ZHANGYUXUAN-zR commited on
Commit
081404f
·
verified ·
1 Parent(s): 82be702

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. parse/train/BkedwoC5t7/BkedwoC5t7.md +357 -0
  2. parse/train/BkedwoC5t7/BkedwoC5t7_content_list.json +1632 -0
  3. parse/train/BkedwoC5t7/BkedwoC5t7_middle.json +0 -0
  4. parse/train/BkedwoC5t7/BkedwoC5t7_model.json +0 -0
  5. parse/train/CaCHjsqCBJV/CaCHjsqCBJV.md +488 -0
  6. parse/train/CaCHjsqCBJV/CaCHjsqCBJV_content_list.json +0 -0
  7. parse/train/CaCHjsqCBJV/CaCHjsqCBJV_middle.json +0 -0
  8. parse/train/CaCHjsqCBJV/CaCHjsqCBJV_model.json +0 -0
  9. parse/train/GitDcBlcg78/GitDcBlcg78.md +266 -0
  10. parse/train/GitDcBlcg78/GitDcBlcg78_content_list.json +1184 -0
  11. parse/train/GitDcBlcg78/GitDcBlcg78_middle.json +0 -0
  12. parse/train/GitDcBlcg78/GitDcBlcg78_model.json +0 -0
  13. parse/train/Hk6kPgZA-/Hk6kPgZA-.md +0 -0
  14. parse/train/Hk6kPgZA-/Hk6kPgZA-_content_list.json +0 -0
  15. parse/train/Hk6kPgZA-/Hk6kPgZA-_middle.json +0 -0
  16. parse/train/Hk6kPgZA-/Hk6kPgZA-_model.json +0 -0
  17. parse/train/HyWrIgW0W/HyWrIgW0W.md +765 -0
  18. parse/train/HyWrIgW0W/HyWrIgW0W_content_list.json +0 -0
  19. parse/train/HyWrIgW0W/HyWrIgW0W_middle.json +0 -0
  20. parse/train/HyWrIgW0W/HyWrIgW0W_model.json +0 -0
  21. parse/train/HyeqPJHYvH/HyeqPJHYvH_middle.json +0 -0
  22. parse/train/HyeqPJHYvH/HyeqPJHYvH_model.json +0 -0
  23. parse/train/S1e4Q6EtDH/S1e4Q6EtDH.md +305 -0
  24. parse/train/S1e4Q6EtDH/S1e4Q6EtDH_content_list.json +1593 -0
  25. parse/train/S1e4Q6EtDH/S1e4Q6EtDH_middle.json +0 -0
  26. parse/train/S1e4Q6EtDH/S1e4Q6EtDH_model.json +0 -0
  27. parse/train/S1lXnhVKPr/S1lXnhVKPr.md +0 -0
  28. parse/train/S1lXnhVKPr/S1lXnhVKPr_content_list.json +0 -0
  29. parse/train/S1lXnhVKPr/S1lXnhVKPr_middle.json +0 -0
  30. parse/train/S1lXnhVKPr/S1lXnhVKPr_model.json +0 -0
  31. parse/train/SJNDWNOlg/SJNDWNOlg.md +234 -0
  32. parse/train/SJNDWNOlg/SJNDWNOlg_content_list.json +1214 -0
  33. parse/train/SJNDWNOlg/SJNDWNOlg_middle.json +0 -0
  34. parse/train/SJNDWNOlg/SJNDWNOlg_model.json +0 -0
  35. parse/train/Skw0n-W0Z/Skw0n-W0Z.md +359 -0
  36. parse/train/Skw0n-W0Z/Skw0n-W0Z_content_list.json +1787 -0
  37. parse/train/Skw0n-W0Z/Skw0n-W0Z_middle.json +0 -0
  38. parse/train/Skw0n-W0Z/Skw0n-W0Z_model.json +0 -0
  39. parse/train/YqYt54gU-XV/YqYt54gU-XV.md +346 -0
  40. parse/train/YqYt54gU-XV/YqYt54gU-XV_content_list.json +1417 -0
  41. parse/train/YqYt54gU-XV/YqYt54gU-XV_middle.json +0 -0
  42. parse/train/YqYt54gU-XV/YqYt54gU-XV_model.json +0 -0
  43. parse/train/mjyMGFL8N2/mjyMGFL8N2.md +331 -0
  44. parse/train/mjyMGFL8N2/mjyMGFL8N2_content_list.json +1449 -0
  45. parse/train/mjyMGFL8N2/mjyMGFL8N2_middle.json +0 -0
  46. parse/train/mjyMGFL8N2/mjyMGFL8N2_model.json +0 -0
  47. parse/train/yNzF41lHYV/yNzF41lHYV.md +361 -0
  48. parse/train/yNzF41lHYV/yNzF41lHYV_content_list.json +1619 -0
  49. parse/train/yNzF41lHYV/yNzF41lHYV_middle.json +0 -0
  50. parse/train/yNzF41lHYV/yNzF41lHYV_model.json +0 -0
parse/train/BkedwoC5t7/BkedwoC5t7.md ADDED
@@ -0,0 +1,357 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FORMAL LIMITATIONS ON THE MEASUREMENT OF MUTUAL INFORMATION
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Motivated by applications to unsupervised learning, we consider the problem of measuring mutual information. Recent analysis has shown that naive kNN estimators of mutual information have serious statistical limitations motivating more refined methods. In this paper we prove that serious statistical limitations are inherent to any measurement method. More specifically, we show that any distributionfree high-confidence lower bound on mutual information cannot be larger than $O ( \ln N )$ where $N$ is the size of the data sample. We also analyze the DonskerVaradhan lower bound on KL divergence in particular and show that, when simple statistical considerations are taken into account, this bound can never produce a high-confidence value larger than $\ln { N }$ . While large high-confidence lower bounds are impossible, in practice one can use estimators without formal guarantees. We suggest expressing mutual information as a difference of entropies and using cross entropy as an entropy estimator. We observe that, although cross entropy is only an upper bound on entropy, cross-entropy estimates converge to the√ true cross entropy at the rate of $1 / \sqrt { N }$ .
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Motivated by maximal mutual information (MMI) predictive coding (McAllester, 2018; Stratos, 2018; Oord et al., 2018), we consider the problem of measuring mutual information. A classical approach to this problem is based on estimating entropies by computing the average log of the distance to the kth nearest neighbor in a sample (Kraskov et al., 2003). It has recently been shown that the classical kNN methods have serious statistical limitations and more refined kNN methods have been proposed (Gao et al., 2014). Here we establish serious statistical limitations on any method of estimating mutual information. More specifically, we show that any distribution-free high-confidence lower bound on mutual information cannot be larger than $O ( \ln N )$ where $N$ is the size of the data sample.
12
+
13
+ Prior to proving the general case, we consider the particular case of the Donsker-Varadhan lower bound on KL divergence (Donsker & Varadhan, 1983; Belghazi et al., 2018). We observe that when simple statistical considerations are taken into account, this bound can never produce a highconfidence value larger than $\ln { N }$ . Similar comments apply to lower bounds based on contrastive estimation. The contrastive estimation lower bound given in Oord et al. (2018) does not establish mutual information of more than $\ln k$ where $k$ is number of negative samples used in the contrastive choice.
14
+
15
+ The difficulties arise in cases where the mutual information $I ( x , y )$ is large. Since $I ( x , y ) =$ $H ( y ) - H ( y | x )$ we are interested in cases where $H ( y )$ is large and $H ( y | x )$ is small. For example consider the mutual information between an English sentence and its French translation. Sampling English and French independently will (almost) never yield two sentences where one is a plausible translation of the other. In this case the DV bound is meaningless and contrastive estimation is trivial. In this example we need a language model for estimating $H ( y )$ and a translation model for estimating $H ( y | x )$ . Language models and translation models are both typically trained with crossentropy loss. Cross-entropy loss can be used as an (upper bound) estimate of entropy and we get an estimate of mutual information as a difference of cross-entropy estimates. Note that the upper-bound guarantee for the cross-entropy estimator yields neither an upper bound nor a lower bound guarantee for a difference of entropies. Similar observations apply to measuring the mutual information for pairs of nearby frames of video or pairs of sound waves for utterances of the same sentence.
16
+
17
+ We are motivated by the problem of maximum mutual information predictive coding (McAllester, 2018; Stratos, 2018; Oord et al., 2018). One can formally define a version of MMI predictive coding by considering a population distribution on pairs $( x , y )$ where we think of $x$ as past raw sensory signals (images or sound waves) and $y$ as a future sensory signal. We consider the problem of learning stochastic coding functions $C _ { x }$ and $C _ { y }$ so as to maximize the mutual information $I ( C _ { x } ( x ) , C _ { y } ( y ) )$ while limiting the entropies $H ( C _ { x } ( x ) )$ and $H ( C _ { y } ( y ) )$ . The intuition is that we want to learn representations $C _ { x } ( x )$ and $C _ { y } ( y )$ that preserve “signal” while removing “noise”. Here signal is simply defined to be a low entropy representation that preserves mutual information with the future. Forms of MMI predictive coding have been independently introduced in (McAllester, 2018) under the name “information-theoretic cotraining” and in (Oord et al., 2018) under the name “contrastive predictive coding”. It is also possible to interpret the local version of DIM (DIM(L)) (Hjelm et al., 2018) as a variant of MMI predictive coding.
18
+
19
+ A closely related framework is the information bottleneck (Tishby et al., 2000). Here one again assumes a population distribution on pairs $( x , y )$ . The objective is to learn a stochastic coding function $C _ { x }$ so as to maximize $I ( C _ { x } ( x ) , y )$ while minimizing $I ( C _ { x } ( x ) , x )$ . Here one does not ask for a coding function on $y$ and one does not limit $H ( C _ { x } ( x ) )$ .
20
+
21
+ Another related framework is INFOMAX (Linsker, 1988; Bell & Sejnowski, 1995; Hjelm et al., 2018). Here we consider a population distribution on a single random variable $x$ . The objective is to learn a stochastic coding function $C _ { x }$ so as to maximize the mutual information $I ( x , C _ { x } ( x ) )$ subject to some constraint or additional objective.
22
+
23
+ As mentioned above, in cases where $I ( C _ { x } ( x ) , C _ { y } ( y ) )$ is large it seems best to train a model of the marginal distribution of $P ( C _ { y } )$ and a model of the conditional distribution $P ( C _ { y } | C _ { x } )$ where both models are trained with cross-entropy loss. Section 5 gives various high confidence upper bounds on cross-entropy loss for learned models. The main point is that, unlike lower bounds on entropy, high-confidence upper bounds on cross-entropy loss can be guaranteed to be close to the true cross entropy.
24
+
25
+ Out theoretical analyses will assume discrete distributions. However, there is no loss of generality in this assumption. Rigorous treatments of probability (measure theory) treat integrals (either Riemann or Lebesgue) as limits of increasingly fine binnings. A continuous density can always be viewed as a limit of discrete distributions. Although our proofs are given for discrete case, all our formal limitations on the measurement of mutual information apply to continuous case as well. See Marsh (2013) for a discussion of continuous information theory. Additional comments on this point are given in section 4.
26
+
27
+ # 2 THE DONSKER-VARADHAN LOWER BOUND
28
+
29
+ Mutual information can be written as a $\mathrm { K L }$ divergence.
30
+
31
+ $$
32
+ I ( X , Y ) = K L ( P _ { X , Y } , P _ { X } P _ { Y } )
33
+ $$
34
+
35
+ Here $P _ { X , Y }$ is a joint distribution on the random variables $X$ and $Y$ and $P _ { X }$ and $P _ { Y }$ are the marginal distributions on $X$ and $Y$ respectively. The DV lower bound applies to KL-divergence generally. To derive the DV bound we start with the following observation for any distributions $P , Q$ , and $G$ on the same support. Our theoretical analyses will assume discrete distributions.
36
+
37
+ $$
38
+ \begin{array} { l l l } { { K L ( P , Q ) } } & { { = } } & { { \displaystyle { E _ { z \sim P } \ \ln \frac { P ( z ) } { { \cal Q } ( z ) } } } } \\ { { } } & { { = } } & { { \displaystyle { E _ { z \sim P } \ \ln \left( \frac { { \cal G } ( z ) } { { \cal Q } ( z ) } \frac { P ( z ) } { { \cal G } ( z ) } \right) } } } \\ { { } } & { { = } } & { { \displaystyle { E _ { z \sim P } \ \ln \frac { { \cal G } ( z ) } { { \cal Q } ( z ) } + K L ( P , G ) } } } \\ { { } } & { { \geq } } & { { \displaystyle { E _ { z \sim P } \ \ln \frac { { \cal G } ( z ) } { { \cal Q } ( z ) } } } } \end{array}
39
+ $$
40
+
41
+ Note that (1) achieves equality for $G ( z ) = P ( z )$ and hence we have
42
+
43
+ $$
44
+ K L ( P , Q ) = \operatorname* { s u p } _ { G } \ E _ { z \in P } \ \ln { \frac { G ( z ) } { Q ( z ) } }
45
+ $$
46
+
47
+ Here we can let $G$ be a parameterized model such that $G ( z )$ can be computed directly. However, we are interested in $K L ( P _ { X , Y } , P _ { X } P _ { Y } )$ where our only access to the distribution $P$ is through sampling. If we draw a pair $( x , y )$ and ignore $y$ we get a sample from $P _ { X }$ . We can similarly sample from $P _ { Y }$ . So we are interested in a KL-divergence $K L ( P , Q )$ where our only access to the distributions $P$ and $Q$ is through sampling. Note that we cannot evaluate (1) by sampling from $P$ because we have no way of computing $Q ( z )$ . But through a change of variables we can convert this to an expression restricted to sampling from $Q$ . More specifically we define $G ( z )$ in terms of an unconstrained function $F ( z )$ as
48
+
49
+ $$
50
+ G ( z ) = \frac { 1 } { Z } Q ( z ) e ^ { F ( z ) } ~ Z = \sum _ { z } Q ( z ) e ^ { F ( z ) } = E _ { z \sim Q } ~ e ^ { F ( z ) }
51
+ $$
52
+
53
+ Substituting (3) into (2) gives
54
+
55
+ $$
56
+ K L ( P , Q ) = \operatorname* { s u p } _ { F } \ E _ { z \sim P } \ F ( z ) - \ln E _ { z \sim Q } \ e ^ { F ( z ) }
57
+ $$
58
+
59
+ Equation (4) is the Donsker-Varadhan lower bound. Applying this to mutual information we get
60
+
61
+ $$
62
+ \begin{array} { l c l } { { I ( X , Y ) } } & { { = } } & { { K L ( P _ { X , Y } , P _ { X } P _ { Y } ) } } \\ { { } } & { { } } & { { } } \\ { { } } & { { = } } & { { \underset { F } { \operatorname* { s u p } } \ E _ { x , y \sim P _ { X , Y } } \ F ( x , y ) - \ln E _ { x \sim P _ { X } , y \sim P _ { Y } } \ e ^ { F ( x , y ) } } } \end{array}
63
+ $$
64
+
65
+ This is the equation underlying the MINE approach to maximizing mutual information (Belghazi et al., 2018). It would seem that we can estimate both terms in (5) through sampling and be able to maximize $I ( X , Y )$ by stochastic gradient ascent on this lower bound.
66
+
67
+ # 3 STATISTICAL LIMITATIONS OF KL-DIVERGENCE LOWER BOUNDS
68
+
69
+ In this section we show that the DV bound (4) cannot be used to measure KL-divergences of more than tens of bits. In fact we will show that no high-confidence distribution-free lower bound on KL divergence can be used for this purpose.
70
+
71
+ As a first observation note that (4) involves $E _ { z \sim Q } ~ e ^ { F ( z ) }$ . This expression has the same form as the moment generating function used in analyzing large deviation probabilities. The utility of expectations of exponentials in large deviation theory is that such expressions can be dominated by extremely rare events (large deviations). The rare events dominating the expectation will never be observed by sampling from $Q$ . It should be noted that the optimal value for $F ( z )$ in (4) is $\ln ( P ( z ) / Q ( z ) )$ in which case the right hand side of (4) simplifies to $K L ( P , Q )$ . But for large KL divergence we will have that $F ( z ) \stackrel { - } { = } \ln ( P ( z ) / Q ( z ) )$ is typically hundreds of bits and this is exactly the case where $E _ { z \sim Q } ~ e ^ { F ( z ) }$ cannot be measured by sampling from $Q$ . If $E _ { z \sim Q } ~ e ^ { F ( z ) }$ is dominated by events that will never occur in sampling from $Q$ then the optimization of $F$ through the use of (4) and sampling from $Q$ cannot possibly lead to a function $F ( z )$ that accurately models the desired function $\ln ( P ( z ) / Q ( z ) )$ .
72
+
73
+ To quantitatively analyze the risk of unseen outlier events we will make use of the following simple lemma where we write $P _ { z \sim Q } ( \Phi [ z ] )$ for the probability over drawing $z$ from $Q$ that the statement $\Phi [ z ]$ holds.
74
+
75
+ Outlier Risk Lemma: For a sample $S ~ \sim ~ Q ^ { N }$ with $N \ \geq \ 2$ , and a property $\Phi [ z ]$ such that $P _ { z \sim Q } ( \Phi [ z ] ) \leq 1 / N$ , the probability over the draw of $S$ that no $z \in S$ satisfies $\Phi [ z ]$ is at least $1 / 4$ .
76
+
77
+ Proof: The probability that $\Phi [ z ]$ is unseen in the sample is at least $( 1 - 1 / N ) ^ { N }$ which is at least $1 / 4$ for $N \geq 2$ and where we have $\begin{array} { r } { \operatorname* { l i m } _ { N \to \infty } ( 1 - 1 / N ) ^ { N ^ { \bullet } } = 1 / e } \end{array}$ . Q.E.D.
78
+
79
+ We can use the outlier risk lemma to perform a quantitative risk analysis of the DV bound (4). We can rewrite (4) as
80
+
81
+ $$
82
+ \begin{array} { r c l } { K L ( P , Q ) } & { \geq } & { { \cal B } ( P , Q , F ) } \\ { { \cal B } ( P , Q , F ) } & { = } & { { \cal E } _ { z \sim P } ~ F ( z ) - \ln { \cal E } _ { z \sim Q } ~ e ^ { F ( z ) } } \end{array}
83
+ $$
84
+
85
+ We can try to estimate $B ( P , Q , G )$ from samples $S _ { P }$ and $S _ { Q }$ , each of size $N$ , from the population distributions $P$ and $Q$ respectively.
86
+
87
+ $$
88
+ \hat { B } ( S _ { P } , S _ { Q } , F ) = \frac { 1 } { N } \sum _ { z \in S _ { P } } F ( z ) - \ln \frac { 1 } { N } \sum _ { z \in S _ { Q } } e ^ { F ( z ) }
89
+ $$
90
+
91
+ While $B ( P , Q , F )$ is a lower bound on $K L ( P , Q )$ , the sample estimate $\hat { B } ( S _ { P } , S _ { Q } , F )$ is not. To get a high confidence lower bound on $K L ( P , Q )$ we have to handle unseen outlier risk. For a fair comparison with our analysis of cross-entropy estimators in section 5, we will limit the outlier risk by bounding $F ( z )$ to the interval $[ 0 , F _ { \mathrm { m a x } } ]$ . The largest possible value of $\hat { B } ( S _ { P } , S _ { q } , F )$ occurs when $F ( z ) = F _ { \operatorname* { m a x } }$ for all $z \in S _ { P }$ and $F ( z ) = 0$ for all $z \in S _ { Q }$ . In this case we get $\hat { B } ( S _ { P } , S _ { Q } , F ) =$ $F _ { \mathrm { m a x } }$ . But by the outlier risk lemma there is still at least a 1/4 probability that
92
+
93
+ $$
94
+ E _ { z \sim Q } ~ e ^ { F ( z ) } \geq \frac { 1 } { N } e ^ { F _ { \mathrm { m a x } } } .
95
+ $$
96
+
97
+ Any high confidence lower bound $\tilde { B } ( S _ { P } , S _ { Q } , F )$ must account for the unseen outlier risk. In particular we must have
98
+
99
+ $$
100
+ \begin{array} { r c l } { \tilde { B } ( S _ { P } , S _ { Q } , F ) } & { \leq } & { F _ { \operatorname* { m a x } } - \ln \frac { e ^ { F _ { \operatorname* { m a x } } } } { N } } \\ & & { } & \\ & { = } & { \ln N } \end{array}
101
+ $$
102
+
103
+ Our negative results can be strengthened by considering the preliminary bound (1) where $G ( z )$ is viewed as a model of $P ( z )$ . We can consider the extreme case of perfect modeling of the population $P$ with a model $G ( z )$ where $G ( z )$ is computable. In this case we have essentially complete access to the distribution $P$ . But even in this setting we have the following negative result.
104
+
105
+ Theorem 1 Let $B$ be any distribution-free high-confidence lower bound on $K L ( P , Q )$ computed with complete knowledge of $P$ but only a sample from $Q$ .
106
+
107
+ More specifically, let $B ( P , S , \delta )$ be any real-valued function of a distribution $P$ , a multiset $S$ , and $a$ confidence parameter $\delta$ such that, for any $P$ , $Q$ and $\delta$ , with probability at least $( 1 - \delta )$ over a draw of $S$ from $Q ^ { N }$ we have
108
+
109
+ $$
110
+ K L ( P , Q ) \ge B ( P , S , \delta ) .
111
+ $$
112
+
113
+ For any such bound, and for $N \geq 2$ , with probability at least $1 - 4 \delta$ over the draw of $S$ from $Q ^ { N }$ we have
114
+
115
+ $$
116
+ B ( P , S , \delta ) \leq \ln { N } .
117
+ $$
118
+
119
+ Proof. Consider distributions $P$ and $Q$ and $N \geq 2$ . Define $\tilde { Q }$ by
120
+
121
+ $$
122
+ \tilde { Q } ( z ) = \left( 1 - \frac { 1 } { N } \right) Q ( z ) + \frac { 1 } { N } P ( z ) .
123
+ $$
124
+
125
+ We now have $K L ( P , { \tilde { Q } } ) \leq \ln N$ . We will prove that from a sample $S \sim Q ^ { N }$ we cannot reliably distinguish between $Q$ and $\tilde { Q }$ .
126
+
127
+ We first note that by applying the high-confidence guarantee of the bound to $\tilde { Q }$ have
128
+
129
+ $$
130
+ P _ { S \sim \tilde { Q } ^ { N } } ( B ( P , S , \delta ) \leq K L ( P , \tilde { Q } ) ) \geq 1 - \delta .
131
+ $$
132
+
133
+ The distribution $\tilde { Q }$ equals the marginal on $z$ of a distribution on pairs $( s , z )$ where $s$ is the value of Bernoulli variable with bias $1 / N$ such that if $s = 1$ then $z$ is drawn from $P$ and otherwise $z$ is drawn
134
+
135
+ from $Q$ . By the outlier risk lemma the probability that all coins are zero is at least 1/4. Conditioned on all coins being zero the distributions $\tilde { Q } ^ { N }$ and $Q ^ { N }$ are the same. Let $\mathrm { P u r e } ( S )$ represent the event that all coins are 0 and let $\operatorname { S m a l l } ( S )$ represent the event that $B ( P , S , \delta ) \leq \ln { N }$ . We now have
136
+
137
+ $$
138
+ \begin{array} { r l } { P _ { S \sim Q ^ { N } } ( \mathrm { S n a l l } ( \mathrm { S } ) ) } & { = \phantom { P } P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { S n a l l } ( S ) ) \mathrm { P u r e } ( S ) ) } \\ { = } & { \frac { P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { P u r e } ( S ) \times \mathrm { S u n a l } ( \mathrm { S } ) ) } { P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { P u r e } ( S ) ) } } \\ { \ge } & { \frac { P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { P u r e } ( S ) ) - P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { - S u n a l l } ( \mathrm { S } ) ) } { P _ { S \sim Q ^ { N } } ( \mathrm { P u r e } ( S ) ) } } \\ { \ge } & { \frac { P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { P u r e } ( S ) ) - \hat { Q } } { P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { P u r e } ( S ) ) } } \\ { = } & { \frac { P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { P u r e } ( S ) ) - \hat { Q } } { P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { P u r e } ( S ) ) } } \\ { = } & { 1 - \frac { \hat { Q } } { P _ { S \sim \hat { Q } ^ { N } } ( \mathrm { P u r e } ( S ) ) } } \\ { \ge } & { 1 - 4 \delta . } \end{array}
139
+ $$
140
+
141
+ # 4 STATISTICAL LIMITATIONS ON ENTROPY LOWER BOUNDS
142
+
143
+ Mutual information is a special case of KL-divergence. It is possible that tighter lower bounds can be given in this special case. In this section we show similar limitations on lower bounding mutual information. We first note that a lower bound on mutual information implies a lower bound on entropy. The mutual information between $X$ and $Y$ cannot be larger than information content of $X$ alone.
144
+
145
+ $$
146
+ I ( X , Y ) = H ( X ) - H ( X | Y ) \leq H ( X )
147
+ $$
148
+
149
+ So a lower bound on $I ( X , Y )$ gives a lower bound on $H ( X )$ . We show that any distribution-free high-confidence lower bound on entropy requires a sample size exponential in the size of the bound.
150
+
151
+ The above argument seems problematic for the case of continuous densities as differential entropy can be negative. However, for the continuous case we have
152
+
153
+ $$
154
+ I ( x , y ) = \operatorname* { s u p } _ { C _ { x } , C _ { y } } I ( C _ { x } ( x ) , C _ { y } ( y ) )
155
+ $$
156
+
157
+ where $C _ { x }$ and $C _ { y }$ range over all maps from the underlying continuous space to discrete sets (all binnings of the continuous space). Hence an $O ( \ln N )$ upper bound on the measurement of mutual information for the discrete case applies to the continuous case as well.
158
+
159
+ The type of a sample $S$ , denoted $\mathcal { T } ( S )$ , is defined to be a function on positive integers (counts) where $\bar { \mathcal { T } } ( S ) ( i )$ is the number of elements of $S$ that occur $i$ times in $S$ . For a sample of $N$ draws we have $\begin{array} { r } { \tilde { N } \stackrel { \cdot } { = } \sum _ { i } i \mathcal { T } ( S ) ( i ) } \end{array}$ . The type $\mathcal { T } ( S )$ contains all information relevant to estimating the actual probability of the items of a given count and of estimating the entropy of the underlying distribution. The problem of estimating distributions and entropies from sample types has been investigated by various authors (McAllester & Schapire, 2000; Orlitsky et al., 2003; Orlitsky & Suresh, 2015; Arora et al., 2018). Here we give the following negative result on lower bounding the entropy of a distribution by sampling.
160
+
161
+ Theorem 2 Let $B$ be any distribution-free high-confidence lower bound on $H ( P )$ computed from a sample type T (S) with S ∼ P N .
162
+
163
+ More specifically, let $B ( \tau , \delta )$ be any real-valued function of a type $\tau$ and a confidence parameter $\delta$ such that for any $P$ , with probability at least $( 1 - \delta )$ over a draw of $S$ from $P ^ { \tilde { N } }$ , we have
164
+
165
+ $$
166
+ H ( P ) \geq B ( { \mathcal { T } } ( S ) , \delta ) .
167
+ $$
168
+
169
+ For any such bound, and for $N \geq 5 0$ and $k \geq 2$ , with probability at least $1 - \delta - 1 . 0 1 / k$ over the draw of $S$ from $P ^ { N }$ we have
170
+
171
+ $$
172
+ B ( { \mathcal { T } } ( S ) , \delta ) \leq \ln 2 k N ^ { 2 } .
173
+ $$
174
+
175
+ Proof: Consider a distribution $P$ and $N \geq 1 0 0$ . If the support of $P$ has fewer than $2 k N ^ { 2 }$ elements then $H ( P ) < \ln 2 k N ^ { 2 }$ and by the premise of the theorem we have that, with probability at least $1 - \delta$ over the draw of $S$ , $B ( { \dot { \mathcal { T } } } ( S ) , { \bar { \delta } } ) \leq H ( P )$ and the theorem follows. If the support of $P$ has at least $2 k N ^ { 2 }$ elements then we sort the support of $P$ into a (possibly infinite) sequence $x _ { 1 } , \ x _ { 2 } , \ x _ { 3 } , . . . .$ so that $P ( x _ { i } ) \geq P ( x _ { i + 1 } )$ . We then define a distribution $\tilde { P }$ on the elements $x _ { 1 }$ $, \ldots , x _ { 2 k N ^ { 2 } }$ by
176
+
177
+ $$
178
+ \tilde { P } ( x _ { i } ) = \left( \begin{array} { l l } { { P ( x _ { i } ) } } & { { \mathrm { f o r } i \leq k N ^ { 2 } } } \\ { { } } & { { } } \\ { { \frac { P ( i > k N ^ { 2 } ) } { k N ^ { 2 } } } } & { { \mathrm { f o r } k N ^ { 2 } < i \leq 2 k N ^ { 2 } } } \end{array} \right)
179
+ $$
180
+
181
+ We will let $\operatorname { S m a l l } ( S )$ denote the event that $B ( \mathcal T ( S ) , \delta ) \le \ln 2 k N ^ { 2 }$ and let ${ \mathrm { P u r e } } ( S )$ abbreviate the event that no element $x _ { i }$ for $i > k N ^ { 2 }$ occurs twice in the sample. Since $\tilde { P }$ has a support of size $2 k N ^ { 2 }$ we have $H ( \tilde { P } ) \leq \ln 2 k N ^ { 2 }$ . Applying the premise of the lemma to $\tilde { P }$ gives
182
+
183
+ $$
184
+ P _ { S \sim \tilde { P } ^ { N } } ( \operatorname { S m a l l } ( S ) ) \geq 1 - \delta
185
+ $$
186
+
187
+ For a type $\tau$ let $P _ { S \sim P ^ { N } } ( \mathcal { T } )$ denote the probability over drawing $S \sim P ^ { N }$ that $\mathcal { T } ( S ) = \mathcal { T }$ . We now have
188
+
189
+ $$
190
+ P _ { S \sim P ^ { N } } ( \mathcal { T } | \mathrm { P u r e } ( S ) ) = P _ { S \sim \tilde { P } ^ { N } } ( \mathcal { T } | \mathrm { P u r e } ( S ) ) .
191
+ $$
192
+
193
+ This gives the following.
194
+
195
+ $$
196
+ \begin{array} { r c l } { P _ { S \sim P ^ { N } } ( \mathrm { S m a l l } ( S ) ) } & { \geq } & { P _ { S \sim P ^ { N } } ( \mathrm { P u r e } ( S ) \wedge \mathrm { S m a l l } ( S ) ) } \\ & { = } & { P _ { S \sim P ^ { N } } ( \mathrm { P u r e } ( S ) ) P _ { S \sim P ^ { N } } ( \mathrm { S m a l l } ( S ) \mid \mathrm { P u r e } ( S ) ) } \\ & { = } & { P _ { S \sim P ^ { N } } ( \mathrm { P u r e } ( S ) ) P _ { S \sim \tilde { P } ^ { N } } ( \mathrm { S m a l l } ( S ) \mid \mathrm { P u r e } ( S ) ) } \\ & { \geq } & { P _ { S \sim P ^ { N } } ( \mathrm { P u r e } ( S ) ) P _ { S \sim \tilde { P } ^ { N } } ( \mathrm { P u r e } ( S ) \wedge \mathrm { S m a l l } ( S ) ) } \end{array}
197
+ $$
198
+
199
+ For $i > k N ^ { 2 }$ we have $\tilde { P } ( x _ { i } ) \leq 1 / ( k N ^ { 2 } )$ which gives
200
+
201
+ $$
202
+ P _ { S \sim \tilde { P } ^ { N } } ( \mathrm { P u r e } ( S ) ) \geq \prod _ { j = 1 } ^ { N - 1 } \left( 1 - \frac { j } { k N ^ { 2 } } \right)
203
+ $$
204
+
205
+ Using $( 1 - P ) \ge e ^ { - 1 . 0 1 \ P }$ for $P \leq 1 / 1 0 0$ we have the following birthday paradox calculation.
206
+
207
+ $$
208
+ \begin{array} { l c l } { { \ln P _ { S \sim \tilde { P } ^ { N } } ( \mathrm { P u r e } ( S ) ) } } & { { \geq } } & { { \displaystyle - \frac { 1 . 0 1 } { k N ^ { 2 } } \sum _ { j = 1 } ^ { N - 1 } j } } \\ { { } } & { { } } & { { } } \\ { { \displaystyle } } & { { = } } & { { \displaystyle - \frac { 1 . 0 1 } { k N ^ { 2 } } \frac { ( N - 1 ) N } { 2 } \ ~ } } \\ { { } } & { { \geq } } & { { \displaystyle - 5 0 5 / k } } \\ { { P _ { S \sim \tilde { P } ^ { N } } ( \mathrm { P u r e } ( S ) ) } } & { { \geq } } & { { \displaystyle e ^ { - . 5 0 5 / k } \geq 1 - . 5 0 5 / k } } \end{array}
209
+ $$
210
+
211
+ Applying the union bound to (7) and (9) gives.
212
+
213
+ $$
214
+ P _ { S \sim \tilde { P } ^ { N } } ( \mathrm { P u r e } ( S ) \wedge \mathrm { S m a l l } ( S ) ) \geq 1 - \delta - . 5 0 5 / k
215
+ $$
216
+
217
+ By a derivation similar to that of (9) we get
218
+
219
+ $$
220
+ P _ { S \sim P ^ { N } } ( \mathrm { P u r e } ( S ) ) \geq 1 - . 5 0 5 / k
221
+ $$
222
+
223
+ Combining (8), (10) and (11) gives
224
+
225
+ $$
226
+ P _ { S \sim P ^ { N } } ( \operatorname { S m a l l } ( S ) ) \geq 1 - \delta - 1 . 0 1 / k
227
+ $$
228
+
229
+ # 5 CROSS ENTROPY AS AN ENTROPY ESTIMATOR
230
+
231
+ Since mutual information can be expressed as a difference of entropies, the problem of measuring mutual information can be reduced to the problem of measuring entropies. In this section we show that, unlike high-confidence distribution-free lower bounds, high-confidence distribution-free upper bounds on entropy can approach the true cross entropy at modest sample sizes even when the true cross entropy is large. More specifically we consider the cross-entropy upper bound.
232
+
233
+ $$
234
+ \begin{array} { l l l } { \displaystyle H ( P ) } & { = } & { \displaystyle { E _ { x \sim P } \ln \frac { 1 } { P ( x ) } } } \\ { \displaystyle } & { = } & { \displaystyle E _ { x \sim P } \ln \left( \frac { 1 } { G ( x ) } \frac { G ( x ) } { P ( x ) } \right) } \\ { \displaystyle } & { = } & { \displaystyle H ( P , G ) - K L ( P , G ) } \\ { \displaystyle } & { \le } & { \displaystyle H ( P , G ) } \end{array}
235
+ $$
236
+
237
+ For $G = P$ we get ${ \cal H } ( P , G ) = { \cal H } ( P )$ and hence we have
238
+
239
+ $$
240
+ H ( P ) = \operatorname* { i n f } _ { G } ~ H ( P , G )
241
+ $$
242
+
243
+ In practice $P$ is a population distribution and $G$ is model of $P$ . For example $P$ might be a population distribution on paragraphs and $G$ might be an autoregressive RNN language model. In practice $G$ will be given by a network with parameters $\Phi$ . In this setting we have the following upper bound entropy estimator.
244
+
245
+ $$
246
+ \hat { H } ( P ) \quad = \quad \underset { \Phi } { \operatorname* { i n f } } H ( P , G _ { \Phi } )
247
+ $$
248
+
249
+ The gap between ${ \hat { H } } ( P )$ and $H ( P )$ depends on the expressive power of the model class.
250
+
251
+ The statistical limitations on distribution-free high-confidence lower bounds on entropy do not arise for cross-entropy upper bounds. For upper bounds we can show that naive sample estimates of the cross-entropy loss produce meaningful (large entropy) results. We first define the cross-entropy estimator from a sample $S$ .
252
+
253
+ $$
254
+ { \hat { H } } ( S , G ) = { \frac { 1 } { | S | } } \sum _ { x \in S } - \ln G ( x )
255
+ $$
256
+
257
+ We can bound the loss of a model $G$ by ensuring a minimum probability $e ^ { - F _ { \operatorname* { m a x } } }$ where $F _ { \mathrm { m a x } }$ is then the maximum possible log loss in the cross-entropy objective. In language modeling a loss bound exists for any model that ultimately backs off to a uniform distribution on characters. Given a loss bound of $F _ { \mathrm { m a x } }$ we have that ${ \hat { H } } ( S , G )$ is just the standard sample mean estimator of an expectation of a bounded variable. In this case we have the following standard confidence interval.
258
+
259
+ Theorem 3 For any population distribution $P$ , and model distribution $G$ with $- l n G ( x )$ bounded to the interval $[ 0 , F _ { \mathrm { m a x } } ]$ , with probability at least $1 - \delta$ over the draw of $S \sim P ^ { N }$ we have
260
+
261
+ $$
262
+ H ( P , G ) \in { \hat { H } } ( S , G ) \pm F _ { \operatorname* { m a x } } { \sqrt { \frac { \ln { \frac { 2 } { \delta } } } { 2 N } } }
263
+ $$
264
+
265
+ It is also possible to give PAC-Bayesian bounds on ${ \cal H } ( P , G _ { \Phi } )$ that take into account the fact that $G _ { \Phi }$ is typically trained so as to minimize the empirical loss on the training data. The PAC-Bayesian bounds apply to“broad basin” losses and loss estimates such as the following.
266
+
267
+ $$
268
+ \begin{array} { r c l } { { { \cal H } _ { \sigma } ( S , G _ { \Phi } ) } } & { { = } } & { { E _ { x \sim P } ~ E _ { \epsilon \sim N ( 0 , \sigma I ) } ~ - \ln ~ G _ { \Phi + \epsilon } ( x ) } } \\ { { \hat { H } _ { \sigma } ( S , G _ { \Phi } ) } } & { { = } } & { { \displaystyle { \frac { 1 } { | S | } \sum _ { x \in S } ~ E _ { \epsilon \sim N ( 0 , \sigma I ) } ~ - \ln ~ G _ { \Phi + \epsilon } ( x ) } } } \end{array}
269
+ $$
270
+
271
+ Under mild smoothness conditions on $G _ { \Phi } ( x )$ as a function of $\Phi$ we have
272
+
273
+ $$
274
+ \begin{array} { r c l } { { \displaystyle \operatorname * { l i m } _ { \sigma \to 0 } ~ H _ { \sigma } ( P , G _ { \Phi } ) } } & { { = } } & { { H ( P , G _ { \Phi } ) } } \\ { { \displaystyle \operatorname * { l i m } _ { \sigma \to 0 } ~ \hat { H } _ { \sigma } ( S , G _ { \Phi } ) } } & { { = } } & { { \hat { H } ( S , G _ { \Phi } ) } } \end{array}
275
+ $$
276
+
277
+ An L2 PAC-Bayesian generalization bound (McAllester (2013)) gives that for any parameterized class of models and any bounded notion of loss, and any $\lambda > 1 / 2$ and $\sigma > 0$ , with probability at least $1 - \delta$ over the draw of $S$ from $P ^ { N }$ we have the following simultaneously for all parameter vectors $\Phi$ .
278
+
279
+ $$
280
+ H _ { \sigma } ( P , G _ { \Phi } ) \leq \frac { 1 } { 1 - \frac { 1 } { 2 \lambda } } \left( \hat { H } _ { \sigma } ( S , G _ { \Phi } ) + \frac { \lambda F _ { \operatorname* { m a x } } } { N } \left( \frac { | | \Phi | | ^ { 2 } } { 2 \sigma ^ { 2 } } + \ln \frac { 1 } { \delta } \right) \right)
281
+ $$
282
+
283
+ It is instructive to set $\lambda = 5$ in which case the bound becomes.
284
+
285
+ $$
286
+ H _ { \sigma } ( P , G _ { \Phi } ) \leq \frac { 1 0 } { 9 } \left( \hat { H } _ { \sigma } ( S , G _ { \Phi } ) + \frac { 5 F _ { \operatorname* { m a x } } } { N } \left( \frac { | | \Phi | | ^ { 2 } } { 2 \sigma ^ { 2 } } + \ln \frac { 1 } { \delta } \right) \right)
287
+ $$
288
+
289
+ While this bound is linear in $1 / N$ , and tighter in practice than square root bounds, note that there is a small residual gap when holding $\lambda$ fixed at 5 while taking $N \to \infty$ . In practice the regularization parameter $\lambda$ can be tuned on holdout data. One point worth noting is the form of the dependence of the regularization coefficient on $F _ { \mathrm { m a x } }$ , $N$ and the basin parameter $\sigma$ .
290
+
291
+ It is also worth noting that the bound can be given in terms of “distance traveled” in parameter space from an initial (random) parameter setting $\Phi _ { 0 }$ .
292
+
293
+ $$
294
+ H _ { \sigma } ( P , G _ { \Phi } ) \leq { \frac { 1 0 } { 9 } } \left( { \hat { H } } _ { \sigma } ( S , G _ { \Phi } ) + { \frac { 5 F _ { \operatorname* { m a x } } } { N } } \left( { \frac { | | \Phi - \Phi _ { 0 } | | ^ { 2 } } { 2 \sigma ^ { 2 } } } + \ln { \frac { 1 } { \delta } } \right) \right)
295
+ $$
296
+
297
+ Evidence is presented in Dziugaite & Roy (2017) that the distance traveled bounds are tighter in practice than traditional L2 generalization bounds.
298
+
299
+ # 6 MMI PREDICTIVE CODING
300
+
301
+ Recall that in MMI predictive coding we assume a population distribution on pairs $( x , y )$ where we think of $x$ as past raw sensory signals (images or sound waves) and $y$ as a future sensory signal. We then consider the problem of learning stochastic coding functions $C _ { x }$ and $C _ { y }$ that maximizes the mutual information $I ( C _ { x } ( x ) , C _ { y } ( y ) )$ while limiting the entropies $H ( C _ { x } ( x ) )$ and $H ( C _ { y } ( y ) )$ . Here we propose representing the mutual information as a difference of entropies.
302
+
303
+ $$
304
+ I ( C _ { x } ( x ) , C _ { y } ( y ) ) = H ( C _ { y } ( y ) ) - H ( C _ { y } ( y ) | C _ { x } ( x ) )
305
+ $$
306
+
307
+ When the coding functions are parameterized by a function $\Psi$ , the above quantities become a function of $\Psi$ . We can then formulate the following nested optimization problem.
308
+
309
+ $$
310
+ \begin{array} { r c l } { \Psi ^ { * } } & { = } & { \underset { \Psi } { \mathrm { a r g m a x } } \ \hat { H } ( C _ { y } ( y ) ; \ \Psi ) - \hat { H } ( C _ { y } ( y ) | C _ { x } ( x ) ; \Psi ) } \\ & & \\ { \hat { H } ( C _ { y } ( y ) ; \ \Psi ) } & { = } & { \underset { \Theta } { \mathrm { i n f } } \ H ( C _ { y } ( y ) , G _ { \Theta } ; \ \Psi ) } \\ { \hat { H } ( C _ { y } ( y ) | C _ { x } ( x ) ; \ \Psi ) } & { = } & { \underset { \Phi } { \mathrm { i n f } } \ H ( C _ { y } ( y ) , G _ { \Phi } | C _ { x } ( x ) ; \ \Psi ) } \end{array}
311
+ $$
312
+
313
+ The above quantities are expectations over the population distribution on pairs $( x , y )$ . In practice we have only a finite sample form the population. But the preceding section presents theoretical evidence that, unlike lower bound estimators, upper bound cross-entropy estimators can meaningfully estimate large entropies from feasible samples.
314
+
315
+ # 7 CONCLUSIONS
316
+
317
+ Maximum mutual information (MMI) predictive coding seems well motivated as a method of unsupervised pretraining of representations that maintain semantic signal while dropping uninformative noise. However, the maximization of mutual information is a difficult training objective. We have given theoretical arguments that representing mutual information as a difference of entropies, and estimating those entropies by minimizing cross-entropy loss, is a more statistically justified approach than maximizing a lower bound on mutual information.
318
+
319
+ Unfortunately cross-entropy upper bounds on entropy fail to provide either upper or lower bounds on mutual information — mutual information is a difference of entropies. We cannot rule out the possible existence of superintelligent models, models beyond current expressive power, that dramatically reduce cross-entropy loss. Lower bounds on entropy can be viewed as proofs of the non-existence of superintelligence. We should not surprised that such proofs are infeasible.
320
+
321
+ # REFERENCES
322
+
323
+ Sanjeev Arora, Andrej Risteski, and Yi Zhang. Do gans learn the distribution? some theory and empirics. ICLR, 2018.
324
+
325
+ Ishmael Belghazi, Sai Rajeswar, Aristide Baratin, R Devon Hjelm, and Aaron Courville. Mine: mutual information neural estimation. arXiv preprint arXiv:1801.04062, 2018.
326
+
327
+ Anthony J Bell and Terrence J Sejnowski. An information-maximization approach to blind separation and blind deconvolution. Neural computation, 7(6):1129–1159, 1995.
328
+
329
+ M. Donsker and S. Varadhan. Asymptotic evaluation of certain markov process expectations for large time, iv. Communications on Pure and Applied Mathematics, 36(2):183–212, 1983.
330
+
331
+ Gintare Karolina Dziugaite and Daniel M. Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv:1703.11008, 2017.
332
+
333
+ Shuyang Gao, Greg Ver Steeg, and Aram Galstyan. Efficient estimation of mutual information for strongly dependent variables. arXiv preprint arXiv:1411.2003, 2014.
334
+
335
+ R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. arXiv preprint arXiv:1808.06670, 2018.
336
+
337
+ Alexander Kraskov, Harald Stoegbaue, and Peter Grassberger. Estimating mutual information. arXiv preprint arXiv:cond-mat/0305641, 2003.
338
+
339
+ Ralph Linsker. Self-organization in a perceptual network. Computer, 21(3):105–117, 1988.
340
+
341
+ Charles Marsh. Introduction to continuous entropy. www.crmarsh.com/static/pdf/Charles Marsh Continuous Entropy.pdf, 2013.
342
+
343
+ David McAllester. A pac-bayesian tutorial with a dropout bound. arXiv preprint arXiv:1307:2118, 2013.
344
+
345
+ David McAllester. Information Theoretic Co-Training. arXiv preprint arXiv:1802.07572, 2018.
346
+
347
+ David McAllester and Robert Schapire. On the convergence rate of good-turing estimators. COLT, 2000.
348
+
349
+ Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
350
+
351
+ Alon Orlitsky and Ananda Theertha Suresh. Competitive distribution estimation: Why is goodturing good. NIPS, 2015.
352
+
353
+ Alon Orlitsky, Narayana Santhanam, and Junan Zhang1. Always good turing: Asymptotically optimal probability estimation. Science, 302(5644), 2003.
354
+
355
+ Karl Stratos. Mutual information maximization for simple and accurate part-of-speech induction. arXiv preprint arXiv:1804.07849, 2018.
356
+
357
+ Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. arXiv preprint physics/0004057, 2000.
parse/train/BkedwoC5t7/BkedwoC5t7_content_list.json ADDED
@@ -0,0 +1,1632 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "FORMAL LIMITATIONS ON THE MEASUREMENT OF MUTUAL INFORMATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 196,
8
+ 98,
9
+ 803,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 392,
19
+ 170,
20
+ 606,
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
+ 250
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Motivated by applications to unsupervised learning, we consider the problem of measuring mutual information. Recent analysis has shown that naive kNN estimators of mutual information have serious statistical limitations motivating more refined methods. In this paper we prove that serious statistical limitations are inherent to any measurement method. More specifically, we show that any distributionfree high-confidence lower bound on mutual information cannot be larger than $O ( \\ln N )$ where $N$ is the size of the data sample. We also analyze the DonskerVaradhan lower bound on KL divergence in particular and show that, when simple statistical considerations are taken into account, this bound can never produce a high-confidence value larger than $\\ln { N }$ . While large high-confidence lower bounds are impossible, in practice one can use estimators without formal guarantees. We suggest expressing mutual information as a difference of entropies and using cross entropy as an entropy estimator. We observe that, although cross entropy is only an upper bound on entropy, cross-entropy estimates converge to the√ true cross entropy at the rate of $1 / \\sqrt { N }$ . ",
40
+ "bbox": [
41
+ 233,
42
+ 270,
43
+ 764,
44
+ 479
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 178,
54
+ 513,
55
+ 336,
56
+ 530
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Motivated by maximal mutual information (MMI) predictive coding (McAllester, 2018; Stratos, 2018; Oord et al., 2018), we consider the problem of measuring mutual information. A classical approach to this problem is based on estimating entropies by computing the average log of the distance to the kth nearest neighbor in a sample (Kraskov et al., 2003). It has recently been shown that the classical kNN methods have serious statistical limitations and more refined kNN methods have been proposed (Gao et al., 2014). Here we establish serious statistical limitations on any method of estimating mutual information. More specifically, we show that any distribution-free high-confidence lower bound on mutual information cannot be larger than $O ( \\ln N )$ where $N$ is the size of the data sample. ",
63
+ "bbox": [
64
+ 174,
65
+ 547,
66
+ 825,
67
+ 672
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Prior to proving the general case, we consider the particular case of the Donsker-Varadhan lower bound on KL divergence (Donsker & Varadhan, 1983; Belghazi et al., 2018). We observe that when simple statistical considerations are taken into account, this bound can never produce a highconfidence value larger than $\\ln { N }$ . Similar comments apply to lower bounds based on contrastive estimation. The contrastive estimation lower bound given in Oord et al. (2018) does not establish mutual information of more than $\\ln k$ where $k$ is number of negative samples used in the contrastive choice. ",
74
+ "bbox": [
75
+ 174,
76
+ 680,
77
+ 825,
78
+ 777
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "The difficulties arise in cases where the mutual information $I ( x , y )$ is large. Since $I ( x , y ) =$ $H ( y ) - H ( y | x )$ we are interested in cases where $H ( y )$ is large and $H ( y | x )$ is small. For example consider the mutual information between an English sentence and its French translation. Sampling English and French independently will (almost) never yield two sentences where one is a plausible translation of the other. In this case the DV bound is meaningless and contrastive estimation is trivial. In this example we need a language model for estimating $H ( y )$ and a translation model for estimating $H ( y | x )$ . Language models and translation models are both typically trained with crossentropy loss. Cross-entropy loss can be used as an (upper bound) estimate of entropy and we get an estimate of mutual information as a difference of cross-entropy estimates. Note that the upper-bound guarantee for the cross-entropy estimator yields neither an upper bound nor a lower bound guarantee for a difference of entropies. Similar observations apply to measuring the mutual information for pairs of nearby frames of video or pairs of sound waves for utterances of the same sentence. ",
85
+ "bbox": [
86
+ 174,
87
+ 785,
88
+ 825,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 173,
98
+ 103,
99
+ 823,
100
+ 132
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "We are motivated by the problem of maximum mutual information predictive coding (McAllester, 2018; Stratos, 2018; Oord et al., 2018). One can formally define a version of MMI predictive coding by considering a population distribution on pairs $( x , y )$ where we think of $x$ as past raw sensory signals (images or sound waves) and $y$ as a future sensory signal. We consider the problem of learning stochastic coding functions $C _ { x }$ and $C _ { y }$ so as to maximize the mutual information $I ( C _ { x } ( x ) , C _ { y } ( y ) )$ while limiting the entropies $H ( C _ { x } ( x ) )$ and $H ( C _ { y } ( y ) )$ . The intuition is that we want to learn representations $C _ { x } ( x )$ and $C _ { y } ( y )$ that preserve “signal” while removing “noise”. Here signal is simply defined to be a low entropy representation that preserves mutual information with the future. Forms of MMI predictive coding have been independently introduced in (McAllester, 2018) under the name “information-theoretic cotraining” and in (Oord et al., 2018) under the name “contrastive predictive coding”. It is also possible to interpret the local version of DIM (DIM(L)) (Hjelm et al., 2018) as a variant of MMI predictive coding. ",
107
+ "bbox": [
108
+ 173,
109
+ 138,
110
+ 825,
111
+ 306
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "A closely related framework is the information bottleneck (Tishby et al., 2000). Here one again assumes a population distribution on pairs $( x , y )$ . The objective is to learn a stochastic coding function $C _ { x }$ so as to maximize $I ( C _ { x } ( x ) , y )$ while minimizing $I ( C _ { x } ( x ) , x )$ . Here one does not ask for a coding function on $y$ and one does not limit $H ( C _ { x } ( x ) )$ . ",
118
+ "bbox": [
119
+ 174,
120
+ 311,
121
+ 825,
122
+ 369
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Another related framework is INFOMAX (Linsker, 1988; Bell & Sejnowski, 1995; Hjelm et al., 2018). Here we consider a population distribution on a single random variable $x$ . The objective is to learn a stochastic coding function $C _ { x }$ so as to maximize the mutual information $I ( x , C _ { x } ( x ) )$ subject to some constraint or additional objective. ",
129
+ "bbox": [
130
+ 174,
131
+ 375,
132
+ 825,
133
+ 431
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "As mentioned above, in cases where $I ( C _ { x } ( x ) , C _ { y } ( y ) )$ is large it seems best to train a model of the marginal distribution of $P ( C _ { y } )$ and a model of the conditional distribution $P ( C _ { y } | C _ { x } )$ where both models are trained with cross-entropy loss. Section 5 gives various high confidence upper bounds on cross-entropy loss for learned models. The main point is that, unlike lower bounds on entropy, high-confidence upper bounds on cross-entropy loss can be guaranteed to be close to the true cross entropy. ",
140
+ "bbox": [
141
+ 173,
142
+ 438,
143
+ 825,
144
+ 522
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "Out theoretical analyses will assume discrete distributions. However, there is no loss of generality in this assumption. Rigorous treatments of probability (measure theory) treat integrals (either Riemann or Lebesgue) as limits of increasingly fine binnings. A continuous density can always be viewed as a limit of discrete distributions. Although our proofs are given for discrete case, all our formal limitations on the measurement of mutual information apply to continuous case as well. See Marsh (2013) for a discussion of continuous information theory. Additional comments on this point are given in section 4. ",
151
+ "bbox": [
152
+ 173,
153
+ 529,
154
+ 825,
155
+ 627
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "2 THE DONSKER-VARADHAN LOWER BOUND ",
162
+ "text_level": 1,
163
+ "bbox": [
164
+ 174,
165
+ 646,
166
+ 570,
167
+ 662
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Mutual information can be written as a $\\mathrm { K L }$ divergence. ",
174
+ "bbox": [
175
+ 174,
176
+ 676,
177
+ 532,
178
+ 690
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "equation",
184
+ "img_path": "images/30d3183b471228dfd5049c31366942f332977253529067eaa1a03463e6378c10.jpg",
185
+ "text": "$$\nI ( X , Y ) = K L ( P _ { X , Y } , P _ { X } P _ { Y } )\n$$",
186
+ "text_format": "latex",
187
+ "bbox": [
188
+ 393,
189
+ 694,
190
+ 602,
191
+ 712
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "Here $P _ { X , Y }$ is a joint distribution on the random variables $X$ and $Y$ and $P _ { X }$ and $P _ { Y }$ are the marginal distributions on $X$ and $Y$ respectively. The DV lower bound applies to KL-divergence generally. To derive the DV bound we start with the following observation for any distributions $P , Q$ , and $G$ on the same support. Our theoretical analyses will assume discrete distributions. ",
198
+ "bbox": [
199
+ 174,
200
+ 713,
201
+ 825,
202
+ 768
203
+ ],
204
+ "page_idx": 1
205
+ },
206
+ {
207
+ "type": "equation",
208
+ "img_path": "images/772047e54db141e6c55876a771b70b595823fc464de218632bb0ce08f0b2d294.jpg",
209
+ "text": "$$\n\\begin{array} { l l l } { { K L ( P , Q ) } } & { { = } } & { { \\displaystyle { E _ { z \\sim P } \\ \\ln \\frac { P ( z ) } { { \\cal Q } ( z ) } } } } \\\\ { { } } & { { = } } & { { \\displaystyle { E _ { z \\sim P } \\ \\ln \\left( \\frac { { \\cal G } ( z ) } { { \\cal Q } ( z ) } \\frac { P ( z ) } { { \\cal G } ( z ) } \\right) } } } \\\\ { { } } & { { = } } & { { \\displaystyle { E _ { z \\sim P } \\ \\ln \\frac { { \\cal G } ( z ) } { { \\cal Q } ( z ) } + K L ( P , G ) } } } \\\\ { { } } & { { \\geq } } & { { \\displaystyle { E _ { z \\sim P } \\ \\ln \\frac { { \\cal G } ( z ) } { { \\cal Q } ( z ) } } } } \\end{array}\n$$",
210
+ "text_format": "latex",
211
+ "bbox": [
212
+ 343,
213
+ 772,
214
+ 655,
215
+ 929
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Note that (1) achieves equality for $G ( z ) = P ( z )$ and hence we have ",
222
+ "bbox": [
223
+ 174,
224
+ 102,
225
+ 620,
226
+ 118
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "equation",
232
+ "img_path": "images/955d2766174a9596da40586dba2e7d19af560e53303bb0fb3de70aa9610440dd.jpg",
233
+ "text": "$$\nK L ( P , Q ) = \\operatorname* { s u p } _ { G } \\ E _ { z \\in P } \\ \\ln { \\frac { G ( z ) } { Q ( z ) } }\n$$",
234
+ "text_format": "latex",
235
+ "bbox": [
236
+ 385,
237
+ 126,
238
+ 612,
239
+ 160
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "Here we can let $G$ be a parameterized model such that $G ( z )$ can be computed directly. However, we are interested in $K L ( P _ { X , Y } , P _ { X } P _ { Y } )$ where our only access to the distribution $P$ is through sampling. If we draw a pair $( x , y )$ and ignore $y$ we get a sample from $P _ { X }$ . We can similarly sample from $P _ { Y }$ . So we are interested in a KL-divergence $K L ( P , Q )$ where our only access to the distributions $P$ and $Q$ is through sampling. Note that we cannot evaluate (1) by sampling from $P$ because we have no way of computing $Q ( z )$ . But through a change of variables we can convert this to an expression restricted to sampling from $Q$ . More specifically we define $G ( z )$ in terms of an unconstrained function $F ( z )$ as ",
246
+ "bbox": [
247
+ 173,
248
+ 167,
249
+ 826,
250
+ 281
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "equation",
256
+ "img_path": "images/8b5fa0dd8345e764b6384e4987aefca819aa83aa35338b094b2d45ccfb5e6f1c.jpg",
257
+ "text": "$$\nG ( z ) = \\frac { 1 } { Z } Q ( z ) e ^ { F ( z ) } ~ Z = \\sum _ { z } Q ( z ) e ^ { F ( z ) } = E _ { z \\sim Q } ~ e ^ { F ( z ) }\n$$",
258
+ "text_format": "latex",
259
+ "bbox": [
260
+ 274,
261
+ 287,
262
+ 723,
263
+ 325
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "Substituting (3) into (2) gives ",
270
+ "bbox": [
271
+ 174,
272
+ 332,
273
+ 369,
274
+ 347
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "equation",
280
+ "img_path": "images/ca2ad10859bacc770187946aeaa497b85ce9438526c772a22f9f7025d0592e11.jpg",
281
+ "text": "$$\nK L ( P , Q ) = \\operatorname* { s u p } _ { F } \\ E _ { z \\sim P } \\ F ( z ) - \\ln E _ { z \\sim Q } \\ e ^ { F ( z ) }\n$$",
282
+ "text_format": "latex",
283
+ "bbox": [
284
+ 338,
285
+ 364,
286
+ 660,
287
+ 393
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "Equation (4) is the Donsker-Varadhan lower bound. Applying this to mutual information we get ",
294
+ "bbox": [
295
+ 169,
296
+ 405,
297
+ 800,
298
+ 420
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "equation",
304
+ "img_path": "images/2049bf06dd79f103c895678695fa5e5df1c7736046e681f017fe3bb6030a7106.jpg",
305
+ "text": "$$\n\\begin{array} { l c l } { { I ( X , Y ) } } & { { = } } & { { K L ( P _ { X , Y } , P _ { X } P _ { Y } ) } } \\\\ { { } } & { { } } & { { } } \\\\ { { } } & { { = } } & { { \\underset { F } { \\operatorname* { s u p } } \\ E _ { x , y \\sim P _ { X , Y } } \\ F ( x , y ) - \\ln E _ { x \\sim P _ { X } , y \\sim P _ { Y } } \\ e ^ { F ( x , y ) } } } \\end{array}\n$$",
306
+ "text_format": "latex",
307
+ "bbox": [
308
+ 276,
309
+ 445,
310
+ 722,
311
+ 511
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "This is the equation underlying the MINE approach to maximizing mutual information (Belghazi et al., 2018). It would seem that we can estimate both terms in (5) through sampling and be able to maximize $I ( X , Y )$ by stochastic gradient ascent on this lower bound. ",
318
+ "bbox": [
319
+ 176,
320
+ 525,
321
+ 823,
322
+ 568
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "3 STATISTICAL LIMITATIONS OF KL-DIVERGENCE LOWER BOUNDS ",
329
+ "text_level": 1,
330
+ "bbox": [
331
+ 171,
332
+ 588,
333
+ 754,
334
+ 604
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "In this section we show that the DV bound (4) cannot be used to measure KL-divergences of more than tens of bits. In fact we will show that no high-confidence distribution-free lower bound on KL divergence can be used for this purpose. ",
341
+ "bbox": [
342
+ 174,
343
+ 619,
344
+ 825,
345
+ 662
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "As a first observation note that (4) involves $E _ { z \\sim Q } ~ e ^ { F ( z ) }$ . This expression has the same form as the moment generating function used in analyzing large deviation probabilities. The utility of expectations of exponentials in large deviation theory is that such expressions can be dominated by extremely rare events (large deviations). The rare events dominating the expectation will never be observed by sampling from $Q$ . It should be noted that the optimal value for $F ( z )$ in (4) is $\\ln ( P ( z ) / Q ( z ) )$ in which case the right hand side of (4) simplifies to $K L ( P , Q )$ . But for large KL divergence we will have that $F ( z ) \\stackrel { - } { = } \\ln ( P ( z ) / Q ( z ) )$ is typically hundreds of bits and this is exactly the case where $E _ { z \\sim Q } ~ e ^ { F ( z ) }$ cannot be measured by sampling from $Q$ . If $E _ { z \\sim Q } ~ e ^ { F ( z ) }$ is dominated by events that will never occur in sampling from $Q$ then the optimization of $F$ through the use of (4) and sampling from $Q$ cannot possibly lead to a function $F ( z )$ that accurately models the desired function $\\ln ( P ( z ) / Q ( z ) )$ . ",
352
+ "bbox": [
353
+ 173,
354
+ 669,
355
+ 825,
356
+ 827
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "To quantitatively analyze the risk of unseen outlier events we will make use of the following simple lemma where we write $P _ { z \\sim Q } ( \\Phi [ z ] )$ for the probability over drawing $z$ from $Q$ that the statement $\\Phi [ z ]$ holds. ",
363
+ "bbox": [
364
+ 174,
365
+ 832,
366
+ 825,
367
+ 876
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "Outlier Risk Lemma: For a sample $S ~ \\sim ~ Q ^ { N }$ with $N \\ \\geq \\ 2$ , and a property $\\Phi [ z ]$ such that $P _ { z \\sim Q } ( \\Phi [ z ] ) \\leq 1 / N$ , the probability over the draw of $S$ that no $z \\in S$ satisfies $\\Phi [ z ]$ is at least $1 / 4$ . ",
374
+ "bbox": [
375
+ 174,
376
+ 881,
377
+ 823,
378
+ 924
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "Proof: The probability that $\\Phi [ z ]$ is unseen in the sample is at least $( 1 - 1 / N ) ^ { N }$ which is at least $1 / 4$ for $N \\geq 2$ and where we have $\\begin{array} { r } { \\operatorname* { l i m } _ { N \\to \\infty } ( 1 - 1 / N ) ^ { N ^ { \\bullet } } = 1 / e } \\end{array}$ . Q.E.D. ",
385
+ "bbox": [
386
+ 169,
387
+ 102,
388
+ 825,
389
+ 133
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "We can use the outlier risk lemma to perform a quantitative risk analysis of the DV bound (4). We can rewrite (4) as ",
396
+ "bbox": [
397
+ 171,
398
+ 138,
399
+ 823,
400
+ 166
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "equation",
406
+ "img_path": "images/5552188496c31f908ba09cf11f5b231e5111666b07dddc5549eddb89d324ef38.jpg",
407
+ "text": "$$\n\\begin{array} { r c l } { K L ( P , Q ) } & { \\geq } & { { \\cal B } ( P , Q , F ) } \\\\ { { \\cal B } ( P , Q , F ) } & { = } & { { \\cal E } _ { z \\sim P } ~ F ( z ) - \\ln { \\cal E } _ { z \\sim Q } ~ e ^ { F ( z ) } } \\end{array}\n$$",
408
+ "text_format": "latex",
409
+ "bbox": [
410
+ 338,
411
+ 171,
412
+ 660,
413
+ 210
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "We can try to estimate $B ( P , Q , G )$ from samples $S _ { P }$ and $S _ { Q }$ , each of size $N$ , from the population distributions $P$ and $Q$ respectively. ",
420
+ "bbox": [
421
+ 174,
422
+ 213,
423
+ 823,
424
+ 242
425
+ ],
426
+ "page_idx": 3
427
+ },
428
+ {
429
+ "type": "equation",
430
+ "img_path": "images/b4533dbf7713f558b433cbe23c738a41af8a1b4e84d543dfa59890e041385b19.jpg",
431
+ "text": "$$\n\\hat { B } ( S _ { P } , S _ { Q } , F ) = \\frac { 1 } { N } \\sum _ { z \\in S _ { P } } F ( z ) - \\ln \\frac { 1 } { N } \\sum _ { z \\in S _ { Q } } e ^ { F ( z ) }\n$$",
432
+ "text_format": "latex",
433
+ "bbox": [
434
+ 323,
435
+ 246,
436
+ 673,
437
+ 286
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "While $B ( P , Q , F )$ is a lower bound on $K L ( P , Q )$ , the sample estimate $\\hat { B } ( S _ { P } , S _ { Q } , F )$ is not. To get a high confidence lower bound on $K L ( P , Q )$ we have to handle unseen outlier risk. For a fair comparison with our analysis of cross-entropy estimators in section 5, we will limit the outlier risk by bounding $F ( z )$ to the interval $[ 0 , F _ { \\mathrm { m a x } } ]$ . The largest possible value of $\\hat { B } ( S _ { P } , S _ { q } , F )$ occurs when $F ( z ) = F _ { \\operatorname* { m a x } }$ for all $z \\in S _ { P }$ and $F ( z ) = 0$ for all $z \\in S _ { Q }$ . In this case we get $\\hat { B } ( S _ { P } , S _ { Q } , F ) =$ $F _ { \\mathrm { m a x } }$ . But by the outlier risk lemma there is still at least a 1/4 probability that ",
444
+ "bbox": [
445
+ 173,
446
+ 292,
447
+ 826,
448
+ 383
449
+ ],
450
+ "page_idx": 3
451
+ },
452
+ {
453
+ "type": "equation",
454
+ "img_path": "images/888f6e380a16d283c953a6e18e8e00909b485f491046ae921ebe02bc2966f5a5.jpg",
455
+ "text": "$$\nE _ { z \\sim Q } ~ e ^ { F ( z ) } \\geq \\frac { 1 } { N } e ^ { F _ { \\mathrm { m a x } } } .\n$$",
456
+ "text_format": "latex",
457
+ "bbox": [
458
+ 415,
459
+ 387,
460
+ 583,
461
+ 417
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "Any high confidence lower bound $\\tilde { B } ( S _ { P } , S _ { Q } , F )$ must account for the unseen outlier risk. In particular we must have ",
468
+ "bbox": [
469
+ 174,
470
+ 422,
471
+ 823,
472
+ 452
473
+ ],
474
+ "page_idx": 3
475
+ },
476
+ {
477
+ "type": "equation",
478
+ "img_path": "images/d4f1f6c53347e4ddbe9f9f84ecda094c4a8bc9b481bb93b168812bf9f80cc990.jpg",
479
+ "text": "$$\n\\begin{array} { r c l } { \\tilde { B } ( S _ { P } , S _ { Q } , F ) } & { \\leq } & { F _ { \\operatorname* { m a x } } - \\ln \\frac { e ^ { F _ { \\operatorname* { m a x } } } } { N } } \\\\ & & { } & \\\\ & { = } & { \\ln N } \\end{array}\n$$",
480
+ "text_format": "latex",
481
+ "bbox": [
482
+ 369,
483
+ 454,
484
+ 627,
485
+ 518
486
+ ],
487
+ "page_idx": 3
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "Our negative results can be strengthened by considering the preliminary bound (1) where $G ( z )$ is viewed as a model of $P ( z )$ . We can consider the extreme case of perfect modeling of the population $P$ with a model $G ( z )$ where $G ( z )$ is computable. In this case we have essentially complete access to the distribution $P$ . But even in this setting we have the following negative result. ",
492
+ "bbox": [
493
+ 174,
494
+ 527,
495
+ 825,
496
+ 585
497
+ ],
498
+ "page_idx": 3
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "Theorem 1 Let $B$ be any distribution-free high-confidence lower bound on $K L ( P , Q )$ computed with complete knowledge of $P$ but only a sample from $Q$ . ",
503
+ "bbox": [
504
+ 173,
505
+ 595,
506
+ 821,
507
+ 626
508
+ ],
509
+ "page_idx": 3
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "More specifically, let $B ( P , S , \\delta )$ be any real-valued function of a distribution $P$ , a multiset $S$ , and $a$ confidence parameter $\\delta$ such that, for any $P$ , $Q$ and $\\delta$ , with probability at least $( 1 - \\delta )$ over a draw of $S$ from $Q ^ { N }$ we have ",
514
+ "bbox": [
515
+ 173,
516
+ 631,
517
+ 825,
518
+ 674
519
+ ],
520
+ "page_idx": 3
521
+ },
522
+ {
523
+ "type": "equation",
524
+ "img_path": "images/83b05277d409cf6f4832583d2d5c8cce6142552d5939a09dd292aac89a0d0fc6.jpg",
525
+ "text": "$$\nK L ( P , Q ) \\ge B ( P , S , \\delta ) .\n$$",
526
+ "text_format": "latex",
527
+ "bbox": [
528
+ 415,
529
+ 672,
530
+ 583,
531
+ 689
532
+ ],
533
+ "page_idx": 3
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "For any such bound, and for $N \\geq 2$ , with probability at least $1 - 4 \\delta$ over the draw of $S$ from $Q ^ { N }$ we have ",
538
+ "bbox": [
539
+ 176,
540
+ 691,
541
+ 821,
542
+ 718
543
+ ],
544
+ "page_idx": 3
545
+ },
546
+ {
547
+ "type": "equation",
548
+ "img_path": "images/693c45ae410a95090118ee67f15337fae6678cfada5de1aca38d848070b7b678.jpg",
549
+ "text": "$$\nB ( P , S , \\delta ) \\leq \\ln { N } .\n$$",
550
+ "text_format": "latex",
551
+ "bbox": [
552
+ 434,
553
+ 718,
554
+ 563,
555
+ 734
556
+ ],
557
+ "page_idx": 3
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "Proof. Consider distributions $P$ and $Q$ and $N \\geq 2$ . Define $\\tilde { Q }$ by ",
562
+ "bbox": [
563
+ 171,
564
+ 747,
565
+ 596,
566
+ 763
567
+ ],
568
+ "page_idx": 3
569
+ },
570
+ {
571
+ "type": "equation",
572
+ "img_path": "images/569a68831cd150c3b68d509b88617d97847b8e751bee37d3bdb4f13e8290aae1.jpg",
573
+ "text": "$$\n\\tilde { Q } ( z ) = \\left( 1 - \\frac { 1 } { N } \\right) Q ( z ) + \\frac { 1 } { N } P ( z ) .\n$$",
574
+ "text_format": "latex",
575
+ "bbox": [
576
+ 377,
577
+ 767,
578
+ 620,
579
+ 803
580
+ ],
581
+ "page_idx": 3
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "We now have $K L ( P , { \\tilde { Q } } ) \\leq \\ln N$ . We will prove that from a sample $S \\sim Q ^ { N }$ we cannot reliably distinguish between $Q$ and $\\tilde { Q }$ . ",
586
+ "bbox": [
587
+ 174,
588
+ 808,
589
+ 821,
590
+ 840
591
+ ],
592
+ "page_idx": 3
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "We first note that by applying the high-confidence guarantee of the bound to $\\tilde { Q }$ have ",
597
+ "bbox": [
598
+ 173,
599
+ 847,
600
+ 725,
601
+ 863
602
+ ],
603
+ "page_idx": 3
604
+ },
605
+ {
606
+ "type": "equation",
607
+ "img_path": "images/3826d4b80cbad61a68c9f7d507bb21e3ecc66828eb7cfdd8fcaaa65bf8b8617d.jpg",
608
+ "text": "$$\nP _ { S \\sim \\tilde { Q } ^ { N } } ( B ( P , S , \\delta ) \\leq K L ( P , \\tilde { Q } ) ) \\geq 1 - \\delta .\n$$",
609
+ "text_format": "latex",
610
+ "bbox": [
611
+ 354,
612
+ 867,
613
+ 643,
614
+ 888
615
+ ],
616
+ "page_idx": 3
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "The distribution $\\tilde { Q }$ equals the marginal on $z$ of a distribution on pairs $( s , z )$ where $s$ is the value of Bernoulli variable with bias $1 / N$ such that if $s = 1$ then $z$ is drawn from $P$ and otherwise $z$ is drawn ",
621
+ "bbox": [
622
+ 173,
623
+ 895,
624
+ 825,
625
+ 924
626
+ ],
627
+ "page_idx": 3
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "from $Q$ . By the outlier risk lemma the probability that all coins are zero is at least 1/4. Conditioned on all coins being zero the distributions $\\tilde { Q } ^ { N }$ and $Q ^ { N }$ are the same. Let $\\mathrm { P u r e } ( S )$ represent the event that all coins are 0 and let $\\operatorname { S m a l l } ( S )$ represent the event that $B ( P , S , \\delta ) \\leq \\ln { N }$ . We now have ",
632
+ "bbox": [
633
+ 176,
634
+ 103,
635
+ 825,
636
+ 147
637
+ ],
638
+ "page_idx": 4
639
+ },
640
+ {
641
+ "type": "equation",
642
+ "img_path": "images/c48082a50871bbd7a3489c45d35f5873a1be7e193cf52caf54ad981b39ab86f4.jpg",
643
+ "text": "$$\n\\begin{array} { r l } { P _ { S \\sim Q ^ { N } } ( \\mathrm { S n a l l } ( \\mathrm { S } ) ) } & { = \\phantom { P } P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { S n a l l } ( S ) ) \\mathrm { P u r e } ( S ) ) } \\\\ { = } & { \\frac { P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { P u r e } ( S ) \\times \\mathrm { S u n a l } ( \\mathrm { S } ) ) } { P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { P u r e } ( S ) ) } } \\\\ { \\ge } & { \\frac { P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { P u r e } ( S ) ) - P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { - S u n a l l } ( \\mathrm { S } ) ) } { P _ { S \\sim Q ^ { N } } ( \\mathrm { P u r e } ( S ) ) } } \\\\ { \\ge } & { \\frac { P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { P u r e } ( S ) ) - \\hat { Q } } { P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { P u r e } ( S ) ) } } \\\\ { = } & { \\frac { P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { P u r e } ( S ) ) - \\hat { Q } } { P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { P u r e } ( S ) ) } } \\\\ { = } & { 1 - \\frac { \\hat { Q } } { P _ { S \\sim \\hat { Q } ^ { N } } ( \\mathrm { P u r e } ( S ) ) } } \\\\ { \\ge } & { 1 - 4 \\delta . } \\end{array}\n$$",
644
+ "text_format": "latex",
645
+ "bbox": [
646
+ 269,
647
+ 152,
648
+ 727,
649
+ 380
650
+ ],
651
+ "page_idx": 4
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "4 STATISTICAL LIMITATIONS ON ENTROPY LOWER BOUNDS ",
656
+ "text_level": 1,
657
+ "bbox": [
658
+ 174,
659
+ 395,
660
+ 689,
661
+ 412
662
+ ],
663
+ "page_idx": 4
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "Mutual information is a special case of KL-divergence. It is possible that tighter lower bounds can be given in this special case. In this section we show similar limitations on lower bounding mutual information. We first note that a lower bound on mutual information implies a lower bound on entropy. The mutual information between $X$ and $Y$ cannot be larger than information content of $X$ alone. ",
668
+ "bbox": [
669
+ 173,
670
+ 426,
671
+ 825,
672
+ 496
673
+ ],
674
+ "page_idx": 4
675
+ },
676
+ {
677
+ "type": "equation",
678
+ "img_path": "images/d2523b1135673308b6b6201c8b272ced768df13053b82e5f5068c922e68b6644.jpg",
679
+ "text": "$$\nI ( X , Y ) = H ( X ) - H ( X | Y ) \\leq H ( X )\n$$",
680
+ "text_format": "latex",
681
+ "bbox": [
682
+ 364,
683
+ 494,
684
+ 632,
685
+ 512
686
+ ],
687
+ "page_idx": 4
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "So a lower bound on $I ( X , Y )$ gives a lower bound on $H ( X )$ . We show that any distribution-free high-confidence lower bound on entropy requires a sample size exponential in the size of the bound. ",
692
+ "bbox": [
693
+ 174,
694
+ 520,
695
+ 820,
696
+ 550
697
+ ],
698
+ "page_idx": 4
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "The above argument seems problematic for the case of continuous densities as differential entropy can be negative. However, for the continuous case we have ",
703
+ "bbox": [
704
+ 171,
705
+ 556,
706
+ 821,
707
+ 584
708
+ ],
709
+ "page_idx": 4
710
+ },
711
+ {
712
+ "type": "equation",
713
+ "img_path": "images/0dd5d089a26705a671924cd06076ab2388bdf37106ca5e309cfb82cf33b8fd29.jpg",
714
+ "text": "$$\nI ( x , y ) = \\operatorname* { s u p } _ { C _ { x } , C _ { y } } I ( C _ { x } ( x ) , C _ { y } ( y ) )\n$$",
715
+ "text_format": "latex",
716
+ "bbox": [
717
+ 385,
718
+ 588,
719
+ 612,
720
+ 617
721
+ ],
722
+ "page_idx": 4
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "where $C _ { x }$ and $C _ { y }$ range over all maps from the underlying continuous space to discrete sets (all binnings of the continuous space). Hence an $O ( \\ln N )$ upper bound on the measurement of mutual information for the discrete case applies to the continuous case as well. ",
727
+ "bbox": [
728
+ 173,
729
+ 621,
730
+ 825,
731
+ 662
732
+ ],
733
+ "page_idx": 4
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "The type of a sample $S$ , denoted $\\mathcal { T } ( S )$ , is defined to be a function on positive integers (counts) where $\\bar { \\mathcal { T } } ( S ) ( i )$ is the number of elements of $S$ that occur $i$ times in $S$ . For a sample of $N$ draws we have $\\begin{array} { r } { \\tilde { N } \\stackrel { \\cdot } { = } \\sum _ { i } i \\mathcal { T } ( S ) ( i ) } \\end{array}$ . The type $\\mathcal { T } ( S )$ contains all information relevant to estimating the actual probability of the items of a given count and of estimating the entropy of the underlying distribution. The problem of estimating distributions and entropies from sample types has been investigated by various authors (McAllester & Schapire, 2000; Orlitsky et al., 2003; Orlitsky & Suresh, 2015; Arora et al., 2018). Here we give the following negative result on lower bounding the entropy of a distribution by sampling. ",
738
+ "bbox": [
739
+ 173,
740
+ 667,
741
+ 825,
742
+ 781
743
+ ],
744
+ "page_idx": 4
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "Theorem 2 Let $B$ be any distribution-free high-confidence lower bound on $H ( P )$ computed from a sample type T (S) with S ∼ P N . ",
749
+ "bbox": [
750
+ 173,
751
+ 791,
752
+ 823,
753
+ 821
754
+ ],
755
+ "page_idx": 4
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "More specifically, let $B ( \\tau , \\delta )$ be any real-valued function of a type $\\tau$ and a confidence parameter $\\delta$ such that for any $P$ , with probability at least $( 1 - \\delta )$ over a draw of $S$ from $P ^ { \\tilde { N } }$ , we have ",
760
+ "bbox": [
761
+ 171,
762
+ 827,
763
+ 823,
764
+ 857
765
+ ],
766
+ "page_idx": 4
767
+ },
768
+ {
769
+ "type": "equation",
770
+ "img_path": "images/15b8e91bce6acdfb8a1fa6eba0c2123ff0999d59757d5c6d091ca9f032ec61b7.jpg",
771
+ "text": "$$\nH ( P ) \\geq B ( { \\mathcal { T } } ( S ) , \\delta ) .\n$$",
772
+ "text_format": "latex",
773
+ "bbox": [
774
+ 424,
775
+ 861,
776
+ 573,
777
+ 877
778
+ ],
779
+ "page_idx": 4
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "For any such bound, and for $N \\geq 5 0$ and $k \\geq 2$ , with probability at least $1 - \\delta - 1 . 0 1 / k$ over the draw of $S$ from $P ^ { N }$ we have ",
784
+ "bbox": [
785
+ 169,
786
+ 881,
787
+ 823,
788
+ 909
789
+ ],
790
+ "page_idx": 4
791
+ },
792
+ {
793
+ "type": "equation",
794
+ "img_path": "images/5e036b47884491ca3c38f81f38120a94e223a1882174c394fe02f27d12b0a3a6.jpg",
795
+ "text": "$$\nB ( { \\mathcal { T } } ( S ) , \\delta ) \\leq \\ln 2 k N ^ { 2 } .\n$$",
796
+ "text_format": "latex",
797
+ "bbox": [
798
+ 416,
799
+ 907,
800
+ 580,
801
+ 925
802
+ ],
803
+ "page_idx": 4
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "Proof: Consider a distribution $P$ and $N \\geq 1 0 0$ . If the support of $P$ has fewer than $2 k N ^ { 2 }$ elements then $H ( P ) < \\ln 2 k N ^ { 2 }$ and by the premise of the theorem we have that, with probability at least $1 - \\delta$ over the draw of $S$ , $B ( { \\dot { \\mathcal { T } } } ( S ) , { \\bar { \\delta } } ) \\leq H ( P )$ and the theorem follows. If the support of $P$ has at least $2 k N ^ { 2 }$ elements then we sort the support of $P$ into a (possibly infinite) sequence $x _ { 1 } , \\ x _ { 2 } , \\ x _ { 3 } , . . . .$ so that $P ( x _ { i } ) \\geq P ( x _ { i + 1 } )$ . We then define a distribution $\\tilde { P }$ on the elements $x _ { 1 }$ $, \\ldots , x _ { 2 k N ^ { 2 } }$ by ",
808
+ "bbox": [
809
+ 173,
810
+ 102,
811
+ 826,
812
+ 176
813
+ ],
814
+ "page_idx": 5
815
+ },
816
+ {
817
+ "type": "equation",
818
+ "img_path": "images/952a099c5a09d0c7650603bdbbdf5221eef141e23dd0c8fa441881b59973896b.jpg",
819
+ "text": "$$\n\\tilde { P } ( x _ { i } ) = \\left( \\begin{array} { l l } { { P ( x _ { i } ) } } & { { \\mathrm { f o r } i \\leq k N ^ { 2 } } } \\\\ { { } } & { { } } \\\\ { { \\frac { P ( i > k N ^ { 2 } ) } { k N ^ { 2 } } } } & { { \\mathrm { f o r } k N ^ { 2 } < i \\leq 2 k N ^ { 2 } } } \\end{array} \\right)\n$$",
820
+ "text_format": "latex",
821
+ "bbox": [
822
+ 331,
823
+ 181,
824
+ 665,
825
+ 234
826
+ ],
827
+ "page_idx": 5
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "We will let $\\operatorname { S m a l l } ( S )$ denote the event that $B ( \\mathcal T ( S ) , \\delta ) \\le \\ln 2 k N ^ { 2 }$ and let ${ \\mathrm { P u r e } } ( S )$ abbreviate the event that no element $x _ { i }$ for $i > k N ^ { 2 }$ occurs twice in the sample. Since $\\tilde { P }$ has a support of size $2 k N ^ { 2 }$ we have $H ( \\tilde { P } ) \\leq \\ln 2 k N ^ { 2 }$ . Applying the premise of the lemma to $\\tilde { P }$ gives ",
832
+ "bbox": [
833
+ 173,
834
+ 239,
835
+ 826,
836
+ 287
837
+ ],
838
+ "page_idx": 5
839
+ },
840
+ {
841
+ "type": "equation",
842
+ "img_path": "images/2ba872835f9e40fd15428a0d8f9570646efb0a1bee7c375a56e39b5bda602ae0.jpg",
843
+ "text": "$$\nP _ { S \\sim \\tilde { P } ^ { N } } ( \\operatorname { S m a l l } ( S ) ) \\geq 1 - \\delta\n$$",
844
+ "text_format": "latex",
845
+ "bbox": [
846
+ 405,
847
+ 305,
848
+ 594,
849
+ 324
850
+ ],
851
+ "page_idx": 5
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "For a type $\\tau$ let $P _ { S \\sim P ^ { N } } ( \\mathcal { T } )$ denote the probability over drawing $S \\sim P ^ { N }$ that $\\mathcal { T } ( S ) = \\mathcal { T }$ . We now have ",
856
+ "bbox": [
857
+ 173,
858
+ 334,
859
+ 825,
860
+ 364
861
+ ],
862
+ "page_idx": 5
863
+ },
864
+ {
865
+ "type": "equation",
866
+ "img_path": "images/71a5c80b8607141cc79f771d8f87137fd9f42d12579a0d38b3910b40aee9b8b8.jpg",
867
+ "text": "$$\nP _ { S \\sim P ^ { N } } ( \\mathcal { T } | \\mathrm { P u r e } ( S ) ) = P _ { S \\sim \\tilde { P } ^ { N } } ( \\mathcal { T } | \\mathrm { P u r e } ( S ) ) .\n$$",
868
+ "text_format": "latex",
869
+ "bbox": [
870
+ 346,
871
+ 382,
872
+ 651,
873
+ 401
874
+ ],
875
+ "page_idx": 5
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "This gives the following. ",
880
+ "bbox": [
881
+ 174,
882
+ 410,
883
+ 338,
884
+ 425
885
+ ],
886
+ "page_idx": 5
887
+ },
888
+ {
889
+ "type": "equation",
890
+ "img_path": "images/87d37981c8b67efa3797cd3fea71f13bd540d61e7fd7687d406db1c4e2f36732.jpg",
891
+ "text": "$$\n\\begin{array} { r c l } { P _ { S \\sim P ^ { N } } ( \\mathrm { S m a l l } ( S ) ) } & { \\geq } & { P _ { S \\sim P ^ { N } } ( \\mathrm { P u r e } ( S ) \\wedge \\mathrm { S m a l l } ( S ) ) } \\\\ & { = } & { P _ { S \\sim P ^ { N } } ( \\mathrm { P u r e } ( S ) ) P _ { S \\sim P ^ { N } } ( \\mathrm { S m a l l } ( S ) \\mid \\mathrm { P u r e } ( S ) ) } \\\\ & { = } & { P _ { S \\sim P ^ { N } } ( \\mathrm { P u r e } ( S ) ) P _ { S \\sim \\tilde { P } ^ { N } } ( \\mathrm { S m a l l } ( S ) \\mid \\mathrm { P u r e } ( S ) ) } \\\\ & { \\geq } & { P _ { S \\sim P ^ { N } } ( \\mathrm { P u r e } ( S ) ) P _ { S \\sim \\tilde { P } ^ { N } } ( \\mathrm { P u r e } ( S ) \\wedge \\mathrm { S m a l l } ( S ) ) } \\end{array}\n$$",
892
+ "text_format": "latex",
893
+ "bbox": [
894
+ 245,
895
+ 450,
896
+ 746,
897
+ 526
898
+ ],
899
+ "page_idx": 5
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "For $i > k N ^ { 2 }$ we have $\\tilde { P } ( x _ { i } ) \\leq 1 / ( k N ^ { 2 } )$ which gives ",
904
+ "bbox": [
905
+ 173,
906
+ 537,
907
+ 529,
908
+ 555
909
+ ],
910
+ "page_idx": 5
911
+ },
912
+ {
913
+ "type": "equation",
914
+ "img_path": "images/7f178c6470ac723ed87efa22fc1a4bc9f67261e076b99ea70c819ebdb4108679.jpg",
915
+ "text": "$$\nP _ { S \\sim \\tilde { P } ^ { N } } ( \\mathrm { P u r e } ( S ) ) \\geq \\prod _ { j = 1 } ^ { N - 1 } \\left( 1 - \\frac { j } { k N ^ { 2 } } \\right)\n$$",
916
+ "text_format": "latex",
917
+ "bbox": [
918
+ 364,
919
+ 560,
920
+ 633,
921
+ 607
922
+ ],
923
+ "page_idx": 5
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "Using $( 1 - P ) \\ge e ^ { - 1 . 0 1 \\ P }$ for $P \\leq 1 / 1 0 0$ we have the following birthday paradox calculation. ",
928
+ "bbox": [
929
+ 169,
930
+ 613,
931
+ 794,
932
+ 630
933
+ ],
934
+ "page_idx": 5
935
+ },
936
+ {
937
+ "type": "equation",
938
+ "img_path": "images/20a2cc6fb928599a5ede38d62d69babfe4575e47d43acbdbec2e5e775d6153c6.jpg",
939
+ "text": "$$\n\\begin{array} { l c l } { { \\ln P _ { S \\sim \\tilde { P } ^ { N } } ( \\mathrm { P u r e } ( S ) ) } } & { { \\geq } } & { { \\displaystyle - \\frac { 1 . 0 1 } { k N ^ { 2 } } \\sum _ { j = 1 } ^ { N - 1 } j } } \\\\ { { } } & { { } } & { { } } \\\\ { { \\displaystyle } } & { { = } } & { { \\displaystyle - \\frac { 1 . 0 1 } { k N ^ { 2 } } \\frac { ( N - 1 ) N } { 2 } \\ ~ } } \\\\ { { } } & { { \\geq } } & { { \\displaystyle - 5 0 5 / k } } \\\\ { { P _ { S \\sim \\tilde { P } ^ { N } } ( \\mathrm { P u r e } ( S ) ) } } & { { \\geq } } & { { \\displaystyle e ^ { - . 5 0 5 / k } \\geq 1 - . 5 0 5 / k } } \\end{array}\n$$",
940
+ "text_format": "latex",
941
+ "bbox": [
942
+ 325,
943
+ 636,
944
+ 671,
945
+ 753
946
+ ],
947
+ "page_idx": 5
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "Applying the union bound to (7) and (9) gives. ",
952
+ "bbox": [
953
+ 174,
954
+ 763,
955
+ 480,
956
+ 780
957
+ ],
958
+ "page_idx": 5
959
+ },
960
+ {
961
+ "type": "equation",
962
+ "img_path": "images/138ac722944714d8e65725c8d701ae246e87392f5381facb112640976292c29e.jpg",
963
+ "text": "$$\nP _ { S \\sim \\tilde { P } ^ { N } } ( \\mathrm { P u r e } ( S ) \\wedge \\mathrm { S m a l l } ( S ) ) \\geq 1 - \\delta - . 5 0 5 / k\n$$",
964
+ "text_format": "latex",
965
+ "bbox": [
966
+ 333,
967
+ 797,
968
+ 665,
969
+ 815
970
+ ],
971
+ "page_idx": 5
972
+ },
973
+ {
974
+ "type": "text",
975
+ "text": "By a derivation similar to that of (9) we get ",
976
+ "bbox": [
977
+ 173,
978
+ 825,
979
+ 459,
980
+ 840
981
+ ],
982
+ "page_idx": 5
983
+ },
984
+ {
985
+ "type": "equation",
986
+ "img_path": "images/2ce2d6153892daa0df6f88beb073347233a140f03794377d3c8dce9c9640e83e.jpg",
987
+ "text": "$$\nP _ { S \\sim P ^ { N } } ( \\mathrm { P u r e } ( S ) ) \\geq 1 - . 5 0 5 / k\n$$",
988
+ "text_format": "latex",
989
+ "bbox": [
990
+ 388,
991
+ 859,
992
+ 611,
993
+ 877
994
+ ],
995
+ "page_idx": 5
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "Combining (8), (10) and (11) gives ",
1000
+ "bbox": [
1001
+ 173,
1002
+ 886,
1003
+ 405,
1004
+ 901
1005
+ ],
1006
+ "page_idx": 5
1007
+ },
1008
+ {
1009
+ "type": "equation",
1010
+ "img_path": "images/ce867d6a433e815c91069e4e3ac9c03229042fabbd777cb0f743eda48092f8ce.jpg",
1011
+ "text": "$$\nP _ { S \\sim P ^ { N } } ( \\operatorname { S m a l l } ( S ) ) \\geq 1 - \\delta - 1 . 0 1 / k\n$$",
1012
+ "text_format": "latex",
1013
+ "bbox": [
1014
+ 370,
1015
+ 907,
1016
+ 625,
1017
+ 925
1018
+ ],
1019
+ "page_idx": 5
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "5 CROSS ENTROPY AS AN ENTROPY ESTIMATOR ",
1024
+ "text_level": 1,
1025
+ "bbox": [
1026
+ 173,
1027
+ 102,
1028
+ 593,
1029
+ 118
1030
+ ],
1031
+ "page_idx": 6
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "Since mutual information can be expressed as a difference of entropies, the problem of measuring mutual information can be reduced to the problem of measuring entropies. In this section we show that, unlike high-confidence distribution-free lower bounds, high-confidence distribution-free upper bounds on entropy can approach the true cross entropy at modest sample sizes even when the true cross entropy is large. More specifically we consider the cross-entropy upper bound. ",
1036
+ "bbox": [
1037
+ 173,
1038
+ 132,
1039
+ 826,
1040
+ 204
1041
+ ],
1042
+ "page_idx": 6
1043
+ },
1044
+ {
1045
+ "type": "equation",
1046
+ "img_path": "images/b7f967dd675140d7c655aff10e953a977dd8bf812136d2e58d9cc3abfa5a0ab6.jpg",
1047
+ "text": "$$\n\\begin{array} { l l l } { \\displaystyle H ( P ) } & { = } & { \\displaystyle { E _ { x \\sim P } \\ln \\frac { 1 } { P ( x ) } } } \\\\ { \\displaystyle } & { = } & { \\displaystyle E _ { x \\sim P } \\ln \\left( \\frac { 1 } { G ( x ) } \\frac { G ( x ) } { P ( x ) } \\right) } \\\\ { \\displaystyle } & { = } & { \\displaystyle H ( P , G ) - K L ( P , G ) } \\\\ { \\displaystyle } & { \\le } & { \\displaystyle H ( P , G ) } \\end{array}\n$$",
1048
+ "text_format": "latex",
1049
+ "bbox": [
1050
+ 367,
1051
+ 207,
1052
+ 625,
1053
+ 313
1054
+ ],
1055
+ "page_idx": 6
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "For $G = P$ we get ${ \\cal H } ( P , G ) = { \\cal H } ( P )$ and hence we have ",
1060
+ "bbox": [
1061
+ 171,
1062
+ 321,
1063
+ 549,
1064
+ 338
1065
+ ],
1066
+ "page_idx": 6
1067
+ },
1068
+ {
1069
+ "type": "equation",
1070
+ "img_path": "images/153e90a92491e1424fbeb9599b6d9a73b79f54a73280e752b34070d5fb234bc6.jpg",
1071
+ "text": "$$\nH ( P ) = \\operatorname* { i n f } _ { G } ~ H ( P , G )\n$$",
1072
+ "text_format": "latex",
1073
+ "bbox": [
1074
+ 423,
1075
+ 356,
1076
+ 575,
1077
+ 380
1078
+ ],
1079
+ "page_idx": 6
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "In practice $P$ is a population distribution and $G$ is model of $P$ . For example $P$ might be a population distribution on paragraphs and $G$ might be an autoregressive RNN language model. In practice $G$ will be given by a network with parameters $\\Phi$ . In this setting we have the following upper bound entropy estimator. ",
1084
+ "bbox": [
1085
+ 173,
1086
+ 388,
1087
+ 825,
1088
+ 445
1089
+ ],
1090
+ "page_idx": 6
1091
+ },
1092
+ {
1093
+ "type": "equation",
1094
+ "img_path": "images/da3769f84dd21843b8feedfd38fa5c9e1ff1d85fbf1a3360fd8c28693257d949.jpg",
1095
+ "text": "$$\n\\hat { H } ( P ) \\quad = \\quad \\underset { \\Phi } { \\operatorname* { i n f } } H ( P , G _ { \\Phi } )\n$$",
1096
+ "text_format": "latex",
1097
+ "bbox": [
1098
+ 406,
1099
+ 449,
1100
+ 591,
1101
+ 474
1102
+ ],
1103
+ "page_idx": 6
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "The gap between ${ \\hat { H } } ( P )$ and $H ( P )$ depends on the expressive power of the model class. ",
1108
+ "bbox": [
1109
+ 173,
1110
+ 482,
1111
+ 748,
1112
+ 498
1113
+ ],
1114
+ "page_idx": 6
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "The statistical limitations on distribution-free high-confidence lower bounds on entropy do not arise for cross-entropy upper bounds. For upper bounds we can show that naive sample estimates of the cross-entropy loss produce meaningful (large entropy) results. We first define the cross-entropy estimator from a sample $S$ . ",
1119
+ "bbox": [
1120
+ 173,
1121
+ 503,
1122
+ 825,
1123
+ 559
1124
+ ],
1125
+ "page_idx": 6
1126
+ },
1127
+ {
1128
+ "type": "equation",
1129
+ "img_path": "images/f3aada33d9fc027cd4f41f76968e60c5b8efc190e018e359ca87af75c6e17ec3.jpg",
1130
+ "text": "$$\n{ \\hat { H } } ( S , G ) = { \\frac { 1 } { | S | } } \\sum _ { x \\in S } - \\ln G ( x )\n$$",
1131
+ "text_format": "latex",
1132
+ "bbox": [
1133
+ 392,
1134
+ 558,
1135
+ 606,
1136
+ 595
1137
+ ],
1138
+ "page_idx": 6
1139
+ },
1140
+ {
1141
+ "type": "text",
1142
+ "text": "We can bound the loss of a model $G$ by ensuring a minimum probability $e ^ { - F _ { \\operatorname* { m a x } } }$ where $F _ { \\mathrm { m a x } }$ is then the maximum possible log loss in the cross-entropy objective. In language modeling a loss bound exists for any model that ultimately backs off to a uniform distribution on characters. Given a loss bound of $F _ { \\mathrm { m a x } }$ we have that ${ \\hat { H } } ( S , G )$ is just the standard sample mean estimator of an expectation of a bounded variable. In this case we have the following standard confidence interval. ",
1143
+ "bbox": [
1144
+ 173,
1145
+ 598,
1146
+ 825,
1147
+ 671
1148
+ ],
1149
+ "page_idx": 6
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "Theorem 3 For any population distribution $P$ , and model distribution $G$ with $- l n G ( x )$ bounded to the interval $[ 0 , F _ { \\mathrm { m a x } } ]$ , with probability at least $1 - \\delta$ over the draw of $S \\sim P ^ { N }$ we have ",
1154
+ "bbox": [
1155
+ 171,
1156
+ 681,
1157
+ 825,
1158
+ 712
1159
+ ],
1160
+ "page_idx": 6
1161
+ },
1162
+ {
1163
+ "type": "equation",
1164
+ "img_path": "images/ddf5d277c10a1ef6bbcbc892415763756e3fa814ffcb364eb2627778b3a0f69c.jpg",
1165
+ "text": "$$\nH ( P , G ) \\in { \\hat { H } } ( S , G ) \\pm F _ { \\operatorname* { m a x } } { \\sqrt { \\frac { \\ln { \\frac { 2 } { \\delta } } } { 2 N } } }\n$$",
1166
+ "text_format": "latex",
1167
+ "bbox": [
1168
+ 379,
1169
+ 717,
1170
+ 620,
1171
+ 758
1172
+ ],
1173
+ "page_idx": 6
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "It is also possible to give PAC-Bayesian bounds on ${ \\cal H } ( P , G _ { \\Phi } )$ that take into account the fact that $G _ { \\Phi }$ is typically trained so as to minimize the empirical loss on the training data. The PAC-Bayesian bounds apply to“broad basin” losses and loss estimates such as the following. ",
1178
+ "bbox": [
1179
+ 173,
1180
+ 770,
1181
+ 826,
1182
+ 814
1183
+ ],
1184
+ "page_idx": 6
1185
+ },
1186
+ {
1187
+ "type": "equation",
1188
+ "img_path": "images/63944417a9d0aa60911ddcc3e9480546f0020d83e28450249b129aec83959c6b.jpg",
1189
+ "text": "$$\n\\begin{array} { r c l } { { { \\cal H } _ { \\sigma } ( S , G _ { \\Phi } ) } } & { { = } } & { { E _ { x \\sim P } ~ E _ { \\epsilon \\sim N ( 0 , \\sigma I ) } ~ - \\ln ~ G _ { \\Phi + \\epsilon } ( x ) } } \\\\ { { \\hat { H } _ { \\sigma } ( S , G _ { \\Phi } ) } } & { { = } } & { { \\displaystyle { \\frac { 1 } { | S | } \\sum _ { x \\in S } ~ E _ { \\epsilon \\sim N ( 0 , \\sigma I ) } ~ - \\ln ~ G _ { \\Phi + \\epsilon } ( x ) } } } \\end{array}\n$$",
1190
+ "text_format": "latex",
1191
+ "bbox": [
1192
+ 316,
1193
+ 838,
1194
+ 681,
1195
+ 897
1196
+ ],
1197
+ "page_idx": 6
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Under mild smoothness conditions on $G _ { \\Phi } ( x )$ as a function of $\\Phi$ we have ",
1202
+ "bbox": [
1203
+ 173,
1204
+ 909,
1205
+ 651,
1206
+ 924
1207
+ ],
1208
+ "page_idx": 6
1209
+ },
1210
+ {
1211
+ "type": "equation",
1212
+ "img_path": "images/b1e161bfaafd9386346055436937317b6f7155ec30acbafc9ac4ba859d8562cd.jpg",
1213
+ "text": "$$\n\\begin{array} { r c l } { { \\displaystyle \\operatorname * { l i m } _ { \\sigma \\to 0 } ~ H _ { \\sigma } ( P , G _ { \\Phi } ) } } & { { = } } & { { H ( P , G _ { \\Phi } ) } } \\\\ { { \\displaystyle \\operatorname * { l i m } _ { \\sigma \\to 0 } ~ \\hat { H } _ { \\sigma } ( S , G _ { \\Phi } ) } } & { { = } } & { { \\hat { H } ( S , G _ { \\Phi } ) } } \\end{array}\n$$",
1214
+ "text_format": "latex",
1215
+ "bbox": [
1216
+ 383,
1217
+ 122,
1218
+ 612,
1219
+ 174
1220
+ ],
1221
+ "page_idx": 7
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "An L2 PAC-Bayesian generalization bound (McAllester (2013)) gives that for any parameterized class of models and any bounded notion of loss, and any $\\lambda > 1 / 2$ and $\\sigma > 0$ , with probability at least $1 - \\delta$ over the draw of $S$ from $P ^ { N }$ we have the following simultaneously for all parameter vectors $\\Phi$ . ",
1226
+ "bbox": [
1227
+ 173,
1228
+ 185,
1229
+ 826,
1230
+ 242
1231
+ ],
1232
+ "page_idx": 7
1233
+ },
1234
+ {
1235
+ "type": "equation",
1236
+ "img_path": "images/5a9aa6d180ba318df970b7e0e280a08552a8cedff94c0aef66354eed01382c7f.jpg",
1237
+ "text": "$$\nH _ { \\sigma } ( P , G _ { \\Phi } ) \\leq \\frac { 1 } { 1 - \\frac { 1 } { 2 \\lambda } } \\left( \\hat { H } _ { \\sigma } ( S , G _ { \\Phi } ) + \\frac { \\lambda F _ { \\operatorname* { m a x } } } { N } \\left( \\frac { | | \\Phi | | ^ { 2 } } { 2 \\sigma ^ { 2 } } + \\ln \\frac { 1 } { \\delta } \\right) \\right)\n$$",
1238
+ "text_format": "latex",
1239
+ "bbox": [
1240
+ 279,
1241
+ 258,
1242
+ 717,
1243
+ 296
1244
+ ],
1245
+ "page_idx": 7
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "It is instructive to set $\\lambda = 5$ in which case the bound becomes. ",
1250
+ "bbox": [
1251
+ 173,
1252
+ 304,
1253
+ 581,
1254
+ 319
1255
+ ],
1256
+ "page_idx": 7
1257
+ },
1258
+ {
1259
+ "type": "equation",
1260
+ "img_path": "images/04c676c367ece489a2f8c568a5b478c0cb672c03f1b24a45177cae27843e77a5.jpg",
1261
+ "text": "$$\nH _ { \\sigma } ( P , G _ { \\Phi } ) \\leq \\frac { 1 0 } { 9 } \\left( \\hat { H } _ { \\sigma } ( S , G _ { \\Phi } ) + \\frac { 5 F _ { \\operatorname* { m a x } } } { N } \\left( \\frac { | | \\Phi | | ^ { 2 } } { 2 \\sigma ^ { 2 } } + \\ln \\frac { 1 } { \\delta } \\right) \\right)\n$$",
1262
+ "text_format": "latex",
1263
+ "bbox": [
1264
+ 295,
1265
+ 335,
1266
+ 702,
1267
+ 371
1268
+ ],
1269
+ "page_idx": 7
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "While this bound is linear in $1 / N$ , and tighter in practice than square root bounds, note that there is a small residual gap when holding $\\lambda$ fixed at 5 while taking $N \\to \\infty$ . In practice the regularization parameter $\\lambda$ can be tuned on holdout data. One point worth noting is the form of the dependence of the regularization coefficient on $F _ { \\mathrm { m a x } }$ , $N$ and the basin parameter $\\sigma$ . ",
1274
+ "bbox": [
1275
+ 173,
1276
+ 380,
1277
+ 825,
1278
+ 438
1279
+ ],
1280
+ "page_idx": 7
1281
+ },
1282
+ {
1283
+ "type": "text",
1284
+ "text": "It is also worth noting that the bound can be given in terms of “distance traveled” in parameter space from an initial (random) parameter setting $\\Phi _ { 0 }$ . ",
1285
+ "bbox": [
1286
+ 174,
1287
+ 443,
1288
+ 821,
1289
+ 473
1290
+ ],
1291
+ "page_idx": 7
1292
+ },
1293
+ {
1294
+ "type": "equation",
1295
+ "img_path": "images/6df9b07de4ee6faabb423f3aafd2a875d684366c7b43083b2e50e9e57ebca623.jpg",
1296
+ "text": "$$\nH _ { \\sigma } ( P , G _ { \\Phi } ) \\leq { \\frac { 1 0 } { 9 } } \\left( { \\hat { H } } _ { \\sigma } ( S , G _ { \\Phi } ) + { \\frac { 5 F _ { \\operatorname* { m a x } } } { N } } \\left( { \\frac { | | \\Phi - \\Phi _ { 0 } | | ^ { 2 } } { 2 \\sigma ^ { 2 } } } + \\ln { \\frac { 1 } { \\delta } } \\right) \\right)\n$$",
1297
+ "text_format": "latex",
1298
+ "bbox": [
1299
+ 276,
1300
+ 488,
1301
+ 722,
1302
+ 523
1303
+ ],
1304
+ "page_idx": 7
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "text": "Evidence is presented in Dziugaite & Roy (2017) that the distance traveled bounds are tighter in practice than traditional L2 generalization bounds. ",
1309
+ "bbox": [
1310
+ 174,
1311
+ 531,
1312
+ 820,
1313
+ 561
1314
+ ],
1315
+ "page_idx": 7
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "text": "6 MMI PREDICTIVE CODING ",
1320
+ "text_level": 1,
1321
+ "bbox": [
1322
+ 174,
1323
+ 580,
1324
+ 429,
1325
+ 598
1326
+ ],
1327
+ "page_idx": 7
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "Recall that in MMI predictive coding we assume a population distribution on pairs $( x , y )$ where we think of $x$ as past raw sensory signals (images or sound waves) and $y$ as a future sensory signal. We then consider the problem of learning stochastic coding functions $C _ { x }$ and $C _ { y }$ that maximizes the mutual information $I ( C _ { x } ( x ) , C _ { y } ( y ) )$ while limiting the entropies $H ( C _ { x } ( x ) )$ and $H ( C _ { y } ( y ) )$ . Here we propose representing the mutual information as a difference of entropies. ",
1332
+ "bbox": [
1333
+ 173,
1334
+ 612,
1335
+ 825,
1336
+ 683
1337
+ ],
1338
+ "page_idx": 7
1339
+ },
1340
+ {
1341
+ "type": "equation",
1342
+ "img_path": "images/920fbcd492e6b9168877c5c8393bbc1a44a0cd7c4941cc403c07e8e961f03080.jpg",
1343
+ "text": "$$\nI ( C _ { x } ( x ) , C _ { y } ( y ) ) = H ( C _ { y } ( y ) ) - H ( C _ { y } ( y ) | C _ { x } ( x ) )\n$$",
1344
+ "text_format": "latex",
1345
+ "bbox": [
1346
+ 328,
1347
+ 689,
1348
+ 668,
1349
+ 707
1350
+ ],
1351
+ "page_idx": 7
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "When the coding functions are parameterized by a function $\\Psi$ , the above quantities become a function of $\\Psi$ . We can then formulate the following nested optimization problem. ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 712,
1359
+ 825,
1360
+ 741
1361
+ ],
1362
+ "page_idx": 7
1363
+ },
1364
+ {
1365
+ "type": "equation",
1366
+ "img_path": "images/4e8f70c35b0a4fe303fa3684b4ea80e65929c04990bdc91c3391dd80f7f110e5.jpg",
1367
+ "text": "$$\n\\begin{array} { r c l } { \\Psi ^ { * } } & { = } & { \\underset { \\Psi } { \\mathrm { a r g m a x } } \\ \\hat { H } ( C _ { y } ( y ) ; \\ \\Psi ) - \\hat { H } ( C _ { y } ( y ) | C _ { x } ( x ) ; \\Psi ) } \\\\ & & \\\\ { \\hat { H } ( C _ { y } ( y ) ; \\ \\Psi ) } & { = } & { \\underset { \\Theta } { \\mathrm { i n f } } \\ H ( C _ { y } ( y ) , G _ { \\Theta } ; \\ \\Psi ) } \\\\ { \\hat { H } ( C _ { y } ( y ) | C _ { x } ( x ) ; \\ \\Psi ) } & { = } & { \\underset { \\Phi } { \\mathrm { i n f } } \\ H ( C _ { y } ( y ) , G _ { \\Phi } | C _ { x } ( x ) ; \\ \\Psi ) } \\end{array}\n$$",
1368
+ "text_format": "latex",
1369
+ "bbox": [
1370
+ 250,
1371
+ 763,
1372
+ 746,
1373
+ 863
1374
+ ],
1375
+ "page_idx": 7
1376
+ },
1377
+ {
1378
+ "type": "text",
1379
+ "text": "The above quantities are expectations over the population distribution on pairs $( x , y )$ . In practice we have only a finite sample form the population. But the preceding section presents theoretical evidence that, unlike lower bound estimators, upper bound cross-entropy estimators can meaningfully estimate large entropies from feasible samples. ",
1380
+ "bbox": [
1381
+ 173,
1382
+ 867,
1383
+ 825,
1384
+ 924
1385
+ ],
1386
+ "page_idx": 7
1387
+ },
1388
+ {
1389
+ "type": "text",
1390
+ "text": "7 CONCLUSIONS ",
1391
+ "text_level": 1,
1392
+ "bbox": [
1393
+ 176,
1394
+ 102,
1395
+ 328,
1396
+ 117
1397
+ ],
1398
+ "page_idx": 8
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "text": "Maximum mutual information (MMI) predictive coding seems well motivated as a method of unsupervised pretraining of representations that maintain semantic signal while dropping uninformative noise. However, the maximization of mutual information is a difficult training objective. We have given theoretical arguments that representing mutual information as a difference of entropies, and estimating those entropies by minimizing cross-entropy loss, is a more statistically justified approach than maximizing a lower bound on mutual information. ",
1403
+ "bbox": [
1404
+ 174,
1405
+ 133,
1406
+ 823,
1407
+ 217
1408
+ ],
1409
+ "page_idx": 8
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "Unfortunately cross-entropy upper bounds on entropy fail to provide either upper or lower bounds on mutual information — mutual information is a difference of entropies. We cannot rule out the possible existence of superintelligent models, models beyond current expressive power, that dramatically reduce cross-entropy loss. Lower bounds on entropy can be viewed as proofs of the non-existence of superintelligence. We should not surprised that such proofs are infeasible. ",
1414
+ "bbox": [
1415
+ 174,
1416
+ 224,
1417
+ 825,
1418
+ 294
1419
+ ],
1420
+ "page_idx": 8
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "REFERENCES ",
1425
+ "text_level": 1,
1426
+ "bbox": [
1427
+ 176,
1428
+ 314,
1429
+ 285,
1430
+ 329
1431
+ ],
1432
+ "page_idx": 8
1433
+ },
1434
+ {
1435
+ "type": "text",
1436
+ "text": "Sanjeev Arora, Andrej Risteski, and Yi Zhang. Do gans learn the distribution? some theory and empirics. ICLR, 2018. ",
1437
+ "bbox": [
1438
+ 174,
1439
+ 338,
1440
+ 820,
1441
+ 366
1442
+ ],
1443
+ "page_idx": 8
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Ishmael Belghazi, Sai Rajeswar, Aristide Baratin, R Devon Hjelm, and Aaron Courville. Mine: mutual information neural estimation. arXiv preprint arXiv:1801.04062, 2018. ",
1448
+ "bbox": [
1449
+ 173,
1450
+ 373,
1451
+ 818,
1452
+ 404
1453
+ ],
1454
+ "page_idx": 8
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "Anthony J Bell and Terrence J Sejnowski. An information-maximization approach to blind separation and blind deconvolution. Neural computation, 7(6):1129–1159, 1995. ",
1459
+ "bbox": [
1460
+ 173,
1461
+ 411,
1462
+ 821,
1463
+ 440
1464
+ ],
1465
+ "page_idx": 8
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "M. Donsker and S. Varadhan. Asymptotic evaluation of certain markov process expectations for large time, iv. Communications on Pure and Applied Mathematics, 36(2):183–212, 1983. ",
1470
+ "bbox": [
1471
+ 173,
1472
+ 449,
1473
+ 823,
1474
+ 478
1475
+ ],
1476
+ "page_idx": 8
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "Gintare Karolina Dziugaite and Daniel M. Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv:1703.11008, 2017. ",
1481
+ "bbox": [
1482
+ 173,
1483
+ 486,
1484
+ 823,
1485
+ 529
1486
+ ],
1487
+ "page_idx": 8
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Shuyang Gao, Greg Ver Steeg, and Aram Galstyan. Efficient estimation of mutual information for strongly dependent variables. arXiv preprint arXiv:1411.2003, 2014. ",
1492
+ "bbox": [
1493
+ 173,
1494
+ 536,
1495
+ 825,
1496
+ 566
1497
+ ],
1498
+ "page_idx": 8
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. arXiv preprint arXiv:1808.06670, 2018. ",
1503
+ "bbox": [
1504
+ 178,
1505
+ 574,
1506
+ 823,
1507
+ 617
1508
+ ],
1509
+ "page_idx": 8
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "Alexander Kraskov, Harald Stoegbaue, and Peter Grassberger. Estimating mutual information. arXiv preprint arXiv:cond-mat/0305641, 2003. ",
1514
+ "bbox": [
1515
+ 174,
1516
+ 625,
1517
+ 823,
1518
+ 655
1519
+ ],
1520
+ "page_idx": 8
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "Ralph Linsker. Self-organization in a perceptual network. Computer, 21(3):105–117, 1988. ",
1525
+ "bbox": [
1526
+ 176,
1527
+ 661,
1528
+ 776,
1529
+ 678
1530
+ ],
1531
+ "page_idx": 8
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "Charles Marsh. Introduction to continuous entropy. www.crmarsh.com/static/pdf/Charles Marsh Continuous Entropy.pdf, 2013. ",
1536
+ "bbox": [
1537
+ 169,
1538
+ 685,
1539
+ 962,
1540
+ 715
1541
+ ],
1542
+ "page_idx": 8
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "David McAllester. A pac-bayesian tutorial with a dropout bound. arXiv preprint arXiv:1307:2118, 2013. ",
1547
+ "bbox": [
1548
+ 173,
1549
+ 722,
1550
+ 823,
1551
+ 752
1552
+ ],
1553
+ "page_idx": 8
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "David McAllester. Information Theoretic Co-Training. arXiv preprint arXiv:1802.07572, 2018. ",
1558
+ "bbox": [
1559
+ 174,
1560
+ 760,
1561
+ 803,
1562
+ 776
1563
+ ],
1564
+ "page_idx": 8
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "David McAllester and Robert Schapire. On the convergence rate of good-turing estimators. COLT, 2000. ",
1569
+ "bbox": [
1570
+ 174,
1571
+ 784,
1572
+ 821,
1573
+ 813
1574
+ ],
1575
+ "page_idx": 8
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. ",
1580
+ "bbox": [
1581
+ 173,
1582
+ 820,
1583
+ 821,
1584
+ 849
1585
+ ],
1586
+ "page_idx": 8
1587
+ },
1588
+ {
1589
+ "type": "text",
1590
+ "text": "Alon Orlitsky and Ananda Theertha Suresh. Competitive distribution estimation: Why is goodturing good. NIPS, 2015. ",
1591
+ "bbox": [
1592
+ 173,
1593
+ 858,
1594
+ 821,
1595
+ 887
1596
+ ],
1597
+ "page_idx": 8
1598
+ },
1599
+ {
1600
+ "type": "text",
1601
+ "text": "Alon Orlitsky, Narayana Santhanam, and Junan Zhang1. Always good turing: Asymptotically optimal probability estimation. Science, 302(5644), 2003. ",
1602
+ "bbox": [
1603
+ 174,
1604
+ 895,
1605
+ 820,
1606
+ 924
1607
+ ],
1608
+ "page_idx": 8
1609
+ },
1610
+ {
1611
+ "type": "text",
1612
+ "text": "Karl Stratos. Mutual information maximization for simple and accurate part-of-speech induction. arXiv preprint arXiv:1804.07849, 2018. ",
1613
+ "bbox": [
1614
+ 173,
1615
+ 103,
1616
+ 823,
1617
+ 132
1618
+ ],
1619
+ "page_idx": 9
1620
+ },
1621
+ {
1622
+ "type": "text",
1623
+ "text": "Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. arXiv preprint physics/0004057, 2000. ",
1624
+ "bbox": [
1625
+ 171,
1626
+ 141,
1627
+ 823,
1628
+ 170
1629
+ ],
1630
+ "page_idx": 9
1631
+ }
1632
+ ]
parse/train/BkedwoC5t7/BkedwoC5t7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkedwoC5t7/BkedwoC5t7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/CaCHjsqCBJV/CaCHjsqCBJV.md ADDED
@@ -0,0 +1,488 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DIFFERENTIABLE OPTIMIZATION OF GENERALIZED NONDECOMPOSABLE FUNCTIONS USING LINEAR PROGRAMS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We propose a framework which makes it feasible to directly train deep neural networks with respect to popular families of task-specific non-decomposable performance measures such as AUC, multi-class AUC, $F$ -measure and others. A common feature of the optimization model that emerges from these tasks is that it involves solving a Linear Programs (LP) during training where representations learned by upstream layers influence the constraints. The constraint matrix is not only large but the constraints are also modified at each iteration. We show how adopting a set of influential ideas proposed by Mangasarian for 1-norm SVMs – which advocates for solving LPs with a generalized Newton method – provides a simple and effective solution. In particular, this strategy needs little unrolling, which makes it more efficient during backward pass. While a number of specialized algorithms have been proposed for the models that we describe here, our module turns out to be applicable without any specific adjustments or relaxations. We describe each use case, study its properties and demonstrate the efficacy of the approach over alternatives which use surrogate lower bounds and often, specialized optimization schemes. Frequently, we achieve superior computational behavior and performance improvements on common datasets used in the literature.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Commonly used losses such as cross-entropy used in deep neural network (DNN) models can be expressed as a sum over the per-sample losses incurred by the current estimate of the model. This allows the direct use of mature optimization routines, and is sufficient for a majority of use cases. But in various applications ranging from ranking/retrieval systems to class imbalanced learning, the most suitable losses for the task do not admit a “decompose over samples” form. Examples include Area under the ROC curve (AUC), multi-class variants of AUC, $F$ -score, Precision at a fixed recall $( \mathrm { P } @ \mathrm { R } )$ and others. Optimizing such measures in a scalable manner can pose challenges even in the shallow setting. Since the compromise involved in falling back on a decomposable loss when a non-decomposable objective may be more appropriate for the task at hand can range from negligible to concerning depending on the application, the last few years have seen a number of interesting approaches proposed to efficiently deal with such structured and non-decomposable losses. To this end, recent algorithms for AUC maximization have been developed based on convex surrogate losses Liu et al. (2018); Natole et al. (2018) in a linear model or in conjuction with a deep neural network Liu et al. (2019) as well as stochastic and online variations (Ataman et al. (2006); Cortes & Mohri (2004); Gao et al. (2013); Liu et al. (2018; 2019)) are available. Methods for measures other than the AUC have also been studied – exact algorithms for optimizing $F$ -score Nan et al. (2012); Dembczynski et al. (2011), optimizing average precision through direct optimization Song et al. (2016), scalable methods for non-decomposable objectives Eban et al. (2017); Venkatesh et al. (2019) and using a structured hinge-loss upper bound to optimize average precision and NDCG Mohapatra et al. (2018). Recently, the AP-Perf method Fathony & Kolter (2020) showed how custom non-decomposable performance measures can be conveniently incorporated into differentiable pipelines.
12
+
13
+ It is known that a number of these non-decomposable objectives can be expressed in the form of an integer program that can be relaxed to a linear program (LP). Earlier approaches adapted methods for structured SVMs Joachims et al. (2009) or cutting plane techniques Yue et al. (2007) and were interesting but had difficulty scaling to larger datasets. More recently, strategies have instead focused on the stochastic setting where we operate on a mini-batch of samples. A common strategy, which is generally efficient, is to study the combinatorial form of one or more losses of interest and derive surrogate lower bounds. These are then tackled via specialized optimization routines. The arguably more direct alternative of optimizating as a module embedded in a DNN architecture remained difficult until recently – but OptNet Amos & Kolter (2017) and CVXPY now offer support for solving certain objectives as differentiable layers within a network. Further, methods based on implicit differentiation have been applied to various problems, showing impressive performance.
14
+
15
+ Our approach is based on the premise that tackling the LP form of the non-decomposable objective as a module within the DNN, one which permits forward and reverse mode differentiation and can utilize in-built support for specialized GPU hardware in modern libraries such as PyTorch, is desirable. First, as long as a suitable LP formulation for an objective is available, the module may be directly used. Second, based on which scheme is used to solve the LP, one may be able to provide guarantees for the non-decomposable objective based on simple calculations (e.g., number of constraints, primal-dual gap). The current tools, however, do not entirely address all these requirements, as we briefly describe next. A specific characteristic of the LPs that arise from the losses mentioned above is that the constraints are modified at each iteration – as a function of the updates to the representations of the data in the upstream layers. Further, the mini-batch of samples changes at each iteration. Solvers within CVXPY, are effective but due to their general-purpose nature, rely on interior point methods. OptNet is quite efficient but designed for quadratic programs (QP): the theoretical results and its efficiency depends on factorizing a matrix in the quadratic term in the objective (which is zero/noninvertible for LPs). The primal-dual properties and implicit differentiation for QPs do not easily translate to LPs, and efficient ways of dealing with constraints that are iteratively updated are not widely available at this time. In principle, of course, backpropagating through a convex optimization model (and in particular, LPs) is not an unsolved problem. For LPs, we can take derivatives of the optimal value (or the optimal solution) of the model with respect to the LP parameters, and this can be accomplished by calling a powerful external solver. Often, this would involve running the solver on the CPU, which introduces overhead. . The ideas in Meng et al. (2020) are relevant in that the optimization steps for the LP are unrolled and only involve simple linear algebra operations but the formulation is applicable when the number of constraints are about the same as the number of variables – an assumption that does not hold for the models we will study.
16
+
17
+ In $\ S 3$ , we show that the modified Newton’s algorithm in Mangasarian (2004) can be used for deep neural network (DNN) training in an end-to-end manner without requiring an external solvers where support for GPUs remains limited. Specifically, by exploiting self-concordance of the objective, we show that the algorithm can converge globally without line search strategies. On the practical side, we analyze the gradient properties, and some modifications to improve stability during backpropagation. We show that this scheme based on Mangasarian’s parametric exterior penalty formulation of the primal LP can be a computationally effective and scalable strategy to solve LPs with a large number of constraints.
18
+
19
+ # 2 NONDECOMPOSABLE FUNCTIONS AND CORRESPONDING LP MODELS
20
+
21
+ We first present a standard LP form and then reparameterize several generalized nondecomposable objectives in this way, summarized in Table 5 in the appendix. We start with the binary AUC, extend it to multi-class AUC, and then later, show a ratio objective, $F$ -score. Some other objectives are described in the appendix.
22
+
23
+ # 2.1 NOTATIONS AND GENERALIZED LP FORMULATION
24
+
25
+ Notations. We use the following notations:
26
+
27
+ (i) $n$ : number of samples used in training.
28
+ (ii) $\ b { X } \in \mathbb { R } ^ { n \times d }$ : the explanatory features fed to a classifier (e.g., parameterized by w);
29
+ (iii) $f ( x _ { i } )$ (or $f ( i ) )$ ): a score function for the classifier where $x _ { i } \in X$ such that $f ( X ) = \mathbf { w } X$ ;
30
+ (iv) $Y \in \{ 0 , 1 \}$ : target label and $\hat { Y } \in \{ 0 , 1 \}$ : predicted label for binary classification, both in $\mathbb { R } ^ { n }$ ;
31
+ (v) $\phi ( \cdot )$ : non linear function applied on $f ( X )$ ;
32
+ (vi) $A \otimes B$ : Kronecker product of matrices $A$ and $B$ .
33
+ (vii) $I _ { r }$ : Identity matrix of size $r$ and $\mathbb { 1 }$ is the indicator function.
34
+ (viii) $\mathbf { B } _ { k , - }$ (and $\mathbf { B } _ { | , k ^ { \prime } } )$ gives the $k$ -th row (and $k ^ { \prime }$ -th) column of $\mathbf { B }$ .
35
+
36
+ LP formulation. We consider a general linear program (LP) that contains nonnegative variables as well as inequality and equality constraints. The form of the LP is given as
37
+
38
+ $$
39
+ \operatorname* { m a x } _ { u , v } g ^ { T } u + h ^ { T } v \quad \mathrm { s . t } \quad E u + F v \leq p , \quad B u + G v = q \quad u , v \geq 0
40
+ $$
41
+
42
+ We can write it more succinctly as
43
+
44
+ variable ${ \mathrm { } } = [ u ~ v ] ; { \mathrm { ~ c o e f f i c i e n t } } c = [ - g ~ - h ] ; { \mathrm { ~ c o n s t r a i n t s } } A = { \left[ \begin{array} { l l l } { E } & { B } & { - B } \\ { F } & { G } & { - G } \end{array} \right] } ^ { T } ; { \mathrm { ~ c o n s t a n t s } } b = [ p q ~ - q ]$ The corresponding primal LP becomes $\operatorname* { m i n } _ { x } c ^ { T } x$ s.t $A x \leq b$ , $x \geq 0$ .
45
+
46
+ # 2.2 MAXIMIZING AUC
47
+
48
+ The Area under the ROC Curve (AUC) calculates the probability that a classifier $f ( \cdot )$ will rank a randomly chosen positive sample higher than a randomly chosen negative sample. Since AUC varies between 0 and 1, where 1 represents all positives being ranked above the negatives. AUC may be estimated using the Wilcoxon-Mann-Whitney (WMW) Statistic Hanley & McNeil (1982), as
49
+
50
+ Definition 2.1 (AUC). Let $n$ be the number of samples. Let $X _ { + }$ (and $X _ { - }$ resp.) be the set of positive (and negative reAUC is given as $| X _ { + } | + | X _ { - } | = n$ $| \cdot |$ f the set. Then,. $\begin{array} { r } { \Big ( \sum _ { i = 1 } ^ { | X _ { + } | } \sum _ { i = 1 } ^ { | X _ { - } | } \mathbb { 1 } _ { f ( x _ { i } ) > f ( x _ { j } ) } \Big ) / \big ( | X _ { + } | | X _ { - } | \big ) \mathrm { ~ f o r ~ } x _ { i } : i \in \{ 1 , \cdots , n \} . } \end{array}$
51
+
52
+ Here, we follow Ataman et al. (2006) to calculate the AUC based on the WMW statistic as follows.
53
+
54
+ $$
55
+ \operatorname* { m i n } _ { z _ { i j } } \sum _ { i = 1 } ^ { | X _ { + } | } \sum _ { j = 1 } ^ { | X _ { - } | } z _ { i j } \quad \mathrm { s . t . } \qquad f ( x _ { i } ) - f ( x _ { j } ) \geq \epsilon - z _ { i j } \quad \mathrm { ~ w h e r e ~ } x _ { i } \in X _ { + } , x _ { j } \in X _ { - } ; \quad z _ { i j } \geq 0 ,
56
+ $$
57
+
58
+ where $\epsilon$ is a given constant. The model in (2), maximizes AUC indirectly, by minimizing the number of pairs (one each from the positive and negative classes) where the positive sample is not ranked higher than the negative sample: so, the number of zero entries in $z$ equals the number of pairs where this condition is not true. To compute the AUC, we do:
59
+
60
+ $$
61
+ \mathbf { A U C } = ( n - \left. z \right. _ { 0 } ) / \left( \left. X _ { + } \right. \left. X _ { - } \right. \right) = \left( n - \sum _ { i } \sum _ { j } \epsilon ^ { - 1 } \mathbf { r e l u } ( 0 , - z _ { i j } + \epsilon ) \right) / \left( \left. X _ { + } \right. \left. X _ { - } \right. \right) .
62
+ $$
63
+
64
+ If $z _ { i j }$ is $0$ , then $\epsilon ^ { - 1 } \mathrm { r e l u } ( 0 , - z _ { i j } + \epsilon )$ equals 1. Otherwise $z _ { i j } > 0$ , it follows from the first constraint in (2), that $z _ { i j } \geq \epsilon$ , so $\epsilon ^ { - 1 } \mathrm { r e l u } ( 0 , - z _ { i j } + \epsilon )$ equals 0. Observe that in (2), the number of constraints is $| X | | X _ { - } |$ , which is quadratic in $n$ .
65
+
66
+ # 2.3 MAXIMIZING MULTI-CLASS AUC
67
+
68
+ An extension of AUC to the multi-class setting, $\operatorname { A U C } _ { \mu }$ , is defined in Kleiman & Page (2019). The $\operatorname { A U C } _ { \mu }$ objective optimizes an indicator matrix computed on the orientation function, $O _ { i , j }$ defined as,
69
+
70
+ Definition 2.2 (Orientation Function; Kleiman & Page (2019)). Assume we have $K$ classes $\{ y _ { 1 } , \cdots , y _ { K } \}$ . Let $\mathbf { f } ( x _ { i } , - ) \in \mathbb { R } ^ { K }$ indicate the model’s prediction on $x _ { i }$ for each of the $K$ classes (class-specific probability)1. Let $\boldsymbol { x } _ { i } ^ { * }$ provide the index of $x _ { i }$ ’s true class label. Let $\mathbf { P } \in \mathbb { R } ^ { k \times k }$ be a partition matrix where $\mathbf { P } _ { k , k ^ { \prime } }$ is the cost of classifying a sample as class $k$ when it should be $k ^ { \prime }$ . Define $\mathbf { v } _ { k k ^ { \prime } } = \mathbf { P } _ { k , - } - \mathbf { P } _ { k ^ { \prime } , - }$ and $\widetilde { \mathbf { v } } = \mathbf { v } _ { x _ { i } ^ { * } x _ { j } ^ { * } } \in \mathbb { R } ^ { K }$ . Then, $O _ { i , j } = ( \widetilde { \mathbf { v } } _ { x _ { i } ^ { * } } - \widetilde { \mathbf { v } } _ { x _ { j } ^ { * } } ) ( \langle \widetilde { \mathbf { v } } , \mathbf { f } ( x _ { i } , - ) \rangle - \langle \widetilde { \mathbf { v } } , \mathbf { f } ( x _ { j } , - ) \rangle )$
71
+
72
+ Here, $\mathbf { v } _ { k k ^ { \prime } }$ ranks the instances by their cost difference between assignments to class $k$ and $k ^ { \prime }$ . For two classes, say indexed by 1 and 2, $\mathbf { v } _ { 1 , 2 } \cdot \mathbf { f } = 0$ is the decision boundary between the classes. The ranking is correct for $x _ { i }$ and $x _ { j }$ (with correct labels 1 and 2 resp.) if the orientation of the points w.r.t. the decision boundary is the same as those of the class labels (converted to one-hot vectors).
73
+
74
+ Then $\begin{array} { r } { \mathrm { A U C } _ { \mu } = \sum _ { k < k ^ { \prime } } g _ { k , k ^ { \prime } } \sum _ { i \in D _ { k } , j \in D _ { k } ^ { \prime } } \mathbb { 1 } _ { O _ { i , j } \ge 0 } } \end{array}$ , where $D _ { k }$ is the index set of samples having same class label $k$ and $g$ is a constant derived from class sizes. In formulating the linear program, we observe that the model is dictated on how $\mathbf { P }$ is defined. One way is to set $\mathbf { P } ( k , k ) \mathbf { \bar { \Psi } } = \mathbf { \bar { 0 } } \forall k$ and 1 for all other entries. We can also define a $\mathbf { P }$ with arbitary entries or formulate AUC in a one-vs-all setting. Here, we show the model in the first case (the other two cases are discussed in
75
+
76
+ Appendix A.1). Similar to our previous formulation, the goal is to minimize the sum of negative values of the orientation function, rather than maximize the sum of positive values. Let $\widetilde { \mathbf { f } } ( i , j ) =$ $\mathbf { f } ( x _ { i } , x _ { i } ^ { * } ) - \mathbf { f } ( x _ { j } , x _ { i } ^ { * } ) + \mathbf { f } ( x _ { j } , x _ { j } ^ { * } ) - \mathbf { f } ( x _ { i } , x _ { i } ^ { * } ) .$ . Then the LP formulation is.
77
+
78
+ $$
79
+ \mathbf { A U C } _ { \mu } ^ { \mathrm { b i n } } : \operatorname* { m i n } _ { z _ { i j } } \sum _ { i = 1 } ^ { n } \sum _ { j = 1 : x _ { i } ^ { * } < x _ { j } ^ { * } } ^ { n } z _ { i j } \quad \mathrm { s . t . } \quad \widetilde { \mathbf { d } } _ { i j } \widetilde { \mathbf { f } } ( i , j ) \geq \epsilon - z _ { i j } , \quad \forall i , j : x _ { i } ^ { * } < x _ { j } ^ { * } \qquad z _ { i j } \geq 0
80
+ $$
81
+
82
+ Here $\widetilde { \mathbf { d } } _ { i j } = \widetilde { \mathbf { v } } _ { { x } _ { i } ^ { * } } - \widetilde { \mathbf { v } } _ { { x } _ { j } ^ { * } }$ . This can be seen as an extension of our binary AUC model, where the $z _ { i j }$ is the ranking between a pair of points defined for multiple classes.
83
+
84
+ # 2.4 MAXIMIZING $F$ -SCORE
85
+
86
+ The $F$ -score (or $F$ -measure) is a representative of objectives expressed as ratios of some combination of True positives (TP), False positives (FP), True negatives (TN) and False negatives (FN). The general form of the ratio functions and formulations for other objectives is in the Appendix A.2. Specifically, $\cdot$ -score is defined as follows:
87
+
88
+ $$
89
+ \begin{array} { r } { F \mathrm { - s c o r e } = \frac { 2 ( \mathrm { P r e c i s i o n } \times \mathrm { R e c a l l } ) } { \mathrm { P r e c i s i o n } + \mathrm { R e c a l l } } = \frac { 2 \mathrm { T P } } { 2 \mathrm { T P } + \mathrm { F P } + \mathrm { F N } } = \frac { 2 ( Y ^ { T } \times \hat { Y } ) } { \mathbf { 1 } ^ { T } Y + \mathbf { 1 } ^ { T } \hat { Y } } } \end{array}
90
+ $$
91
+
92
+ The second part of the equality comes from simplying the precision $\frac { T P } { T P + F P } )$ and recall $( \frac { T P } { T P + F N } )$ based formula Dembczynski et al. (2011). The last part is obtained by replacing TP with $( Y ^ { T } \times \hat { Y } )$ , FP with $( 1 - Y ) ^ { T } \times { \hat { Y } }$ and FN with $( Y ) ^ { T } \times ( 1 - \hat { Y } )$ as functions of $Y$ and $\hat { Y }$ . This leads to the following integer fractional optimization model,
93
+
94
+ $$
95
+ F \mathrm { - s c o r e } = \operatorname* { m a x } _ { \hat { Y } } \frac { \mathbf { c } ^ { T } \hat { Y } } { 1 ^ { T } \hat { Y } + b } \quad \mathrm { s . t . } \quad \hat { Y _ { i } } \in [ 0 , 1 ] , \ i = 1 , \dots , n \mathrm { ~ w h e r e ~ } c = 2 Y \mathrm { a n d ~ } b = \sum _ { i = 1 } ^ { n } Y _ { i } .
96
+ $$
97
+
98
+ To solve this, we first relax the constraint on $\hat { Y }$ and reformulate the model as the following LP, by introducing two variables $z \in R ^ { n }$ and $t \in R ^ { 1 }$ where $\begin{array} { r } { z = \frac { b \hat { Y } } { 1 ^ { T } \hat { Y } + b } } \end{array}$ , $\begin{array} { r } { t = \frac { b } { 1 ^ { T } \hat { Y } + b } } \end{array}$ and $i \in \{ 1 , \cdots , n \}$ : ,
99
+
100
+ $$
101
+ \operatorname* { m a x } _ { z , t } \frac { \mathbf { c } ^ { T } z } { b } \quad \mathrm { s . t } \quad \underbrace { 1 ^ { T } z + b t = b ; } _ { ( a ) } \underbrace { z _ { i } \leq t } _ { ( b ) } ; \underbrace { \phi ( f ( x _ { i } ) ) t \leq z _ { i } \leq ( 1 + \phi ( f ( x _ { i } ) ) ) t } _ { ( c ) } ; 1 \geq z _ { i } , t \geq 0 ,
102
+ $$
103
+
104
+ Remark 1. (a) ensures the appropriate relation between $z$ , $t$ and $\hat { Y }$ and is essentially a reformulaton of the ratio objective as a linear function with a fixed denominator. $\hat { Y }$ is recovered from the solution to the linear program by computing $\begin{array} { r } { \hat { Y } _ { i } ~ = ~ \frac { z _ { i } } { t } } \end{array}$ when $t > 0$ and $\hat { Y } _ { i } ~ = ~ z _ { i }$ otherwise. $( b )$ sets an upper bound for $\hat { Y } _ { i } \leq 1 .$ . (c) ties the output of the previous layer $\phi ( f ( x _ { i } ) )$ (a classifier score for $\hat { Y _ { i } }$ , see the definition in Section 2.1) as a input in this layer. Assume $\phi ( . ) \in \{ - 1 , 1 \}$ (ensured if $\phi$ is sigmoid or tanh) is the indicator of the class label (based on sign). We want ${ \hat { Y } } _ { i } \geq \phi ( f ( x _ { i } ) )$ and $\hat { Y _ { i } } \leq 1 + \phi ( f ( x _ { i } ) )$ . If $\hat { Y _ { i } }$ is $\{ 0 , 1 \}$ , these two constraints ensures that $\hat { Y _ { i } } = 0$ when $\phi ( f ( x _ { i } ) ) \leq 0$ and $\hat { Y } _ { i } = 1$ when $\phi ( f ( x _ { i } ) ) > 0$ . When $\hat { Y _ { i } }$ is relaxed and replaced with $z$ and $t$ , we get the equivalent form (c).
105
+
106
+ This model imposes $4 n$ constraints for $n$ samples. Since this is a maximization, a solution to the LP, $O _ { \hat { Y } }$ , is an upper bound on the integer objective ${ o p t } ^ { * }$ , and serves as the loss.
107
+
108
+ # 3 BACKPROPAGATION VIA FAST EXTERIOR PENALTY OPTIMIZATION
109
+
110
+ Unlike traditional feedforward networks, where the output of each layer is a relatively simple (though non-linear) function of the previous layer, a LP layer must solve a constrained optimization problem, therefore implementing scalable and efficient backpropagation schemes that minimizes computational overhead requires more care and as reviewed in $\ S 1$ , is an active topic of research. This problem is, of course, not unique to LPs and manifests in differentiable sorting Mena et al. (2018) and formulating quadratic or cone programs Amos et al. (2017). One may unroll gradient descent steps Amos et al. (2017); Goodfellow et al. (2013); Metz et al. (2016) or use projections Zeng et al. (2019). Recently
111
+
112
+ Agrawal et al. (2019) introduced a package for differentiable constrained convex programming, which includes LPs as a special case. For LPs, Meng et al. (2020) presents an unrolled scheme and Blondel et al. (2020) shows that we can differentiate through LP formulations of sorting/ranking exactly by using smooth approximations of projection steps. Berthet et al. (2020) describes an interesting approach where one computes approximate gradients through ranking/shortest path problems by stochastic perturbation techniques.
113
+
114
+ Remark 2. Some previous works Zeng et al. (2019) have considered LPs where the constraints are deterministic (for a fixed input dimension), i.e., do not depend on the data $X$ , which is different from the LPs in $\ S 2 . 2 \mathrm { - } 2 . 4$ .
115
+
116
+ Note that such perturbation techniques in Berthet et al. (2020) are applicable to our LPs as well. For example, the Fenchel Young losses as defined in Berthet et al. (2020) is attractive because there is no need to compute the Jacobian. From the implementation standpoint, one could simply think of the backward pass as a function given the input and output of the forward pass. But the gradient expressions of the losses is an expectation and hence may require multiple calls to a LP solver in order to approximate the expectation. although parallelization and warm starts were shown to alleviate this dependency by sampling in parallel.
117
+
118
+ Rationale. Consider a LP with a large $m$ number of constraints in fixed dimensions $n$ $( n \ll m )$ ). This assumption holds in all formulations in $\ S 2$ . This is because we assume that the architecture is fixed whereas minibatch size depends on the complexity of the task (stable gradient or when noise in gradient is high). Hence, solving such LPs using off-the-shelf solvers as in Berthet et al. (2020) may slow down the training process. The strategy in Agrawal et al. (2019) does offer benefits over Amos & Kolter (2017) for sparse QPs. Our strategy is to run Mangasarian’s Newton’s method on an exterior penalty function of the LP. There are two advantages: (i) during forward pass, quadratic local convergence of Newton’s method indicates that unrolling the method may be a reasonable choice; and further (ii) based on the relationship between dual and primal variables, and the exactness of the exterior penalty we can show that backward pass is independent of $m$ . We will discuss both these results and some modifications to deal with discontinuous Hessian (and its inverse) that is required for Newton’s method. A similar approach is proposed in Amos & Kolter (2017) in which Primal-Dual Interior Point methods with implicit differentiation is used for differentiation purposes. But the exterior penalty in (6) satisfies an interesting property: primal and dual solutions are related by a closed form expression which can be exploited for efficient backpropagation.
119
+
120
+ # 3.1 FORWARD PASS USING NEWTON’S ALGORITHM
121
+
122
+ A key requirement for fast automatic (forward or reverse mode) differentiation is that we can perform the forward pass efficiently. In our setting, we seek to solve and backpropagate through an LP. We will focus on reverse mode differentiation since it is the most suitable for DNN training.
123
+
124
+ Given a primal LP, for a fixed accuracy $\epsilon > 0$ , Mangasarian (2004) solves an unconstrained problem,
125
+
126
+ $$
127
+ \operatorname* { m i n } _ { y } g ( y ) : = \frac { 1 } { 2 } \left\| \sigma ( A y - b ) \right\| ^ { 2 } + \epsilon c ^ { T } y ,
128
+ $$
129
+
130
+ where $\sigma ( \cdot ) = \operatorname* { m a x } ( \cdot , 0 )$ represents the elementwise relu function. A modified Newton’s method can be use to solve equation 6 that performs the following iterations:
131
+
132
+ $$
133
+ y = y + \lambda d \mathrm { w h e r e } d = \tilde { H } ( y ) ^ { - 1 } \nabla g ( y ) : = ( \nabla ^ { 2 } g ( y ) + \rho I ) ^ { - 1 } \nabla g ( y ) .
134
+ $$
135
+
136
+ In large scale settings of $A , b$ , such Newton methods are known to perform empirically better than gradient descent Mangasarian (2006); Keerthi et al. (2007). We will discuss if this holds for our purposes shortly.
137
+
138
+ Why is Newton’s method applicable for minibatches? In general, the convergence of Newton’s method depends strongly on initialization, i.e., we can only provide local convergence results. However, this is not the case for our problems since in our examples, either the level sets are bounded from below; or the feasible set is compact, as noted in Mangasarian (2004). There are two reasons why the result, by itself, is insufficient for our purposes: (i) it assumes that we can perform line search to satisfy Armijo condition; (ii) even with line search, the result does not provide a rate of convergence. In DNN training, such line search based convergence results can be prohibitively expensive. The main difficulty is handling the discontinuity in the Hessian. As a remedy, we use self concordance of (6) to guarantee global convergence of (7) iterations for the exterior penalty formulation in (6). To do so, we first show a result (proof in Appendix) that characterizes the discrepancy between the actual Hessian of (6) and the modified one in (7) when $A$ is randomly distributed.
139
+
140
+ Lemma 1. Assume that $A$ is a random matrix, and fix some $y \in \mathbb { R } ^ { n }$ . Then with probability one, g in equation 6 is constant (given by $\tilde { H } , \nabla g ( y ) )$ over a sufficiently small neighborhood of y.
141
+
142
+ Intuitively, Lemma 1 states that with probability one, each $\cdot$ has a neighborhood in which the Hessian is constant. In addition, the modified Hessian is nonsingular at all points (in particular the optimal $y ^ { * } .$ ), and so we can then show the following global convergence result.
143
+
144
+ Theorem 2. Newton’s method converges globally at a linear rate with local quadratic convergence.
145
+
146
+ Proof. (Sketch) First, we use the fact that the objective in equation 6 is piecewise quadratic, and hence self concordant. Second, observe that the possible choice of Hessian are finite, and so we can choose $\rho > 0$ so that there is a descent direction without line search, that is, there exist a step size $\lambda > 0$ such that $\lambda \nabla g ( x ) ^ { T } d < 0$ . Finally, we use Theorem 4.1.12 in Nesterov (2013) to claim the result. □
147
+
148
+ Please see Appendix for the proof. The loss function is almost surely quadratic in the neighborhood of any $y$ , thus intuitively suggests local quadratic convergence independent of the starting point.
149
+
150
+ Remark 3. Convergence in Thm. 2 is guaranteed under standard constraint qualification assumptions. Linear Independent Constraint Qualification (LICQ) is satisfied for AUC, and Multi-class AUC formulations in $\ S 2$ . But the $F$ -score formulation does not satisfy LICQ, hence we need safeguarding principles in the initial iterations (until iterates get close to the optimal solution).
151
+
152
+ 3.2 BACKWARD PASS USING OPTIMAL DUAL VARIABLES AIDED BY UNROLLING
153
+
154
+ The advantage of optimizing the exterior penalty in (6) is that given an iterate $y _ { t }$ , accuracy , we can extract the optimal dual solution $v _ { t }$ by simple thresholding, that is, $v _ { t } = 1 / \epsilon ( A ^ { T } \sigma ( A \dot { y } - b ) )$ . By complementarity slackness, the nonzero coordinates of $v _ { t }$ specify the set of active constraints in $A x \leq b$ . So, given an approximate solution $y _ { t }$ such that $\begin{array} { r } { \nabla g ( y _ { t } ) \tilde { H } ( y _ { t } ) ^ { - 1 } \nabla g ( y _ { t } ) \le \epsilon } \end{array}$ , to compute the primal solution $x ^ { * }$ , we solve the “active" linear system given by $\tilde { A } \tilde { b }$ , where $\tilde { A }$ denotes the active rows of $A$ and the corresponding subvector $\tilde { b }$ . Hence, backpropagation through the layer reduces to computing derivatives of $\tilde { A } ^ { - 1 } \tilde { b }$ which is simple via automatic differentiation.
155
+
156
+ How to choose $\epsilon ?$ If we can successfully retrieve the active constraints at the optimal solution, we do not need to store the intermediate iterates $y _ { t }$ at all during the forward pass (memory efficient). However, setting $\epsilon$ correctly can be tricky for arbitrary polyhedra since it depends on the geometric properties such as facets and vertices that may be difficult to enumerate. One possible way to get around this is to use a “burn-in” period in which we increase $\epsilon$ slightly in each iteration (of deep network training) and backpropagate through the unrolled Newton’s iterations during this period. Once we see that the convergence profile has stabilized, we can fix $\epsilon$ at that value and start using the complementarity conditions and derive the active linear system $\tilde { A } ^ { - 1 } \tilde { b }$ as discussed above.
157
+
158
+ How to backpropagate through unrolled iterations? We assume that the chain rule is applicable up to this LP layer and is $\frac { \partial L } { \partial x } \frac { \partial \Breve { x } } { \partial A }$ (for one of the parameters $A$ ), and note that it is possible to find $\textstyle { \frac { \partial L } { \partial x } }$ (either directly or using a chain rule). Therefore we focus our attention on $\frac { \partial x } { \partial A }$ , which involves the LP layer. Indeed, unrolling each iteration in (7) is equivalent to a “sublayer". So in order to backpropagate we have to show the partial derivatives of each operation or step wrt to the LP parameters $A , b$ , and $c$
159
+
160
+ Our goal is to $\frac { \partial d } { \partial A }$ where $d = Q ^ { - 1 } q$ , $Q = { \tilde { H } }$ and $\boldsymbol { u } = \nabla g ( y )$ . We can use the product rule to arrive at: $\partial d = - \left( u ^ { \check { T } } \dot { Q } ^ { - 1 } \otimes Q ^ { - 1 } \right) \partial Q + Q ^ { - 1 } \partial u$ . To see this, note that we have used the chain rule to differentiate through the inverse in the first term. The second term is easy to compute similar to the computation of Hessian. For each of these terms we eventually have to compute $\frac { \partial Q } { \partial z }$ or ∂u where $z \in \{ c , A , b \}$ which can also be done by another application of chain rule. Please see Appendix A.4 for empirical verification of unrolled gradient and the one provided by $\tilde { A } ^ { - 1 } \tilde { b }$ .
161
+
162
+ Before proceeding, we should note an issue that comes up when differentiating each step of the unrolled algorithm due to the fact that the Hessian is piecewise linear (constant) as a function of the input to that particular layer. Here, some possible numerical approximations are needed, as we describe below.
163
+
164
+ Remark 4. Note that the diagonal matrix term in $\frac { \partial Q } { \partial A }$ is nondifferentiable due to the presence of the step function. However, the step function is a piecewise constant function, and hence has zero derivative almost surely, that is, in any bounded set $S$ , $x \in S$ , if a ball (of radius $r > 0 ,$ ) $B _ { r } ( x ) \subseteq S$ , then the Lebesgue measure of the set of nondifferentiable points on $S$ is zero. Please see Appendix B.3 for a formal justification where we show this by approximating the step function using a sequence of logistic functions with increasing slope parameter at the origin.
165
+
166
+ Therefore, in this setting, Remark 4 provides a way to compute an approximate sub-gradient when using Newton’s method based LP layers. The function is a piece-wise quadratic function and differentiable everywhere, and the inverse of the Hessian acts as a preconditioner.
167
+
168
+ Summary. Our forward pass involved three steps: 1. finite steps of Newton’s method using which we 2. computed the dual variable by a thresholding operation, and 3. finally, to get the primal solution, these dual variables are first used to identify the active constraints followed by solving a linear system. In order to backpropagate through these three steps, we must differentiate through each layer of our procedure including $\tilde { A } ^ { - 1 } \tilde { b }$ , independent of whether we use unrolling or Danskin’s theorem. Using Danskin’s theorem in this setting would involve differentiating through the fixed point of the Newton’s iterations similar to (regularized) gradient descent iterations considered in the iMAML work Rajeswaran et al. (2019).
169
+
170
+ # 4 EXPERIMENTS
171
+
172
+ In this section, we conduct experiments on commonly used benchmarks to show that our framework can be used to optimize multiple different objectives within deep neural networks and lead to performance gain. We start with binary AUC optimization, and then extend to multi class AUC optimization and $F$ -score optimization. We also show that nonnegative matrix factorization can be optimized in linear programming form in our framework.
173
+
174
+ # Optimizing Binary AUC
175
+
176
+ We follow the current state-of-the-art work on AUC optimization Liu et al. (2019) to conduct experiments on optimizing AUC score directly with deep neural networks. The baseline algorithms we compare with for binary AUC are cross-entropy loss and two algorithm (PPD-SG and PPDAdaGrad) from Liu et al. (2019).
177
+
178
+ Datasets: Cat&Dog, CIFAR10, CIFAR100, and STL10. Cat&Dog is a dataset from Kaggle which contains 25000 images of cats and dogs. $8 0 \%$ of the dataset is used as training set and the rest $2 0 \%$ as test set. STL10 is inspired by the CIFAR-10 dataset but with some modifications. Each class in STL10 has fewer labeled training examples than in CIFAR-10. We follow Liu et al. (2019) to use 19k/1k, 45k/5k, $4 5 \mathrm { k } / 5 \mathrm { k }$ , 4k/1k training/validation split on Cat&Dog, CIFAR10, CIFAR100, STL10 respectively.
179
+
180
+ Table 1: Binary AUC optimization results on four benchmark datasets.
181
+
182
+ <table><tr><td>AUC(%)</td><td colspan="4">Cat&amp;Dog</td><td colspan="4">CIFAR10</td></tr><tr><td>Positive Ratio</td><td>91%</td><td>83%</td><td>71%</td><td>50%</td><td>91%</td><td>83%</td><td>71%</td><td>50%</td></tr><tr><td>Cross-Entropy</td><td>67.6</td><td>74.6</td><td>85.1</td><td>87.4</td><td>65.2</td><td>73.3</td><td>78.1</td><td>83.7</td></tr><tr><td>PPD-SG</td><td>79.1</td><td>81.5</td><td>85.5</td><td>87.1</td><td>69.8</td><td>73.9</td><td>79.1</td><td>82.6</td></tr><tr><td>PPD-AdaGrad</td><td>77.3</td><td>80.6</td><td>83.7</td><td>86.3</td><td>69.7</td><td>74.1</td><td>78.4</td><td>83.1</td></tr><tr><td>Ours</td><td>78.6</td><td>81.3</td><td>85.6</td><td>87.8</td><td>72.5</td><td>74.4</td><td>78.3</td><td>82.7</td></tr><tr><td>AUC(%)</td><td colspan="4">CIFAR100</td><td colspan="4">STL10</td></tr><tr><td>Positive Ratio</td><td>91%</td><td>83%</td><td>71%</td><td>50%</td><td>91%</td><td>83%</td><td>71%</td><td>50%</td></tr><tr><td>Cross-Entropy</td><td>57.8</td><td>58.4</td><td>62.2</td><td>66.3</td><td>63.5</td><td>67.1</td><td>72.7</td><td>80.8</td></tr><tr><td>PPD-SG</td><td>56.5</td><td>58.9</td><td>61.6</td><td>65.2</td><td>70.7</td><td>71.6</td><td>75.1</td><td>77.4</td></tr><tr><td>PPD-AdaGrad</td><td>56.2</td><td>59.0</td><td>62.6</td><td>67.6</td><td>68.5</td><td>72.4</td><td>76.7</td><td>78.5</td></tr><tr><td>Ours</td><td>58.2</td><td>60.5</td><td>64.5</td><td>69.0</td><td>68.4</td><td>71.1</td><td>76.7</td><td>81.6</td></tr></table>
183
+
184
+ Construction of imbalanced datasets: We construct imbalanced binary classification task by using half classes as positive class and another half as negative class, and dropping samples from negative class by a certain ratio, which is reflected by the positive ratio (the ratio of the majority class to the minority class) in Table 1.
185
+
186
+ Experimental setting. We use a Resnet-18 He et al. (2016) as the deep neural network for all algorithms. During optimization, the batch size is set to 64. The initial learning rate is tuned in $\{ 0 . 1$ , $0 . { \overset { \cdot } { 0 } } 1 , 0 . 0 0 1 \}$ and decays $2 / 3$ at $2 k$ , $1 0 k$ , $2 5 k$ -th iteration. We train $4 0 k$ iterations in total. The $\epsilon$ in
187
+
188
+ Newton’s method is 0.001. We use the same random seed, learning rate and total number of iterations in all of our experiments including multi class AUC and $F$ -score experiments.
189
+
190
+ Results. The results are shown in Table 1. We can see that our method slightly outperforms Liu et al. (2019) and outperforms cross-entropy loss by a large margin, especially on imbalanced datasets, where AUC objective shows superiority over cross-entropy loss.
191
+
192
+ Table 2: Ablation study of $\epsilon$ on Cat&Dog dataset.
193
+
194
+ <table><tr><td>Positive Ratio</td><td>91%</td><td>83%</td><td>71%</td><td>50%</td></tr><tr><td>Ours(ε= 0.1)</td><td>71.3</td><td>77.0</td><td>84.4</td><td>87.3</td></tr><tr><td>Ours(ε = 0.01)</td><td>78.6</td><td>81.3</td><td>85.6</td><td>87.8</td></tr><tr><td>Ours(ε= 0.001)</td><td>65.9</td><td>71.3</td><td>71.8</td><td>76.1</td></tr></table>
195
+
196
+ Influence of $\epsilon { _ { \mathrm { { \Omega } } } }$ . We report the influence of $\cdot$ on our algorithm in Table 2, where we choose Cat&Dog as an example to test different $\epsilon$ . We can see that $\epsilon = 0 . 1$ gets slightly worse performance than $\cdot$ , while $\epsilon = 0 . 0 0 1$ performs much worse. To choose $\epsilon$ , we follow the approach proposed by Mangasarian (2004). If for two successive values of $\epsilon _ { 1 } > \epsilon _ { 2 }$ , the value of the $\cdot$ perturbed quadratic function is the same, then it is the least 2-norm solution of the dual. Therefore, we simply choose an $\epsilon$ that satisfies this property, which is chosen to be 0.01 in our experiments.
197
+
198
+ # Optimizing Multiclass AUC
199
+
200
+ We further demonstrate our method for optimizing multiclass AUC. Similar to previous section on binary AUC, we construct imbalanced multiclass datasets by dividing datasets into 3 classes and drop samples from 2 of them and report the one-versus-all AUC (de
201
+
202
+ Table 3: Multiclass AUC optimization results on STL10 and CIFAR100. Drop rate is the proportion used when dropping samples from two of three classes.
203
+
204
+ <table><tr><td rowspan="2">AUCova(%) Drop rate</td><td colspan="3">CIFAR100</td><td colspan="5">STL10</td></tr><tr><td>90%</td><td>80%</td><td>60%</td><td>0%</td><td>90%</td><td>80%</td><td>60%</td><td>0%</td></tr><tr><td>Cross-Entropy</td><td>54.3</td><td>59.4</td><td>62.7</td><td>63.5</td><td>66.9</td><td>68.0</td><td>74.8</td><td>81.0</td></tr><tr><td>Ours</td><td>58.4</td><td>59.2</td><td>64.1</td><td>65.7</td><td>72.9</td><td>72.5</td><td>75.7</td><td>82.7</td></tr><tr><td>AUC师in(%)</td><td></td><td>CIFAR100</td><td></td><td></td><td></td><td>STL10</td><td></td><td></td></tr><tr><td>Droprate</td><td>90%</td><td>80%</td><td>60%</td><td>0%</td><td>90%</td><td>80%</td><td>60%</td><td>0%</td></tr><tr><td>Cross-Entropy</td><td>55.1</td><td>60.6</td><td>65.0</td><td>64.0</td><td>68.9</td><td>69.6</td><td>75.8</td><td>82.2</td></tr><tr><td>Ours</td><td>60.1</td><td>61.2</td><td>66.0</td><td>67.2</td><td>76.1</td><td>74.4</td><td>77.7</td><td>84.5</td></tr></table>
205
+
206
+ noted as $\mathbf { A U C } ^ { \mathrm { { o v a } } } ,$ ) and $\operatorname { A U C } _ { \mu } ^ { \mathrm { { b i n } } }$ score . For STL10, we group class $0 - 2 , 3 - 5 , 6 - 9$ into the three classes, and drop samples from the first two classes. For CIFR100, we group class $0 - 3 2$ , 33 − 65, $6 6 - 9 9$ into three classes, and also drop samples from the first two classes.
207
+
208
+ Results. Results are in Table 3. In addition to one-versus-all AUC metric, we also report the performance in terms of $\operatorname { A U C } _ { \mu }$ Kleiman & Page (2019) which is specifically designed for measuring multiclass AUC and keeps nice properties of binary AUC such as being insensitive to class skew. We can see that our method outperforms cross-entropy loss on all four datasets and under all different skewed ratios. Specifically, the performance gain tends to be larger when the dataset becomes more imbalanced.
209
+
210
+ ![](images/4f8fd039bbf4e552beab845864b559883594f7a766a42150c64ce5c83a854659.jpg)
211
+ Figure 1: ROC curve of multiclass AUC optimization on STL10 with $9 0 \%$ drop rate. We divide STL10 into 3 classes and use one as positive class and other two as negative class to plot the ROC.
212
+
213
+ # Optimizing $F$ -score
214
+
215
+ We show that by directly optimizing $F$ -score, we can achieve a better performance on this than when using cross entropy loss. In addition to cross entropy loss, we perform evalua
216
+
217
+ Table 4: $F .$ -score on four datasets.
218
+
219
+ <table><tr><td>F-score(%)</td><td>Cat&amp;Dog</td><td>CIFAR10</td><td>CIFAR100</td><td>STL10</td></tr><tr><td>Cross-Entropy</td><td>76.0</td><td>70.3</td><td>60.4</td><td>71.8</td></tr><tr><td>CVXPY-SCS</td><td>70.1</td><td>66.6</td><td>66.7</td><td>66.6</td></tr><tr><td>AP-Perf</td><td>65.3</td><td>66.7</td><td>66.4</td><td>67.2</td></tr><tr><td>Ours</td><td>77.8</td><td>72.6</td><td>63.4</td><td>72.7</td></tr></table>
220
+
221
+ tions with two other methods that can also directly optimize the $F 1$ -score. First, we replace our solver with CVXPY-SCS Agrawal et al. (2019), which is a differentiable general purpose linear programming solver; second, we perform comparisons with AP-Perf Fathony & Kolter (2020) which offers differentiable optimization of $\cdot$ -score using an adversarial prediction framework. The datasets and our setup to group them into two classes remain the same as in binary AUC section. The results in Table 4 shows that our method generally yields improvement over cross-entropy loss in terms of $F$ -score. Note that different from optimizing cross entropy loss, when we optimize $\cdot$ -score directly, there exists a local optimal point where assigning all examples to the positive class leads to $F$ -score of $\cdot$ . We see this behavior on CIFAR10, CIFAR100, and STL10.
222
+
223
+ # 5 CONCLUSIONS
224
+
225
+ We demonstrated that various non-decomposable objectives can be optimized within deep neural networks in a differentiable way under the same general framework of LPs using a modified Newton’s algorithm proposed by Mangasarian. A number of recent papers have studied the general problem of backpropagating through convex optimization modules, and this literature provides several effective approaches although scalability remains a topic of active research. Our work complements these results and shows that the operations needed can be implemented to utilize the capabilities of modern deep learning libraries. While our experimental results suggest that promising results on binary AUC, multi-class AUC and $F$ -score optimization within DNNs is achievable, we believe that the module may have other applications where the number of constraints are large and data-dependent.
226
+
227
+ # REFERENCES
228
+
229
+ Akshay Agrawal, Brandon Amos, Shane Barratt, Stephen Boyd, Steven Diamond, and J Zico Kolter. Differentiable convex optimization layers. In Advances in neural information processing systems, pp. 9562–9574, 2019. 5, 9
230
+
231
+ Brandon Amos and J Zico Kolter. Optnet: Differentiable optimization as a layer in neural networks. arXiv preprint arXiv:1703.00443, 2017. 2, 5
232
+
233
+ Brandon Amos, Lei Xu, and J Zico Kolter. Input convex neural networks. In International Conference on Machine Learning, pp. 146–155, 2017. 4
234
+
235
+ Sanjeev Arora, Rong Ge, and Ankur Moitra. Learning topic models–going beyond svd. In 2012 IEEE 53rd annual symposium on foundations of computer science, pp. 1–10. IEEE, 2012. 14
236
+
237
+ Kaan Ataman, W Nick Street, and Yi Zhang. Learning to rank by maximizing auc with linear programming. In The 2006 IEEE International Joint Conference on Neural Network Proceedings, pp. 123–129. IEEE, 2006. 1, 3
238
+
239
+ Quentin Berthet, Mathieu Blondel, Olivier Teboul, Marco Cuturi, Jean-Philippe Vert, and Francis Bach. Learning with differentiable perturbed optimizers. arXiv preprint arXiv:2002.08676, 2020. 5
240
+
241
+ Mathieu Blondel, Olivier Teboul, Quentin Berthet, and Josip Djolonga. Fast differentiable sorting and ranking. In International Conference on Machine Learning, 2020. 5
242
+
243
+ Mike Brookes. The matrix reference manual. Imperial College London, 3, 2005. 16
244
+
245
+ Edo Collins, Radhakrishna Achanta, and Sabine Susstrunk. Deep feature factorization for concept discovery. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 336–352, 2018. 13, 14
246
+
247
+ Corinna Cortes and Mehryar Mohri. Auc optimization vs. error rate minimization. In Advances in neural information processing systems, pp. 313–320, 2004. 1
248
+
249
+ Krzysztof J. Dembczynski, Willem Waegeman, Weiwei Cheng, and Eyke Hüllermeier. An exact algorithm for f-measure maximization. In J. Shawe-Taylor, R. S. Zemel, P. L. Bartlett, F. Pereira, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 24, pp. 1404–1412. Curran Associates, Inc., 2011. URL http://papers.nips.cc/paper/ 4389-an-exact-algorithm-for-f-measure-maximization.pdf. 1, 4, 12
250
+
251
+ Elad Eban, Mariano Schain, Alan Mackey, Ariel Gordon, Ryan Rifkin, and Gal Elidan. Scalable learning of non-decomposable objectives. In Artificial Intelligence and Statistics, pp. 832–840, 2017. 1
252
+
253
+ Rizal Fathony and Zico Kolter. Ap-perf: Incorporating generic performance metrics in differentiable learning. In International Conference on Artificial Intelligence and Statistics, pp. 4130–4140. PMLR, 2020. 1, 9
254
+
255
+ Wei Gao, Rong Jin, Shenghuo Zhu, and Zhi-Hua Zhou. One-pass auc optimization. In International conference on machine learning, pp. 906–914, 2013. 1
256
+
257
+ Alexander I Golikov and Igor E Kaporin. Inexact newton method for minimization of convex piecewise quadratic functions. In Numerical Geometry, Grid Generation and Scientific Computing, pp. 139–155. Springer, 2019. 15
258
+
259
+ Ian Goodfellow, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Multi-prediction deep boltzmann machines. In Advances in Neural Information Processing Systems, pp. 548–556, 2013. 4
260
+
261
+ James A Hanley and Barbara J McNeil. The meaning and use of the area under a receiver operating characteristic (roc) curve. Radiology, 143(1):29–36, 1982. 3
262
+
263
+ 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. 7
264
+
265
+ Thorsten Joachims, Thomas Finley, and Chun-Nam John Yu. Cutting-plane training of structural svms. Machine learning, 77(1):27–59, 2009. 1
266
+
267
+ S Sathiya Keerthi, Vikas Sindhwani, and Olivier Chapelle. An efficient method for gradient-based adaptation of hyperparameters in svm models. In Advances in neural information processing systems, pp. 673–680, 2007. 5
268
+
269
+ Ross Kleiman and David Page. Auc $\mu$ : A performance metric for multi-class machine learning models. In International Conference on Machine Learning, pp. 3439–3447, 2019. 3, 8, 12
270
+
271
+ Mingrui Liu, Xiaoxuan Zhang, Zaiyi Chen, Xiaoyu Wang, and Tianbao Yang. Fast stochastic auc maximization with $o ( 1 / n )$ -convergence rate. In International Conference on Machine Learning, pp. 3189–3197, 2018. 1
272
+
273
+ Mingrui Liu, Zhuoning Yuan, Yiming Ying, and Tianbao Yang. Stochastic auc maximization with deep neural networks. arXiv preprint arXiv:1908.10831, 2019. 1, 7, 8
274
+
275
+ OL Mangasarian. A newton method for linear programming. Journal of Optimization Theory and Applications, 121(1):1–18, 2004. 2, 5, 8
276
+
277
+ Olvi L Mangasarian. Exact 1-norm support vector machines via unconstrained convex differentiable minimization. Journal of Machine Learning Research, 7(Jul):1517–1530, 2006. 5
278
+
279
+ Gonzalo Mena, David Belanger, Scott Linderman, and Jasper Snoek. Learning latent permutations with gumbel-sinkhorn networks. arXiv preprint arXiv:1802.08665, 2018. 4
280
+
281
+ Zihang Meng, Sathya N Ravi, and Vikas Singh. Physarum powered differentiable linear programming layers and applications. arXiv preprint arXiv:2004.14539, 2020. 2, 5
282
+
283
+ Luke Metz, Ben Poole, David Pfau, and Jascha Sohl-Dickstein. Unrolled generative adversarial networks. arXiv preprint arXiv:1611.02163, 2016. 4
284
+
285
+ Pritish Mohapatra, Michal Rolinek, CV Jawahar, Vladimir Kolmogorov, and M Pawan Kumar. Efficient optimization for rank-based loss functions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3693–3701, 2018. 1
286
+
287
+ Ye Nan, Kian Ming Chai, Wee Sun Lee, and Hai Leong Chieu. Optimizing f-measure: A tale of two approaches. arXiv preprint arXiv:1206.4625, 2012. 1
288
+
289
+ Michael Natole, Yiming Ying, and Siwei Lyu. Stochastic proximal algorithms for auc maximization. In International Conference on Machine Learning, pp. 3710–3719, 2018. 1
290
+
291
+ Yurii Nesterov. Introductory lectures on convex optimization: A basic course, volume 87. Springer Science & Business Media, 2013. 6, 15
292
+
293
+ Aravind Rajeswaran, Chelsea Finn, Sham M Kakade, and Sergey Levine. Meta-learning with implicit gradients. In Advances in Neural Information Processing Systems, pp. 113–124, 2019. 7
294
+
295
+ Ben Recht, Christopher Re, Joel Tropp, and Victor Bittorf. Factoring nonnegative matrices with linear programs. In Advances in Neural Information Processing Systems, pp. 1214–1222, 2012. 14
296
+
297
+ Yang Song, Alexander Schwing, Raquel Urtasun, et al. Training deep neural networks via direct loss minimization. In International Conference on Machine Learning, pp. 2169–2177, 2016. 1
298
+
299
+ George Trigeorgis, Konstantinos Bousmalis, Stefanos Zafeiriou, and Bjoern Schuller. A deep seminmf model for learning hidden representations. In International Conference on Machine Learning, pp. 1692–1700, 2014. 13
300
+
301
+ Sathya N Ravi Abhay Venkatesh, Glenn M Fung, and Vikas Singh. Optimizing nondecomposable data dependent regularizers via lagrangian reparameterization offers significant performance and efficiency gains. arXiv preprint arXiv:1909.12398, 2019. 1
302
+
303
+ Yisong Yue, Thomas Finley, Filip Radlinski, and Thorsten Joachims. A support vector method for optimizing average precision. In Proceedings of the 30th annual international ACM SIGIR conference on Research and development in information retrieval, pp. 271–278, 2007. 1
304
+
305
+ Xiaohui Zeng, Renjie Liao, Li Gu, Yuwen Xiong, Sanja Fidler, and Raquel Urtasun. Dmm-net: Differentiable mask-matching network for video object segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 3929–3938, 2019. 4, 5
306
+
307
+ # A APPENDIX
308
+
309
+ # A.1 LP FORMULATION FOR MULTI-CLASS AUC
310
+
311
+ One way to extend binary AUC to multi-class is by considering multiple one-versus-all pairs. This leads us to the following formulation:
312
+
313
+ $$
314
+ \begin{array} { l } { \displaystyle \mathrm { A U C : \operatorname* { m i n } } _ { z _ { i j } } \sum _ { i = 1 } ^ { n } \sum _ { j = 1 : x _ { i } ^ { * } \neq x _ { j } ^ { * } } ^ { n } z _ { i j } } \\ { \displaystyle \mathrm { s . t . } \quad \left( \mathbf { f } \left( x _ { i } , x _ { i } ^ { * } \right) - \mathbf { f } \left( x _ { j } , x _ { i } ^ { * } \right) \right) \geq \epsilon - z _ { i j } \qquad \forall i , j : x _ { i } ^ { * } \neq x _ { j } ^ { * } , \quad z _ { i j } \geq 0 } \end{array}
315
+ $$
316
+
317
+ In our multi-class AUC experiment, we use this one-versus-all AUC as training loss and report performance in both one-versus-all AUC and $\operatorname { A U C } _ { \mu } ^ { \mathrm { { b i n } } }$ . In addition, we can also consider the setting of $\mathrm { A U C } _ { \mu }$ where $\mathbf { P }$ is set arbitarily. In this case, the exact terms in orientation function $O$ proposed by Kleiman & Page (2019) can be written as follows:
318
+
319
+ $$
320
+ \begin{array} { r l } { \{ \mathbf { A U C } _ { \mu } ^ { \mathrm { a t b i t } } : \displaystyle \operatorname* { m i n } _ { z _ { i j } } \displaystyle \sum _ { i = 1 } ^ { n } \sum _ { j = 1 : x _ { i } ^ { * } < x _ { j } ^ { * } } z _ { i j } } & { } \\ { \mathrm { s . t . } \quad \widetilde { \mathbf { d } } _ { i j } \displaystyle \sum _ { k = 1 } ^ { K } \widetilde { \mathbf { v } } ( k ) ( \mathbf { f } ( x _ { i } , k ) - \mathbf { f } ( x _ { j } , k ) ) \geq \epsilon - z _ { i j } \qquad } & { \forall i , j : x _ { i } ^ { * } < x _ { j } ^ { * } , z _ { i j } \geq 0 } \end{array}
321
+ $$
322
+
323
+ Note that $\mathbf { A U C } _ { \mu _ { . } } ^ { \mathrm { a r b i t } }$ has the same number of constraints and variables as $\mathbf { A U C } _ { \mu } ^ { \mathrm { { b i n } } }$ . Once the LPs are solved, the loss function is calculated the same way as binary AUC.
324
+
325
+ # A.2 FORMULATING RATIO OBJECTIVES
326
+
327
+ In this section, we study a subset of non-decomposable metrics, which are typically expressed as ratios of some combination of True Positive(TP), False Positives(FP), True Negatives(TN) and False Negatives(FN). These can be expressed in a general form as $\frac { a _ { 1 1 } T P + \bar { a _ { 1 2 } } } { a _ { 2 1 } T P + a _ { 2 2 } F P + a _ { 2 3 } F N + a _ { 2 4 } }$ , where $a _ { p q }$ are constants/cofficients which if set to 0, means the term is absent and not equal to zero in other cases. This formulation can used to define Fscore, $F _ { \beta }$ , Jaccard, IOU and Precision at fixed recall. In the following section, we describe the formulation of Fscore as a representative of this approach, other metrics can be formulated similarly.
328
+
329
+ Given $Y$ the groud truth, our goal is to compute $\hat { Y }$ both of length $n$ , which aligns with $Y$ based on the specific metric. We first show how to write TP, FP, TN and FN wrt to these vectors.
330
+
331
+ $$
332
+ \begin{array} { c c } { { T P = Y ^ { T } \times \hat { Y } } } & { { F P = ( 1 - Y ) ^ { T } \times \hat { Y } } } \\ { { T N = ( 1 - Y ) ^ { T } \times ( 1 - \hat { Y } ) } } & { { F N = ( Y ) ^ { T } \times ( 1 - \hat { Y } ) } } \end{array}
333
+ $$
334
+
335
+ # A.2.1 FORMULATING $F$ -SCORE
336
+
337
+ The $F$ -score or $F$ -measure is routinely used as a performance metric for different types of prediction problems, including binary classification and, multi-label classification. Compared to measures like error rate in binary classification and Hamming loss, it enforces a better balance between performance on the minority and the majority classes, and, therefore, it is more suitable in the case of imbalanced data Dembczynski et al. (2011). $F$ -score is defined as follows:
338
+
339
+ $$
340
+ F – s c o r e ( Y , \hat { Y } ) = \frac { 2 P ( Y , \hat { Y } ) \times R ( Y , \hat { Y } ) } { P ( Y , \hat { Y } ) + R ( Y , \hat { Y } ) }
341
+ $$
342
+
343
+ where $P$ is the measure of precision defined as
344
+
345
+ $$
346
+ P ( Y , { \hat { Y } } ) = { \frac { T P } { T P + F P } }
347
+ $$
348
+
349
+ and $R$ stands for the measure of recall, given as
350
+
351
+ $$
352
+ R ( Y , \hat { Y } ) = \frac { T P } { T P + F N }
353
+ $$
354
+
355
+ Plugging this in $\operatorname { E q } ( 1 )$ , and replacing the formulations for TP, FP and FN(from Eq A.2) we get
356
+
357
+ $$
358
+ F \ – s c o r e ( Y , \hat { Y } ) = \frac { 2 T P } { 2 T P + F P + F N } = \frac { 2 ( Y ^ { T } \times \hat { Y } ) } { \sum _ { i = 1 } ^ { n } y _ { i } + \sum _ { i = 1 } ^ { n } \hat { y } _ { i } } = \frac { 2 ( Y ^ { T } \times \hat { Y } ) } { \mathbf { 1 } ^ { T } Y + \mathbf { 1 } ^ { T } \hat { Y } }
359
+ $$
360
+
361
+ where $y _ { i }$ refers to the ith element of $Y$ (same for $\hat { y } _ { i }$ ). 1 represents an all one vector in $R ^ { n }$ . Note that in training, since $Y$ is generally provided, we can assume $\mathbf { \widehat { 1 } } ^ { T } Y = \beta$ which is constant (the number of examples in the positive class in the ground truth). We can also represent the the values of $2 Y$ as a coefficient matrix $c$ , then the optimization problem for finding $F$ -score can be written as
362
+
363
+ $$
364
+ \begin{array} { l l } { \underset { \hat { Y } } { \mathrm { m a x i m i z e } } } & { \qquad \frac { c ^ { T } \hat { Y } } { 1 ^ { T } \hat { Y } + b } } \\ { \mathrm { s u b j e c t ~ t o } } & { \qquad \hat { Y _ { i } } \in [ 0 , 1 ] , \ i = 1 , \dots , n . } \end{array}
365
+ $$
366
+
367
+ # A.2.2 MAXIMIZING JACCARD COEFFICIENT AND $F _ { \beta }$
368
+
369
+ The Jaccard Coefficient and Dice Index lead to similar formulation as $F$ -score. The Jaccard coefficient can be expressed as:
370
+
371
+ $$
372
+ \mathrm { J a c c } ( Y , { \hat { Y } } ) = { \frac { T P } { T P + F P + F N } } = { \frac { ( Y ^ { T } \times { \hat { Y } } ) } { \sum _ { i = 1 } ^ { n } y _ { i } + \sum _ { i = 1 } ^ { n } { \hat { y } } _ { i } - \sum _ { i = 1 } ^ { n } y _ { i } \times { \hat { y } } _ { i } } } = { \frac { ( Y ^ { T } \times { \hat { Y } } ) } { \mathbf { 1 } ^ { T } Y + ( 1 - Y ) ^ { T } { \hat { Y } } } }
373
+ $$
374
+
375
+ This can be equivalently written as a linear factional program as shown in Model(10) where $c = Y$ , $d = ( 1 - Y )$ and $b = \mathbf { 1 } ^ { T } Y$ . The rest of the construction is similar to $F$ -score. Note that $F _ { \beta }$ which is defined as
376
+
377
+ $$
378
+ F _ { \beta } ( Y , \hat { Y } ) = ( 1 + \beta ^ { 2 } ) \frac { P ( Y , \hat { Y } ) \times R ( Y , \hat { Y } ) } { \beta ^ { 2 } P ( Y , \hat { Y } ) + R ( Y , \hat { Y } ) }
379
+ $$
380
+
381
+ where $\beta$ is a user specified parameter (balancing the importance of precision and recall) also permits a similar formulation. Here we simply set $c = \bar { ( 1 + \beta ^ { 2 } ) } Y$ , $d = \mathbf { 1 }$ and $b = \beta ^ { 2 } \mathbf { 1 } ^ { T } Y$ .
382
+
383
+ # A.2.3 MAXIMIZING P @R
384
+
385
+ We begin by defining the maximum precision at fixed minimum recall problem as
386
+
387
+ $$
388
+ \begin{array} { r l } { P \mathbb { Q } R \alpha = \operatorname { m a x i m i z e } } & { P \quad \mathrm { s . t . } R \ge \alpha } \\ { \mathrm { = m a x i m i z e } } & { \frac { ( Y ^ { T } \hat { Y } ) } { \mathbf { 1 } ^ { T } \hat { Y } } \quad \mathrm { s . t . } \quad Y ^ { T } \hat { Y } \ge \alpha \mathbf { 1 } ^ { T } Y } \end{array}
389
+ $$
390
+
391
+ This is again a linear fractional objective with a linear constraint. So we can write it as an equivalent Linear program using the same transformation where $c = Y$ , $d = \mathbf { 1 }$ and $b = 0$ . $R @ P$ on the other hand directly leads to a linear program.
392
+
393
+ # A.3 OPTIMIZING NON-NEGATIVE MATRIX FACTORIZATION (NMF)
394
+
395
+ Nonnegative matrix factorization is different from the other objectives we presented in that it is primarily used in unsupervised learning and does not satify the criteria for a metric loss function. It can still be formulated in a generalized non-decomposable form because (i) cannot be written as a sum over individual samples, (ii) leads to a model where the constraints depend on learned features.
396
+
397
+ Note that purpose of discussing NMF in this context, is not to provide a general purpose solver for the problem, and instead to assess whether NMF layers can serve as a regularizer or a clustering module, e.g., learning more interpretable attributes, co-segmentation and a substitute for clustering, see Trigeorgis et al. (2014) and Collins et al. (2018). The following description in this section and the experimental validation in the following section is a proof of principle instantiation of this idea.
398
+
399
+ We briefly review from Arora et al. (2012) and Recht et al. (2012), how NMF is written as a LP.
400
+
401
+ We know from Arora et al. (2012) that a NMF decomposition $V = F W$ where $F$ is $s \times s ^ { \prime }$ and $W$ is $s ^ { \prime } \times w$ and $V$ and $W$ have a row sum of 1, is ‘separable’ if the rows of $W$ are simplicial and there is a permutation matrix $R \in \mathbb { R } ^ { s \times s }$ such that $\boldsymbol { R } \boldsymbol { F } = \left[ \begin{array} { l l } { \boldsymbol { I _ { r } } } & { \boldsymbol { M } } \end{array} \right] ^ { T }$ . The top $r$ rows of $F$ contains so-called anchor words. Recht et al. (2012) proposed a data-driven model where the most salient features in the data are used to express the remaining features, given as $V \sim C V$ , where $C$ is of size $s \times s$ . Assuming $V$ admits a rank- $\cdot r$ separable factorization, then $V = R ^ { T } { \left[ \begin{array} { l l } { I _ { r } } & { 0 } \\ { M } & { 0 } \end{array} \right] } R V = C V .$ . To show that thsis factorization is possible, we need to first make $\cdot$ square, which is why it is zero-padded to make it a size $s \times s$ matrix. Let $\cdot$ be any vector which is used as the coefficient in the objective in the efollowing model. According to Recht et al. (2012), any value for the entries of $\cdot$ should suffice as elong as they are distinct. with distinct values. Then the LP formulation is as follows:
402
+
403
+ $$
404
+ \operatorname* { m i n } _ { C } \widetilde { p } ^ { T } \mathrm { d i a g } ( C ) \quad \mathrm { s . t . } \qquad C V = V , \mathrm { t r } ( C ) = r , C _ { j j } \leq 1 \forall j , C _ { i j } \leq C _ { j j } \forall i j , C \geq 0
405
+ $$
406
+
407
+ With $C$ in hand, $W$ is constructed by extracting rows of $V$ for those indices $k$ where $C _ { k k } = 1$ . $F$ is constructed by extracting rows of $C$ which correspond to $k$ where $C _ { k k } = 1$ .
408
+
409
+ # A.3.1 EXPERIMENTAL RESULTS ON NONNEGATIVE MATRIX FACTORIZATION
410
+
411
+ We demonstrate applicability of our strategy to nonnegative matrix factorization (NMF) by performing a rank $k$ factorization on Convolutional Neural Network (CNN) activations as an example, following Collins et al. (2018). Recall that the activation tensor of an image at some layer in CNN has the shape $V \in R ^ { c \times h \times w }$ where $h , w$ are the spatial sizes and $c$ is the number of channels. We can reshape it into $V \in \mathbb { R } ^ { c \times ( h \cdot w ) }$ and calculate a rank $k$ NMF for $V$ $V = F W$ . Each row $W _ { j }$ of the resultant $W \in \mathbb { R } ^ { k \times ( h \cdot w ) }$ can be reshaped into a heat map of dimension $h \times w$ which highlights regions in the image that correspond to the factor $W _ { j }$ . We show an example for $k = 1 , 2$ in Fig. 2. We can see that heatmap consistently captures a meaningful part/concept in the examples. Currently, our memory consumption increases quickly with $c$ here since the constraint matrix in our LP formulation is of size $O ( c ^ { 2 } ) \times O ( c ^ { 2 } )$ . This makes our method only work for small $c$ on a GPU with 11GB memory (here, we use $c = 2 0$ ). This scaling issue can be possibly solved by utilizing sparsity in the constraint matrix, but the sparse matrix operations are currently not well supported on mainstream deep learning platforms like PyTorch and Tensorflow. Since our method provides backward gradients for the NMF operation, the heatmap generated here can, in fact, be used to construct a loss function during training in order to learn a interpretable models.
412
+
413
+ ![](images/397e9126e6869a43d16da8e6e194203e37439b2d49e4982c7fb0c3fe37c89da5.jpg)
414
+ Figure 2: NMF example. Three rows correspond to original images, $k = 1$ and $k = 2$ respectively.
415
+
416
+ <table><tr><td>Objective</td><td>9 h</td><td>E</td><td></td><td>F</td><td>p</td><td>B</td><td>G</td><td></td><td>q</td></tr><tr><td>AUC</td><td>1 ∈ Z/T|x|NI</td><td>- -1 ZITIxINI</td><td>E</td><td></td><td>Pij</td><td>(f(xi) f(xj)-e)</td><td>-</td><td></td><td>-</td></tr><tr><td>AUCbin</td><td>1,</td><td>-1</td><td>S</td><td></td><td>Pij S</td><td>-@</td><td></td><td></td><td></td></tr><tr><td> F-score</td><td>C</td><td>0 -1</td><td>1 1</td><td>-1 (f(xi)) -(1+Φ(f(xi)))</td><td>0</td><td></td><td>d</td><td>bb</td><td></td></tr></table>
417
+
418
+ Table 5: Table showing the general LP coefficients for each model. †: length based on problem setting; $^ \ddag$ : $\mathbf { f } _ { i j } ^ { \pm } = \widetilde { \mathbf { d } } _ { i j } ( f ( x _ { i } , y _ { C ( x _ { i } ) } ) - f ( x _ { j } , y _ { C ( x _ { i } ) } ) + f ( x _ { j } , y _ { C ( x _ { j } ) } ) - f ( x _ { i } , y _ { C ( x _ { j } ) } ) ) ;$ §: one block for each $i \in [ 1 , . . n ]$ . We do not include NMF in this table, as its formulation as a general LP is more verbose including vectorization of matrices and kronecker product calculations.
419
+
420
+ A.4 VERIFICATION OF UNROLLING GRADIENT AND THE ONE PROVIDED BY $\tilde { A } ^ { - 1 } \tilde { b }$
421
+
422
+ We use Fscore formulation as an example. For input sample $x$ , the neural network predicts a score $f ( x )$ , and then the scores of a batch of samples will be used in solving the linear programming form of Fscore and be used to construct the loss function. We compute the gradient from the final loss function back to the predicted scores from the neural network and compare two approaches: one is that we use $z = \tilde { A } ^ { - 1 } \tilde { b }$ as the solution (the one we used in our experiment) where we can compute gradient by only one step, another one is that we directly use $y _ { t }$ resulting from the Newton iterations as the solution and compute gradients by unrolling those iterations. We then compute the cosine value between these two gradient vectors. By experiments on 100 randomly sampled batches, the average cosine value is 0.9991, which means the two gradients are highly consistent.
423
+
424
+ # B PROOFS AND DETAILS OF RESULTS IN SECTION 3
425
+
426
+ In this section, we will provide the missing proofs and additional calculations in Section 3.
427
+
428
+ # B.1 PROOF OF LEMMA 1.
429
+
430
+ Lemma 1 is restated here for convenience.
431
+
432
+ Lemma 3. Assume that $A \in \mathbb { R } ^ { m \times n }$ is a random matrix, and fix some $y \in \mathbb { R } ^ { n }$ . Then with probability one, $g$ in equation $\cdot$ is quadratic (given by $\tilde { H } , \nabla g ( y ) ,$ ) over a sufficiently small neighborhood of $y$ .
433
+
434
+ Proof. Using the integral form of second order Taylor’s expansion of $\sigma ^ { 2 } ( y ) = \left( \operatorname* { m a x } ( 0 , y ) \right) ^ { 2 }$ , we can show that,
435
+
436
+ $$
437
+ g ( y + h ) - g ( y ) - h ^ { T } \nabla g ( y ) = \frac { 1 } { 2 } h ^ { T } A ^ { T } \mathrm { d i a g } \left( \mathfrak { d } \right) A h
438
+ $$
439
+
440
+ where
441
+
442
+ $$
443
+ \mathfrak { d } = \int _ { 0 } ^ { 1 } \left( \int _ { 0 } ^ { 1 } \left( \sigma \left( A y - b \right) \right) _ { * } d s \right) 2 d t .
444
+ $$
445
+
446
+ See Remark 1 in Golikov & Kaporin (2019) for details. Without loss of generality, we can assume $b = 0$ by simply translating the origin. Following the same remark, the diagonal matrix coincides with the step function based diagonal in $\tilde { H }$ under the following condition on $h$ :
447
+
448
+ $$
449
+ e _ { j } ^ { T } A h \cdot e _ { j } ^ { T } ( A y ) < 0 \implies | e _ { j } ^ { T } A h | \leq | e _ { j } ^ { T } ( A y ) | .
450
+ $$
451
+
452
+ Since $y$ is fixed, assuming that the entries of $A$ are chosen from a continuous distribution such that $e _ { j } ^ { T } A$ is uniformly distributed over the sphere, then $( e _ { j } ^ { T } A h ) ^ { 2 }$ follows a Beta $\textstyle \left( { \frac { 1 } { 2 } } , { \frac { n - 1 } { 2 } } \right)$ when $h$ is drawn uniformly at random from the unit sphere, independent of $A$ . This means that no matter what $y$ is, there exists sufficiently small $h$ such that the left hand side of equation 20 is false with probability one, and in that neighborhood $\mathrm { d i a g } ( \mathfrak { d } ) = \tilde { H }$ . □
453
+
454
+ # B.2 PROOF OF THEOREM 2
455
+
456
+ Theorem 4. Assume that the primal $L P$ has a unique optimal solution, and that the level set $\{ x : A x \leq b , c ^ { T } x \leq \alpha \}$ is bounded for all $\alpha$ (for dual feasibility). Then short step (no line search) Newton’s method converges globally at a linear rate with local quadratic convergence.
457
+
458
+ Proof. First, since the objective function is piecewise quadratic since it is a sum of piecewise quadratic functions. In particular, it is self concordant since its third derivative zero everywhere. Now setting $\rho < \epsilon$ , we see that an approximate solution of the problem with the modified Hessian is also an approximate solution to equation 6. Moreover, since the possible values of $\tilde { H }$ is finite, the local norm (also known as Newton’s decrement) $\nabla g ( y ) ^ { T } \tilde { H } ( y ) ^ { - 1 } \nabla g ( y )$ is finite. Hence, we can choose $\rho > 0$ so that there is a descent direction $d$ , that is, there exist a step size $\lambda > 0$ such that $\lambda \nabla g ( x ) ^ { T } \dot { d } < 0$ Finally, we use Theorem 4.1.12 in Nesterov (2013) to claim the desired result. □
459
+
460
+ The assumptions in Theorem 4 are standard: 1. uniqueness can easily be satisfied by randomly perturbing the cost vector; 2. in most of our formulations, we explicitly have bound constraints on the decision variables, hence level sets are bounded.
461
+
462
+ # B.3 DIFFERENTIATING THE STEP FUNCTION IN REMARK 4
463
+
464
+ We will use a slightly modified “suffix" notation as in Brookes (2005) in our calculations. That is, for a matrix $A$ , $\vec { A }$ is the same as $\mathrm { v e c } ( A )$ , vectorization of $A$ obtained by concatenating all the columns. The following three properties relating the Kronecker product,\~·, and differentials will be used often:
465
+
466
+ 1. Fact 1: For two vectors a, b, a ⊗ b = baT .
467
+ 2. Fact 2: If $A$ is $p \times q$ matrix, and $B$ is a $m \times n$ matrix, then $\overrightarrow { { \partial B } } = \left( { \partial B } / { \partial A } \right) \overrightarrow { { \partial A } }$ where $\partial B / \partial A$ is the $( m n ) \times ( p q )$ Jacobian matrix of $\vec { B }$ with respect to $\vec { A }$ . If $A$ or $B$ is a column vector or scalar, then\~· has no effect.
468
+ 3. Fact 3: ${ \overrightarrow { \partial ( A X B ) } } = \left( B ^ { T } \otimes A \right) { \overrightarrow { \partial X } } .$ .
469
+
470
+ Using the above two facts, we can compute all the gradients needed to backpropagate through the unrolled iterations. We will show the computation for the gradient of $Q ^ { - \bar { 1 } } u$ with respect to $A \in \mathbb { R } ^ { m \times n }$ for a fixed $u \in \mathbb { R } ^ { n }$ . We can apply chain rule to the following composition:
471
+
472
+ $$
473
+ \begin{array} { r } { A \xrightarrow { \quad f _ { 1 } \circ f _ { 2 } \quad } \left( A ^ { T } \tilde { H } A + \rho I \right) ^ { - 1 } u } \\ { f _ { 1 } \Bigg \downarrow \xrightarrow [ ] { f _ { 2 } } \quad } \\ { A ^ { T } \tilde { H } A + \rho I } \end{array}
474
+ $$
475
+
476
+ to get, $J _ { f _ { 2 } \circ f _ { 1 } } = J _ { f _ { 2 } } \circ J _ { f _ { 1 } }$ . Now using Fact 2 on $\partial \left( X ^ { - 1 } \right) = - X ^ { - 1 } ( \partial X ) X ^ { - 1 }$ and some algebraic manipulation, we obtain,
477
+
478
+ $$
479
+ \overrightarrow { J _ { f _ { 2 } \circ f _ { 1 } } } = - \left( u ^ { T } \left( A ^ { T } \tilde { H } A + \rho I \right) ^ { - 1 } \otimes \left( A ^ { T } \tilde { H } A + \rho I \right) \right) \overrightarrow { J _ { f _ { 1 } } } .
480
+ $$
481
+
482
+ We will now compute $\overrightarrow { J _ { f _ { 1 } } }$ . Note that $\tilde { H }$ is also a function of $A$ , so using product rule, we can write $\overrightarrow { J _ { f _ { 1 } } }$ as a sum of three derivatives – with respect to each of $A , A ^ { T } , \tilde { H }$ . The derivatives with respect to $A$ and $A ^ { T }$ are fairly straightforward to compute, so will focus on computing the derivative with respect to $\tilde { H }$ . To that end, we will use Fact 3, and show to compute the derivative of the step function by approximating it using the logistic function.
483
+
484
+ $$
485
+ \frac { \partial } { \partial A } \mathrm { d i a g } \left( \left( A y - b \right) _ { \ast } \right) \approx \frac { \partial } { \partial A } \mathrm { d i a g } \left( 1 \circledast \left( 1 + \exp \left( \kappa \left( - A y + b \right) \right) \right) \right) , \kappa > 0 .
486
+ $$
487
+
488
+ Note that these derivatives are used in computing derivatives of upstream network, so using distributional derivatives, and another application of chain rule to the left hand side of equation 22 results in the dirac delta function which is atomic, that is, has all its mass in a measure zero set. Hence this calculation provides an mathematical justification that the set of nondifferentiable points has measure zero for our training purposes. It is easy to formally verify this argument using differentiable tent functions as approximations to the heaviside step function.
parse/train/CaCHjsqCBJV/CaCHjsqCBJV_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/CaCHjsqCBJV/CaCHjsqCBJV_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/CaCHjsqCBJV/CaCHjsqCBJV_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/GitDcBlcg78/GitDcBlcg78.md ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Glance-and-Gaze Vision Transformer
2
+
3
+ Qihang $\mathbf { V } \mathbf { u } ^ { 1 }$ , Yingda $\mathbf { X i a ^ { 1 } }$ , Yutong Bai1, Yongyi ${ { \bf { L } } { \bf { u } } ^ { 1 } }$ , Alan Yuille1, Wei Shen2∗
4
+
5
+ 1 Department of Computer Science, Johns Hopkins University 2 MoE Key Lab of Artificial Intelligence, AI Institute, Shanghai Jiao Tong University {yucornetto, philyingdaxia, ytongbai, yylu1989, alan.l.yuille}@gmail.com wei.shen@sjtu.edu.cn
6
+
7
+ # Abstract
8
+
9
+ Recently, there emerges a series of vision Transformers, which show superior performance with a more compact model size than conventional convolutional neural networks, thanks to the strong ability of Transformers to model long-range dependencies. However, the advantages of vision Transformers also come with a price: Self-attention, the core part of Transformer, has a quadratic complexity to the input sequence length. This leads to a dramatic increase of computation and memory cost with the increase of sequence length, thus introducing difficulties when applying Transformers to the vision tasks that require dense predictions based on high-resolution feature maps.
10
+
11
+ In this paper, we propose a new vision Transformer, named Glance-and-Gaze Transformer (GG-Transformer), to address the aforementioned issues. It is motivated by the Glance and Gaze behavior of human beings when recognizing objects in natural scenes, with the ability to efficiently model both long-range dependencies and local context. In GG-Transformer, the Glance and Gaze behavior is realized by two parallel branches: The Glance branch is achieved by performing self-attention on the adaptively-dilated partitions of the input, which leads to a linear complexity while still enjoying a global receptive field; The Gaze branch is implemented by a simple depth-wise convolutional layer, which compensates local image context to the features obtained by the Glance mechanism. We empirically demonstrate our method achieves consistently superior performance over previous state-of-the-art Transformers on various vision tasks and benchmarks.
12
+
13
+ # 1 Introduction
14
+
15
+ Convolution Neural Networks (CNNs) have been dominating the field of computer vision, which have been a de-facto standard and achieved tremendous success in various tasks, e.g., image classification [16], object detection [15], semantic segmentation [5], etc. CNNs model images from a local-to-global perspective, starting with extracting local features such as edges and textures, and forming high-level semantic concepts gradually. Although CNNs prove to be successful for various vision tasks, they lack the ability to globally represent long-range dependencies. To compensate a global view to CNN, researchers explored different methods such as non-local operation [36], self-attention [33], Atrous Spatial Pyramid Pooling (ASPP) [5].
16
+
17
+ Recently, another type of networks with stacked Transformer blocks emerged. Unlike CNNs, Transformers naturally learn global features in a parameter-free manner, which makes them stronger alternatives and raises questions about the necessity of CNNs in vision systems. Since the advent of Vision Transformer (ViT) [12], which applied Transformers to vision tasks by projecting and tokenizing natural images into sequences, various improvements have been introduced rapidly, e.g., better training and distillation strategies [32], tokenization [41], position encoding [7], local feature learning [14]. Moreover, besides Transformers’ success on image classification, many efforts have been made to explore Transformers for various down-stream vision tasks [35, 24, 13, 3, 46].
18
+
19
+ Nevertheless, the advantages of Transformers come at a price. Since self-attention operates on the whole sequences, it incurs much more memory and computation costs than convolution, especially when it comes to natural images, whose lengths are usually much longer than word sequences, if treating each pixel as a token . Therefore, most existing works have to adopt a compromised strategy to embed a large image patch for each token, although treating smaller patches for tokens leads to a better performance (e.g., ViT-32 compared to ViT-16 [12]). To address this dilemma, various strategies have been proposed. For instance, Pyramid Vision Transformer (PVT) [35] introduced a progressive shrinking pyramid to reduce the sequence length of the Transformer with the increase of network depth, and adopted spatial-reduction attention, where key and value in the attention module are down-sampled to a lower resolution. Swin-Transformer [24] also adopted the pyramid structure, and further proposed to divide input feature maps into different fix-sized local windows, so that self-attention is computed within each window, which reduces the computation cost and makes it scalable to large image scales with linear complexity.
20
+
21
+ Nonetheless, we notice that these strategies have some limitations: Spatial-reduction attention can reduce memory and computation costs to learn high-resolution feature maps, yet with a price of losing details which are expected from the high-resolution feature maps. Adopting self-attention within local windows is efficient with linear complexity, but it sacrifices the most significant advantage of Transformers in modeling long-range dependencies.
22
+
23
+ To address these limitations, we propose Glance-and-Gaze Transformer (GG-Transformer), inspired by the Glance-and-Gaze human behavior when recognizing objects in natural scenes [11], which takes advantage of both the long-range dependency modeling ability of Transformers and locality of convolutions in a complementary manner. A GG-Transformer block consists of two parallel branches: A Glance branch performs self-attention within adaptively-dilated partitions of input images or feature maps, which preserves the global receptive field of the self-attention operation, meanwhile reduces its computation cost to a linear complexity as local window attention [24] does; A Gaze branch compensates locality to the features obtained by the Glance branch, which is implemented by a light-weight depth-wise convolutional layer. A merging operation finally re-arranges the points in each partition to their original locations, ensuring that the output of the GG-Transformer block has the same size as the input. We evaluate GG-Transformer on several vision tasks and benchmarks including image classification on ImageNet [10], object detection on COCO [23], and semantic segmentation on ADE20K [48], and show its efficiency and superior performance, compared to previous state-of-the-art Transformers.
24
+
25
+ # 2 Related Work
26
+
27
+ CNN and self-attention. Convolution has been the basic unit in deep neural networks for computer vision problems. Since standard CNN blocks were proposed in [22], researchers have been working on designing stronger and more efficient network architectures, e.g., VGG [30], ResNet [16], MobileNet [29], and EfficientNet [31]. In addition to studying how to organize convolutional blocks into a network, several variants of the convolution layer have also been proposed, e.g., group convolution [21], depth-wise convolution [6], and dilated convolution [40]. With the development of CNN architectures, researchers also seeked to improve contextual representation of CNNs. Representative works, such as ASPP [5] and PPM [45] enhance CNNs with multi-scale context, and NLNet [36] and CCNet [20] provided a non-local mechanism to CNNs. Moreover, instead of just using them as an add-on to CNNs, some works explored to use attention modules to replace convolutional blocks [18, 28, 34, 44].
28
+
29
+ Vision Transformer. Recently, ViT [12] was proposed to adapt the Transformer [33] for image recognition by tokenizing and flattening 2D images into sequence of tokens. Since then, many works have been done to improve Transformers, making them more suitable for vision tasks. These works can be roughly categorized into three types: (1) Type I made efforts to improve the ViT design itself. For example, DeiT [32] introduced a training scheme to get rid of large-scale pre-training and distillation method to further improve the performance. T2T-ViT [41] presented a token-to-token operation as alternatives to patch embedding, which keeps better local details. (2) Type $\mathbf { I I }$ tried to introduce convolution back into the ViT design. E.g., Chu et al. [7] proposed to use convolution for position encoding. Wu et al. [37] used convolution to replace the linear projection layers in Transformers. (3) Type III tried to replace CNNs by building hierarchical Transformers as a plug-in backbone in many downstream tasks. Wang et al. [35] proposed a pyramid vision Transformer, which gradually downsamples the feature map and extract multi-scale features as common CNN backbones do. However, applying self-attention on high-resolution features is not affordable in terms of both memory and computation cost, thus they used spatial-reduction attention, which downsamples key and value in self-attention as a trade-off between efficiency and accuracy. Later, Liu et al. [24] proposed a new hierarchical Transformer architecture, named Swin-Transformer. To handle the expensive computation burden incurred with self-attention, they divided feature maps into several non-overlapped windows, and limited the self-attention operation to be performed within each window. By doing so, Swin-Transformer is more efficient and also scalable to large resolution input. Besides, to compensate the missing global information, a shifted window strategy is proposed to exchange information between different windows.
30
+
31
+ ![](images/d25135eaed9973a14d881001630df19aedeb9afb61f0794ec600f15d091f0723.jpg)
32
+ Figure 1: Toy examples illustrating different methods to reduce computation and memory cost of self-attention. (a) Spatial reduction [35, 13] spatially downsamples the feature map; (b) Local window [24] restricts self-attention inside local windows; (c) Glance attention (ours) applies selfattention to adaptively-dilated partitions.
33
+
34
+ Our method differs from aforementioned works in the following aspects: Type I, II methods usually utilize a large patch size and thus incompatible to work with high-resolution feature map. Type III methods proposed new attention mechanism to handle the extreme memory and computation burden with long sequences, but they sacrifices accuracy as a trade-off with efficiency. In contrast, GGTransformer proposes a more efficient Transformer block with a novel Glance-and-Gaze mechanism, which not only enables it to handle long sequences and scalable to high-resolution feature maps, but also leads to a better performance than other efficient alternatives.
35
+
36
+ # 3 Method
37
+
38
+ The design of GG-Transformer draws inspiration from how human beings observe the world, which follows the Glance and Gaze mechanism. Specifically, humans will glance at the global view, and meanwhile gaze into local details to obtain a comprehensive understanding to the environment. We note that these behaviors surprisingly match the property of self-attention and convolution, which models long-range dependencies and local context, respectively. Inspired from this, we propose GG-Transformer, whose Transformer block consists of two parallel branches: A Glance branch, where self-attention is performed to adaptively-dilated partitions of the input, and a Gaze branch, where a depth-wise convolutional layer is adopted to capture the local patterns.
39
+
40
+ # 3.1 Revisit Vision Transformer
41
+
42
+ We start with revisiting the formulation of vision Transformer block, which consists of multi-head self-attention (MSA), layer normalization (LN), and multi-layer perceptron (MLP). A Transformer
43
+
44
+ ![](images/253dfac219ed11a67ac880aff4f7ed73c64d3b79ee05f6c331d3b80a5fab014e.jpg)
45
+ Figure 2: A visual illustration of GG Transformer block, where the Glance and Gaze branches parallely extract complementary information.
46
+
47
+ block processes input features as follows:
48
+
49
+ $$
50
+ \begin{array} { r l } & { \mathbf { z } _ { \ell } ^ { \prime } = \mathrm { M S A } ( \mathrm { L N } ( \mathbf { z } _ { \ell - 1 } ) ) + \mathbf { z } _ { \ell - 1 } , } \\ & { \mathbf { z } _ { \ell } = \mathrm { M L P } ( \mathrm { L N } ( \mathbf { z } _ { \ell } ^ { \prime } ) ) + \mathbf { z } _ { \ell } ^ { \prime } , } \end{array}
51
+ $$
52
+
53
+ where $\mathbf { z } _ { \ell }$ is the encoded image representation at the $\ell$ -th block. MSA gives Transformers the advantages of modeling a global relationship in a parameter-free manner, which is formulated as:
54
+
55
+ $$
56
+ \operatorname { M S A } ( X ) = \operatorname { S o f t m a x } ( \frac { Q K ^ { T } } { \sqrt { C } } ) V ,
57
+ $$
58
+
59
+ where $Q , K$ , $V \in \mathbf { R } ^ { N \times C }$ are the query, key, and value matrices which are linear mappings of input $X \in \mathbf { R } ^ { N \times C }$ , $C$ is the channel dimension of the input, and $N$ is the length of input sequence. Note that for simplified derivation, we assume the number of heads is 1 in the multi-head self attention, which will not affect the following complexity analysis and can be easily generalize to more complex cases.
60
+
61
+ For vision tasks, $N$ is often related to the input height $H$ and width $W$ . In practice, a 2D image is often first tokenized based on non-overlapping image patch grids, which maps a 2D input with size $H \times W$ into a sequence of token embeddings with length $\begin{array} { r } { \breve { N } = \frac { H \times W } { P ^ { 2 } } } \end{array}$ , where $( P , P )$ is the grid size. In MSA, the relationships between a token and all tokens are computed. Such designs, though effectively capturing long-range features, incur a computation complexity quadratic to $N$ :
62
+
63
+ $$
64
+ \Omega ( \mathrm { M S A } ) = 4 N C ^ { 2 } + 2 N ^ { 2 } C .
65
+ $$
66
+
67
+ For ViTs that only work on $1 6 \times$ down-sampled feature maps (i.e., $P = 1 6$ ), the computation cost is affordable, since in this scenario $N = 1 4 \times 1 4 = 1 9 6$ (for a typical ImageNet setting with input size $2 2 4 \times 2 2 4 ,$ ). However, when it comes to a more general vision scenario with the need of dense prediction based on high-resolution feature maps (such as semantic segmentation), where the cost dramatically increases by thousands of times or even more. Naively applying MSA to such high-resolution feature maps can easily lead to the problem of out-of-memory (OOM), and extremely high computational cost. Although some efficient alternatives [35, 24] were brought up recently, accuracy is often sacrificed as a trade-off of efficiency. To address this issue, we propose a new vision Transformer that can be applied to longer sequence while keeping high accuracy, inspired by the Glance-and-Gaze human behavior when recognizing objects in natural scenes [11].
68
+
69
+ # 3.2 Glance: Efficient Global Modeling with Adaptively-dilated Splitting
70
+
71
+ To address the efficiency problem of Transformers, existing solutions often adapt Transformers to high-resolution feature maps by down-sampling the key and value during the attention process [35], or limit self-attention to be computed in a local region then exchange information through shifting these local regions to mimic a global view [24]. But limitations exist in these methods. For down-sampling methods, although the output feature maps keep to be high-resolution, they lose some details during the down-sampling processes. Besides, they still has a quadratic complexity and thus may not scale up to a larger input size. For local-region based methods, though they successfully reduce the complexity to a linear level, they cannot directly model a long-range dependency but instead are stuck within local context, which counters the design intuition of Transformer and self-attention for long-range dependency modeling. Besides, two consecutive blocks need to work together to mimic a global receptive field, which may not achieve as good performance as MSA (see Table. 4b).
72
+
73
+ Thus, we propose Glance attention, which performs self-attention efficiently with a global receptive field. It shares same time complexity as [24], but directly models long-range dependencies, as shown in Fig. 1. Specifically, we first splits an input feature map to several dilated partitions, i.e., the points in a partition are not from a local region but from the whole input feature map with a dilation rate adaptive to the feature map size and the token size. We name this operation Adaptively-dilated Splitting. For example, a partition contains $M \times M$ tokens and it is obtained with an adaptive dilation rate $\begin{array} { r } { { \bf \Pi } = \left( \frac { \bar { h } } { M } , \frac { w } { M } \right) } \end{array}$ , where $h , w$ is the height and width of current feature map respectively, and $h w = N$ . Here we assume all divisions have no remainder for simplicity. These partitions are easily to be split from the input feature map or merged back. Specifically, we formulate this process as follows:
74
+
75
+ $$
76
+ \begin{array} { r } { \mathbf { z } _ { \ell - 1 } = [ \mathbf { z } _ { \ell - 1 } ^ { 1 , 1 } , \mathbf { z } _ { \ell - 1 } ^ { 1 , 2 } , \dots , \mathbf { z } _ { \ell - 1 } ^ { h , w } ] , } \end{array}
77
+ $$
78
+
79
+ where zi,jℓ−1 is the feature token at position $( i , j )$ if reshaping the sequence of token embedding $\mathbf { z } _ { \ell - 1 }$ back into a 2D feature map and use the 2D coordinates accordingly. To reduce the memory and computation burden, while keeping a global receptive field, $\mathbf { z } _ { \ell - 1 }$ is split into several partitions:
80
+
81
+ $$
82
+ \begin{array} { r l } & { \mathbf { z } _ { \ell - 1 } ^ { \dagger } = \mathrm { A d a p t i v e l y D i l a t e d S p l i t t i n g } ( \mathbf { z } _ { \ell - 1 } ) } \\ & { \qquad = [ \mathbf { z } _ { \ell - 1 } ^ { \dagger , 1 , 1 } , \mathbf { z } _ { \ell - 1 } ^ { \dagger , 1 , 2 } , \ldots , \mathbf { z } _ { \ell - 1 } ^ { \dagger , \frac { h } { M } , \frac { w } { M } } ] , } \\ & { \qquad \mathrm { ~ } } \\ & { \mathrm { ~ \imath e r e ~ } \mathbf { z } _ { \ell - 1 } ^ { \dagger , i , j } = [ \mathbf { z } _ { \ell - 1 } ^ { i , j } , \mathbf { z } _ { \ell - 1 } ^ { i , j + \frac { h } { M } } , \ldots , \mathbf { z } _ { \ell - 1 } ^ { i + \frac { ( M - 1 ) h } { M } , j + \frac { ( M - 1 ) w } { M } } ] , } \end{array}
83
+ $$
84
+
85
+ where ${ \bf z } _ { \ell - 1 } ^ { \dagger } \in { \bf R } ^ { N \times C }$ , ${ \bf z } _ { \ell - 1 } ^ { \dag , i , j } \in { \bf R } ^ { M ^ { 2 } \times C }$ . Afterwards, MSA is applied to each partition, which substantially reduces the computation and memory cost yet does not lose the global feature representation. And then all partitions are merged back into one feature map and go through the remaining modules:
86
+
87
+ $$
88
+ \begin{array} { r l } & { \mathbf { z } _ { \ell } ^ { \prime , i , j } = \mathrm { M S A } ( \mathrm { L N } ( \mathbf { z } _ { \ell - 1 } ^ { \dag , i , j } ) ) + \mathbf { z } _ { \ell - 1 } ^ { \dag , i , j } , } \\ & { \quad \quad \mathbf { z } _ { \ell } ^ { \prime } = \mathrm { M e r g i n g } ( \mathbf { z } _ { \ell } ^ { \prime , 1 , 1 } , \ldots , \mathbf { z } _ { \ell } ^ { \prime , \frac { h } { M } , \frac { w } { M } } ) , } \\ & { \quad \quad \mathbf { z } _ { \ell } = \mathrm { M L P } ( \mathrm { L N } ( \mathbf { z } _ { \ell } ^ { \prime } ) ) + \mathbf { z } _ { \ell } ^ { \prime } , } \end{array}
89
+ $$
90
+
91
+ where Merging is an inverse operation of AdaptivelyDilatedSplitting which re-arranges points in each partition back in their original orders.
92
+
93
+ This new self-attention module (formulated in Eq. 6 to 10), namely Glance multi-head self attention module (G-MSA), enables a global feature learning with linear complexity:
94
+
95
+ $$
96
+ \Omega ( \mathrm { G } \mathrm { - } \mathrm { M S A } ) = 4 h w C ^ { 2 } + 2 M ^ { 2 } h w C = 4 N C ^ { 2 } + 2 M ^ { 2 } N C .
97
+ $$
98
+
99
+ # 3.3 Gaze: Compensating Local Relationship with Depthwise Convolution
100
+
101
+ Although the Glance branch can effectively capture long-range representations, it misses the local connections across partitions, which can be crucial for vision tasks relying on local cues. To this end, we propose a Gaze branch to compensate the missing relationship and enhance the modeling power at a negligible cost.
102
+
103
+ Specifically, to compensate the local patterns missed in the Glance branch, we propose to apply an additional depthwise convolution on the value in G-MSA:
104
+
105
+ $$
106
+ \operatorname { G a z e } ( X ) = \operatorname { D e p t h w i s e C o n v 2 d } ( \operatorname { M e r g i n g } ( V ) ) ,
107
+ $$
108
+
109
+ which has a neglectable computational cost and thus the overall cost is still significantly reduced:
110
+
111
+ $$
112
+ \Omega ( \mathrm { G G - M S A } ) = 4 N C ^ { 2 } + 2 M ^ { 2 } N C + k ^ { 2 } N C ,
113
+ $$
114
+
115
+ where $k$ is the Gaze branch kernel size, and $M$ is the partition size set in Glance branch, both $k$ and $M$ are constants that are much smaller than $N$ . We note that in this way, long-range and short-range features are naturally and effectively learned. Besides, unlike [24], GG-MSA does not require two consecutive blocks (e.g., W-MSA and SW-MSA) to be always used together, instead, it is a standalone module as the original MSA [12].
116
+
117
+ We propose two ways to determine the kernel size $k$ for better compensating the local features:
118
+
119
+ Fixed Gazing. A straightforward way is to adopt the same kernel size (e.g., $3 \times 3 ,$ ) for all Gaze branches, which can ensure same local feature learning regardless of the dilation rate.
120
+
121
+ Adaptive Gazing. Another way is implementing Gazing branch with adaptive kernels, where the kernel size should be the same as dilation rate $( \bar { h } / M , w \bar { / } M )$ . In this way, GG-MSA still enjoys a complete view of the input.
122
+
123
+ By combining Glance and Gaze branches together, GG-MSA can achieve superior performance to other counterparts while remaining a low cost.
124
+
125
+ # 3.4 Network Instantiation
126
+
127
+ We build a hierarchical GG-Transformer with the proposed Glance-and-Gaze branches as shown in Fig. 2. For fair comparison, we follow the same settings as Swin-Transformer [24] in terms of network depth and width, with only difference in the attention methods used in Transformer blocks. Furthermore, we set $M$ to be same as the window size in [24], so that the model size and computation cost are also directly comparable. Note that GG-Transformer has not been specifically tuned by scaling depth and width for a better accuracy-cost trade-off.
128
+
129
+ We build GG-T and GG-S, which share the same model size and computation costs as Swin-T and Swin-S, respectively. For all GG-Transformers, we set the fixed patch size $M = 7$ , expansion ratio of MLP $\alpha = 4$ . All GG-Transformer consists of 4 hierarchical stages, which corresponds to feature maps with down-sampling ratio 4, 8, 16, 32, respectively. The first patch embedding layer projects input to a feature map with channel $C = 9 6$ . When transitioning from one stage to the next one, we follow CNN design principles [16] to expand the channel by $2 \times$ when the spatial size is down-sampled by $4 \times$ .
130
+
131
+ # 4 Experiments
132
+
133
+ In the following parts, we report results on ImageNet [10] classification, COCO [23] object detection, and ADE20K [48] semantic segmentation to compare GG-Transformer with those state-of-the-art CNNs and ViTs. Afterwards, we conduct ablation studies to verify the design of Glance and Gaze branches and also compare effectiveness of different alternative self-attention designs.
134
+
135
+ # 4.1 ImageNet Classification
136
+
137
+ We validate the performance of GG-Transformer on ImageNet-1K [10] classification task, which contains 1.28M training images and 50K validation images for 1000 classes. We report top-1 accuracy with a single $2 2 4 \times 2 2 4$ crop.
138
+
139
+ Implementation Details. To ensure a fair comparison, we follow the same training settings of [24]. Specifically, we use AdamW [25] optimizer for 300 epochs with cosine learning rate decay including 20 epochs for linear warm-up. The training batch size is 1024 with 8 GPUs. Initial learning rate starts at 0.001, and weight decay is 0.05. Augmentations and regularizations setting follows [32] including rand-augment [9], mixup [43], cutmix [42], random erasing [47], stochastic depth [19], but excluding repeated repeated augmentation [17] and EMA [26].
140
+
141
+ Results. A summary of results in Table 1, where we compare GG-Transformer with various CNNs and ViTs. It is shown that GG-Transformer achieve better accuracy-cost trade-off compared to other models. Moreover, GG-T, a light-weight model $2 8 \mathbf { M } / 4 . 5 \mathbf { G } / 8 2 . 0 \% )$ ), can achieve comparable performance to those even much large models such as DeiT-B $( 8 6 \mathbf { M } / 1 7 . 5 \mathbf { G } / 8 1 . 8 \% )$ , T2T-ViT-24 $6 4 \mathbf { M } / 1 4 . 1 \mathbf { G } / 8 2 . 3 \% )$ , and PVT-Large $( 6 1 \mathbf { M } / 9 . 8 \mathbf { G } / 8 1 . 7 \% )$ . Furthermore, compared to Swin-Transformer, which we follows the architecture and ensures the same model size and computation costs to ensure a fair comparison, our model consistently brings an improvement to baseline, with a consistent improvement of $0 . 8 \%$ and $0 . 2 \%$ for $\mathrm { T }$ and S models respectively.
142
+
143
+ Table 1: Comparison of different models on ImageNet-1K classification.
144
+
145
+ <table><tr><td>method</td><td>image size</td><td>#param.</td><td>FLOPs</td><td>ImageNet top-1 acc.</td></tr><tr><td>RegNetY-4G [27]</td><td>2242</td><td>21M</td><td>4.0G</td><td>80.0</td></tr><tr><td>RegNetY-8G [27]</td><td>224²</td><td>39M</td><td>8.0G</td><td>81.7</td></tr><tr><td>RegNetY-16G [27]</td><td>224²</td><td>84M</td><td>16.0G</td><td>82.9</td></tr><tr><td>EffNet-B3[31]</td><td>3002</td><td>12M</td><td>1.8G</td><td>81.6</td></tr><tr><td>EffNet-B4 [31]</td><td>380²</td><td>19M</td><td>4.2G</td><td>82.9</td></tr><tr><td>EffNet-B5[31]</td><td>4562</td><td>30M</td><td>9.9G</td><td>83.6</td></tr><tr><td>DeiT-T[32]</td><td>2242</td><td>5M</td><td>1.3G</td><td>72.2</td></tr><tr><td>DeiT-S [32]</td><td>224²</td><td>22M</td><td>4.6G</td><td>79.8</td></tr><tr><td>DeiT-B [32]</td><td>2242</td><td>86M</td><td>17.5G</td><td>81.8</td></tr><tr><td>TNT-S [14]</td><td>2242</td><td>24M</td><td>5.2G</td><td>81.3</td></tr><tr><td>TNS-B[14]</td><td>2242</td><td>66M</td><td>14.1G</td><td>82.8</td></tr><tr><td>T2T-ViT-7[41]</td><td>2242</td><td>4M</td><td>1.2G</td><td>71.7</td></tr><tr><td>T2T-ViT-14 [41]</td><td>224²</td><td>22M</td><td>5.2G</td><td>81.5</td></tr><tr><td>T2T-ViT-24 [41]</td><td>2242</td><td>64M</td><td>14.1G</td><td>82.3</td></tr><tr><td>PVT-Tiny [35]</td><td>2242</td><td>13M</td><td>1.9G</td><td>75.1</td></tr><tr><td>PVT-Small [35]</td><td>2242</td><td>25M</td><td>3.8G</td><td>79.8</td></tr><tr><td>PVT-Medium [35]</td><td>224²</td><td>44M</td><td>6.7G</td><td>81.2</td></tr><tr><td>PVT-Large [35]</td><td>2242</td><td>61M</td><td>9.8G</td><td>81.7</td></tr><tr><td>Swin-T[24]</td><td>2242</td><td>28M</td><td>4.5G</td><td>81.2</td></tr><tr><td>Swin-S [24]</td><td>224²</td><td>50M</td><td>8.7G</td><td>83.2</td></tr><tr><td>GG-T</td><td>2242</td><td>28M</td><td>4.5G</td><td>82.0</td></tr><tr><td>GG-S</td><td>2242</td><td>50M</td><td>8.7G</td><td>83.4</td></tr></table>
146
+
147
+ # 4.2 ADE20K Semantic Segmentation
148
+
149
+ ADE20K [48] is a challenging semantic segmentation dataset, containing 20K images for training and 2K images for validation. We follow common practices to use the training set for training and report mIoU results on the validation sets. We use UperNet [38] as the segmentation framework and replace the backbone with GG-Transformer.
150
+
151
+ Implementation Details. We follow [24] and use MMSegmentation [8] to implement all related experiments. We use AdamW [25] with a learning rate starting at $6 \times 1 0 ^ { - 5 }$ , weight decay of 0.01, batch size of 16, crop size of $5 1 2 \times 5 1 2$ . The learning rate schedule contains a warmup of 1500 iterations and linear learning rate decay. The training is conducted with 8 GPUs and the training procedure lasts for 160K iterations in total. The augmentations follows the default setting of MMSegmentation, including random horizontal flipping, random re-scaling within ratio range [0.5, 2.0] and random photometric distortion. For testing, we follow [46] to utilize a sliding window manner with crop size 512 and stride 341. ImageNet-1K pretrained weights are used for initialization.
152
+
153
+ Results. We show results in Table 2, where results both w/ and w/o test-time augmentation are reported. Noticeably, GG-Transformer not only achieves better results to baselines, but also obtain a comparable single-scale testing performance to those with multi-scale testing results. Specifically, GG-T achieves $4 6 . 4 \%$ mIoU with single-scale testing, which surpasses ResNet50, PVT-Small, SwinT’s multi-scale testing results by $3 . 6 \%$ , $1 . 6 \%$ , $0 . 6 \%$ , respectively. Moreover, our tiny model even can be comparable to those much larger models (e.g., $4 7 . 2 \%$ of GG-T compared to $4 7 . 6 \%$ of Swin-S).
154
+
155
+ # 4.3 COCO Object Detection
156
+
157
+ We further verify the performance of GG-Transformer when used as a plug-in backbone to object detection task on COCO dataset [23], which contains 118K, 5K, 20K images for training, validation and test respectively. We use Mask-RCNN [15] and Cascaded Mask R-CNN [1] as the detection frameworks, and compare GG-Transformer to various CNN and ViT backbones.
158
+
159
+ Table 2: Performance comparisons with different backbones on ADE20K validation dataset. FLOPs is tested on $1 0 2 4 \times 1 0 2 4$ resolution. All backbones are pretrained on ImageNet-1k.
160
+
161
+ <table><tr><td rowspan="2">Backbone</td><td colspan="4">UperNet</td></tr><tr><td>Prams (M)</td><td>FLOPs (G)</td><td>mIoU (%)</td><td>mIoU(ms+flip) (%)</td></tr><tr><td>ResNet50 [16]</td><td>67</td><td>952</td><td>42.1</td><td>42.8</td></tr><tr><td>PVT-Small [35]</td><td>55</td><td>919</td><td>43.9</td><td>44.8</td></tr><tr><td>Swin-T [24]</td><td>60</td><td>941</td><td>44.5</td><td>45.8</td></tr><tr><td>GG-T (ours)</td><td>60</td><td>942</td><td>46.4</td><td>47.2</td></tr><tr><td>ResNet101[16]</td><td>86</td><td>1029</td><td>43.8</td><td>44.9</td></tr><tr><td>PVT-Medium [35]</td><td>74</td><td>977</td><td>44.9</td><td>45.3</td></tr><tr><td>Swin-S [24]</td><td>81</td><td>1034</td><td>47.6</td><td>49.5</td></tr><tr><td>GG-S (ours)</td><td>81</td><td>1035</td><td>48.4</td><td>49.6</td></tr></table>
162
+
163
+ Table 3: Object detection and instance segmentation performance on the COCO val2017 dataset using the Mask R-CNN framework. Params/FLOPs is evaluated with Mask R-CNN architecture on a $1 2 8 0 \times 8 0 0$ image.
164
+
165
+ <table><tr><td rowspan="3">Backbone</td><td colspan="2">|Params FLOPs|</td><td colspan="4">Mask R-CNN</td><td colspan="4">Cascaded Mask R-CNN</td></tr><tr><td>(M)</td><td>(G)</td><td></td><td></td><td>|APb AP0AP5 APm AP AP|A</td><td></td><td></td><td>|APb APAP AP APAP</td><td></td><td></td><td></td></tr><tr><td>ResNet50 [16]</td><td>44</td><td>260</td><td>38.2</td><td>58.8 41.4</td><td>34.7</td><td></td><td>55.7 37.2</td><td></td><td>|41.2 59.4 45.0 35.9 56.6 38.4</td><td></td></tr><tr><td>PVT-Small [35]</td><td>44</td><td>245</td><td>40.4 62.9</td><td></td><td>43.8 37.8</td><td>60.1</td><td>40.3</td><td>1 1</td><td>- -</td><td>1 1</td></tr><tr><td>Swin-T [24]</td><td>48</td><td>264</td><td>43.7</td><td>66.6 47.7</td><td>39.8</td><td>63.3</td><td>42.7</td><td>48.1</td><td>67.1 52.2 41.7 64.4 45.0</td><td></td></tr><tr><td>GG-T (ours)</td><td>48</td><td>265</td><td>44.1</td><td>66.7</td><td>48.339.9</td><td></td><td>63.342.4</td><td></td><td>48.4 67.4 52.3 41.9 64.5 45.0</td><td></td></tr><tr><td>ResNet101[16]</td><td>63</td><td>336</td><td>40.0</td><td>60.6 44.0</td><td>36.1</td><td></td><td>57.5 38.6</td><td>42.9</td><td>61.0 46.6 37.3 58.2 40.1</td><td></td></tr><tr><td>ResNeXt101-32×4d [39]</td><td>63</td><td>340</td><td>41.9</td><td>62.545.9</td><td>37.5</td><td>59.440.2</td><td></td><td></td><td>44.3 62.8 48.4 38.3 59.7 41.2</td><td></td></tr><tr><td>PVT-Medium [35]</td><td>64</td><td>302</td><td>42.0 64.445.639.0</td><td></td><td></td><td>61.6 42.1</td><td>-</td><td>-</td><td>- -</td><td>- -</td></tr><tr><td>Swin-S [24]</td><td>69</td><td>354</td><td>45.4 67.9 49.6 41.4</td><td></td><td></td><td></td><td>65.1 44.6</td><td></td><td>49.7 68.8 53.8 42.8 66.0 46.4</td><td></td></tr><tr><td>GG-S (ours)</td><td>69</td><td>355</td><td>45.7 68.3 49.9 41.3</td><td></td><td></td><td></td><td>65.344.0</td><td></td><td>49.9 69.0 54.0 43.1 66.2 46.4</td><td></td></tr></table>
166
+
167
+ Implementation Details. We follow the setting of [24] and use MMDetection [4] to conduct all the experiments. We adopt multi-scale training [2], AdamW optimizer [25] with initial learning rate of 0.0001, weight decay of 0.05, batch size of 16. The training is conducted with 8 GPUs and a $1 \times$ schedule. All models are initialized with ImageNet-1K pretrained weights.
168
+
169
+ Results. As shown in Table 3, GG-Transformer achieves superior performance to other backbones in the two widely-used detection frameworks. Specifically, GG-T achieves 44.1 box AP and 39.9 mask AP, which surpasses both CNNs and other ViTs with a similar model size and computation costs. Compared with the state-of-the-art Swin-Transformer, GG-Transformer achieves better performance while keeping the same model size and computation costs for both T and S models.
170
+
171
+ # 4.4 Ablation Studies
172
+
173
+ In this part, we conduct ablation studies regarding to the designs of GG-Transformer. Meanwhile, we also compare among different efficient alternatives to MSA. Besides, we verify GG-MSA on another ViT architecture [32] to compare its capacity to MSA directly. We conduct all these experiments based on Swin-T [24] with 100 epochs training and DeiT [32] architectures with 300 epochs training.
174
+
175
+ Kernel Choice of Gaze Branch. We study the choice of Gaze branch in terms of fixed or adaptive mechanism. The kernel sizes for each stage and results are summarized in Table 4a, where we observe that both mechanisms work well. Using a larger kernel leads to a non-significant improvement. In contrast, adaptive manner leads to a slightly better performance. Considering the adaptive manner provides a complete view as the original MSA has, we choose it in our final design.
176
+
177
+ Glance/Gaze Branch. We study the necessity of both Glance and Gaze branches. Meanwhile, a comparison between different ways to conduct self-attention is also studied. Results are in Table 4b.
178
+
179
+ Swin-T [24] serves as the baseline for all variants, which achieves $7 8 . 5 0 \%$ top-1 accuracy on ImageNet validation set. Firstly, we note that the local window attention and shifted window attention (W&SW-MSA) in [24] although can significantly reduce the computation complexity and makes
180
+
181
+ Table 4: Ablation studies regarding GG-Transformer design and comparison among different selfattention mechanisms.
182
+
183
+ (b) Comparison among different self-attentions. Gaze (Conv) uses kernels of Fixed-(3,3,3,3).
184
+
185
+ (a) Choices of Gaze Kernels.
186
+
187
+ <table><tr><td>Gaze Kernel</td><td>Top-1</td></tr><tr><td>Fixed-(3,3,3,3) Fixed-(5,5,5,5) Adaptive-(9,5,3,3)</td><td>80.28% 80.31% 80.38%</td></tr></table>
188
+
189
+ (c) Applying GG-MSA to DeiT backbone.
190
+
191
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Top-1</td></tr><tr><td rowspan=1 colspan=1>W&amp;SW-MSA[24]MSAGlance OnlyGaze OnlyGlance+Gaze (Attn)</td><td rowspan=1 colspan=1>78.50%79.79%77.21%76.76%79.07%</td></tr><tr><td rowspan=1 colspan=1>Glance+Gaze (Conv)</td><td rowspan=1 colspan=1>80.28%</td></tr></table>
192
+
193
+ <table><tr><td></td><td>Top-1</td></tr><tr><td>DeiT-T GG-DeiT-T</td><td>72.2%</td></tr><tr><td>DeiT-S</td><td>73.8% 79.9%</td></tr><tr><td></td><td></td></tr><tr><td>GG-DeiT-S</td><td>80.5%</td></tr></table>
194
+
195
+ Transformer easier to scale-up, it sacrifices the accuracy and the combination of W&SW-MSA to mimic a global view is not as good as the original MSA. We replace the W&SW-MSA with MSA for all blocks in stage 3 and 4 (i.e., stages with down-sampling rate 16 and 32), which leads to a $1 . 2 9 \%$ performance improvement, indicating there exists a significant performance gap between MSA and its efficient alternative. Notably, when adopting the proposed Glance and Gaze mechanism instead, which shares a same complexity of W& SW-MSA, can achieves much better performance, where the Glance+Gaze (Attn) improves the performance by $0 . 5 7 \%$ , and Glance+Gaze (Conv) (i.e., GG-T) by $1 . 7 8 \%$ , which is even higher than MSA by $0 . 4 9 \%$ .
196
+
197
+ Besides using depthwise convolution, another natural choice is to also adopt self-attention for implementing the Gaze branch. Therefore, we conduct experiments by using local window attention [24] as the Gaze branch. Note that, unlike depthwise convolution, a self-attention variant of the Gaze branch cannot be integrated with the Glance branch into the same Transformer block while keeping the overall model size and computation cost at the same level. To ensure a fair comparison, we use two consecutive Transformer blocks where one is Glance attention and another is Gaze attention. Using either convolution or self-attention to implement the Gaze branch can both improve the performance compared to [24], illustrating the effectiveness of the Glance and Gaze designs. However, using self-attention is inferior to depth-wise convolution with a degrade of $1 . 2 1 \%$ , which may indicate that convolution is still a better choice when it comes to learning local relationships. Besides, using depth-wise convolution as Gaze branch can also naturally be integrated into the Transformer block with Glance attention, thus makes it more flexible in terms of network designs.
198
+
199
+ We also note that Glance or Gaze branch alone is far from enough, while only a combination of both can lead to a performance gain, which matches the behavior that we human beings can not rely on Glance or Gaze alone. For instance, using Glance alone can only lead to an inferior performance with accuracy of $7 7 . 2 1 \%$ , and Gaze alone $7 6 . 7 6 \%$ , which is significantly lower than baseline with a degrade of $1 . 2 9 \%$ and $1 . 7 4 \%$ , respectively. Nevertheless, we note that this is because Glance and Gaze branches miss important local or global cues which can be compensated by each other. As a result, a combination of both Glance and Gaze gives a high accuracy of $8 0 . 2 8 \%$ , which improves the Glance alone and Gaze alone by $3 . 0 7 \%$ and $3 . 5 2 \%$ respectively.
200
+
201
+ Apply to other backbone. We verify the effectiveness of GG-Transformer on another popular ViT architecture DeiT [32], as shown in Table 4c. We replace MSA with GG-MSA for two DeiT variants [32], DeiT-T and DeiT-S. We show that, although GG-MSA is an efficient alternative to MSA, it can also lead to a performance gain. Compared to DeiT-T and DeiT-S, GG-DeiT-T and GG-DeiT-S bring the performance up by $1 . 6 \%$ and $0 . 6 \%$ respectively, illustrating that it is not only efficient but also effectively even compared to a fully self-attention.
202
+
203
+ Network runtime. We follow [24] to report and compare work runtime measured by FPS: GG-T achieves 782.34 FPS compared to 737.86 of Swin-T, and GG-S achieves 441.31 FPS compared to 423.51 of Swin-S. The evaluation is done with a single Nvidia tesla v100-sxm2-16gb GPU.
204
+
205
+ # 5 Limitation
206
+
207
+ Although GG-Transformer provides a powerful and efficient solution to make Transformers scalable to large inputs, some limitations still exist and worth further exploring.
208
+
209
+ Firstly, over-fitting is a common problem [12] in Vision Transformers and can be alleviated by large-scale pretraining [12] or strong augmentations and regularization [32]. This problem is more serious for stronger models (GG-Transformer) and in the tasks with relatively small dataset (e.g. semantic segmentation). Secondly, Transformers suffer from performance degradation in modeling longer-range dependencies, when there exists large discrepancy in the training-testing image size. The limitations can come from position encoding, which has fixed size and need to be interpolated to different input sizes, or self-attention itself, which may not adapt well when significant changes happen in input size. Lastly, there is a long-lasting debate on the impacts of AI on human world. As a method improving the fundamental ability of deep learning, our work also advances the development of AI, which means there could be both beneficial and harmful influences depending on the users.
210
+
211
+ # 6 Conclusion
212
+
213
+ In this paper, we present GG-Transformer, which offers an efficient and effective solution to adapting Transformers for vision tasks. GG-Transformer, inspired by how human beings learn from the world, is equipped with parallel and complementary Glance branch and Gaze branch, which offer long-range relationship and short-range modeling, respectively. The two branches can specialize in their tasks and collaborate with each other, which leads to a much more efficient ViT design for vision tasks. Experiments on various architectures and benchmarks validate the advantages of GG-Transformer.
214
+
215
+ Acknowledgment: This work was supported by ONR N00014-20-1-2206, ONR N00014-18-1- 2119, NSFC 62176159, Natural Science Foundation of Shanghai 21ZR1432200, SJTU Explore X Foundation, and Shanghai Municipal Science and Technology Major Project 2021SHZDZX0102.
216
+
217
+ # References
218
+
219
+ [1] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6154–6162, 2018.
220
+ [2] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European Conference on Computer Vision, pages 213–229. Springer, 2020.
221
+ [3] Jieneng Chen, Yongyi Lu, Qihang Yu, Xiangde Luo, Ehsan Adeli, Yan Wang, Le Lu, Alan L Yuille, and Yuyin Zhou. Transunet: Transformers make strong encoders for medical image segmentation. arXiv preprint arXiv:2102.04306, 2021.
222
+ [4] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, et al. Mmdetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019.
223
+ [5] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017.
224
+ [6] François Chollet. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1251–1258, 2017.
225
+ [7] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. Arxiv preprint 2102.10882, 2021.
226
+ [8] MMSegmentation Contributors. MMSegmentation: Openmmlab semantic segmentation toolbox and benchmark. https://github.com/open-mmlab/mmsegmentation, 2020.
227
+ [9] Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with a reduced search space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 702–703, 2020.
228
+ [10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee, 2009.
229
+ [11] Heiner Deubel and Werner X. Schneider. Saccade target selection and object recognition: Evidence for a common attentional mechanism. Vision Research, 36(12):1827–1837, 1996.
230
+ [12] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
231
+ [13] Haoqi Fan, Bo Xiong, Karttikeya Mangalam, Yanghao Li, Zhicheng Yan, Jitendra Malik, and Christoph Feichtenhofer. Multiscale vision transformers. arXiv preprint arXiv:2104.11227, 2021.
232
+ [14] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021.
233
+ [15] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961–2969, 2017.
234
+ [16] 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, pages 770–778, 2016.
235
+ [17] Elad Hoffer, Tal Ben-Nun, Itay Hubara, Niv Giladi, Torsten Hoefler, and Daniel Soudry. Augment your batch: Improving generalization through instance repetition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8129–8138, 2020.
236
+ [18] Han Hu, Zheng Zhang, Zhenda Xie, and Stephen Lin. Local relation networks for image recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3464–3473, 2019.
237
+ [19] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646–661. Springer, 2016.
238
+ [20] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 603–612, 2019.
239
+ [21] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097–1105, 2012.
240
+ [22] 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.
241
+ [23] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740–755. Springer, 2014.
242
+ [24] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021.
243
+ [25] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.
244
+ [26] Boris T Polyak and Anatoli B Juditsky. Acceleration of stochastic approximation by averaging. SIAM journal on control and optimization, 30(4):838–855, 1992.
245
+ [27] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10428–10436, 2020.
246
+ [28] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jonathon Shlens. Stand-alone self-attention in vision models. arXiv preprint arXiv:1906.05909, 2019.
247
+ [29] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510–4520, 2018.
248
+ [30] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
249
+ [31] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105–6114. PMLR, 2019.
250
+ [32] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020.
251
+ [33] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
252
+ [34] Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Axialdeeplab: Stand-alone axial-attention for panoptic segmentation. In European Conference on Computer Vision, pages 108–126. Springer, 2020.
253
+ [35] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021.
254
+ [36] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7794–7803, 2018.
255
+ [37] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. Cvt: Introducing convolutions to vision transformers. arXiv preprint arXiv:2103.15808, 2021.
256
+ [38] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 418–434, 2018.
257
+ [39] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492–1500, 2017.
258
+ [40] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015.
259
+ [41] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021.
260
+ [42] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6023–6032, 2019.
261
+ [43] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
262
+ [44] Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun. Exploring self-attention for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10076– 10085, 2020.
263
+ [45] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2881–2890, 2017.
264
+ [46] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, et al. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. arXiv preprint arXiv:2012.15840, 2020.
265
+ [47] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 13001–13008, 2020.
266
+ [48] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 633–641, 2017.
parse/train/GitDcBlcg78/GitDcBlcg78_content_list.json ADDED
@@ -0,0 +1,1184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Glance-and-Gaze Vision Transformer ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 269,
8
+ 122,
9
+ 728,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Qihang $\\mathbf { V } \\mathbf { u } ^ { 1 }$ , Yingda $\\mathbf { X i a ^ { 1 } }$ , Yutong Bai1, Yongyi ${ { \\bf { L } } { \\bf { u } } ^ { 1 } }$ , Alan Yuille1, Wei Shen2∗ ",
17
+ "bbox": [
18
+ 232,
19
+ 195,
20
+ 769,
21
+ 212
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1 Department of Computer Science, Johns Hopkins University 2 MoE Key Lab of Artificial Intelligence, AI Institute, Shanghai Jiao Tong University {yucornetto, philyingdaxia, ytongbai, yylu1989, alan.l.yuille}@gmail.com wei.shen@sjtu.edu.cn ",
28
+ "bbox": [
29
+ 192,
30
+ 212,
31
+ 805,
32
+ 267
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 304,
43
+ 535,
44
+ 320
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Recently, there emerges a series of vision Transformers, which show superior performance with a more compact model size than conventional convolutional neural networks, thanks to the strong ability of Transformers to model long-range dependencies. However, the advantages of vision Transformers also come with a price: Self-attention, the core part of Transformer, has a quadratic complexity to the input sequence length. This leads to a dramatic increase of computation and memory cost with the increase of sequence length, thus introducing difficulties when applying Transformers to the vision tasks that require dense predictions based on high-resolution feature maps. ",
51
+ "bbox": [
52
+ 233,
53
+ 335,
54
+ 764,
55
+ 460
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "In this paper, we propose a new vision Transformer, named Glance-and-Gaze Transformer (GG-Transformer), to address the aforementioned issues. It is motivated by the Glance and Gaze behavior of human beings when recognizing objects in natural scenes, with the ability to efficiently model both long-range dependencies and local context. In GG-Transformer, the Glance and Gaze behavior is realized by two parallel branches: The Glance branch is achieved by performing self-attention on the adaptively-dilated partitions of the input, which leads to a linear complexity while still enjoying a global receptive field; The Gaze branch is implemented by a simple depth-wise convolutional layer, which compensates local image context to the features obtained by the Glance mechanism. We empirically demonstrate our method achieves consistently superior performance over previous state-of-the-art Transformers on various vision tasks and benchmarks. ",
62
+ "bbox": [
63
+ 233,
64
+ 463,
65
+ 766,
66
+ 628
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 Introduction ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 174,
76
+ 656,
77
+ 310,
78
+ 672
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Convolution Neural Networks (CNNs) have been dominating the field of computer vision, which have been a de-facto standard and achieved tremendous success in various tasks, e.g., image classification [16], object detection [15], semantic segmentation [5], etc. CNNs model images from a local-to-global perspective, starting with extracting local features such as edges and textures, and forming high-level semantic concepts gradually. Although CNNs prove to be successful for various vision tasks, they lack the ability to globally represent long-range dependencies. To compensate a global view to CNN, researchers explored different methods such as non-local operation [36], self-attention [33], Atrous Spatial Pyramid Pooling (ASPP) [5]. ",
85
+ "bbox": [
86
+ 174,
87
+ 688,
88
+ 825,
89
+ 799
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Recently, another type of networks with stacked Transformer blocks emerged. Unlike CNNs, Transformers naturally learn global features in a parameter-free manner, which makes them stronger alternatives and raises questions about the necessity of CNNs in vision systems. Since the advent of Vision Transformer (ViT) [12], which applied Transformers to vision tasks by projecting and tokenizing natural images into sequences, various improvements have been introduced rapidly, e.g., better training and distillation strategies [32], tokenization [41], position encoding [7], local feature learning [14]. Moreover, besides Transformers’ success on image classification, many efforts have been made to explore Transformers for various down-stream vision tasks [35, 24, 13, 3, 46]. ",
96
+ "bbox": [
97
+ 174,
98
+ 805,
99
+ 825,
100
+ 876
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 176,
109
+ 92,
110
+ 823,
111
+ 132
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Nevertheless, the advantages of Transformers come at a price. Since self-attention operates on the whole sequences, it incurs much more memory and computation costs than convolution, especially when it comes to natural images, whose lengths are usually much longer than word sequences, if treating each pixel as a token . Therefore, most existing works have to adopt a compromised strategy to embed a large image patch for each token, although treating smaller patches for tokens leads to a better performance (e.g., ViT-32 compared to ViT-16 [12]). To address this dilemma, various strategies have been proposed. For instance, Pyramid Vision Transformer (PVT) [35] introduced a progressive shrinking pyramid to reduce the sequence length of the Transformer with the increase of network depth, and adopted spatial-reduction attention, where key and value in the attention module are down-sampled to a lower resolution. Swin-Transformer [24] also adopted the pyramid structure, and further proposed to divide input feature maps into different fix-sized local windows, so that self-attention is computed within each window, which reduces the computation cost and makes it scalable to large image scales with linear complexity. ",
118
+ "bbox": [
119
+ 174,
120
+ 140,
121
+ 825,
122
+ 319
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Nonetheless, we notice that these strategies have some limitations: Spatial-reduction attention can reduce memory and computation costs to learn high-resolution feature maps, yet with a price of losing details which are expected from the high-resolution feature maps. Adopting self-attention within local windows is efficient with linear complexity, but it sacrifices the most significant advantage of Transformers in modeling long-range dependencies. ",
129
+ "bbox": [
130
+ 174,
131
+ 325,
132
+ 825,
133
+ 395
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "To address these limitations, we propose Glance-and-Gaze Transformer (GG-Transformer), inspired by the Glance-and-Gaze human behavior when recognizing objects in natural scenes [11], which takes advantage of both the long-range dependency modeling ability of Transformers and locality of convolutions in a complementary manner. A GG-Transformer block consists of two parallel branches: A Glance branch performs self-attention within adaptively-dilated partitions of input images or feature maps, which preserves the global receptive field of the self-attention operation, meanwhile reduces its computation cost to a linear complexity as local window attention [24] does; A Gaze branch compensates locality to the features obtained by the Glance branch, which is implemented by a light-weight depth-wise convolutional layer. A merging operation finally re-arranges the points in each partition to their original locations, ensuring that the output of the GG-Transformer block has the same size as the input. We evaluate GG-Transformer on several vision tasks and benchmarks including image classification on ImageNet [10], object detection on COCO [23], and semantic segmentation on ADE20K [48], and show its efficiency and superior performance, compared to previous state-of-the-art Transformers. ",
140
+ "bbox": [
141
+ 174,
142
+ 401,
143
+ 825,
144
+ 594
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "2 Related Work ",
151
+ "text_level": 1,
152
+ "bbox": [
153
+ 174,
154
+ 619,
155
+ 321,
156
+ 637
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "CNN and self-attention. Convolution has been the basic unit in deep neural networks for computer vision problems. Since standard CNN blocks were proposed in [22], researchers have been working on designing stronger and more efficient network architectures, e.g., VGG [30], ResNet [16], MobileNet [29], and EfficientNet [31]. In addition to studying how to organize convolutional blocks into a network, several variants of the convolution layer have also been proposed, e.g., group convolution [21], depth-wise convolution [6], and dilated convolution [40]. With the development of CNN architectures, researchers also seeked to improve contextual representation of CNNs. Representative works, such as ASPP [5] and PPM [45] enhance CNNs with multi-scale context, and NLNet [36] and CCNet [20] provided a non-local mechanism to CNNs. Moreover, instead of just using them as an add-on to CNNs, some works explored to use attention modules to replace convolutional blocks [18, 28, 34, 44]. ",
163
+ "bbox": [
164
+ 174,
165
+ 656,
166
+ 825,
167
+ 808
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Vision Transformer. Recently, ViT [12] was proposed to adapt the Transformer [33] for image recognition by tokenizing and flattening 2D images into sequence of tokens. Since then, many works have been done to improve Transformers, making them more suitable for vision tasks. These works can be roughly categorized into three types: (1) Type I made efforts to improve the ViT design itself. For example, DeiT [32] introduced a training scheme to get rid of large-scale pre-training and distillation method to further improve the performance. T2T-ViT [41] presented a token-to-token operation as alternatives to patch embedding, which keeps better local details. (2) Type $\\mathbf { I I }$ tried to introduce convolution back into the ViT design. E.g., Chu et al. [7] proposed to use convolution for position encoding. Wu et al. [37] used convolution to replace the linear projection layers in Transformers. (3) Type III tried to replace CNNs by building hierarchical Transformers as a plug-in backbone in many downstream tasks. Wang et al. [35] proposed a pyramid vision Transformer, which gradually downsamples the feature map and extract multi-scale features as common CNN backbones do. However, applying self-attention on high-resolution features is not affordable in terms of both memory and computation cost, thus they used spatial-reduction attention, which downsamples key and value in self-attention as a trade-off between efficiency and accuracy. Later, Liu et al. [24] proposed a new hierarchical Transformer architecture, named Swin-Transformer. To handle the expensive computation burden incurred with self-attention, they divided feature maps into several non-overlapped windows, and limited the self-attention operation to be performed within each window. By doing so, Swin-Transformer is more efficient and also scalable to large resolution input. Besides, to compensate the missing global information, a shifted window strategy is proposed to exchange information between different windows. ",
174
+ "bbox": [
175
+ 174,
176
+ 814,
177
+ 825,
178
+ 911
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "image",
184
+ "img_path": "images/d25135eaed9973a14d881001630df19aedeb9afb61f0794ec600f15d091f0723.jpg",
185
+ "image_caption": [
186
+ "Figure 1: Toy examples illustrating different methods to reduce computation and memory cost of self-attention. (a) Spatial reduction [35, 13] spatially downsamples the feature map; (b) Local window [24] restricts self-attention inside local windows; (c) Glance attention (ours) applies selfattention to adaptively-dilated partitions. "
187
+ ],
188
+ "image_footnote": [],
189
+ "bbox": [
190
+ 202,
191
+ 0,
192
+ 795,
193
+ 267
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "",
200
+ "bbox": [
201
+ 174,
202
+ 362,
203
+ 825,
204
+ 555
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Our method differs from aforementioned works in the following aspects: Type I, II methods usually utilize a large patch size and thus incompatible to work with high-resolution feature map. Type III methods proposed new attention mechanism to handle the extreme memory and computation burden with long sequences, but they sacrifices accuracy as a trade-off with efficiency. In contrast, GGTransformer proposes a more efficient Transformer block with a novel Glance-and-Gaze mechanism, which not only enables it to handle long sequences and scalable to high-resolution feature maps, but also leads to a better performance than other efficient alternatives. ",
211
+ "bbox": [
212
+ 174,
213
+ 561,
214
+ 825,
215
+ 659
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "3 Method ",
222
+ "text_level": 1,
223
+ "bbox": [
224
+ 174,
225
+ 685,
226
+ 269,
227
+ 702
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "The design of GG-Transformer draws inspiration from how human beings observe the world, which follows the Glance and Gaze mechanism. Specifically, humans will glance at the global view, and meanwhile gaze into local details to obtain a comprehensive understanding to the environment. We note that these behaviors surprisingly match the property of self-attention and convolution, which models long-range dependencies and local context, respectively. Inspired from this, we propose GG-Transformer, whose Transformer block consists of two parallel branches: A Glance branch, where self-attention is performed to adaptively-dilated partitions of the input, and a Gaze branch, where a depth-wise convolutional layer is adopted to capture the local patterns. ",
234
+ "bbox": [
235
+ 174,
236
+ 720,
237
+ 825,
238
+ 832
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "3.1 Revisit Vision Transformer ",
245
+ "text_level": 1,
246
+ "bbox": [
247
+ 174,
248
+ 854,
249
+ 400,
250
+ 869
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "We start with revisiting the formulation of vision Transformer block, which consists of multi-head self-attention (MSA), layer normalization (LN), and multi-layer perceptron (MLP). A Transformer ",
257
+ "bbox": [
258
+ 174,
259
+ 883,
260
+ 821,
261
+ 911
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "image",
267
+ "img_path": "images/253dfac219ed11a67ac880aff4f7ed73c64d3b79ee05f6c331d3b80a5fab014e.jpg",
268
+ "image_caption": [
269
+ "Figure 2: A visual illustration of GG Transformer block, where the Glance and Gaze branches parallely extract complementary information. "
270
+ ],
271
+ "image_footnote": [],
272
+ "bbox": [
273
+ 207,
274
+ 87,
275
+ 790,
276
+ 313
277
+ ],
278
+ "page_idx": 3
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "block processes input features as follows: ",
283
+ "bbox": [
284
+ 174,
285
+ 375,
286
+ 446,
287
+ 388
288
+ ],
289
+ "page_idx": 3
290
+ },
291
+ {
292
+ "type": "equation",
293
+ "img_path": "images/38dac407f79e4161882f723522b83c1c2c9fda49ac83af95ec3595a3da79272a.jpg",
294
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { z } _ { \\ell } ^ { \\prime } = \\mathrm { M S A } ( \\mathrm { L N } ( \\mathbf { z } _ { \\ell - 1 } ) ) + \\mathbf { z } _ { \\ell - 1 } , } \\\\ & { \\mathbf { z } _ { \\ell } = \\mathrm { M L P } ( \\mathrm { L N } ( \\mathbf { z } _ { \\ell } ^ { \\prime } ) ) + \\mathbf { z } _ { \\ell } ^ { \\prime } , } \\end{array}\n$$",
295
+ "text_format": "latex",
296
+ "bbox": [
297
+ 392,
298
+ 393,
299
+ 604,
300
+ 434
301
+ ],
302
+ "page_idx": 3
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "where $\\mathbf { z } _ { \\ell }$ is the encoded image representation at the $\\ell$ -th block. MSA gives Transformers the advantages of modeling a global relationship in a parameter-free manner, which is formulated as: ",
307
+ "bbox": [
308
+ 174,
309
+ 438,
310
+ 828,
311
+ 467
312
+ ],
313
+ "page_idx": 3
314
+ },
315
+ {
316
+ "type": "equation",
317
+ "img_path": "images/d04cede0396d54eed1f9a99942302d3da4f63e9649fbb32c5b46b5913a68adcf.jpg",
318
+ "text": "$$\n\\operatorname { M S A } ( X ) = \\operatorname { S o f t m a x } ( \\frac { Q K ^ { T } } { \\sqrt { C } } ) V ,\n$$",
319
+ "text_format": "latex",
320
+ "bbox": [
321
+ 390,
322
+ 472,
323
+ 607,
324
+ 508
325
+ ],
326
+ "page_idx": 3
327
+ },
328
+ {
329
+ "type": "text",
330
+ "text": "where $Q , K$ , $V \\in \\mathbf { R } ^ { N \\times C }$ are the query, key, and value matrices which are linear mappings of input $X \\in \\mathbf { R } ^ { N \\times C }$ , $C$ is the channel dimension of the input, and $N$ is the length of input sequence. Note that for simplified derivation, we assume the number of heads is 1 in the multi-head self attention, which will not affect the following complexity analysis and can be easily generalize to more complex cases. ",
331
+ "bbox": [
332
+ 173,
333
+ 513,
334
+ 825,
335
+ 584
336
+ ],
337
+ "page_idx": 3
338
+ },
339
+ {
340
+ "type": "text",
341
+ "text": "For vision tasks, $N$ is often related to the input height $H$ and width $W$ . In practice, a 2D image is often first tokenized based on non-overlapping image patch grids, which maps a 2D input with size $H \\times W$ into a sequence of token embeddings with length $\\begin{array} { r } { \\breve { N } = \\frac { H \\times W } { P ^ { 2 } } } \\end{array}$ , where $( P , P )$ is the grid size. In MSA, the relationships between a token and all tokens are computed. Such designs, though effectively capturing long-range features, incur a computation complexity quadratic to $N$ : ",
342
+ "bbox": [
343
+ 173,
344
+ 590,
345
+ 825,
346
+ 660
347
+ ],
348
+ "page_idx": 3
349
+ },
350
+ {
351
+ "type": "equation",
352
+ "img_path": "images/eb4df221ba5eab503d364a4cb8784373f91662f9f2ea45d23bcda713bc46284b.jpg",
353
+ "text": "$$\n\\Omega ( \\mathrm { M S A } ) = 4 N C ^ { 2 } + 2 N ^ { 2 } C .\n$$",
354
+ "text_format": "latex",
355
+ "bbox": [
356
+ 400,
357
+ 665,
358
+ 598,
359
+ 683
360
+ ],
361
+ "page_idx": 3
362
+ },
363
+ {
364
+ "type": "text",
365
+ "text": "For ViTs that only work on $1 6 \\times$ down-sampled feature maps (i.e., $P = 1 6$ ), the computation cost is affordable, since in this scenario $N = 1 4 \\times 1 4 = 1 9 6$ (for a typical ImageNet setting with input size $2 2 4 \\times 2 2 4 ,$ ). However, when it comes to a more general vision scenario with the need of dense prediction based on high-resolution feature maps (such as semantic segmentation), where the cost dramatically increases by thousands of times or even more. Naively applying MSA to such high-resolution feature maps can easily lead to the problem of out-of-memory (OOM), and extremely high computational cost. Although some efficient alternatives [35, 24] were brought up recently, accuracy is often sacrificed as a trade-off of efficiency. To address this issue, we propose a new vision Transformer that can be applied to longer sequence while keeping high accuracy, inspired by the Glance-and-Gaze human behavior when recognizing objects in natural scenes [11]. ",
366
+ "bbox": [
367
+ 173,
368
+ 689,
369
+ 825,
370
+ 828
371
+ ],
372
+ "page_idx": 3
373
+ },
374
+ {
375
+ "type": "text",
376
+ "text": "3.2 Glance: Efficient Global Modeling with Adaptively-dilated Splitting ",
377
+ "text_level": 1,
378
+ "bbox": [
379
+ 174,
380
+ 843,
381
+ 686,
382
+ 859
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "To address the efficiency problem of Transformers, existing solutions often adapt Transformers to high-resolution feature maps by down-sampling the key and value during the attention process [35], or limit self-attention to be computed in a local region then exchange information through shifting these local regions to mimic a global view [24]. But limitations exist in these methods. For down-sampling methods, although the output feature maps keep to be high-resolution, they lose some details during the down-sampling processes. Besides, they still has a quadratic complexity and thus may not scale up to a larger input size. For local-region based methods, though they successfully reduce the complexity to a linear level, they cannot directly model a long-range dependency but instead are stuck within local context, which counters the design intuition of Transformer and self-attention for long-range dependency modeling. Besides, two consecutive blocks need to work together to mimic a global receptive field, which may not achieve as good performance as MSA (see Table. 4b). ",
389
+ "bbox": [
390
+ 174,
391
+ 869,
392
+ 825,
393
+ 911
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "",
400
+ "bbox": [
401
+ 173,
402
+ 90,
403
+ 825,
404
+ 203
405
+ ],
406
+ "page_idx": 4
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "Thus, we propose Glance attention, which performs self-attention efficiently with a global receptive field. It shares same time complexity as [24], but directly models long-range dependencies, as shown in Fig. 1. Specifically, we first splits an input feature map to several dilated partitions, i.e., the points in a partition are not from a local region but from the whole input feature map with a dilation rate adaptive to the feature map size and the token size. We name this operation Adaptively-dilated Splitting. For example, a partition contains $M \\times M$ tokens and it is obtained with an adaptive dilation rate $\\begin{array} { r } { { \\bf \\Pi } = \\left( \\frac { \\bar { h } } { M } , \\frac { w } { M } \\right) } \\end{array}$ , where $h , w$ is the height and width of current feature map respectively, and $h w = N$ . Here we assume all divisions have no remainder for simplicity. These partitions are easily to be split from the input feature map or merged back. Specifically, we formulate this process as follows: ",
411
+ "bbox": [
412
+ 173,
413
+ 207,
414
+ 826,
415
+ 335
416
+ ],
417
+ "page_idx": 4
418
+ },
419
+ {
420
+ "type": "equation",
421
+ "img_path": "images/851f536c76b7abd68f7194ec991d3ef336ebb9f83d8c98f2c3ba03b6d39b8e33.jpg",
422
+ "text": "$$\n\\begin{array} { r } { \\mathbf { z } _ { \\ell - 1 } = [ \\mathbf { z } _ { \\ell - 1 } ^ { 1 , 1 } , \\mathbf { z } _ { \\ell - 1 } ^ { 1 , 2 } , \\dots , \\mathbf { z } _ { \\ell - 1 } ^ { h , w } ] , } \\end{array}\n$$",
423
+ "text_format": "latex",
424
+ "bbox": [
425
+ 393,
426
+ 340,
427
+ 601,
428
+ 361
429
+ ],
430
+ "page_idx": 4
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "where zi,jℓ−1 is the feature token at position $( i , j )$ if reshaping the sequence of token embedding $\\mathbf { z } _ { \\ell - 1 }$ back into a 2D feature map and use the 2D coordinates accordingly. To reduce the memory and computation burden, while keeping a global receptive field, $\\mathbf { z } _ { \\ell - 1 }$ is split into several partitions: ",
435
+ "bbox": [
436
+ 174,
437
+ 368,
438
+ 825,
439
+ 411
440
+ ],
441
+ "page_idx": 4
442
+ },
443
+ {
444
+ "type": "equation",
445
+ "img_path": "images/b17372ae2d5883b5987669465b563d1a4e373eb31b43947ce5032ffd5e185849.jpg",
446
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { z } _ { \\ell - 1 } ^ { \\dagger } = \\mathrm { A d a p t i v e l y D i l a t e d S p l i t t i n g } ( \\mathbf { z } _ { \\ell - 1 } ) } \\\\ & { \\qquad = [ \\mathbf { z } _ { \\ell - 1 } ^ { \\dagger , 1 , 1 } , \\mathbf { z } _ { \\ell - 1 } ^ { \\dagger , 1 , 2 } , \\ldots , \\mathbf { z } _ { \\ell - 1 } ^ { \\dagger , \\frac { h } { M } , \\frac { w } { M } } ] , } \\\\ & { \\qquad \\mathrm { ~ } } \\\\ & { \\mathrm { ~ \\imath e r e ~ } \\mathbf { z } _ { \\ell - 1 } ^ { \\dagger , i , j } = [ \\mathbf { z } _ { \\ell - 1 } ^ { i , j } , \\mathbf { z } _ { \\ell - 1 } ^ { i , j + \\frac { h } { M } } , \\ldots , \\mathbf { z } _ { \\ell - 1 } ^ { i + \\frac { ( M - 1 ) h } { M } , j + \\frac { ( M - 1 ) w } { M } } ] , } \\end{array}\n$$",
447
+ "text_format": "latex",
448
+ "bbox": [
449
+ 328,
450
+ 417,
451
+ 687,
452
+ 491
453
+ ],
454
+ "page_idx": 4
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "where ${ \\bf z } _ { \\ell - 1 } ^ { \\dagger } \\in { \\bf R } ^ { N \\times C }$ , ${ \\bf z } _ { \\ell - 1 } ^ { \\dag , i , j } \\in { \\bf R } ^ { M ^ { 2 } \\times C }$ . Afterwards, MSA is applied to each partition, which substantially reduces the computation and memory cost yet does not lose the global feature representation. And then all partitions are merged back into one feature map and go through the remaining modules: ",
459
+ "bbox": [
460
+ 173,
461
+ 496,
462
+ 826,
463
+ 554
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "equation",
469
+ "img_path": "images/edda70349b7a0ec4dc8a15518f2e0823bbcaf954073a41031ecc8267e1d96ccb.jpg",
470
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { z } _ { \\ell } ^ { \\prime , i , j } = \\mathrm { M S A } ( \\mathrm { L N } ( \\mathbf { z } _ { \\ell - 1 } ^ { \\dag , i , j } ) ) + \\mathbf { z } _ { \\ell - 1 } ^ { \\dag , i , j } , } \\\\ & { \\quad \\quad \\mathbf { z } _ { \\ell } ^ { \\prime } = \\mathrm { M e r g i n g } ( \\mathbf { z } _ { \\ell } ^ { \\prime , 1 , 1 } , \\ldots , \\mathbf { z } _ { \\ell } ^ { \\prime , \\frac { h } { M } , \\frac { w } { M } } ) , } \\\\ & { \\quad \\quad \\mathbf { z } _ { \\ell } = \\mathrm { M L P } ( \\mathrm { L N } ( \\mathbf { z } _ { \\ell } ^ { \\prime } ) ) + \\mathbf { z } _ { \\ell } ^ { \\prime } , } \\end{array}\n$$",
471
+ "text_format": "latex",
472
+ "bbox": [
473
+ 369,
474
+ 556,
475
+ 625,
476
+ 623
477
+ ],
478
+ "page_idx": 4
479
+ },
480
+ {
481
+ "type": "text",
482
+ "text": "where Merging is an inverse operation of AdaptivelyDilatedSplitting which re-arranges points in each partition back in their original orders. ",
483
+ "bbox": [
484
+ 171,
485
+ 626,
486
+ 823,
487
+ 656
488
+ ],
489
+ "page_idx": 4
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "This new self-attention module (formulated in Eq. 6 to 10), namely Glance multi-head self attention module (G-MSA), enables a global feature learning with linear complexity: ",
494
+ "bbox": [
495
+ 173,
496
+ 661,
497
+ 823,
498
+ 689
499
+ ],
500
+ "page_idx": 4
501
+ },
502
+ {
503
+ "type": "equation",
504
+ "img_path": "images/1e98923be30a748d7cb58eccdff8be0bf478107f1207d39283ca7d89fb7de102.jpg",
505
+ "text": "$$\n\\Omega ( \\mathrm { G } \\mathrm { - } \\mathrm { M S A } ) = 4 h w C ^ { 2 } + 2 M ^ { 2 } h w C = 4 N C ^ { 2 } + 2 M ^ { 2 } N C .\n$$",
506
+ "text_format": "latex",
507
+ "bbox": [
508
+ 303,
509
+ 694,
510
+ 694,
511
+ 713
512
+ ],
513
+ "page_idx": 4
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "3.3 Gaze: Compensating Local Relationship with Depthwise Convolution ",
518
+ "text_level": 1,
519
+ "bbox": [
520
+ 173,
521
+ 727,
522
+ 694,
523
+ 742
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Although the Glance branch can effectively capture long-range representations, it misses the local connections across partitions, which can be crucial for vision tasks relying on local cues. To this end, we propose a Gaze branch to compensate the missing relationship and enhance the modeling power at a negligible cost. ",
530
+ "bbox": [
531
+ 174,
532
+ 752,
533
+ 825,
534
+ 808
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "Specifically, to compensate the local patterns missed in the Glance branch, we propose to apply an additional depthwise convolution on the value in G-MSA: ",
541
+ "bbox": [
542
+ 173,
543
+ 814,
544
+ 823,
545
+ 843
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "equation",
551
+ "img_path": "images/d88e6236e5279a4cc9383ed1352cd711fc89b6429d902a2777009583553451ce.jpg",
552
+ "text": "$$\n\\operatorname { G a z e } ( X ) = \\operatorname { D e p t h w i s e C o n v 2 d } ( \\operatorname { M e r g i n g } ( V ) ) ,\n$$",
553
+ "text_format": "latex",
554
+ "bbox": [
555
+ 339,
556
+ 848,
557
+ 656,
558
+ 866
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "which has a neglectable computational cost and thus the overall cost is still significantly reduced: ",
565
+ "bbox": [
566
+ 171,
567
+ 871,
568
+ 805,
569
+ 886
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "equation",
575
+ "img_path": "images/31ed3a3d817f5f1b8aac17cc33ecf43ac84a8c9e7589218239d3be12f4afbd4e.jpg",
576
+ "text": "$$\n\\Omega ( \\mathrm { G G - M S A } ) = 4 N C ^ { 2 } + 2 M ^ { 2 } N C + k ^ { 2 } N C ,\n$$",
577
+ "text_format": "latex",
578
+ "bbox": [
579
+ 343,
580
+ 890,
581
+ 651,
582
+ 909
583
+ ],
584
+ "page_idx": 4
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "where $k$ is the Gaze branch kernel size, and $M$ is the partition size set in Glance branch, both $k$ and $M$ are constants that are much smaller than $N$ . We note that in this way, long-range and short-range features are naturally and effectively learned. Besides, unlike [24], GG-MSA does not require two consecutive blocks (e.g., W-MSA and SW-MSA) to be always used together, instead, it is a standalone module as the original MSA [12]. ",
589
+ "bbox": [
590
+ 174,
591
+ 90,
592
+ 825,
593
+ 161
594
+ ],
595
+ "page_idx": 5
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "We propose two ways to determine the kernel size $k$ for better compensating the local features: ",
600
+ "bbox": [
601
+ 174,
602
+ 166,
603
+ 795,
604
+ 181
605
+ ],
606
+ "page_idx": 5
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "Fixed Gazing. A straightforward way is to adopt the same kernel size (e.g., $3 \\times 3 ,$ ) for all Gaze branches, which can ensure same local feature learning regardless of the dilation rate. ",
611
+ "bbox": [
612
+ 171,
613
+ 188,
614
+ 823,
615
+ 215
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "Adaptive Gazing. Another way is implementing Gazing branch with adaptive kernels, where the kernel size should be the same as dilation rate $( \\bar { h } / M , w \\bar { / } M )$ . In this way, GG-MSA still enjoys a complete view of the input. ",
622
+ "bbox": [
623
+ 174,
624
+ 222,
625
+ 825,
626
+ 263
627
+ ],
628
+ "page_idx": 5
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "By combining Glance and Gaze branches together, GG-MSA can achieve superior performance to other counterparts while remaining a low cost. ",
633
+ "bbox": [
634
+ 176,
635
+ 270,
636
+ 821,
637
+ 299
638
+ ],
639
+ "page_idx": 5
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "3.4 Network Instantiation ",
644
+ "text_level": 1,
645
+ "bbox": [
646
+ 176,
647
+ 319,
648
+ 367,
649
+ 333
650
+ ],
651
+ "page_idx": 5
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "We build a hierarchical GG-Transformer with the proposed Glance-and-Gaze branches as shown in Fig. 2. For fair comparison, we follow the same settings as Swin-Transformer [24] in terms of network depth and width, with only difference in the attention methods used in Transformer blocks. Furthermore, we set $M$ to be same as the window size in [24], so that the model size and computation cost are also directly comparable. Note that GG-Transformer has not been specifically tuned by scaling depth and width for a better accuracy-cost trade-off. ",
656
+ "bbox": [
657
+ 173,
658
+ 344,
659
+ 825,
660
+ 428
661
+ ],
662
+ "page_idx": 5
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "We build GG-T and GG-S, which share the same model size and computation costs as Swin-T and Swin-S, respectively. For all GG-Transformers, we set the fixed patch size $M = 7$ , expansion ratio of MLP $\\alpha = 4$ . All GG-Transformer consists of 4 hierarchical stages, which corresponds to feature maps with down-sampling ratio 4, 8, 16, 32, respectively. The first patch embedding layer projects input to a feature map with channel $C = 9 6$ . When transitioning from one stage to the next one, we follow CNN design principles [16] to expand the channel by $2 \\times$ when the spatial size is down-sampled by $4 \\times$ . ",
667
+ "bbox": [
668
+ 174,
669
+ 434,
670
+ 825,
671
+ 532
672
+ ],
673
+ "page_idx": 5
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "4 Experiments ",
678
+ "text_level": 1,
679
+ "bbox": [
680
+ 174,
681
+ 554,
682
+ 312,
683
+ 571
684
+ ],
685
+ "page_idx": 5
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "In the following parts, we report results on ImageNet [10] classification, COCO [23] object detection, and ADE20K [48] semantic segmentation to compare GG-Transformer with those state-of-the-art CNNs and ViTs. Afterwards, we conduct ablation studies to verify the design of Glance and Gaze branches and also compare effectiveness of different alternative self-attention designs. ",
690
+ "bbox": [
691
+ 174,
692
+ 588,
693
+ 825,
694
+ 643
695
+ ],
696
+ "page_idx": 5
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "4.1 ImageNet Classification ",
701
+ "text_level": 1,
702
+ "bbox": [
703
+ 174,
704
+ 662,
705
+ 379,
706
+ 678
707
+ ],
708
+ "page_idx": 5
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "We validate the performance of GG-Transformer on ImageNet-1K [10] classification task, which contains 1.28M training images and 50K validation images for 1000 classes. We report top-1 accuracy with a single $2 2 4 \\times 2 2 4$ crop. ",
713
+ "bbox": [
714
+ 176,
715
+ 689,
716
+ 823,
717
+ 732
718
+ ],
719
+ "page_idx": 5
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "Implementation Details. To ensure a fair comparison, we follow the same training settings of [24]. Specifically, we use AdamW [25] optimizer for 300 epochs with cosine learning rate decay including 20 epochs for linear warm-up. The training batch size is 1024 with 8 GPUs. Initial learning rate starts at 0.001, and weight decay is 0.05. Augmentations and regularizations setting follows [32] including rand-augment [9], mixup [43], cutmix [42], random erasing [47], stochastic depth [19], but excluding repeated repeated augmentation [17] and EMA [26]. ",
724
+ "bbox": [
725
+ 174,
726
+ 738,
727
+ 825,
728
+ 821
729
+ ],
730
+ "page_idx": 5
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "Results. A summary of results in Table 1, where we compare GG-Transformer with various CNNs and ViTs. It is shown that GG-Transformer achieve better accuracy-cost trade-off compared to other models. Moreover, GG-T, a light-weight model $2 8 \\mathbf { M } / 4 . 5 \\mathbf { G } / 8 2 . 0 \\% )$ ), can achieve comparable performance to those even much large models such as DeiT-B $( 8 6 \\mathbf { M } / 1 7 . 5 \\mathbf { G } / 8 1 . 8 \\% )$ , T2T-ViT-24 $6 4 \\mathbf { M } / 1 4 . 1 \\mathbf { G } / 8 2 . 3 \\% )$ , and PVT-Large $( 6 1 \\mathbf { M } / 9 . 8 \\mathbf { G } / 8 1 . 7 \\% )$ . Furthermore, compared to Swin-Transformer, which we follows the architecture and ensures the same model size and computation costs to ensure a fair comparison, our model consistently brings an improvement to baseline, with a consistent improvement of $0 . 8 \\%$ and $0 . 2 \\%$ for $\\mathrm { T }$ and S models respectively. ",
735
+ "bbox": [
736
+ 174,
737
+ 828,
738
+ 825,
739
+ 911
740
+ ],
741
+ "page_idx": 5
742
+ },
743
+ {
744
+ "type": "table",
745
+ "img_path": "images/0539fbb4759e717682138a4b8f97cfe3b60abdfa017280ee5a2b99686ca45e97.jpg",
746
+ "table_caption": [
747
+ "Table 1: Comparison of different models on ImageNet-1K classification. "
748
+ ],
749
+ "table_footnote": [],
750
+ "table_body": "<table><tr><td>method</td><td>image size</td><td>#param.</td><td>FLOPs</td><td>ImageNet top-1 acc.</td></tr><tr><td>RegNetY-4G [27]</td><td>2242</td><td>21M</td><td>4.0G</td><td>80.0</td></tr><tr><td>RegNetY-8G [27]</td><td>224²</td><td>39M</td><td>8.0G</td><td>81.7</td></tr><tr><td>RegNetY-16G [27]</td><td>224²</td><td>84M</td><td>16.0G</td><td>82.9</td></tr><tr><td>EffNet-B3[31]</td><td>3002</td><td>12M</td><td>1.8G</td><td>81.6</td></tr><tr><td>EffNet-B4 [31]</td><td>380²</td><td>19M</td><td>4.2G</td><td>82.9</td></tr><tr><td>EffNet-B5[31]</td><td>4562</td><td>30M</td><td>9.9G</td><td>83.6</td></tr><tr><td>DeiT-T[32]</td><td>2242</td><td>5M</td><td>1.3G</td><td>72.2</td></tr><tr><td>DeiT-S [32]</td><td>224²</td><td>22M</td><td>4.6G</td><td>79.8</td></tr><tr><td>DeiT-B [32]</td><td>2242</td><td>86M</td><td>17.5G</td><td>81.8</td></tr><tr><td>TNT-S [14]</td><td>2242</td><td>24M</td><td>5.2G</td><td>81.3</td></tr><tr><td>TNS-B[14]</td><td>2242</td><td>66M</td><td>14.1G</td><td>82.8</td></tr><tr><td>T2T-ViT-7[41]</td><td>2242</td><td>4M</td><td>1.2G</td><td>71.7</td></tr><tr><td>T2T-ViT-14 [41]</td><td>224²</td><td>22M</td><td>5.2G</td><td>81.5</td></tr><tr><td>T2T-ViT-24 [41]</td><td>2242</td><td>64M</td><td>14.1G</td><td>82.3</td></tr><tr><td>PVT-Tiny [35]</td><td>2242</td><td>13M</td><td>1.9G</td><td>75.1</td></tr><tr><td>PVT-Small [35]</td><td>2242</td><td>25M</td><td>3.8G</td><td>79.8</td></tr><tr><td>PVT-Medium [35]</td><td>224²</td><td>44M</td><td>6.7G</td><td>81.2</td></tr><tr><td>PVT-Large [35]</td><td>2242</td><td>61M</td><td>9.8G</td><td>81.7</td></tr><tr><td>Swin-T[24]</td><td>2242</td><td>28M</td><td>4.5G</td><td>81.2</td></tr><tr><td>Swin-S [24]</td><td>224²</td><td>50M</td><td>8.7G</td><td>83.2</td></tr><tr><td>GG-T</td><td>2242</td><td>28M</td><td>4.5G</td><td>82.0</td></tr><tr><td>GG-S</td><td>2242</td><td>50M</td><td>8.7G</td><td>83.4</td></tr></table>",
751
+ "bbox": [
752
+ 299,
753
+ 113,
754
+ 699,
755
+ 439
756
+ ],
757
+ "page_idx": 6
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "",
762
+ "bbox": [
763
+ 173,
764
+ 468,
765
+ 826,
766
+ 496
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "4.2 ADE20K Semantic Segmentation ",
773
+ "text_level": 1,
774
+ "bbox": [
775
+ 176,
776
+ 517,
777
+ 442,
778
+ 532
779
+ ],
780
+ "page_idx": 6
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "ADE20K [48] is a challenging semantic segmentation dataset, containing 20K images for training and 2K images for validation. We follow common practices to use the training set for training and report mIoU results on the validation sets. We use UperNet [38] as the segmentation framework and replace the backbone with GG-Transformer. ",
785
+ "bbox": [
786
+ 174,
787
+ 545,
788
+ 825,
789
+ 599
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "Implementation Details. We follow [24] and use MMSegmentation [8] to implement all related experiments. We use AdamW [25] with a learning rate starting at $6 \\times 1 0 ^ { - 5 }$ , weight decay of 0.01, batch size of 16, crop size of $5 1 2 \\times 5 1 2$ . The learning rate schedule contains a warmup of 1500 iterations and linear learning rate decay. The training is conducted with 8 GPUs and the training procedure lasts for 160K iterations in total. The augmentations follows the default setting of MMSegmentation, including random horizontal flipping, random re-scaling within ratio range [0.5, 2.0] and random photometric distortion. For testing, we follow [46] to utilize a sliding window manner with crop size 512 and stride 341. ImageNet-1K pretrained weights are used for initialization. ",
796
+ "bbox": [
797
+ 174,
798
+ 606,
799
+ 825,
800
+ 718
801
+ ],
802
+ "page_idx": 6
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "Results. We show results in Table 2, where results both w/ and w/o test-time augmentation are reported. Noticeably, GG-Transformer not only achieves better results to baselines, but also obtain a comparable single-scale testing performance to those with multi-scale testing results. Specifically, GG-T achieves $4 6 . 4 \\%$ mIoU with single-scale testing, which surpasses ResNet50, PVT-Small, SwinT’s multi-scale testing results by $3 . 6 \\%$ , $1 . 6 \\%$ , $0 . 6 \\%$ , respectively. Moreover, our tiny model even can be comparable to those much larger models (e.g., $4 7 . 2 \\%$ of GG-T compared to $4 7 . 6 \\%$ of Swin-S). ",
807
+ "bbox": [
808
+ 174,
809
+ 723,
810
+ 825,
811
+ 808
812
+ ],
813
+ "page_idx": 6
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "4.3 COCO Object Detection ",
818
+ "text_level": 1,
819
+ "bbox": [
820
+ 174,
821
+ 828,
822
+ 383,
823
+ 843
824
+ ],
825
+ "page_idx": 6
826
+ },
827
+ {
828
+ "type": "text",
829
+ "text": "We further verify the performance of GG-Transformer when used as a plug-in backbone to object detection task on COCO dataset [23], which contains 118K, 5K, 20K images for training, validation and test respectively. We use Mask-RCNN [15] and Cascaded Mask R-CNN [1] as the detection frameworks, and compare GG-Transformer to various CNN and ViT backbones. ",
830
+ "bbox": [
831
+ 174,
832
+ 856,
833
+ 823,
834
+ 911
835
+ ],
836
+ "page_idx": 6
837
+ },
838
+ {
839
+ "type": "table",
840
+ "img_path": "images/eb3c6c5a55a8468add8fcebc97f10cb08299fb8f48f1654121e5a379213750dc.jpg",
841
+ "table_caption": [
842
+ "Table 2: Performance comparisons with different backbones on ADE20K validation dataset. FLOPs is tested on $1 0 2 4 \\times 1 0 2 4$ resolution. All backbones are pretrained on ImageNet-1k. "
843
+ ],
844
+ "table_footnote": [],
845
+ "table_body": "<table><tr><td rowspan=\"2\">Backbone</td><td colspan=\"4\">UperNet</td></tr><tr><td>Prams (M)</td><td>FLOPs (G)</td><td>mIoU (%)</td><td>mIoU(ms+flip) (%)</td></tr><tr><td>ResNet50 [16]</td><td>67</td><td>952</td><td>42.1</td><td>42.8</td></tr><tr><td>PVT-Small [35]</td><td>55</td><td>919</td><td>43.9</td><td>44.8</td></tr><tr><td>Swin-T [24]</td><td>60</td><td>941</td><td>44.5</td><td>45.8</td></tr><tr><td>GG-T (ours)</td><td>60</td><td>942</td><td>46.4</td><td>47.2</td></tr><tr><td>ResNet101[16]</td><td>86</td><td>1029</td><td>43.8</td><td>44.9</td></tr><tr><td>PVT-Medium [35]</td><td>74</td><td>977</td><td>44.9</td><td>45.3</td></tr><tr><td>Swin-S [24]</td><td>81</td><td>1034</td><td>47.6</td><td>49.5</td></tr><tr><td>GG-S (ours)</td><td>81</td><td>1035</td><td>48.4</td><td>49.6</td></tr></table>",
846
+ "bbox": [
847
+ 250,
848
+ 104,
849
+ 748,
850
+ 257
851
+ ],
852
+ "page_idx": 7
853
+ },
854
+ {
855
+ "type": "table",
856
+ "img_path": "images/425ad611f6d2502d101178e846b88fb1170985a0df454058045136cdc12fbbb0.jpg",
857
+ "table_caption": [
858
+ "Table 3: Object detection and instance segmentation performance on the COCO val2017 dataset using the Mask R-CNN framework. Params/FLOPs is evaluated with Mask R-CNN architecture on a $1 2 8 0 \\times 8 0 0$ image. "
859
+ ],
860
+ "table_footnote": [],
861
+ "table_body": "<table><tr><td rowspan=\"3\">Backbone</td><td colspan=\"2\">|Params FLOPs|</td><td colspan=\"4\">Mask R-CNN</td><td colspan=\"4\">Cascaded Mask R-CNN</td></tr><tr><td>(M)</td><td>(G)</td><td></td><td></td><td>|APb AP0AP5 APm AP AP|A</td><td></td><td></td><td>|APb APAP AP APAP</td><td></td><td></td><td></td></tr><tr><td>ResNet50 [16]</td><td>44</td><td>260</td><td>38.2</td><td>58.8 41.4</td><td>34.7</td><td></td><td>55.7 37.2</td><td></td><td>|41.2 59.4 45.0 35.9 56.6 38.4</td><td></td></tr><tr><td>PVT-Small [35]</td><td>44</td><td>245</td><td>40.4 62.9</td><td></td><td>43.8 37.8</td><td>60.1</td><td>40.3</td><td>1 1</td><td>- -</td><td>1 1</td></tr><tr><td>Swin-T [24]</td><td>48</td><td>264</td><td>43.7</td><td>66.6 47.7</td><td>39.8</td><td>63.3</td><td>42.7</td><td>48.1</td><td>67.1 52.2 41.7 64.4 45.0</td><td></td></tr><tr><td>GG-T (ours)</td><td>48</td><td>265</td><td>44.1</td><td>66.7</td><td>48.339.9</td><td></td><td>63.342.4</td><td></td><td>48.4 67.4 52.3 41.9 64.5 45.0</td><td></td></tr><tr><td>ResNet101[16]</td><td>63</td><td>336</td><td>40.0</td><td>60.6 44.0</td><td>36.1</td><td></td><td>57.5 38.6</td><td>42.9</td><td>61.0 46.6 37.3 58.2 40.1</td><td></td></tr><tr><td>ResNeXt101-32×4d [39]</td><td>63</td><td>340</td><td>41.9</td><td>62.545.9</td><td>37.5</td><td>59.440.2</td><td></td><td></td><td>44.3 62.8 48.4 38.3 59.7 41.2</td><td></td></tr><tr><td>PVT-Medium [35]</td><td>64</td><td>302</td><td>42.0 64.445.639.0</td><td></td><td></td><td>61.6 42.1</td><td>-</td><td>-</td><td>- -</td><td>- -</td></tr><tr><td>Swin-S [24]</td><td>69</td><td>354</td><td>45.4 67.9 49.6 41.4</td><td></td><td></td><td></td><td>65.1 44.6</td><td></td><td>49.7 68.8 53.8 42.8 66.0 46.4</td><td></td></tr><tr><td>GG-S (ours)</td><td>69</td><td>355</td><td>45.7 68.3 49.9 41.3</td><td></td><td></td><td></td><td>65.344.0</td><td></td><td>49.9 69.0 54.0 43.1 66.2 46.4</td><td></td></tr></table>",
862
+ "bbox": [
863
+ 173,
864
+ 324,
865
+ 825,
866
+ 492
867
+ ],
868
+ "page_idx": 7
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "Implementation Details. We follow the setting of [24] and use MMDetection [4] to conduct all the experiments. We adopt multi-scale training [2], AdamW optimizer [25] with initial learning rate of 0.0001, weight decay of 0.05, batch size of 16. The training is conducted with 8 GPUs and a $1 \\times$ schedule. All models are initialized with ImageNet-1K pretrained weights. ",
873
+ "bbox": [
874
+ 173,
875
+ 520,
876
+ 825,
877
+ 575
878
+ ],
879
+ "page_idx": 7
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "Results. As shown in Table 3, GG-Transformer achieves superior performance to other backbones in the two widely-used detection frameworks. Specifically, GG-T achieves 44.1 box AP and 39.9 mask AP, which surpasses both CNNs and other ViTs with a similar model size and computation costs. Compared with the state-of-the-art Swin-Transformer, GG-Transformer achieves better performance while keeping the same model size and computation costs for both T and S models. ",
884
+ "bbox": [
885
+ 174,
886
+ 582,
887
+ 825,
888
+ 651
889
+ ],
890
+ "page_idx": 7
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "4.4 Ablation Studies ",
895
+ "text_level": 1,
896
+ "bbox": [
897
+ 174,
898
+ 670,
899
+ 328,
900
+ 685
901
+ ],
902
+ "page_idx": 7
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "In this part, we conduct ablation studies regarding to the designs of GG-Transformer. Meanwhile, we also compare among different efficient alternatives to MSA. Besides, we verify GG-MSA on another ViT architecture [32] to compare its capacity to MSA directly. We conduct all these experiments based on Swin-T [24] with 100 epochs training and DeiT [32] architectures with 300 epochs training. ",
907
+ "bbox": [
908
+ 174,
909
+ 696,
910
+ 825,
911
+ 752
912
+ ],
913
+ "page_idx": 7
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "Kernel Choice of Gaze Branch. We study the choice of Gaze branch in terms of fixed or adaptive mechanism. The kernel sizes for each stage and results are summarized in Table 4a, where we observe that both mechanisms work well. Using a larger kernel leads to a non-significant improvement. In contrast, adaptive manner leads to a slightly better performance. Considering the adaptive manner provides a complete view as the original MSA has, we choose it in our final design. ",
918
+ "bbox": [
919
+ 174,
920
+ 758,
921
+ 825,
922
+ 829
923
+ ],
924
+ "page_idx": 7
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "Glance/Gaze Branch. We study the necessity of both Glance and Gaze branches. Meanwhile, a comparison between different ways to conduct self-attention is also studied. Results are in Table 4b. ",
929
+ "bbox": [
930
+ 174,
931
+ 835,
932
+ 823,
933
+ 863
934
+ ],
935
+ "page_idx": 7
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "Swin-T [24] serves as the baseline for all variants, which achieves $7 8 . 5 0 \\%$ top-1 accuracy on ImageNet validation set. Firstly, we note that the local window attention and shifted window attention (W&SW-MSA) in [24] although can significantly reduce the computation complexity and makes ",
940
+ "bbox": [
941
+ 176,
942
+ 869,
943
+ 825,
944
+ 911
945
+ ],
946
+ "page_idx": 7
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "Table 4: Ablation studies regarding GG-Transformer design and comparison among different selfattention mechanisms. ",
951
+ "bbox": [
952
+ 173,
953
+ 97,
954
+ 823,
955
+ 125
956
+ ],
957
+ "page_idx": 8
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "(b) Comparison among different self-attentions. Gaze (Conv) uses kernels of Fixed-(3,3,3,3). ",
962
+ "bbox": [
963
+ 395,
964
+ 133,
965
+ 593,
966
+ 171
967
+ ],
968
+ "page_idx": 8
969
+ },
970
+ {
971
+ "type": "table",
972
+ "img_path": "images/3e601d3633f3ebc623453bc8a499b35ab133256371dd00c4676b7a91321ef1da.jpg",
973
+ "table_caption": [
974
+ "(a) Choices of Gaze Kernels. "
975
+ ],
976
+ "table_footnote": [],
977
+ "table_body": "<table><tr><td>Gaze Kernel</td><td>Top-1</td></tr><tr><td>Fixed-(3,3,3,3) Fixed-(5,5,5,5) Adaptive-(9,5,3,3)</td><td>80.28% 80.31% 80.38%</td></tr></table>",
978
+ "bbox": [
979
+ 187,
980
+ 179,
981
+ 383,
982
+ 233
983
+ ],
984
+ "page_idx": 8
985
+ },
986
+ {
987
+ "type": "table",
988
+ "img_path": "images/f627a30c853928fd0c35d02587d22d67315d9f1b94312d42c5e04620a4f6bec4.jpg",
989
+ "table_caption": [
990
+ "(c) Applying GG-MSA to DeiT backbone. "
991
+ ],
992
+ "table_footnote": [],
993
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Top-1</td></tr><tr><td rowspan=1 colspan=1>W&amp;SW-MSA[24]MSAGlance OnlyGaze OnlyGlance+Gaze (Attn)</td><td rowspan=1 colspan=1>78.50%79.79%77.21%76.76%79.07%</td></tr><tr><td rowspan=1 colspan=1>Glance+Gaze (Conv)</td><td rowspan=1 colspan=1>80.28%</td></tr></table>",
994
+ "bbox": [
995
+ 395,
996
+ 179,
997
+ 607,
998
+ 270
999
+ ],
1000
+ "page_idx": 8
1001
+ },
1002
+ {
1003
+ "type": "table",
1004
+ "img_path": "images/9fe53712ff896837e0ec48874e9862e31ce8e2044be6b37a726dbb5b6ed6c5ef.jpg",
1005
+ "table_caption": [],
1006
+ "table_footnote": [],
1007
+ "table_body": "<table><tr><td></td><td>Top-1</td></tr><tr><td>DeiT-T GG-DeiT-T</td><td>72.2%</td></tr><tr><td>DeiT-S</td><td>73.8% 79.9%</td></tr><tr><td></td><td></td></tr><tr><td>GG-DeiT-S</td><td>80.5%</td></tr></table>",
1008
+ "bbox": [
1009
+ 637,
1010
+ 176,
1011
+ 787,
1012
+ 243
1013
+ ],
1014
+ "page_idx": 8
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "Transformer easier to scale-up, it sacrifices the accuracy and the combination of W&SW-MSA to mimic a global view is not as good as the original MSA. We replace the W&SW-MSA with MSA for all blocks in stage 3 and 4 (i.e., stages with down-sampling rate 16 and 32), which leads to a $1 . 2 9 \\%$ performance improvement, indicating there exists a significant performance gap between MSA and its efficient alternative. Notably, when adopting the proposed Glance and Gaze mechanism instead, which shares a same complexity of W& SW-MSA, can achieves much better performance, where the Glance+Gaze (Attn) improves the performance by $0 . 5 7 \\%$ , and Glance+Gaze (Conv) (i.e., GG-T) by $1 . 7 8 \\%$ , which is even higher than MSA by $0 . 4 9 \\%$ . ",
1019
+ "bbox": [
1020
+ 173,
1021
+ 295,
1022
+ 825,
1023
+ 406
1024
+ ],
1025
+ "page_idx": 8
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "Besides using depthwise convolution, another natural choice is to also adopt self-attention for implementing the Gaze branch. Therefore, we conduct experiments by using local window attention [24] as the Gaze branch. Note that, unlike depthwise convolution, a self-attention variant of the Gaze branch cannot be integrated with the Glance branch into the same Transformer block while keeping the overall model size and computation cost at the same level. To ensure a fair comparison, we use two consecutive Transformer blocks where one is Glance attention and another is Gaze attention. Using either convolution or self-attention to implement the Gaze branch can both improve the performance compared to [24], illustrating the effectiveness of the Glance and Gaze designs. However, using self-attention is inferior to depth-wise convolution with a degrade of $1 . 2 1 \\%$ , which may indicate that convolution is still a better choice when it comes to learning local relationships. Besides, using depth-wise convolution as Gaze branch can also naturally be integrated into the Transformer block with Glance attention, thus makes it more flexible in terms of network designs. ",
1030
+ "bbox": [
1031
+ 174,
1032
+ 412,
1033
+ 825,
1034
+ 578
1035
+ ],
1036
+ "page_idx": 8
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "We also note that Glance or Gaze branch alone is far from enough, while only a combination of both can lead to a performance gain, which matches the behavior that we human beings can not rely on Glance or Gaze alone. For instance, using Glance alone can only lead to an inferior performance with accuracy of $7 7 . 2 1 \\%$ , and Gaze alone $7 6 . 7 6 \\%$ , which is significantly lower than baseline with a degrade of $1 . 2 9 \\%$ and $1 . 7 4 \\%$ , respectively. Nevertheless, we note that this is because Glance and Gaze branches miss important local or global cues which can be compensated by each other. As a result, a combination of both Glance and Gaze gives a high accuracy of $8 0 . 2 8 \\%$ , which improves the Glance alone and Gaze alone by $3 . 0 7 \\%$ and $3 . 5 2 \\%$ respectively. ",
1041
+ "bbox": [
1042
+ 173,
1043
+ 584,
1044
+ 825,
1045
+ 695
1046
+ ],
1047
+ "page_idx": 8
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "Apply to other backbone. We verify the effectiveness of GG-Transformer on another popular ViT architecture DeiT [32], as shown in Table 4c. We replace MSA with GG-MSA for two DeiT variants [32], DeiT-T and DeiT-S. We show that, although GG-MSA is an efficient alternative to MSA, it can also lead to a performance gain. Compared to DeiT-T and DeiT-S, GG-DeiT-T and GG-DeiT-S bring the performance up by $1 . 6 \\%$ and $0 . 6 \\%$ respectively, illustrating that it is not only efficient but also effectively even compared to a fully self-attention. ",
1052
+ "bbox": [
1053
+ 173,
1054
+ 700,
1055
+ 825,
1056
+ 785
1057
+ ],
1058
+ "page_idx": 8
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Network runtime. We follow [24] to report and compare work runtime measured by FPS: GG-T achieves 782.34 FPS compared to 737.86 of Swin-T, and GG-S achieves 441.31 FPS compared to 423.51 of Swin-S. The evaluation is done with a single Nvidia tesla v100-sxm2-16gb GPU. ",
1063
+ "bbox": [
1064
+ 173,
1065
+ 791,
1066
+ 821,
1067
+ 833
1068
+ ],
1069
+ "page_idx": 8
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "5 Limitation ",
1074
+ "text_level": 1,
1075
+ "bbox": [
1076
+ 174,
1077
+ 852,
1078
+ 294,
1079
+ 869
1080
+ ],
1081
+ "page_idx": 8
1082
+ },
1083
+ {
1084
+ "type": "text",
1085
+ "text": "Although GG-Transformer provides a powerful and efficient solution to make Transformers scalable to large inputs, some limitations still exist and worth further exploring. ",
1086
+ "bbox": [
1087
+ 173,
1088
+ 882,
1089
+ 821,
1090
+ 911
1091
+ ],
1092
+ "page_idx": 8
1093
+ },
1094
+ {
1095
+ "type": "text",
1096
+ "text": "Firstly, over-fitting is a common problem [12] in Vision Transformers and can be alleviated by large-scale pretraining [12] or strong augmentations and regularization [32]. This problem is more serious for stronger models (GG-Transformer) and in the tasks with relatively small dataset (e.g. semantic segmentation). Secondly, Transformers suffer from performance degradation in modeling longer-range dependencies, when there exists large discrepancy in the training-testing image size. The limitations can come from position encoding, which has fixed size and need to be interpolated to different input sizes, or self-attention itself, which may not adapt well when significant changes happen in input size. Lastly, there is a long-lasting debate on the impacts of AI on human world. As a method improving the fundamental ability of deep learning, our work also advances the development of AI, which means there could be both beneficial and harmful influences depending on the users. ",
1097
+ "bbox": [
1098
+ 173,
1099
+ 90,
1100
+ 826,
1101
+ 229
1102
+ ],
1103
+ "page_idx": 9
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "6 Conclusion ",
1108
+ "text_level": 1,
1109
+ "bbox": [
1110
+ 173,
1111
+ 250,
1112
+ 299,
1113
+ 267
1114
+ ],
1115
+ "page_idx": 9
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "In this paper, we present GG-Transformer, which offers an efficient and effective solution to adapting Transformers for vision tasks. GG-Transformer, inspired by how human beings learn from the world, is equipped with parallel and complementary Glance branch and Gaze branch, which offer long-range relationship and short-range modeling, respectively. The two branches can specialize in their tasks and collaborate with each other, which leads to a much more efficient ViT design for vision tasks. Experiments on various architectures and benchmarks validate the advantages of GG-Transformer. ",
1120
+ "bbox": [
1121
+ 174,
1122
+ 281,
1123
+ 825,
1124
+ 364
1125
+ ],
1126
+ "page_idx": 9
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "Acknowledgment: This work was supported by ONR N00014-20-1-2206, ONR N00014-18-1- 2119, NSFC 62176159, Natural Science Foundation of Shanghai 21ZR1432200, SJTU Explore X Foundation, and Shanghai Municipal Science and Technology Major Project 2021SHZDZX0102. ",
1131
+ "bbox": [
1132
+ 174,
1133
+ 371,
1134
+ 826,
1135
+ 412
1136
+ ],
1137
+ "page_idx": 9
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "References ",
1142
+ "text_level": 1,
1143
+ "bbox": [
1144
+ 174,
1145
+ 433,
1146
+ 266,
1147
+ 448
1148
+ ],
1149
+ "page_idx": 9
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "[1] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6154–6162, 2018. \n[2] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European Conference on Computer Vision, pages 213–229. Springer, 2020. \n[3] Jieneng Chen, Yongyi Lu, Qihang Yu, Xiangde Luo, Ehsan Adeli, Yan Wang, Le Lu, Alan L Yuille, and Yuyin Zhou. Transunet: Transformers make strong encoders for medical image segmentation. arXiv preprint arXiv:2102.04306, 2021. \n[4] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, et al. Mmdetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019. \n[5] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017. \n[6] François Chollet. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1251–1258, 2017. \n[7] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. Arxiv preprint 2102.10882, 2021. \n[8] MMSegmentation Contributors. MMSegmentation: Openmmlab semantic segmentation toolbox and benchmark. https://github.com/open-mmlab/mmsegmentation, 2020. \n[9] Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with a reduced search space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 702–703, 2020. \n[10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee, 2009. \n[11] Heiner Deubel and Werner X. Schneider. Saccade target selection and object recognition: Evidence for a common attentional mechanism. Vision Research, 36(12):1827–1837, 1996. \n[12] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. \n[13] Haoqi Fan, Bo Xiong, Karttikeya Mangalam, Yanghao Li, Zhicheng Yan, Jitendra Malik, and Christoph Feichtenhofer. Multiscale vision transformers. arXiv preprint arXiv:2104.11227, 2021. \n[14] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021. \n[15] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961–2969, 2017. \n[16] 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, pages 770–778, 2016. \n[17] Elad Hoffer, Tal Ben-Nun, Itay Hubara, Niv Giladi, Torsten Hoefler, and Daniel Soudry. Augment your batch: Improving generalization through instance repetition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8129–8138, 2020. \n[18] Han Hu, Zheng Zhang, Zhenda Xie, and Stephen Lin. Local relation networks for image recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3464–3473, 2019. \n[19] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646–661. Springer, 2016. \n[20] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 603–612, 2019. \n[21] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097–1105, 2012. \n[22] 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. \n[23] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740–755. Springer, 2014. \n[24] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021. \n[25] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. \n[26] Boris T Polyak and Anatoli B Juditsky. Acceleration of stochastic approximation by averaging. SIAM journal on control and optimization, 30(4):838–855, 1992. \n[27] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10428–10436, 2020. \n[28] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jonathon Shlens. Stand-alone self-attention in vision models. arXiv preprint arXiv:1906.05909, 2019. \n[29] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4510–4520, 2018. \n[30] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. \n[31] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105–6114. PMLR, 2019. \n[32] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. \n[33] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. \n[34] Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Axialdeeplab: Stand-alone axial-attention for panoptic segmentation. In European Conference on Computer Vision, pages 108–126. Springer, 2020. \n[35] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. \n[36] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7794–7803, 2018. \n[37] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. Cvt: Introducing convolutions to vision transformers. arXiv preprint arXiv:2103.15808, 2021. \n[38] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 418–434, 2018. \n[39] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492–1500, 2017. \n[40] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. \n[41] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021. \n[42] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6023–6032, 2019. \n[43] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. \n[44] Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun. Exploring self-attention for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10076– 10085, 2020. \n[45] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2881–2890, 2017. \n[46] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, et al. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. arXiv preprint arXiv:2012.15840, 2020. \n[47] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 13001–13008, 2020. \n[48] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 633–641, 2017. ",
1154
+ "bbox": [
1155
+ 174,
1156
+ 452,
1157
+ 828,
1158
+ 912
1159
+ ],
1160
+ "page_idx": 9
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "",
1165
+ "bbox": [
1166
+ 171,
1167
+ 53,
1168
+ 828,
1169
+ 916
1170
+ ],
1171
+ "page_idx": 10
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "",
1176
+ "bbox": [
1177
+ 171,
1178
+ 92,
1179
+ 828,
1180
+ 773
1181
+ ],
1182
+ "page_idx": 11
1183
+ }
1184
+ ]
parse/train/GitDcBlcg78/GitDcBlcg78_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/GitDcBlcg78/GitDcBlcg78_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hk6kPgZA-/Hk6kPgZA-.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hk6kPgZA-/Hk6kPgZA-_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hk6kPgZA-/Hk6kPgZA-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hk6kPgZA-/Hk6kPgZA-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyWrIgW0W/HyWrIgW0W.md ADDED
@@ -0,0 +1,765 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # STOCHASTIC GRADIENT DESCENT PERFORMS VARIATIONAL INFERENCE, CONVERGES TO LIMIT CYCLES FOR DEEP NETWORKS
2
+
3
+ Pratik Chaudhari, Stefano Soatto
4
+
5
+ Computer Science, University of California, Los Angeles.
6
+
7
+ Email: pratikac@ucla.edu, soatto@ucla.edu
8
+
9
+ # ABSTRACT
10
+
11
+ Stochastic gradient descent (SGD) is widely believed to perform implicit regularization when used to train deep neural networks, but the precise manner in which this occurs has thus far been elusive. We prove that SGD minimizes an average potential over the posterior distribution of weights along with an entropic regularization term. This potential is however not the original loss function in general. So SGD does perform variational inference, but for a different loss than the one used to compute the gradients. Even more surprisingly, SGD does not even converge in the classical sense: we show that the most likely trajectories of SGD for deep networks do not behave like Brownian motion around critical points. Instead, they resemble closed loops with deterministic components. We prove that such “out-of-equilibrium” behavior is a consequence of highly non-isotropic gradient noise in SGD; the covariance matrix of mini-batch gradients for deep networks has a rank as small as $1 \%$ of its dimension. We provide extensive empirical validation of these claims, proven in the appendix.
12
+
13
+ Keywords: deep networks, stochastic gradient descent, variational inference, gradient noise, out-of-equilibrium, thermodynamics, Wasserstein metric, Fokker-Planck equation, wide minima, Markov chain Monte Carlo
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Our first result is to show precisely in what sense stochastic gradient descent (SGD) implicitly performs variational inference, as is often claimed informally in the literature. For a loss function $f ( x )$ with weights $x \in \mathbb { R } ^ { d }$ , if $\rho ^ { \mathrm { s s } }$ is the steady-state distribution over the weights estimated by SGD,
18
+
19
+ $$
20
+ \rho ^ { \mathrm { s s } } = \underset { \rho } { \arg \operatorname* { m i n } } ~ \mathbb { E } _ { x \sim \rho } \left[ \Phi ( x ) \right] - \frac { \eta } { 2 \ell } H ( \rho ) ;
21
+ $$
22
+
23
+ where $H ( \rho )$ is the entropy of the distribution $\rho$ and $\eta$ and $\boldsymbol { \mathscr { k } }$ are the learning rate and batch-size, respectively. The potential $\Phi ( x )$ , which we characterize explicitly, is related but not necessarily equal to $f ( x )$ . It is only a function of the architecture and the dataset. This implies that SGD implicitly performs variational inference with a uniform prior, albeit of a different loss than the one used to compute back-propagation gradients.
24
+
25
+ We next prove that the implicit potential $\Phi ( x )$ is equal to our chosen loss $f ( x )$ if and only if the noise in mini-batch gradients is isotropic. This condition, however, is not satisfied for deep networks. Empirically, we find gradient noise to be highly non-isotropic with the rank of its covariance matrix being about $1 \%$ of its dimension. Thus, SGD on deep networks implicitly discovers locations where $\nabla \Phi ( x ) = 0$ , these are not the locations where $\nabla f ( x ) = 0$ . This is our second main result: the most likely locations of SGD are not the local minima, nor the saddle points, of the original loss. The deviation of these critical points, which we compute explicitly scales linearly with $\eta / \ell$ and is typically large in practice.
26
+
27
+ When mini-batch noise is non-isotropic, SGD does not even converge in the classical sense. We prove that, instead of undergoing Brownian motion in the vicinity of a critical point, trajectories have a deterministic component that causes SGD to traverse closed loops in the weight space. We detect such loops using a Fourier analysis of SGD trajectories. We also show through an example that SGD with non-isotropic noise can even converge to stable limit cycles around saddle points.
28
+
29
+ # 2 BACKGROUND ON CONTINUOUS-TIME SGD
30
+
31
+ Stochastic gradient descent performs the following updates while training a network $x _ { k + 1 } = x _ { k } -$ $\eta \ \nabla f _ { \ell } \left( x _ { k } \right)$ where $\eta$ is the learning rate and $\nabla f _ { \ell } ( x _ { k } )$ is the average gradient over a mini-batch $\boldsymbol { \mathscr { k } }$ ,
32
+
33
+ $$
34
+ \nabla f _ { \ell } \left( x \right) = \frac { 1 } { \ell } \sum _ { k \in \ell } \nabla f _ { k } ( x ) .
35
+ $$
36
+
37
+ We overload notation $\mathcal { \ell }$ for both the set of examples in a mini-batch and its size. We assume that weights belong to a compact subset $\Omega \subset \mathbb { R } ^ { d }$ , to ensure appropriate boundary conditions for the evolution of steady-state densities in SGD, although all our results hold without this assumption if the loss grows unbounded as $\left\| x \right\| \to \infty$ , for instance, with weight decay as a regularizer.
38
+
39
+ Definition 1 (Diffusion matrix $D ( x ) \}$ ). If a mini-batch is sampled with replacement, we show in Appendix A.1 that the variance of mini-batch gradients is var $\begin{array} { r } { ( \nabla f _ { \ell } ( x ) ) = \frac { D ( x ) } { \ell } } \end{array}$ where
40
+
41
+ $$
42
+ D ( x ) = \left( \frac { 1 } { N } \sum _ { k = 1 } ^ { N } \nabla f _ { k } ( x ) \ : \nabla f _ { k } ( x ) ^ { \top } \right) - \nabla f ( x ) \ : \nabla f ( x ) ^ { \top } \succeq 0 .
43
+ $$
44
+
45
+ Note that $D ( x )$ is independent of the learning rate $\eta$ and the batch-size $\mathcal { \ell }$ . It only depends on the weights $x$ , architecture and loss defined by $f ( x )$ , and the dataset. We will often discuss two cases: isotropic diffusion when $D ( x )$ is a scalar multiple of identity, independent of $x$ , and non-isotropic diffusion, when $D ( x )$ is a general function of the weights $x$ .
46
+
47
+ We now construct a stochastic differential equation (SDE) for the discrete-time SGD updates.
48
+
49
+ Lemma 2 (Continuous-time SGD). The continuous-time limit of SGD is given by
50
+
51
+ $$
52
+ d x ( t ) = - \nabla f ( x ) d t + \sqrt { 2 \beta ^ { - 1 } D ( x ) } d W ( t ) ;
53
+ $$
54
+
55
+ where $W ( t )$ is Brownian motion and $\beta$ is the inverse temperature defined as $\begin{array} { r } { \beta ^ { - 1 } = \frac { \eta } { 2 \ell } } \end{array}$ . The steadystate distribution of the weights $\rho ( z , t ) \propto \mathbb { P } \big ( x ( t ) = z \big )$ , evolves according to the Fokker-Planck equation (Risken, 1996, Ito form):
56
+
57
+ $$
58
+ { \frac { \partial \rho } { \partial t } } = \nabla \cdot \Big ( \nabla f ( x ) \rho + \beta ^ { - 1 } \nabla \cdot \big ( D ( x ) \rho \big ) \Big )
59
+ $$
60
+
61
+ where the notation $\nabla \cdot \nu$ denotes the divergence $\begin{array} { r } { \nabla \cdot \boldsymbol { \nu } = \sum _ { i } \partial _ { x _ { i } } \nu _ { i } ( x ) } \end{array}$ for any vector $\nu ( x ) \in \mathbb { R } ^ { d }$ ; the divergence operator is applied column-wise to matrices such as $D ( x )$ .
62
+
63
+ We refer to Li et al. (2017b, Thm. 1) for the proof of the convergence of discrete SGD to (3). Note that $\beta ^ { - 1 }$ completely captures the magnitude of noise in SGD that depends only upon the learning rate $\eta$ and the mini-batch size $\boldsymbol { \mathscr { k } }$ .
64
+
65
+ Assumption 3 (Steady-state distribution exists and is unique). We assume that the steady-state distribution of the Fokker-Planck equation (FP) exists and is unique, this is denoted by $\rho ^ { \mathrm { s s } } ( x )$ and satisfies,
66
+
67
+ $$
68
+ 0 = { \frac { \partial \rho ^ { \mathrm { s s } } } { \partial t } } = \nabla \cdot { \Big ( } \nabla f ( x ) \rho ^ { \mathrm { s s } } + \beta ^ { - 1 } \nabla \cdot { \big ( } D ( x ) \rho ^ { \mathrm { s s } } { \big ) } { \Big ) } .
69
+ $$
70
+
71
+ # 3 SGD PERFORMS VARIATIONAL INFERENCE
72
+
73
+ Let us first implicitly define a potential $\Phi ( x )$ using the steady-state distribution $\rho ^ { \mathrm { s s } }$ :
74
+
75
+ $$
76
+ \Phi ( x ) = - \beta ^ { - 1 } \log \rho ^ { \mathrm { s s } } ( x ) ,
77
+ $$
78
+
79
+ up to a constant. The potential $\Phi ( x )$ depends only on the full-gradient and the diffusion matrix; see Appendix C for a proof. It will be made explicit in Section 5. We express $\rho ^ { \mathrm { s s } }$ in terms of the potential using a normalizing constant $Z ( \beta )$ as
80
+
81
+ $$
82
+ \rho ^ { \mathrm { s s } } ( x ) = \frac { 1 } { Z ( \beta ) } e ^ { - \beta \Phi ( x ) }
83
+ $$
84
+
85
+ which is also the steady-state solution of
86
+
87
+ $$
88
+ d \boldsymbol { x } = \beta ^ { - 1 } \nabla \cdot D ( \boldsymbol { x } ) d t - D ( \boldsymbol { x } ) \nabla \Phi ( \boldsymbol { x } ) d t + \sqrt { 2 \beta ^ { - 1 } D ( \boldsymbol { x } ) } d W ( t )
89
+ $$
90
+
91
+ as can be verified by direct substitution in (FP).
92
+
93
+ The above observation is very useful because it suggests that, if $\nabla f ( x )$ can be written in terms of the diffusion matrix and a gradient term $\nabla \Phi ( x )$ , the steady-state distribution of this SDE is easily obtained. We exploit this observation to rewrite $\nabla f ( x )$ in terms a term $D \nabla \Phi$ that gives rise to the above steady-state, the spatial derivative of the diffusion matrix, and the remainder:
94
+
95
+ $$
96
+ \begin{array} { r } { j ( x ) = - \nabla f ( x ) + D ( x ) \nabla \Phi ( x ) - \beta ^ { - 1 } \nabla \cdot D ( x ) , } \end{array}
97
+ $$
98
+
99
+ interpreted as the part of $\nabla f ( x )$ that cannot be written as $D \Phi ^ { \prime } ( x )$ for some $\Phi ^ { \prime }$ . We now make an important assumption on $j ( x )$ which has its origins in thermodynamics.
100
+
101
+ Assumption 4 (Force $j ( x )$ is conservative). We assume that
102
+
103
+ $$
104
+ \nabla \cdot j ( x ) = 0 .
105
+ $$
106
+
107
+ The Fokker-Planck equation (FP) typically models a physical system which exchanges energy with an external environment (Ottinger, 2005; Qian, 2014). In our case, this physical system is the gradient dynamics $\nabla \cdot \left( \nabla f \rho \right)$ while the interaction with the environment is through the term involving temperature: $\beta ^ { - 1 } \nabla \cdot ( \nabla \cdot ( D \pmb { \rho } ) )$ . The second law of thermodynamics states that the entropy of a system can never decrease; in Appendix B we show how the above assumption is sufficient to satisfy the second law. We also discuss some properties of $j ( x )$ in Appendix C that are a consequence of this. The most important is that $j ( x )$ is always orthogonal to $\nabla \rho ^ { \mathrm { s s } }$ . We illustrate the effects of this assumption in Example 19.
108
+
109
+ This leads us to the main result of this section.
110
+
111
+ Theorem 5 (SGD performs variational inference). The functional
112
+
113
+ $$
114
+ F ( \rho ) = \beta ^ { - 1 } \operatorname { K L } ( \rho | | \rho ^ { \operatorname { s s } } )
115
+ $$
116
+
117
+ decreases monotonically along the trajectories of the Fokker-Planck equation $( F P )$ and converges to its minimum, which is zero, at steady-state. Moreover, we also have an energetic-entropic split
118
+
119
+ $$
120
+ F ( \rho ) = \mathbb { E } _ { x \in \rho } \Big [ \Phi ( x ) \Big ] - \beta ^ { - 1 } H ( \rho ) + \mathrm { c o n s t a n t } .
121
+ $$
122
+
123
+ Theorem 5, proven in Appendix F.1, shows that SGD implicitly minimizes a combination of two terms: an “energetic” term, and an “entropic” term. The first is the average potential over a distribution $\rho$ . The steady-state of SGD in (6) is such that it places most of its probability mass in regions of the parameter space with small values of $\Phi$ . The second shows that SGD has an implicit bias towards solutions that maximize the entropy of the distribution $\rho$ .
124
+
125
+ Note that the energetic term in (11) has potential $\Phi ( x )$ , instead of $f ( x )$ . This is an important fact and the crux of this paper.
126
+
127
+ Lemma 6 (Potential equals original loss iff isotropic diffusion). If the diffusion matrix $D ( x )$ is isotropic, i.e., a constant multiple of the identity, the implicit potential is the original loss itself
128
+
129
+ $$
130
+ D ( x ) = c I _ { d \times d } \quad \Leftrightarrow \quad \Phi ( x ) = f ( x ) .
131
+ $$
132
+
133
+ This is proven in Appendix F.2. The definition in (8) shows that $j \neq 0$ when $D ( x )$ is non-isotropic. This results in a deterministic component in the SGD dynamics which does not affect the functional $F ( \rho )$ , hence $j ( x )$ is called a “conservative force.” The following lemma is proven in Appendix F.3.
134
+
135
+ Lemma 7 (Most likely trajectories of SGD are limit cycles). The force $j ( x )$ does not decrease $F ( \rho )$ in $( l I )$ and introduces a deterministic component in SGD given by
136
+
137
+ $$
138
+ { \dot { x } } = j ( x ) .
139
+ $$
140
+
141
+ The condition $\nabla \cdot \boldsymbol { j } ( x ) = 0$ in Assumption $^ { 4 }$ implies that most likely trajectories of SGD traverse closed trajectories in weight space.
142
+
143
+ # 3.1 WASSERSTEIN GRADIENT FLOW
144
+
145
+ Theorem 5 applies for a general $D ( x )$ and it is equivalent to the celebrated JKO functional (Jordan et al., 1997) in optimal transportation (Santambrogio, 2015; Villani, 2008) if the diffusion matrix is isotropic. Appendix D provides a brief overview using the heat equation as an example.
146
+
147
+ Corollary 8 (Wasserstein gradient flow for isotropic noise). If $D ( x ) = I $ , trajectories of the FokkerPlanck equation $( F P )$ are gradient flow in the Wasserstein metric of the functional
148
+
149
+ $$
150
+ F ( \rho ) = \mathbb { E } _ { x \sim \rho } \Big [ f ( x ) \Big ] - \beta ^ { - 1 } H ( \rho ) .
151
+ $$
152
+
153
+ Observe that the energetic term contains $f ( x )$ in Corollary 8. The proof follows from Theorem 5 and Lemma 6, see Santambrogio (2017) for a rigorous treatment of Wasserstein metrics. The JKO functional above has had an enormous impact in optimal transport because results like Theorem 5 and Corollary 8 provide a way to modify the functional $F ( \rho )$ in an interpretable fashion. Modifying the Fokker-Planck equation or the SGD updates directly to enforce regularization properties on the solutions $\rho ^ { \mathrm { s s } }$ is much harder.
154
+
155
+ # 3.2 CONNECTION TO BAYESIAN INFERENCE
156
+
157
+ Note the absence of any prior in (11). On the other hand, the evidence lower bound (Kingma and Welling, 2013) for the dataset $\Xi$ is,
158
+
159
+ $$
160
+ \begin{array} { r l } & { - \log p ( \Xi ) \leq \mathbb { E } _ { x \sim q } \big [ f ( x ) \big ] + { \bf K L } \Big ( q ( x \vert \Xi ) \vert \vert \ p ( x \vert \Xi ) \Big ) , } \\ & { \qquad \quad \leq \mathbb { E } _ { x \sim q } \big [ f ( x ) \big ] - H ( q ) + H ( q , p ) ; } \end{array}
161
+ $$
162
+
163
+ where $H ( q , p )$ is the cross-entropy of the estimated steady-state and the variational prior. The implicit loss function of SGD in (11) therefore corresponds to a uniform prior $p ( x | \Xi )$ . In other words, we have shown that SGD itself performs variational optimization with a uniform prior. Note that this prior is well-defined by our hypothesis of $x \in \Omega$ for some compact $\Omega$ .
164
+
165
+ It is important to note that SGD implicitly minimizes a potential $\Phi ( x )$ instead of the original loss $f ( x )$ in ELBO. We prove in Section 5 that this potential is quite different from $f ( x )$ if the diffusion matrix $D$ is non-isotropic, in particular, with respect to its critical points.
166
+
167
+ Remark 9 (SGD has an information bottleneck). The functional (11) is equivalent to the information bottleneck principle in representation learning (Tishby et al., 1999). Minimizing this functional, explicitly, has been shown to lead to invariant representations (Achille and Soatto, 2017). Theorem 5 shows that SGD implicitly contains this bottleneck and therefore begets these properties, naturally.
168
+
169
+ Remark 10 (ELBO prior conflicts with SGD). Working with ELBO in practice involves one or multiple steps of SGD to minimize the energetic term along with an estimate of the KL-divergence term, often using a factored Gaussian prior (Kingma and Welling, 2013; Jordan et al., 1999). As Theorem 5 shows, such an approach also enforces a uniform prior whose strength is determined by $\beta ^ { - 1 }$ and conflicts with the externally imposed Gaussian prior. This conflict—which fundamentally arises from using SGD to minimize the energetic term—has resulted in researchers artificially modulating the strength of the KL-divergence term using a scalar pre-factor (Mandt et al., 2016).
170
+
171
+ # 3.3 PRACTICAL IMPLICATIONS
172
+
173
+ We will show in Section 5 that the potential $\Phi ( x )$ does not depend on the optimization process, it is only a function of the dataset and the architecture. The effect of two important parameters, the learning rate $\eta$ and the mini-batch size $\boldsymbol { \mathscr { k } }$ therefore completely determines the strength of the entropic regularization term. If $\beta ^ { - 1 } \to 0$ , the implicit regularization of SGD goes to zero. This implies that
174
+
175
+ $$
176
+ \beta ^ { - 1 } = \frac { \eta } { 2 \ell } \ \mathrm { s h o u l d \ n o t \ b e \ s m a l l }
177
+ $$
178
+
179
+ is a good tenet for regularization of SGD.
180
+
181
+ Remark 11 (Learning rate should scale linearly with batch-size to generalize well). In order to maintain the entropic regularization, the learning rate $\eta$ needs to scale linearly with the batch-size $\boldsymbol { \mathscr { k } }$ . This prediction, based on Theorem 5, fits very well with empirical evidence wherein one obtains good generalization performance only with small mini-batches in deep networks (Keskar et al., 2016), or via such linear scaling (Goyal et al., 2017).
182
+
183
+ Remark 12 (Sampling with replacement is better than without replacement). The diffusion matrix for the case when mini-batches are sampled with replacement is very close to (2), see Appendix A.2. However, the corresponding inverse temperature is
184
+
185
+ $$
186
+ \beta ^ { \prime } ^ { - 1 } = { \frac { \eta } { 2 \ell } } \left( 1 - { \frac { \ell } { N } } \right) { \mathrm { ~ s h o u l d ~ n o t ~ b e ~ s m a l l } } .
187
+ $$
188
+
189
+ The extra factor of $\begin{array} { r } { \left( 1 - \frac { \mathcal { \ell } } { N } \right) } \end{array}$ reduces the entropic regularization in (11), as $\ell \to N$ , the inverse temperature $\beta ^ { \prime } \to \infty$ . As a consequence, for the same learning rate $\eta$ and batch-size $\boldsymbol { \mathscr { k } }$ , Theorem 5 predicts that sampling with replacement has better regularization than sampling without replacement. This effect is particularly pronounced at large batch-sizes.
190
+
191
+ # 4 EMPIRICAL CHARACTERIZATION OF SGD DYNAMICS
192
+
193
+ Section 4.1 shows that the diffusion matrix $D ( x )$ for modern deep networks is highly non-isotropic with a very low rank. We also analyze trajectories of SGD and detect periodic components using a frequency analysis in Section 4.2; this validates the prediction of Lemma 7.
194
+
195
+ We consider three networks for these experiments: a convolutional network called small-lenet, a twolayer fully-connected network on MNIST (LeCun et al., 1998) and a smaller version of the All-CNN-C architecture of Springenberg et al. (2014) on the CIFAR-10 and CIFAR-100 datasets (Krizhevsky, 2009); see Appendix E for more details.
196
+
197
+ # 4.1 HIGHLY NON-ISOTROPIC $D ( x )$ FOR DEEP NETWORKS
198
+
199
+ Figs. 1 and 2 show the eigenspectrum1 of the diffusion matrix. In all cases, it has a large fraction of almost-zero eigenvalues with a very small rank that ranges between $0 . 3 \% - 2 \%$ . Moreover, non-zero eigenvalues are spread across a vast range with a large variance.
200
+
201
+ Remark 13 (Noise in SGD is largely independent of the weights). The variance of noise in (3) is
202
+
203
+ $$
204
+ { \frac { \eta D ( x _ { k } ) } { \ell } } = 2 \beta ^ { - 1 } D ( x _ { k } ) .
205
+ $$
206
+
207
+ ![](images/9a86a33b7df8b36e1ad0bff02b96059e9b5e60bfb2cf940fec346790071c0e82.jpg)
208
+ Figure 1: Eigenspectrum of $D ( x )$ at three instants during training $2 0 \%$ , $40 \%$ and $100 \%$ completion, darker is later). The eigenspectrum in Fig. 1b for the fully-connected network has a much smaller rank and much larger variance than the one in Fig. 1a which also performs better on MNIST. This indicates that convolutional networks are better conditioned than fully-connected networks in terms of $D ( x )$ .
209
+
210
+ We have plotted the eigenspectra of the diffusion matrix in Fig. 1 and Fig. 2 at three different instants, $20 \%$ , $40 \%$ and $100 \%$ training completion; they are almost indistinguishable. This implies that the variance of the mini-batch gradients in deep networks can be considered a constant, highly non-isotropic matrix.
211
+
212
+ Remark 14 (More non-isotropic diffusion if data is diverse). The eigenspectra in Fig. 2 for CIFAR-10 and CIFAR-100 have much larger eigenvalues and standard-deviation than those in Fig. 1, this is expected because the images in the CIFAR datasets have more variety than those in MNIST. Similarly, while CIFAR-100 has qualitatively similar images as CIFAR-10, it has $1 0 \times$ more classes and as a result, it is a much harder dataset. This correlates well with the fact that both the mean and standard-deviation of the eigenvalues in Fig. 2b are much higher than those in Fig. 2a. Input augmentation increases the diversity of mini-batch gradients. This is seen in Fig. 2c where the standard-deviation of the eigenvalues is much higher as compared to Fig. 2a.
213
+
214
+ ![](images/bb1558520a18d9f379cf40dcb925505ebb8e86766e26c0a1275cb561822d16d4.jpg)
215
+ Figure 2: Eigenspectrum of $D ( x )$ at three instants during training $20 \%$ , $40 \%$ and $100 \%$ completion, darker is later). The eigenvalues are much larger in magnitude here than those of MNIST in Fig. 1, this suggests a larger gradient diversity for CIFAR-10 and CIFAR-100. The diffusion matrix for CIFAR-100 in Fig. 2b has larger eigenvalues and is more non-isotropic and has a much larger rank than that of Fig. 2a; this suggests that gradient diversity increases with the number of classes. As Fig. 2a and Fig. 2c show, augmenting input data increases both the mean and the variance of the eigenvalues while keeping the rank almost constant.
216
+
217
+ Remark 15 (Inverse temperature scales with the mean of the eigenspectrum). Remark 14 shows that the mean of the eigenspectrum is large if the dataset is diverse. Based on this, we propose that the inverse temperature $\beta$ should scale linearly with the mean of the eigenvalues of $D$
218
+
219
+ $$
220
+ \left( \frac { \eta } { \ell } \right) \left( \frac { 1 } { d } \sum _ { k = 1 } ^ { d } \lambda ( D ) \right) = \mathrm { c o n s t a n t } ;
221
+ $$
222
+
223
+ where $d$ is the number of weights. This keeps the noise in SGD constant in magnitude for different values of the learning rate $\eta$ , mini-batch size $\boldsymbol { \mathscr { k } }$ , architectures, and datasets. Note that other hyperparameters which affect stochasticity such as dropout probability are implicit inside $D$ .
224
+
225
+ Remark 16 (Variance of the eigenspectrum informs architecture search). Compare the eigenspectra in Figs. 1a and 1b with those in Figs. 2a and 2c. The former pair shows that small-lenet which is a much better network than small-fc also has a much larger rank, i.e., the number of non-zero eigenvalues $( D ( x )$ is symmetric). The second pair shows that for the same dataset, data-augmentation creates a larger variance in the eigenspectrum. This suggests that both the quantities, viz., rank of the diffusion matrix and the variance of the eigenspectrum, inform the performance of a given architecture on the dataset. Note that as discussed in Remark 15, the mean of the eigenvalues can be controlled using the learning rate $\eta$ and the batch-size $\boldsymbol { \mathscr { k } }$ .
226
+
227
+ This observation is useful for automated architecture search where we can use the quantity
228
+
229
+ $$
230
+ { \frac { \operatorname { r a n k } ( D ) } { d } } + \operatorname { v a r } \left( \lambda ( D ) \right)
231
+ $$
232
+
233
+ to estimate the efficacy of a given architecture, possibly, without even training, since $D$ does not depend on the weights much. This task currently requires enormous amounts of computational power (Zoph and Le, 2016; Baker et al., 2016; Brock et al., 2017).
234
+
235
+ ![](images/67bf451aeeb4fafd7ee028d321c217a2fabbe9ce8c4458e31b3e1d2b017c1286.jpg)
236
+ Figure 3: Fig. 3a shows the Fast Fourier Transform (FFT) of $x _ { k + 1 } ^ { i } - x _ { k } ^ { i }$ where $k$ is the number of epochs and $i$ denotes the index of the weight. Fig. 3b shows the auto-correlation of $x _ { k } ^ { i }$ with $9 9 \%$ confidence bands denoted by the dotted red lines. Both Figs. 3a and 3b show the mean and one standard-deviation over the weight index $i \mathrm { : }$ ; the standard deviation is very small which indicates that all the weights have a very similar frequency spectrum. Figs. 3a and 3b should be compared with the FFT of white noise which should be flat and the auto-correlation of Brownian motion which quickly decays to zero, respectively. Figs. 3 and 3a therefore show that trajectories of SGD are not simply Brownian motion. Moreover the gradient at these locations is quite large (Fig. 3c).
237
+
238
+ # 4.2 ANALYSIS OF LONG-TERM TRAJECTORIES
239
+
240
+ We train a smaller version of small-fc on $7 \times 7$ down-sampled MNIST images for $1 0 ^ { 5 }$ epochs and store snapshots of the weights after each epoch to get a long trajectory in the weight space. We discard the first $1 0 ^ { 3 }$ epochs of training (“burnin”) to ensure that SGD has reached the steady-state. The learning rate is fixed to $1 0 ^ { - 3 }$ after this, up to $1 0 ^ { 5 }$ epochs.
241
+
242
+ Remark 17 (Low-frequency periodic components in SGD trajectories). Iterates of SGD, after it reaches the neighborhood of a critical point $\| \nabla f ( x _ { k } ) \| \leq \varepsilon$ , are expected to perform Brownian motion with variance var $\left( \nabla f _ { \ell } ( x ) \right)$ , the FFT in Fig. 3a would be flat if this were so. Instead, we see low-frequency modes in the trajectory that are indicators of a periodic dynamics of the force $j ( x )$ . These modes are not sharp peaks in the FFT because $j ( x )$ can be a non-linear function of the weights thereby causing the modes to spread into all dimensions of $x$ . The FFT is dominated by jittery high-frequency modes on the right with a slight increasing trend; this suggests the presence of colored noise in SGD at high-frequencies.
243
+
244
+ The auto-correlation (AC) in Fig. 3b should be compared with the AC for Brownian motion which decays to zero very quickly and stays within the red confidence bands $( 9 9 \% )$ . Our iterates are significantly correlated with each other even at very large lags. This further indicates that trajectories of SGD do not perform Brownian motion.
245
+
246
+ Remark 18 (Gradient magnitude in deep networks is always large). Fig. 3c shows that the fullgradient computed over the entire dataset (without burnin) does not decrease much with respect to the number of epochs. While it is expected to have a non-zero gradient norm because SGD only converges to a neighborhood of a critical point for non-zero learning rates, the magnitude of this gradient norm is quite large. This magnitude drops only by about a factor of 3 over the next $1 0 ^ { 5 }$ epochs. The presence of a non-zero $j ( x )$ also explains this, it causes SGD to be away from critical points, this phenomenon is made precise in Theorem 22. Let us note that a similar plot is also seen in Shwartz-Ziv and Tishby (2017) for the per-layer gradient magnitude.
247
+
248
+ # 5 SGD FOR DEEP NETWORKS IS OUT-OF-EQUILIBRIUM
249
+
250
+ This section now gives an explicit formula for the potential $\Phi ( x )$ . We also discuss implications of this for generalization in Section 5.3.
251
+
252
+ The fundamental difficulty in obtaining an explicit expression for $\Phi$ is that even if the diffusion matrix $D ( x )$ is full-rank, there need not exist a function $\Phi ( x )$ such that $\nabla \Phi ( x ) = D ^ { - 1 } ( x ) \nabla f ( x )$ at all $x \in \Omega$ . We therefore split the analysis into two cases:
253
+
254
+ (i) a local analysis near any critical point $\nabla f ( x ) = 0$ where we linearize $\nabla f ( x ) = F x$ and $\nabla \Phi ( x ) =$ $U x$ to compute $U = G ^ { - 1 } F$ for some $G$ , and (ii) the general case where $\nabla \Phi ( x )$ cannot be written as a local rotation and scaling of $\nabla f ( x )$ .
255
+
256
+ Let us introduce these cases with an example from Noh and Lee (2015).
257
+
258
+ ![](images/f4da24bdc35d327147a5a15bc3f0952aee0badd53820e63cf8de23b1755c2aa7.jpg)
259
+ Figure 4: Gradient field for the dynamics in Example 19: line-width is proportional to the magnitude of the gradient $\| \nabla f ( x ) \|$ , red dots denote the most likely locations of the steady-state $e ^ { - \Phi }$ while the potential $\Phi$ is plotted as a contour map. The critical points of $f ( x )$ and $\Phi ( x )$ are the same in Fig. 4a, namely $( \pm 1 , 0 )$ , because the force $j ( x ) = 0$ . For $\lambda = 0 . 5$ in Fig. 4b, locations where $\nabla f ( x ) = 0$ have shifted slightly as predicted by Theorem 22. The force field also has a distinctive rotation component, see Remark 21. In Fig. 4c with a large $| | j ( x ) | |$ , SGD converges to limit cycles around the saddle point at the origin. This is highly surprising and demonstrates that the solutions obtained by SGD may be very different from local minima.
260
+
261
+ # Example 19 (Double-well potential with limit cycles). Define
262
+
263
+ $$
264
+ \Phi ( x ) = \frac { ( x _ { 1 } ^ { 2 } - 1 ) ^ { 2 } } { 4 } + \frac { x _ { 2 } ^ { 2 } } { 2 } .
265
+ $$
266
+
267
+ Instead of constructing a diffusion matrix $D ( x )$ , we will directly construct different gradients $\nabla f ( x )$ that lead to the same potential $\Phi$ ; these are equivalent but the later is much easier. The dynamics is
268
+
269
+ given by $d x = - \nabla f ( x ) d t + { \sqrt { 2 } } d W ( t )$ , where $\nabla f ( x ) = - j ( x ) + \nabla \Phi ( x )$ . We pick $j = \lambda e ^ { \Phi } J ^ { \mathrm { s s } } ( x )$ for some parameter $\lambda > 0$ where
270
+
271
+ $$
272
+ J ^ { \mathrm { s s } } ( x ) = e ^ { - \frac { ( x _ { 1 } ^ { 2 } + x _ { 2 } ^ { 2 } ) ^ { 2 } } { 4 } } \ ( - x _ { 2 } , x _ { 1 } ) .
273
+ $$
274
+
275
+ Note that this satisfies (6) and does not change $\rho ^ { \mathrm { s s } } = e ^ { - \Phi }$ . Fig. 4 shows the gradient field $f ( x )$ along with a discussion.
276
+
277
+ # 5.1 LINEARIZATION AROUND A CRITICAL POINT
278
+
279
+ Without loss of generality, let $x = 0$ be a critical point of $f ( x )$ . This critical point can be a local minimum, maximum, or even a saddle point. We linearize the gradient around the origin and define a fixed matrix $F \in \mathbb { R } ^ { d \times d }$ (the Hessian) to be $\nabla f ( x ) = F x$ . Let $D = D ( 0 )$ be the constant diffusion matrix matrix. The dynamics in (3) can now be written as
280
+
281
+ $$
282
+ d x = - F x d t + \sqrt { 2 \beta ^ { - 1 } D } d W ( t ) .
283
+ $$
284
+
285
+ Lemma 20 (Linearization). The matrix $F$ in (15) can be uniquely decomposed into
286
+
287
+ $$
288
+ F = \left( D + Q \right) U ;
289
+ $$
290
+
291
+ $D$ and $Q$ are the symmetric and anti-symmetric parts of a matrix $G$ with $G F ^ { \top } - F G ^ { \top } = 0$ , to get $\begin{array} { r } { \Phi ( x ) = \frac 1 2 x ^ { \top } U x . } \end{array}$ .
292
+
293
+ The above lemma is a classical result if the critical point is a local minimum, i.e., if the loss is locally convex near $x = 0$ ; this case has also been explored in machine learning before (Mandt et al., 2016). We refer to Kwon et al. (2005) for the proof that linearizes around any critical point.
294
+
295
+ Remark 21 (Rotation of gradients). We see from Lemma 20 that, near a critical point,
296
+
297
+ $$
298
+ \nabla f = \left( D + Q \right) \nabla \Phi - \beta ^ { - 1 } \nabla \cdot D - \beta ^ { - 1 } \nabla \cdot Q
299
+ $$
300
+
301
+ up to the first order. This suggests that the effect of $j ( x )$ is to rotate the gradient field and move the critical points, also seen in Fig. 4b. Note that $\nabla \cdot D = 0$ and $\nabla \cdot Q = 0$ in the linearized analysis.
302
+
303
+ # 5.2 GENERAL CASE
304
+
305
+ We next give the general expression for the deviation of the critical points $\nabla \Phi$ from those of the original loss $\nabla f$ .
306
+
307
+ A-type stochastic integration: A Fokker-Planck equation is a deterministic partial differential equation (PDE) and every steady-state distribution, $\rho ^ { \mathrm { s s } } \propto e ^ { - \beta \Phi }$ in this case, has a unique such PDE that achieves it. However, the same PDE can be tied to different SDEs depending on the stochastic integration scheme, e.g., Ito, Stratonovich (Risken, 1996; Oksendal, 2003), Hanggi (Hanggi ¨ , 1978), $\alpha$ -type etc. An “A-type” interpretation is one such scheme (Ao et al., 2007; Shi et al., 2012). It is widely used in non-equilibrium studies in physics and biology (Wang et al., 2008; Zhu et al., 2004) because it allows one to compute the steady-state distribution easily; its implications are supported by other mathematical analyses such as Tel et al. (1989); Qian (2014).
308
+
309
+ The main result of the section now follows. It exploits the A-type interpretation to compute the difference between the most likely locations of SGD which are given by the critical points of the potential $\Phi ( x )$ and those of the original loss $f ( x )$ .
310
+
311
+ Theorem 22 (Most likely locations are not the critical points of the loss). The Ito SDE
312
+
313
+ $$
314
+ d x = - \nabla f ( x ) d t + { \sqrt { 2 \beta ^ { - 1 } D ( x ) } } d W ( t )
315
+ $$
316
+
317
+ is equivalent to the $A$ -type SDE (Ao et al., 2007; Shi et al., 2012)
318
+
319
+ $$
320
+ d \boldsymbol { x } = - \Big ( D ( \boldsymbol { x } ) + Q ( \boldsymbol { x } ) \Big ) \nabla \Phi ( \boldsymbol { x } ) d t + \sqrt { 2 \beta ^ { - 1 } D ( \boldsymbol { x } ) } d W ( t )
321
+ $$
322
+
323
+ with the same steady-state distribution $\rho ^ { \mathrm { s s } } \propto e ^ { - \beta \Phi ( x ) }$ and Fokker-Planck equation $( F P )$ if
324
+
325
+ $$
326
+ \nabla f ( x ) = { \Big ( } D ( x ) + Q ( x ) { \Big ) } \nabla \Phi ( x ) - \beta ^ { - 1 } \nabla \cdot { \Big ( } D ( x ) + Q ( x ) { \Big ) } .
327
+ $$
328
+
329
+ The anti-symmetric matrix $Q ( x )$ and the potential $\Phi ( x )$ can be explicitly computed in terms of the gradient $\nabla f ( x )$ and the diffusion matrix $D ( x )$ . The potential $\Phi ( x )$ does not depend on $\beta$ .
330
+
331
+ See Appendix F.4 for the proof. It exploits the fact that the the Ito SDE (3) and the A-type SDE (18) should have the same Fokker-Planck equations because they have the same steady-state distributions.
332
+
333
+ Remark 23 (SGD is far away from critical points). The time spent by a Markov chain at a state $x$ is proportional to its steady-state distribution $\rho ^ { \mathrm { s s } } ( x )$ . While it is easily seen that SGD does not converge in the Cauchy sense due to the stochasticity, it is very surprising that it may spend a significant amount of time away from the critical points of the original loss. If $D ( x ) + Q ( x )$ has a large divergence, the set of states with $\nabla \Phi ( x ) = 0$ might be drastically different than those with $\nabla f ( x ) = 0$ . This is also seen in example Fig. 4c; in fact, SGD may even converge around a saddle point.
334
+
335
+ This also closes the logical loop we began in Section 3 where we assumed the existence of $\rho ^ { \mathrm { s s } }$ and defined the potential $\Phi$ using it. Lemma 20 and Theorem 22 show that both can be defined uniquely in terms of the original quantities, i.e., the gradient term $\nabla f ( x )$ and the diffusion matrix $D ( x )$ . There is no ambiguity as to whether the potential $\Phi ( x )$ results in the steady-state $\rho ^ { \mathrm { s s } } ( x )$ or vice-versa.
336
+
337
+ Remark 24 (Consistent with the linear case). Theorem 22 presents a picture that is completely consistent with Lemma 20. If $j ( x ) = 0$ and $Q ( x ) = 0$ , or if $Q$ is a constant like the linear case in Lemma 20, the divergence of $Q ( x )$ in (19) is zero.
338
+
339
+ Remark 25 (Out-of-equilibrium effect can be large even if $D$ is constant). The presence of a $Q ( x )$ with non-zero divergence is the consequence of a non-isotropic $D ( x )$ and it persists even if $D$ is constant and independent of weights $x$ . So long as $D$ is not isotropic, as we discussed in the beginning of Section 5, there need not exist a function $\Phi ( x )$ such that $\nabla \Phi ( { \bar { x } } ) = D ^ { - 1 } \nabla f ( x )$ at all $x$ . This is also seen in our experiments, the diffusion matrix is almost constant with respect to weights for deep networks, but consequences of out-of-equilibrium behavior are still seen in Section 4.2.
340
+
341
+ Remark 26 (Out-of-equilibrium effect increases with $\beta ^ { - 1 }$ ). The effect predicted by (19) becomes more pronounced if $\begin{array} { r } { \beta ^ { - 1 } = \frac { \eta } { 2 \ell } } \end{array}$ is large. In other words, small batch-sizes or high learning rates cause SGD to be drastically out-of-equilibrium. Theorem 5 also shows that as $\beta ^ { - 1 } \to 0$ , the implicit entropic regularization in SGD vanishes. Observe that these are exactly the conditions under which we typically obtain good generalization performance for deep networks (Keskar et al., 2016; Goyal et al., 2017). This suggests that non-equilibrium behavior in SGD is crucial to obtain good generalization performance, especially for high-dimensional models such as deep networks where such effects are expected to be more pronounced.
342
+
343
+ # 5.3 GENERALIZATION
344
+
345
+ It was found that solutions of discrete learning problems that generalize well belong to dense clusters in the weight space (Baldassi et al., 2015; 2016). Such dense clusters are exponentially fewer compared to isolated solutions. To exploit these observations, the authors proposed a loss called “local entropy” that is out-of-equilibrium by construction and can find these well-generalizable solutions easily. This idea has also been successful in deep learning where Chaudhari et al. (2016) modified SGD to seek solutions in “wide minima” with low curvature to obtain improvements in generalization performance as well as convergence rate (Chaudhari et al., 2017a).
346
+
347
+ Local entropy is a smoothed version of the original loss given by
348
+
349
+ $$
350
+ f _ { \gamma } ( x ) = - \log \left( G _ { \gamma } * e ^ { - f ( x ) } \right) ,
351
+ $$
352
+
353
+ where $G _ { \gamma }$ is a Gaussian kernel of variance $\gamma$ . Even with an isotropic diffusion matrix, the steady-state distribution with $f _ { \gamma } ( x )$ as the loss function is $\rho _ { \gamma } ^ { \mathrm { s s } } ( x ) \propto e ^ { - \beta f _ { \gamma } ( x ) }$ . For large values of $\gamma _ { : }$ , the new loss makes the original local minima exponentially less likely. In other words, local entropy does not rely on non-isotropic gradient noise to obtain out-of-equilibrium behavior, it gets it explicitly, by construction. This is also seen in Fig. 4c: if SGD is drastically out-of-equilibrium, it converges around the “wide” saddle point region at the origin which has a small local entropy.
354
+
355
+ Actively constructing out-of-equilibrium behavior leads to good generalization in practice. Our evidence that SGD on deep networks itself possesses out-of-equilibrium behavior then indicates that SGD for deep networks generalizes well because of such behavior.
356
+
357
+ # 6 RELATED WORK
358
+
359
+ SGD, variational inference and implicit regularization: The idea that SGD is related to variational inference has been seen in machine learning before (Duvenaud et al., 2016; Mandt et al., 2016) under assumptions such as quadratic steady-states; for instance, see Mandt et al. (2017) for methods to approximate steady-states using SGD. Our results here are very different, we would instead like to understand properties of SGD itself. Indeed, in full generality, SGD performs variational inference using a new potential $\Phi$ that it implicitly constructs given an architecture and a dataset.
360
+
361
+ It is widely believed that SGD is an implicit regularizer, see Zhang et al. (2016); Neyshabur et al. (2017); Shwartz-Ziv and Tishby (2017) among others. This belief stems from its remarkable empirical performance. Our results show that such intuition is very well-placed. Thanks to the special architecture of deep networks where gradient noise is highly non-isotropic, SGD helps itself to a potential $\Phi$ with properties that lead to both generalization and acceleration.
362
+
363
+ SGD and noise: Noise is often added in SGD to improve its behavior around saddle points for non-convex losses, see Lee et al. (2016); Anandkumar and Ge (2016); Ge et al. (2015). It is also quite indispensable for training deep networks (Hinton and Van Camp, 1993; Srivastava et al., 2014; Kingma et al., 2015; Gulcehre et al., 2016; Achille and Soatto, 2017). There is however a disconnect between these two directions due to the fact that while adding external gradient noise helps in theory, it works poorly in practice (Neelakantan et al., 2015; Chaudhari and Soatto, 2015). Instead, “noise tied to the architecture” works better, e.g., dropout, or small mini-batches. Our results close this gap and show that SGD crucially leverages the highly degenerate noise induced by the architecture.
364
+
365
+ Gradient diversity: Yin et al. (2017) construct a scalar measure of the gradient diversity given by $\Sigma _ { k } \| \nabla f _ { k } ( x ) \| / \| \nabla f ( x ) \|$ , and analyze its effect on the maximum allowed batch-size in the context of distributed optimization.
366
+
367
+ Markov Chain Monte Carlo: MCMC methods that sample from a negative log-likelihood $\Phi ( x )$ have employed the idea of designing a force $\begin{array} { r } { \boldsymbol { j } = \nabla \Phi - \nabla f } \end{array}$ to accelerate convergence, see Ma et al. (2015) for a thorough survey, or Pavliotis (2016); Kaiser et al. (2017) for a rigorous treatment. We instead compute the potential $\Phi$ given $\nabla f$ and $D$ , which necessitates the use of techniques from physics. In fact, our results show that since $j \neq 0$ for deep networks due to non-isotropic gradient noise, very simple algorithms such as SGLD by Welling and Teh (2011) also benefit from the acceleration that their sophisticated counterparts aim for (Ding et al., 2014; Chen et al., 2016).
368
+
369
+ # 7 DISCUSSION
370
+
371
+ The continuous-time point-of-view used in this paper gives access to general principles that govern SGD, such analyses are increasingly becoming popular (Wibisono et al., 2016; Chaudhari et al., 2017b). However, in practice, deep networks are trained for only a few epochs with discrete-time updates. Closing this gap is an important future direction. A promising avenue towards this is that for typical conditions in practice such as small mini-batches or large learning rates, SGD converges to the steady-state distribution quickly (Raginsky et al., 2017).
372
+
373
+ # 8 ACKNOWLEDGMENTS
374
+
375
+ PC would like to thank Adam Oberman for introducing him to the JKO functional. The authors would also like to thank Alhussein Fawzi for numerous discussions during the conception of this paper and his contribution to its improvement. This research was supported by ARO W911NF-17-1-0304, ONR N00014-17-1-2072, AFOSR FA9550-15-1-0229.
376
+
377
+ # REFERENCES
378
+
379
+ Achille, A. and Soatto, S. (2017). On the emergence of invariance and disentangling in deep representations. arXiv:1706.01350.
380
+ Anandkumar, A. and Ge, R. (2016). Efficient approaches for escaping higher order saddle points in non-convex optimization. In COLT, pages 81–102.
381
+ Ao, P., Kwon, C., and Qian, H. (2007). On the existence of potential landscape in the evolution of complex systems. Complexity, 12(4):19–27.
382
+ Baker, B., Gupta, O., Naik, N., and Raskar, R. (2016). Designing neural network architectures using reinforcement learning. arXiv:1611.02167.
383
+ Baldassi, C., Borgs, C., Chayes, J., Ingrosso, A., Lucibello, C., Saglietti, L., and Zecchina, R. (2016). Unreasonable effectiveness of learning neural networks: From accessible states and robust ensembles to basic algorithmic schemes. PNAS, 113(48):E7655–E7662.
384
+ Baldassi, C., Ingrosso, A., Lucibello, C., Saglietti, L., and Zecchina, R. (2015). Subdominant dense clusters allow for simple learning and high computational performance in neural networks with discrete synapses. Physical review letters, 115(12):128101.
385
+ Brock, A., Lim, T., Ritchie, J., and Weston, N. (2017). SMASH: One-Shot Model Architecture Search through HyperNetworks. arXiv:1708.05344.
386
+ Chaudhari, P., Baldassi, C., Zecchina, R., Soatto, S., Talwalkar, A., and Oberman, A. (2017a). Parle: parallelizing stochastic gradient descent. arXiv:1707.00424.
387
+ Chaudhari, P., Choromanska, A., Soatto, S., LeCun, Y., Baldassi, C., Borgs, C., Chayes, J., Sagun, L., and Zecchina, R. (2016). Entropy-SGD: biasing gradient descent into wide valleys. arXiv:1611.01838.
388
+ Chaudhari, P., Oberman, A., Osher, S., Soatto, S., and Guillame, C. (2017b). Deep Relaxation: partial differential equations for optimizing deep neural networks. arXiv:1704.04932.
389
+ Chaudhari, P. and Soatto, S. (2015). On the energy landscape of deep networks. arXiv:1511.06485.
390
+ Chen, C., Carlson, D., Gan, Z., Li, C., and Carin, L. (2016). Bridging the gap between stochastic gradient MCMC and stochastic optimization. In AISTATS, pages 1051–1060.
391
+ Ding, N., Fang, Y., Babbush, R., Chen, C., Skeel, R., and Neven, H. (2014). Bayesian sampling using stochastic gradient thermostats. In NIPS, pages 3203–3211.
392
+ Duvenaud, D., Maclaurin, D., and Adams, R. (2016). Early stopping as non-parametric variational inference. In AISTATS, pages 1070–1077.
393
+ Frank, T. D. (2005). Nonlinear Fokker-Planck equations: fundamentals and applications. Springer Science & Business Media.
394
+ Ge, R., Huang, F., Jin, C., and Yuan, Y. (2015). Escaping from saddle points online stochastic gradient for tensor decomposition. In COLT, pages 797–842.
395
+ Goyal, P., Dollr, P., Girshick, R., Noordhuis, P., Wesolowski, L., Kyrola, A., Tulloch, A., Jia, Y., and He, K. (2017). Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour. arXiv:1706.02677.
396
+ Gulcehre, C., Moczulski, M., Denil, M., and Bengio, Y. (2016). Noisy activation functions. In ICML, pages 3059–3068.
397
+ Hanggi, P. (1978). On derivations and solutions of master equations and asymptotic representations. ¨ Zeitschrift fur Physik B Condensed Matter ¨ , 30(1):85–95.
398
+ Hinton, G. E. and Van Camp, D. (1993). Keeping the neural networks simple by minimizing the description length of the weights. In Proceedings of the sixth annual conference on Computational learning theory, pages 5–13. ACM.
399
+ Jaynes, E. T. (1980). The minimum entropy production principle. Annual Review of Physical Chemistry, 31(1):579–601.
400
+ Jordan, M. I., Ghahramani, Z., Jaakkola, T. S., and Saul, L. K. (1999). An introduction to variational methods for graphical models. Machine learning, 37(2):183–233.
401
+ Jordan, R., Kinderlehrer, D., and Otto, F. (1997). Free energy and the fokker-planck equation. Physica $D$ : Nonlinear Phenomena, 107(2-4):265–271.
402
+ Jordan, R., Kinderlehrer, D., and Otto, F. (1998). The variational formulation of the Fokker–Planck equation. SIAM journal on mathematical analysis, 29(1):1–17.
403
+ Kaiser, M., Jack, R. L., and Zimmer, J. (2017). Acceleration of convergence to equilibrium in Markov chains by breaking detailed balance. Journal of Statistical Physics, 168(2):259–287.
404
+ Keskar, N. S., Mudigere, D., Nocedal, J., Smelyanskiy, M., and Tang, P. T. P. (2016). On large-batch training for deep learning: Generalization gap and sharp minima. arXiv:1609.04836.
405
+ Kingma, D. P., Salimans, T., and Welling, M. (2015). Variational dropout and the local reparameterization trick. In NIPS, pages 2575–2583.
406
+ Kingma, D. P. and Welling, M. (2013). Auto-encoding variational Bayes. arXiv:1312.6114.
407
+ Krizhevsky, A. (2009). Learning multiple layers of features from tiny images. Master’s thesis, Computer Science, University of Toronto.
408
+ Kwon, C., Ao, P., and Thouless, D. J. (2005). Structure of stochastic dynamics near fixed points. Proceedings of the National Academy of Sciences of the United States of America, 102(37):13029–13033.
409
+ LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324.
410
+ Lee, J. D., Simchowitz, M., Jordan, M. I., and Recht, B. (2016). Gradient descent only converges to minimizers. In COLT, pages 1246–1257.
411
+ Li, C. J., Li, L., Qian, J., and Liu, J.-G. (2017a). Batch size matters: A diffusion approximation framework on nonconvex stochastic gradient descent. arXiv:1705.07562.
412
+ Li, Q., Tai, C., and Weinan, E. (2017b). Stochastic modified equations and adaptive stochastic gradient algorithms. In ICML, pages 2101–2110.
413
+ Ma, Y.-A., Chen, T., and Fox, E. (2015). A complete recipe for stochastic gradient MCMC. In NIPS, pages 2917–2925.
414
+ Mandt, S., Hoffman, M., and Blei, D. (2016). A variational analysis of stochastic gradient algorithms. In ICML, pages 354–363.
415
+ Mandt, S., Hoffman, M. D., and Blei, D. M. (2017). Stochastic Gradient Descent as Approximate Bayesian Inference. arXiv:1704.04289.
416
+ Neelakantan, A., Vilnis, L., Le, Q. V., Sutskever, I., Kaiser, L., Kurach, K., and Martens, J. (2015). Adding gradient noise improves learning for very deep networks. arXiv:1511.06807.
417
+ Neyshabur, B., Tomioka, R., Salakhutdinov, R., and Srebro, N. (2017). Geometry of optimization and implicit regularization in deep learning. arXiv:1705.03071.
418
+ Noh, J. D. and Lee, J. (2015). On the steady-state probability distribution of nonequilibrium stochastic systems. Journal of the Korean Physical Society, 66(4):544–552.
419
+ Oksendal, B. (2003). Stochastic differential equations. Springer.
420
+ Onsager, L. (1931a). Reciprocal relations in irreversible processes. I. Physical review, 37(4):405.
421
+ Onsager, L. (1931b). Reciprocal relations in irreversible processes. II. Physical review, 38(12):2265.
422
+ Ottinger, H. (2005). Beyond equilibrium thermodynamics. John Wiley & Sons.
423
+ Otto, F. (2001). The geometry of dissipative evolution equations: the porous medium equation.
424
+ Pavliotis, G. A. (2016). Stochastic processes and applications. Springer.
425
+ Prigogine, I. (1955). Thermodynamics of irreversible processes, volume 404. Thomas.
426
+ Qian, H. (2014). The zeroth law of thermodynamics and volume-preserving conservative system in equilibrium with stochastic damping. Physics Letters A, 378(7):609–616.
427
+ Raginsky, M., Rakhlin, A., and Telgarsky, M. (2017). Non-convex learning via Stochastic Gradient Langevin Dynamics: a nonasymptotic analysis. arXiv:1702.03849.
428
+ Risken, H. (1996). The Fokker-Planck Equation. Springer.
429
+ Santambrogio, F. (2015). Optimal transport for applied mathematicians. Birkuser, NY.
430
+ Santambrogio, F. (2017). Euclidean, metric, and Wasserstein gradient flows: an overview. Bulletin of Mathematical Sciences, 7(1):87–154.
431
+ Shi, J., Chen, T., Yuan, R., Yuan, B., and Ao, P. (2012). Relation of a new interpretation of stochastic differential equations to ito process. Journal of Statistical physics, 148(3):579–590.
432
+ Shwartz-Ziv, R. and Tishby, N. (2017). Opening the black box of deep neural networks via information. arXiv:1703.00810.
433
+ Springenberg, J., Dosovitskiy, A., Brox, T., and Riedmiller, M. (2014). Striving for simplicity: The all convolutional net. arXiv:1412.6806.
434
+ Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. (2014). Dropout: a simple way to prevent neural networks from overfitting. JMLR, 15(1):1929–1958.
435
+ Tel, T., Graham, R., and Hu, G. (1989). Nonequilibrium potentials and their power-series expansions. Physical Review A, 40(7):4065.
436
+ Tishby, N., Pereira, F. C., and Bialek, W. (1999). The information bottleneck method. In Proc. of the 37-th Annual Allerton Conference on Communication, Control and Computing, pages 368–377.
437
+ Villani, C. (2008). Optimal transport: old and new, volume 338. Springer Science & Business Media.
438
+ Wang, J., Xu, L., and Wang, E. (2008). Potential landscape and flux framework of nonequilibrium networks: robustness, dissipation, and coherence of biochemical oscillations. Proceedings of the National Academy of Sciences, 105(34):12271–12276.
439
+ Welling, M. and Teh, Y. W. (2011). Bayesian learning via stochastic gradient Langevin dynamics. In ICML, pages 681–688.
440
+ Wibisono, A., Wilson, A. C., and Jordan, M. I. (2016). A variational perspective on accelerated methods in optimization. PNAS, page 201614734.
441
+ Yin, D., Pananjady, A., Lam, M., Papailiopoulos, D., Ramchandran, K., and Bartlett, P. (2017). Gradient diversity empowers distributed learning. arXiv:1706.05699.
442
+ Yin, L. and Ao, P. (2006). Existence and construction of dynamical potential in nonequilibrium processes without detailed balance. Journal of Physics A: Mathematical and General, 39(27):8593.
443
+ Zhang, C., Bengio, S., Hardt, M., Recht, B., and Vinyals, O. (2016). Understanding deep learning requires rethinking generalization. arXiv:1611.03530.
444
+ Zhu, X.-M., Yin, L., Hood, L., and Ao, P. (2004). Calculating biological behaviors of epigenetic states in the phage λ life cycle. Functional & integrative genomics, 4(3):188–195.
445
+ Zoph, B. and Le, Q. V. (2016). Neural architecture search with reinforcement learning. arXiv:1611.01578.
446
+
447
+ # A DIFFUSION MATRIX $D ( x )$
448
+
449
+ In this section we denote $g _ { k } : = \nabla f _ { k } ( x )$ and $\begin{array} { r } { g : = \nabla f ( x ) = \frac { 1 } { N } ~ \sum _ { k = 1 } ^ { N } ~ g _ { k } } \end{array}$ . Although we drop the dependence of $g _ { k }$ on $x$ to keep the notation clear, we emphasize that the diffusion matrix $D$ depends on the weights $x$ .
450
+
451
+ # A.1 WITH REPLACEMENT
452
+
453
+ Let $i _ { 1 } , \ldots , i _ { \ell }$ be $\boldsymbol { \mathscr { k } }$ iid random variables in $\{ 1 , 2 , \ldots , N \}$ . We would like to compute
454
+
455
+ $$
456
+ \mathrm { v a r } \left( \frac { 1 } { \ell } \sum _ { j = 1 } ^ { \ell } g _ { i _ { j } } \right) = \mathbb { E } _ { i _ { 1 } , \ldots , i _ { \ell } } \left\{ \left( \frac { 1 } { \ell } \sum _ { j = 1 } ^ { \ell } g _ { i _ { j } } - g \right) \ \left( \frac { 1 } { \ell } \sum _ { j = 1 } ^ { \ell } g _ { i _ { j } } - g \right) ^ { \top } \right\} .
457
+ $$
458
+
459
+ Note that we have that for any $j \neq k$ , the random vectors $g _ { i _ { j } }$ and $g _ { i _ { k } }$ are independent. We therefore have
460
+
461
+ $$
462
+ \operatorname { c o v a r } ( g _ { i _ { j } } , g _ { i _ { k } } ) = 0 = \mathbb { E } _ { i _ { j } , i _ { k } } \left\{ ( g _ { i _ { j } } - g ) ( g _ { i _ { k } } - g ) ^ { \top } \right\}
463
+ $$
464
+
465
+ We use this to obtain
466
+
467
+ $$
468
+ \begin{array} { r } { \mathrm { v a r } \left( \displaystyle \frac { 1 } { \theta } \sum _ { j = 1 } ^ { \theta } g _ { i _ { j } } \right) = \displaystyle \frac { 1 } { \theta ^ { 2 } } \sum _ { j = 1 } ^ { \theta } \mathrm { v a r } ( g _ { i _ { j } } ) = \displaystyle \frac { 1 } { N \theta } \sum _ { k = 1 } ^ { N } \left( \left( g _ { k } - g \right) \left( g _ { k } - g \right) ^ { \top } \right) } \\ { = \displaystyle \frac { 1 } { \theta } \left( \frac { \sum _ { k = 1 } ^ { N } g _ { k } g _ { k } ^ { \top } } { N } - g g ^ { \top } \right) . } \end{array}
469
+ $$
470
+
471
+ We will set
472
+
473
+ $$
474
+ D ( x ) = \frac { 1 } { N } \left( \sum _ { k = 1 } ^ { N } g _ { k } g _ { k } ^ { \top } \right) - g g ^ { \top } .
475
+ $$
476
+
477
+ and assimilate the factor of $\ell ^ { - 1 }$ in the inverse temperature $\beta$
478
+
479
+ # A.2 WITHOUT REPLACEMENT
480
+
481
+ Let us define an indicator random variable $\mathbf { 1 } _ { i \in \mathcal { 6 } }$ that denotes if an example $i$ was sampled in batch $\boldsymbol { \mathscr { k } }$ We can show that
482
+
483
+ $$
484
+ \operatorname { v a r } ( \mathbf { 1 } _ { i \in \varnothing } ) = { \frac { \ell } { N } } - { \frac { \ell ^ { 2 } } { N ^ { 2 } } } ,
485
+ $$
486
+
487
+ and for $i \neq j$
488
+
489
+ $$
490
+ \operatorname { c o v a r } ( \mathbf { 1 } _ { i \in \ell } , \mathbf { 1 } _ { j \in \ell } ) = - \frac { \ell \left( N - \ell \right) } { N ^ { 2 } ( N - 1 ) } .
491
+ $$
492
+
493
+ Similar to Li et al. (2017a), we can now compute
494
+
495
+ $$
496
+ \begin{array} { r l } { \mathrm { v a r } \left( \displaystyle \frac { 1 } { \theta } \sum _ { k = 1 } ^ { N } g _ { k } \mathbf { 1 } _ { k \in \theta } \right) = \displaystyle \frac { 1 } { \theta ^ { 2 } } \mathrm { v a r } \left( \sum _ { k = 1 } ^ { N } g _ { k } \mathbf { 1 } _ { k \in \theta } \right) } & { } \\ { = \displaystyle \frac { 1 } { \theta ^ { 2 } } \sum _ { k = 1 } ^ { N } g _ { k } g _ { k } ^ { \top } \mathrm { v a r } ( \mathbf { 1 } _ { k \in \theta } ) + \frac { 1 } { \theta ^ { 2 } } \sum _ { i , j = 1 , i \neq j } ^ { N } g _ { i } g _ { j } ^ { \top } \mathrm { c o v a r } ( \mathbf { 1 } _ { i \in \theta } , \mathbf { 1 } _ { j \in \theta } ) } & { } \\ { = \displaystyle \frac { 1 } { \theta } \left( 1 - \frac { \theta } { N } \right) \left[ \frac { \sum _ { k = 1 } ^ { N } g _ { k } g _ { k } ^ { \top } } { N - 1 } - \left( 1 - \frac { 1 } { N - 1 } \right) g g ^ { \top } \right] . } & { } \end{array}
497
+ $$
498
+
499
+ We will again set
500
+
501
+ $$
502
+ D ( x ) = { \frac { 1 } { N - 1 } } \left( \sum _ { k = 1 } ^ { N } g _ { k } g _ { k } ^ { \top } \right) - \left( 1 - { \frac { 1 } { N - 1 } } \right) g g ^ { \top }
503
+ $$
504
+
505
+ and assimilate the factor of $\ell ^ { - 1 } \left( 1 - \frac { \ell } { N } \right)$ that depends on the batch-size in the inverse temperature $\beta$
506
+
507
+ # B DISCUSSION ON ASSUMPTION 4
508
+
509
+ Let $F ( \rho )$ be as defined in (11). In non-equilibrium thermodynamics, it is assumed that the local entropy production is a product of the force $- \nabla \left( \frac { \delta F } { \delta \rho } \right)$ from (A8) and the probability current $- J ( x , t )$ from (FP). This assumption in this form was first introduced by Prigogine (1955) based on the works of Onsager (1931a;b). See Frank (2005, Sec. 4.5) for a mathematical treatment and Jaynes (1980) for further discussion. The rate of entropy $( S _ { i } )$ increase is given by
510
+
511
+ $$
512
+ \beta ^ { - 1 } { \frac { d S _ { i } } { d t } } = \int _ { x \in \Omega } \nabla \left( { \frac { \delta F } { \delta \rho } } \right) J ( x , t ) d x .
513
+ $$
514
+
515
+ This can now be written using (A8) again as
516
+
517
+ $$
518
+ \beta ^ { - 1 } \frac { d S _ { i } } { d t } = \int \rho \ : D : \left( \nabla \frac { \delta F } { \delta \rho } \right) \left( \nabla \frac { \delta F } { \delta \rho } \right) ^ { \top } + \int j \rho \left( \nabla \frac { \delta F } { \delta \rho } \right) d x .
519
+ $$
520
+
521
+ The first term in the above expression is non-negative, in order to ensure that $\begin{array} { r } { \frac { d S _ { i } } { d t } \geq 0 } \end{array}$ , we require
522
+
523
+ $$
524
+ \begin{array} { l } { \displaystyle 0 = \int ~ j \rho \left( \nabla \frac { \delta F } { \delta \rho } \right) ~ d x } \\ { \displaystyle ~ = \int \nabla \cdot ( j \rho ) ~ \left( \frac { \delta F } { \delta \rho } \right) ~ d x ; } \end{array}
525
+ $$
526
+
527
+ where the second equality again follows by integration by parts. It can be shown (Frank, 2005, Sec. 4.5.5) that the condition in Assumption 4, viz., $\nabla \cdot \boldsymbol { j } ( x ) = 0$ , is sufficient to make the above integral vanish and therefore for the entropy generation to be non-negative.
528
+
529
+ # C SOME PROPERTIES OF THE FORCE $j$
530
+
531
+ The Fokker-Planck equation (FP) can be written in terms of the probability current as
532
+
533
+ $$
534
+ \begin{array} { r l } & { 0 = \rho _ { t } ^ { \mathrm { s s } } = \nabla \cdot \left( - j \rho ^ { \mathrm { s s } } + D \nabla \Phi \rho ^ { \mathrm { s s } } - \beta ^ { - 1 } ( \nabla \cdot D ) \rho ^ { \mathrm { s s } } + \beta ^ { - 1 } \nabla \cdot \left( D \rho ^ { \mathrm { s s } } \right) \right) } \\ & { \qquad = \nabla \cdot \boldsymbol { J } ^ { \mathrm { s s } } . } \end{array}
535
+ $$
536
+
537
+ Since we have $\rho ^ { \mathrm { s s } } \propto e ^ { - \beta \Phi ( x ) }$ , from the observation (7), we also have that
538
+
539
+ $$
540
+ 0 = \rho _ { t } ^ { \mathrm { s s } } = \nabla \cdot \left( D \nabla \Phi \rho ^ { \mathrm { s s } } + \beta ^ { - 1 } D \nabla \rho ^ { \mathrm { s s } } \right) ,
541
+ $$
542
+
543
+ and consequently,
544
+
545
+ $$
546
+ \begin{array} { c } { 0 = \nabla \cdot ( \boldsymbol { j } \rho ^ { \mathrm { s s } } ) } \\ { \Rightarrow \quad j ( \boldsymbol { x } ) = \displaystyle \frac { { \cal J } ^ { \mathrm { s s } } } { \rho ^ { \mathrm { s s } } } . } \end{array}
547
+ $$
548
+
549
+ In other words, the conservative force is non-zero only if detailed balance is broken, i.e., $J ^ { \mathrm { s s } } \neq 0$ . We also have
550
+
551
+ $$
552
+ \begin{array} { r l } { \mathrm { ~ \theta ~ } } & { 0 = \nabla \cdot \left( j \rho ^ { \mathrm { s s } } \right) } \\ & { \mathrm { ~ \theta ~ } } \\ & { = \rho ^ { \mathrm { s s } } \left( \nabla \cdot j - j \cdot \nabla \Phi \right) , } \end{array}
553
+ $$
554
+
555
+ which shows using Assumption 4 and $\rho ^ { \mathrm { s s } } ( x ) > 0$ for all $x \in \Omega$ that $j ( x )$ is always orthogonal to the gradient of the potential
556
+
557
+ $$
558
+ \begin{array} { c } { 0 = j ( x ) \cdot \nabla \Phi ( x ) } \\ { = j ( x ) \cdot \nabla \rho ^ { \mathrm { s s } } . } \end{array}
559
+ $$
560
+
561
+ Using the definition of $j ( x )$ in (8), we have detailed balance when
562
+
563
+ $$
564
+ \nabla f ( x ) = D ( x ) \nabla \Phi ( x ) - \beta ^ { - 1 } \nabla \cdot D ( x ) .
565
+ $$
566
+
567
+ # D HEAT EQUATION AS A GRADIENT FLOW
568
+
569
+ As first discovered in the works of Jordan, Kinderleherer and Otto (Jordan et al., 1998; Otto, 2001), certain partial differential equations can be seen as coming from a variational principle, i.e., they perform steepest descent with respect to functionals of their state distribution. Section 3 is a generalization of this idea, we give a short overview here with the heat equation. The heat equation
570
+
571
+ $$
572
+ \rho _ { t } = \nabla \cdot \left( \nabla \rho \right) ,
573
+ $$
574
+
575
+ can be written as the steepest descent for the Dirichlet energy functional
576
+
577
+ $$
578
+ \frac { 1 } { 2 } \int _ { \Omega } \left| \nabla \rho \right| ^ { 2 } d x .
579
+ $$
580
+
581
+ However, the same PDE can also be seen as the gradient flow of the negative Shannon entropy in the Wasserstein metric (Santambrogio, 2017; 2015),
582
+
583
+ $$
584
+ - H ( \rho ) = \int _ { \Omega } \rho ( x ) \log \rho ( x ) d x .
585
+ $$
586
+
587
+ More precisely, the sequence of iterated minimization problems
588
+
589
+ $$
590
+ \rho _ { k + 1 } ^ { \tau } \in \underset { \rho } { \arg \operatorname* { m i n } } \left\{ - H ( \rho ) + \frac { \mathbb { W } _ { 2 } ^ { 2 } ( \rho , \rho _ { k } ^ { \tau } ) } { 2 \tau } \right\}
591
+ $$
592
+
593
+ converges to trajectories of the heat equation as $\tau \to 0$ . This equivalence is extremely powerful because it allows us to interpret, and modify, the functional $- H ( \rho )$ that PDEs such as the heat equation implicitly minimize.
594
+
595
+ This equivalence is also quite natural, the heat equation describes the probability density of pure√ Brownian motion: $d x = { \sqrt { 2 } } d W ( t )$ . The Wasserstein point-of-view suggests that Brownian motion maximizes the entropy of its state distribution, while the Dirichlet functional suggests that it minimizes the total-variation of its density. These are equivalent. While the latter has been used extensively in image processing, our paper suggests that the entropic regularization point-of-view is very useful to understand SGD for machine learning.
596
+
597
+ # E EXPERIMENTAL SETUP
598
+
599
+ We consider the following three networks on the MNIST (LeCun et al., 1998) and the CIFAR-10 and CIFAR-100 datasets (Krizhevsky, 2009).
600
+
601
+ (i) small-lenet: a smaller version of LeNet (LeCun et al., 1998) on MNIST with batchnormalization and dropout (0.1) after both convolutional layers of 8 and 16 output channels, respectively. The fully-connected layer has 128 hidden units. This network has 13, 338 weights and reaches about $0 . 7 5 \%$ training and validation error.
602
+
603
+ (ii) small-fc: a fully-connected network with two-layers, batch-normalization and rectified linear units that takes $7 \times 7$ down-sampled images of MNIST as input and has 64 hidden units. Experiments in Section 4.2 use a smaller version of this network with 16 hidden units and 5 output classes (30, 000 input images); this is called tiny-fc.
604
+
605
+ (iii) small-allcnn: this a smaller version of the fully-convolutional network for CIFAR-10 and CIFAR-100 introduced by Springenberg et al. (2014) with batch-normalization and 12,24 output channels in the first and second block respectively. It has 26,982 weights and reaches about $11 \%$ and $17 \%$ training and validation errors, respectively.
606
+
607
+ We train the above networks with SGD with appropriate learning rate annealing and Nesterov’s momentum set to 0.9. We do not use any data-augmentation and pre-process data using global contrast normalization with ZCA for CIFAR-10 and CIFAR-100.
608
+
609
+ We use networks with about 20,000 weights to keep the eigen-decomposition of $D ( x ) \in \mathbb { R } ^ { d \times d }$ tractable. These networks however possess all the architectural intricacies such as convolutions, dropout, batch-normalization etc. We evaluate $D ( x )$ using (2) with the network in evaluation mode.
610
+
611
+ # F PROOFS
612
+
613
+ # F.1 THEOREM 5
614
+
615
+ The KL-divergence is non-negative: $F ( \rho ) \geq 0$ with equality if and only if $\rho = \rho ^ { \mathrm { s s } }$ . The expression in (11) follows after writing
616
+
617
+ $$
618
+ \log { \rho ^ { \mathrm { s s } } } = - \beta \Phi - \log Z ( \beta ) .
619
+ $$
620
+
621
+ We now show that $\begin{array} { r } { \frac { d F ( \rho ) } { d t } \leq 0 } \end{array}$ with equality only at $\rho = \rho ^ { \mathrm { s s } }$ when $F ( \rho )$ reaches its minimum and the Fokker-Planck equation achieves its steady-state. The first variation (Santambrogio, 2015) of $F ( \rho )$ computed from (11) is
622
+
623
+ $$
624
+ \frac { \delta F } { \delta \rho } ( \rho ) = \Phi ( x ) + \beta ^ { - 1 } \big ( \log \rho + 1 \big ) ,
625
+ $$
626
+
627
+ which helps us write the Fokker-Planck equation (FP) as
628
+
629
+ $$
630
+ \rho _ { t } = \nabla \cdot \bigg ( - j \rho + \rho D \nabla \left( \frac { \delta F } { \delta \rho } \right) \bigg ) .
631
+ $$
632
+
633
+ Together, we can now write
634
+
635
+ $$
636
+ \begin{array} { r l r } { { \frac { d F ( \rho ) } { d t } = \int _ { x \in \Omega } \rho _ { t } \frac { \delta F } { \delta \rho } d x } } \\ & { } & { = \int _ { x \in \Omega } \ \frac { \delta F } { \delta \rho } \nabla \cdot ( - j \rho ) \ d x + \int _ { x \in \Omega } \ \frac { \delta F } { \delta \rho } \nabla \cdot ( \rho D \nabla ( \frac { \delta F } { \delta \rho } ) ) d x . } \end{array}
637
+ $$
638
+
639
+ As we show in Appendix B, the first term above is zero due to Assumption 4. Under suitable boundary condition on the Fokker-Planck equation which ensures that no probability mass flows across the boundary of the domain $\partial \Omega$ , after an integration by parts, the second term can be written as
640
+
641
+ $$
642
+ \begin{array} { l } { \displaystyle \frac { d F ( \rho ) } { d t } = - \int _ { x \in \Omega } \rho D \colon \left( \nabla \frac { \delta F } { \delta \rho } ( \rho ) \right) \ \left( \nabla \frac { \delta F } { \delta \rho } ( \rho ) \right) ^ { \top } d x } \\ { \displaystyle \qquad \leq 0 . } \end{array}
643
+ $$
644
+
645
+ In the above expression, $A : B$ denotes the matrix dot product $\begin{array} { r } { A : B = \sum _ { i j } A _ { i j } B _ { i j } } \end{array}$ . The final inequality with the quadratic form holds because $D ( x ) \succeq 0$ is a covariance matrix. Moreover, we have from (A7) that
646
+
647
+ $$
648
+ \frac { d { \cal F } ( \rho ^ { \mathrm { s s } } ) } { d t } = 0 .
649
+ $$
650
+
651
+ # F.2 LEMMA 6
652
+
653
+ The forward implication can be checked by substituting $\rho ^ { \mathrm { s s } } ( x ) \propto e ^ { - c \beta f ( x ) }$ in the Fokker-Planck equation (FP) while the reverse implication is true since otherwise (A4) would not hold.
654
+
655
+ # F.3 LEMMA 7
656
+
657
+ The Fokker-Planck operator written as
658
+
659
+ $$
660
+ L \rho = \nabla \cdot \left( - j \rho + D \nabla \Phi \rho - \beta ^ { - 1 } \left( \nabla \cdot D \right) \rho + \beta ^ { - 1 } \nabla \cdot \left( D \rho \right) \right)
661
+ $$
662
+
663
+ from (8) and (FP) can be split into two operators
664
+
665
+ $$
666
+ { \cal L } = { \cal L } _ { S } + { \cal L } _ { A } ,
667
+ $$
668
+
669
+ where the symmetric part is
670
+
671
+ $$
672
+ L _ { S } \rho = \nabla \cdot \left( D \nabla \Phi \rho - \beta ^ { - 1 } \left( \nabla \cdot D \right) \rho + \beta ^ { - 1 } \nabla \cdot \left( D \rho \right) \right)
673
+ $$
674
+
675
+ and the anti-symmetric part is
676
+
677
+ $$
678
+ \begin{array} { r l } & { L _ { A } \rho = \nabla \cdot ( - j \rho ) } \\ & { \qquad = \nabla \cdot \left( - D \nabla \Phi \rho + \nabla f \rho + \beta ^ { - 1 } ( \nabla \cdot D ) \rho \right) } \\ & { \qquad = \nabla \cdot \left( \beta ^ { - 1 } D \nabla \rho + \nabla f \rho + \beta ^ { - 1 } ( \nabla \cdot D ) \rho \right) . } \end{array}
679
+ $$
680
+
681
+ We first note that $L _ { A }$ does not affect $F ( \rho )$ in Theorem 5. For solutions of $\rho _ { t } = L _ { A } \rho$ , we have
682
+
683
+ $$
684
+ \begin{array} { l } { \displaystyle \frac { d } { d t } F ( \boldsymbol { \rho } ) = \int _ { \Omega } \frac { \delta F } { \delta \rho } \rho _ { t } d x } \\ { \displaystyle \qquad = \int _ { \Omega } \frac { \delta F } { \delta \rho } \nabla \cdot \left( - j \boldsymbol { \rho } \right) d x } \\ { \displaystyle \qquad = 0 , } \end{array}
685
+ $$
686
+
687
+ by Assumption 4. The dynamics of the anti-symmetric operator is thus completely deterministic and conserves $F ( \rho )$ . In fact, the equation (A10) is known as the Liouville equation (Frank, 2005) and describes the density of a completely deterministic dynamics given by
688
+
689
+ $$
690
+ { \dot { x } } = j ( x ) ;
691
+ $$
692
+
693
+ where $j ( x ) = J ^ { \mathrm { s s } } / \rho ^ { \mathrm { s s } }$ from Appendix C. On account of the trajectories of the Liouville operator being deterministic, they are also the most likely ones under the steady-state distribution $\rho ^ { \mathrm { s s } } \propto e ^ { - \beta \Phi }$ .
694
+
695
+ # F.4 THEOREM 22
696
+
697
+ All the matrices below depend on the weights $x$ ; we suppress this to keep the notation clear. Our original SDE is given by
698
+
699
+ $$
700
+ d x = - \nabla f d t + \sqrt { 2 \beta ^ { - 1 } D } d W ( t ) .
701
+ $$
702
+
703
+ We will transform the original SDE into a new SDE
704
+
705
+ $$
706
+ G d x = - \nabla \Phi d t + \sqrt { 2 \beta ^ { - 1 } \ : S } d W ( t )
707
+ $$
708
+
709
+ where $s$ and $A$ are the symmetric and anti-symmetric parts of $G ^ { - 1 }$ ,
710
+
711
+ $$
712
+ \begin{array} { l } { \displaystyle { S = \frac { G ^ { - 1 } + G ^ { - T } } { 2 } , } } \\ { \displaystyle { A = G ^ { - 1 } - S . } } \end{array}
713
+ $$
714
+
715
+ Since the two SDEs above are equal to each other, both the deterministic and the stochastic terms have to match. This gives
716
+
717
+ $$
718
+ \begin{array} { r l r } & { } & { \nabla f ( x ) = G \nabla \Phi ( x ) } \\ & { } & { \boldsymbol { D } = \frac { G + G ^ { \top } } { 2 } } \\ & { } & { \boldsymbol { Q } = \frac { \boldsymbol { G } - \boldsymbol { G } ^ { \top } } { 2 } . } \end{array}
719
+ $$
720
+
721
+ Using the above expression, we can now give an explicit, although formal, expression for the potential:
722
+
723
+ $$
724
+ \Phi ( { \boldsymbol { x } } ) = \int _ { 0 } ^ { 1 } \ \left( G ^ { - 1 } ( \Gamma ( s ) ) \nabla f ( \Gamma ( s ) ) \right) \cdot d \Gamma ( s ) ;
725
+ $$
726
+
727
+ where $\Gamma : [ 0 , 1 ] \to \Omega$ is any curve such that $\Gamma ( 1 ) = x$ and $\Gamma ( 0 ) = x ( 0 )$ which is the initial condition of the dynamics in (3). Note that $\Phi ( x )$ does not depend on $\beta$ because $G ( x )$ does not depend on $\beta$ .
728
+
729
+ We now write the modified SDE (A12) as a second-order Langevin system after introducing a velocity variable $p$ with $q \triangleq x$ and mass $m$ :
730
+
731
+ $$
732
+ \begin{array} { l } { d q = \displaystyle \frac { p } { m } d t } \\ { d p = - ( S + A ) \ \frac { p } { m } d t - \nabla _ { q } \Phi ( q ) d t + \sqrt { 2 \beta ^ { - 1 } S } d W ( t ) . } \end{array}
733
+ $$
734
+
735
+ The key idea in Yin and Ao (2006) is to compute the Fokker-Planck equation of the system above and take its zero-mass limit. The steady-state distribution of this equation, which is also known as the Klein-Kramer’s equation, is
736
+
737
+ $$
738
+ \rho ^ { \mathrm { s s } } ( q , p ) = \frac { 1 } { Z ^ { \prime } ( \beta ) } \exp \left( - \beta \Phi ( q ) - \frac { \beta p ^ { 2 } } { 2 m } \right) ;
739
+ $$
740
+
741
+ where the position and momentum variables are decoupled. The zero-mass limit is given by
742
+
743
+ $$
744
+ \begin{array} { r l } & { \rho _ { t } = \nabla \cdot G \left( \nabla \Phi \rho + \beta ^ { - 1 } \nabla \rho \right) , } \\ & { \quad = \nabla \cdot \left( D \nabla \Phi \rho + Q \nabla \Phi \rho + \left( D + Q \right) \beta ^ { - 1 } \nabla \rho \right) } \\ & { \quad = \nabla \cdot \left( D \nabla \Phi \rho + Q \nabla \Phi \rho \right) + \nabla \cdot \left( D \beta ^ { - 1 } \nabla \rho \right) + \beta ^ { - 1 } \underbrace { \nabla \cdot \left( Q \nabla \right) \rho } _ { * } } \end{array}
745
+ $$
746
+
747
+ We now exploit the fact that $Q$ is defined to be an anti-symmetric matrix. Note that $\Sigma _ { i , j } \partial _ { i } \partial _ { j } \left( Q _ { i j } \rho \right) { = } 0$ because $Q$ is anti-symmetric. Rewrite the third term on the last step $( \ast )$ as
748
+
749
+ $$
750
+ \begin{array} { l } { { \nabla \cdot ( Q \nabla \rho ) = \displaystyle \sum _ { i j } \partial _ { i } \Big ( Q _ { i j } \partial _ { j } \rho \Big ) } } \\ { ~ } \\ { { = - \displaystyle \sum _ { i j } \partial _ { i } \Big ( \partial _ { j } Q _ { i j } \Big ) \rho } } \\ { { = - \nabla \cdot \Big ( \nabla \cdot Q \Big ) \rho . } } \end{array}
751
+ $$
752
+
753
+ We now use the fact that (3) has $\rho ^ { \mathrm { s s } } \propto e ^ { - \beta \Phi }$ as the steady-state distribution as well. Since the steady-state distribution is uniquely determined by a Fokker-Planck equation, the two equations (FP) and (A16) are the same. Let us decompose the second term in (FP):
754
+
755
+ $$
756
+ \begin{array} { l } { { \displaystyle \beta ^ { - 1 } \sum _ { i , j } \partial _ { i } \partial _ { j } \Big [ D _ { i j } ( x ) \rho ( x ) \Big ] } } \\ { { \displaystyle = \beta ^ { - 1 } \sum _ { i , j } \partial _ { i } \big \{ \left( \partial _ { j } D _ { i j } \right) \rho \big \} + \beta ^ { - 1 } \sum _ { i , j } \partial _ { i } \big \{ D _ { i j } \partial _ { j } \rho \big \} } . } \end{array}
757
+ $$
758
+
759
+ Observe that the brown terms are equal. Moving the blue terms together and matching the drift terms in the two Fokker-Planck equations then gives
760
+
761
+ $$
762
+ \nabla f = \left( D + Q \right) \nabla \Phi - \beta ^ { - 1 } \nabla \cdot D - \beta ^ { - 1 } \nabla \cdot Q
763
+ $$
764
+
765
+ The critical points of $\Phi$ are different from those of the original loss $f$ by a term that is $\beta ^ { - 1 } \nabla \cdot \mathbf { \tau } ( D + Q )$
parse/train/HyWrIgW0W/HyWrIgW0W_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyWrIgW0W/HyWrIgW0W_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyWrIgW0W/HyWrIgW0W_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyeqPJHYvH/HyeqPJHYvH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyeqPJHYvH/HyeqPJHYvH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1e4Q6EtDH/S1e4Q6EtDH.md ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TENSORIZED EMBEDDING LAYERS FOR EFFICIENT MODEL COMPRESSION
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The embedding layers transforming input words into real vectors are the key components of deep neural networks used in natural language processing. However, when the vocabulary is large, the corresponding weight matrices can be enormous, which precludes their deployment in a limited resource setting. We introduce a novel way of parametrizing embedding layers based on the Tensor Train (TT) decomposition, which allows compressing the model significantly at the cost of a negligible drop or even a slight gain in performance. We evaluate our method on a wide range of benchmarks in natural language processing and analyze the trade-off between performance and compression ratios for a wide range of architectures, from MLPs to LSTMs and Transformers.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep neural networks (DNNs) typically used in natural language processing (NLP) employ large embeddings layers, which map the input words into continuous representations and usually have the form of lookup tables. Despite such simplicity and, arguably because of it, the resulting models are cumbersome, which may cause problems in training and deploying them in a limited resource setting. Thus, the compression of large neural networks and the development of novel lightweight architectures have become essential problems in NLP research.
12
+
13
+ One way to reduce the number of parameters in the trained model is to imply a specific structure on its weight matrices (e.g., assume that they are low-rank or can be well approximated by low-rank tensor networks). Such approaches are successful at compressing the pre-trained models, but they do not facilitate the training itself. Furthermore, they usually require an additional fine-tuning stage to recover the performance of the original model.
14
+
15
+ In this paper, we introduce a new, parameter efficient embedding layer, termed TT–embedding, which can be plugged in into any model and trained end-to-end. The benefits of our compressed TT–layer are twofold. Firstly, instead of storing huge embedding matrix, we store a sequence of much smaller 2-dimensional and 3-dimensional tensors, necessary for reconstructing the required embeddings, which allows compressing the model significantly at the cost of a negligible performance drop. Secondly, the overall number of parameters can be relatively small (and constant) during the whole training stage, which allows to use larger batches or train efficiently in a case of limited resources.
16
+
17
+ To validate the efficiency of the proposed approach, we have tested it on several popular NLP tasks. In our experiments, we have observed that the standard embeddings can be replaced by TT–embeddings with the compression ratio of $1 - 3$ orders without any significant drop (and sometimes even with a slight gain) of the metric of interest. Specifically, we report the following compression ratios of the embedding layers: 441 on the IMDB dataset with $0 . 2 \%$ absolute increase in classification accuracy; 15 on the WMT 2014 En–De dataset with 0.3 drop in the BLEU score.
18
+
19
+ Additionally, we have also evaluated our algorithm on a task of binary classification based on a large number of categorical features. More concretely, we applied TT–embedding to the click through rate (CTR) prediction problem, a crucial task in the field of digital advertising. Neural networks, typically used for solving this problem, while being rather elementary, include a large number of embedding layers of significant size. As a result, a majority of model parameters that represent these layers, may occupy hundreds of gigabytes of space. We show that TT–embedding not only considerably reduces the number of parameters in such models, but also sometimes improves their accuracy.
20
+
21
+ # 2 RELATED WORK
22
+
23
+ In recent years, a large body of research was devoted to compressing and speeding up various components of neural networks used in NLP tasks. Joulin et al. (2016) adapted the framework of product quantization to reduce the number of parameters in linear models used for text classification. See et al. (2016) proposed to compress LSTM-based neural machine translation models with pruning algorithms. Lobacheva et al. (2017) showed that the recurrent models could be significantly sparsified with the help of variational dropout (Kingma et al., 2015). Chen et al. (2018b) proposed more compact K-way D-dimensional discrete encoding scheme to replace the “one-hot” encoding of categorical features, such as words in NLP taks. Very recently, Chen et al. (2018a) and Variani et al. (2018) introduced GroupReduce and WEST, two very efficient compression methods for the embedding and softmax layers, based on structured low-rank matrix approximation. Concurrently, Lam (2018) proposed the quantization algorithm for compressing word vectors and showed the superiority of the obtained embeddings on word similarity, word analogy, and question answering tasks.
24
+
25
+ Tensor methods have also been already successfully applied to neural networks compression. Novikov et al. (2015) coined the idea of reshaping weights of fully-connected layers into high-dimensional tensors and representing them in Tensor Train (TT) (Oseledets, 2011) format. This approach was later extended to convolutional (Garipov et al., 2016) and recurrent (Yang et al., 2017; Tjandra et al., 2017; Yu et al., 2017) neural networks. Furthermore, Lebedev et al. (2015) showed that convolutional layers could be also compressed with canonical (CP) tensor decomposition (Carroll & Chang, 1970; Harshman, 1970). Finally, Wang et al. (2018) compressed both fully-connected and convolutional layers with Tensor Ring decomposition (Zhao et al., 2016). While all these methods allowed to reduce the number of parameters in the networks dramatically, they mostly capitalized on heavy fullyconnected and convolutional layers (present in AlexNet (Krizhevsky et al., 2012) or VGG (Simonyan & Zisserman, 2014)), which became outdated in the following years. Recently, Ma et al. (2019) succesfully applied Block-Term Tensor Decomposition to the compression of self-attention modules in the Transformer (Vaswani et al., 2017) architecture. In this work, we show the benefits of applying tensor machinery to the compression of embedding layers, which are still widely used in NLP.
26
+
27
+ # 3 TENSOR TRAIN EMBEDDING
28
+
29
+ In this section, we briefly introduce the necessary notation and present the algorithm for training the TT–embedding layer. Hereinafter, by $N$ -way tensor $_ { x }$ we mean a multidimensional array:
30
+
31
+ $$
32
+ \pmb { \chi } \in \mathbb { R } ^ { I _ { 1 } \times I _ { 2 } \times \cdots \times I _ { N } } .
33
+ $$
34
+
35
+ with entries $\pmb { \chi } ( i _ { 1 } , \dots , i _ { N } )$ , such that $\{ 0 \leq i _ { k } < I _ { k } \} _ { k = 1 } ^ { N }$
36
+
37
+ # 3.1 MOTIVATION
38
+
39
+ Since most of the parameters in the NLP models occupy the embedding layers, we can greatly reduce size of the entire model by compressing these layers. Our goal is to replace the standard embedding matrix with a more compact, yet powerful and trainable, representation which would allow us to efficiently map words into vectors.
40
+
41
+ The simplest approach to compactly represent a matrix of a large size is to use the low–rank matrix factorization, which treats matrix $\mathbf { E } \in \mathbb { R } ^ { I \times J }$ as a product of two matrices $\mathbf { E } = \mathbf { U } \mathbf { V } ^ { \top }$ . Here $\mathbf { U } \in \mathbb { R } ^ { I \times R }$ and $V \in \mathbb { R } ^ { J \times R }$ are much “thinner” matrices, and $R$ is the rank hyperparameter. Note that rather than training the model with the standard embedding layer, and then trying to compress the obtained embedding, we can initially seek the embedding matrix in the described low–rank format. Then, for evaluation and training, the individual word embedding $\mathbf { E } [ i , : ]$ can be computed as a product $\mathbf { U } [ i , : ] \mathbf { V } ^ { \top }$ which does not require materializing the full matrix $\mathbf { E }$ . This approach reduces the number of degrees of freedom in the embedding layer from $I J$ to $( I + J ) R$ .
42
+
43
+ However, typically, in the NLP tasks the embedding dimension $J$ is much smaller than the vocabulary size $I$ , and obtaining significant compression ratio using low-rank matrix factorization is problematic. In order to preserve the model performance, the rank $R$ cannot be taken very small, and the compression ratio is bounded by $\begin{array} { r } { \frac { I J ^ { \bullet } } { ( I + J ) R } \le \frac { J } { R } } \end{array}$ , which is close to 1 for usually full-rank embedding matrix (see Figure 1 in Chen et al. (2018b)). To overcome this bound and achieve significant compression ratio even for matrices of disproportional dimensionalities, we reshape them into multidimensional tensors and apply the Tensor Train decomposition, which allows for more compact representation, where the number of parameters falls down to logarithmic with respect to $I$ .
44
+
45
+ # 3.2 TENSOR TRAIN DECOMPOSITION
46
+
47
+ A tensor $_ { x }$ is said to be represented in the Tensor Train (TT) format (Oseledets, 2011) if each element of $_ { x }$ can be computed as:
48
+
49
+ $$
50
+ \pmb { \chi } ( i _ { 1 } , i _ { 2 } , \dots , i _ { d } ) = \sum _ { r _ { 1 } = 1 } ^ { R _ { 1 } } \sum _ { r _ { 2 } = 1 } ^ { R _ { 2 } } \cdots \sum _ { r _ { N - 1 } = 1 } ^ { R _ { N - 1 } } \pmb { \mathcal { G } } ^ { ( 1 ) } ( i _ { 1 } , r _ { 1 } ) \pmb { \mathcal { G } } ^ { ( 2 ) } ( r _ { 1 } , i _ { 2 } , r _ { 2 } ) \dots \pmb { \mathcal { G } } ^ { ( N ) } ( r _ { N - 1 } , i _ { N } ) ,
51
+ $$
52
+
53
+ where the tensors $\pmb { \mathcal { G } } ^ { ( k ) } \in \mathbb { R } ^ { R _ { k - 1 } \times I _ { k } \times R _ { k } }$ are the so-called $T T$ –cores and $R _ { 0 } = R _ { N } = 1$ by definition. The minimal values of {Rk}N−1k=1 for which the TT–decomposition exists are called TT–ranks. Note,
54
+
55
+ $$
56
+ \pmb { \mathscr { X } } ( i _ { 1 } , \dots , i _ { N } ) = \underbrace { \pmb { \mathscr { G } } ^ { ( 1 ) } [ i _ { 1 } , : ] } _ { 1 \times R _ { 1 } } \underbrace { \pmb { \mathscr { G } } ^ { ( 2 ) } [ : , i _ { 2 } , : ] } _ { R _ { 1 } \times R _ { 2 } } \cdot \underbrace { \pmb { \mathscr { G } } ^ { ( N - 1 ) } [ : , i _ { N - 1 } , : ] } _ { R _ { N - 2 } \times R _ { N - 1 } } \underbrace { \pmb { \mathscr { G } } ^ { ( N ) } [ : , i _ { N } ] } _ { R _ { N - 1 } \times 1 } ,
57
+ $$
58
+
59
+ where $\mathcal { G } ^ { ( k ) } [ : , i _ { k } , : ]$ stands for the slice (a subset of a tensor with some indices fixed) of the corresponding TT–core G(k).
60
+
61
+ The number of degrees of freedom in such a decomposition can be evaluated as $\begin{array} { r } { \sum _ { k = 1 } ^ { N } R _ { k - 1 } I _ { k } R _ { k } } \end{array}$ . Thus, in the case of small ranks, the total number of parameters required to store a tensor in TT– representation is significantly smaller than $\textstyle \prod _ { k = 1 } ^ { N } I _ { k }$ parameters required to store the full tensor of the corresponding size. This observation makes the application of the TT–decomposition appealing in many problems dealing with extremely large tensors.
62
+
63
+ # 3.3 TT–MATRIX
64
+
65
+ Let $\mathbf { X } \in \mathbb { R } ^ { I \times J }$ be a matrix of size $I \times J$ . Given two arbitrary factorizations of its dimensions into natural numbers, $\begin{array} { r } { I = \prod _ { k = 1 } ^ { N } I _ { k } } \end{array}$ and $\begin{array} { r } { J = \prod _ { k = 1 } ^ { N } J _ { k } } \end{array}$ , we can reshape1 and transpose this matrix into an $N$ -way tensor $\pmb { \chi } \in \mathbb { R } ^ { I _ { 1 } J _ { 1 } \times I _ { 2 } J _ { 2 } \times \cdots \times I _ { N } J _ { N } }$ and then apply the TT–decomposition to it, resulting in a more compact representation.
66
+
67
+ More concretely, define the bijections $\pmb { \mathcal { T } } ( i ) = ( i _ { 1 } , \ldots , i _ { N } )$ and $\mathcal { I } ( j ) = ( j _ { 1 } , . . . , j _ { N } )$ that map row and column indices $i$ and $j$ of the matrix $X$ to the $N$ -dimensional vector-indices such that $0 \leq i _ { k } < I _ { k } , \ 0 \leq j _ { k } < J _ { k } , \ \forall k = 1 , \ldots , N$ . From the matrix $\mathbf { X }$ we can form an $N$ -way tensor $_ { x }$ whose $k$ -th dimension is of length $I _ { k } J _ { k }$ and is indexed by the tuple $( i _ { k } , j _ { k } )$ . This tensor is then represented in the TT–format:
68
+
69
+ $$
70
+ \pmb { \mathscr { X } } ( ( i _ { 1 } , j _ { 1 } ) \dots ( i _ { N } , j _ { N } ) ) = \pmb { \mathscr { G } } ^ { ( 1 ) } [ ( i _ { 1 } , j _ { 1 } ) , : ] \dots \pmb { \mathscr { G } } ^ { ( N ) } [ : , ( i _ { N } , j _ { N } ) ] .
71
+ $$
72
+
73
+ Such representation of the matrix in the TT–format is called $T T$ –matrix (Oseledets, 2010; Novikov et al., 2015) and is also known as Matrix Product Operator (Pirvu et al., 2010) in physics literature. The factorizations $( I _ { 1 } , I _ { 2 } , \ldots I _ { N } ) \times ( J _ { 1 } , J _ { 2 } , \ldots J _ { N } )$ will be referred to as the shape of TT–matrix, or TT–shapes. The process of constructing the TT–matrix from the standard matrix is visualized in Figure 1 for the tensor of order 3. Note, that in this case the TT–cores are in fact 4-th order tensors, but all the operations defined for tensors in the TT–format are naturally extended to TT–matrices.
74
+
75
+ # 3.4 TT–EMBEDDING
76
+
77
+ By TT–embedding, we call a layer with trainable parameters (TT–cores) represented as a TT–matrix $\varepsilon$ of the underlying tensor shape $( I _ { 1 } , I _ { 2 } , \ldots I _ { N } ) \times ( J _ { 1 } , J _ { 2 } , \ldots J _ { N } )$ , which can be transformed into a valid embedding layer TT–cores one has also t $\boldsymbol { E } \in \mathbb { R } ^ { I \times J }$ , with he TT– $\begin{array} { r } { I = \prod _ { k = 1 } ^ { N } I _ { k } } \end{array}$ and are $\begin{array} { r } { J = \prod _ { k = 1 } ^ { N } J _ { k } } \end{array}$ . To specify the shapes oferparameters of the layer and explicitly define the total compression ratio.
78
+
79
+ ![](images/ebd295ae5cc2824bf887c0465a9dd884f08ef5f1083540065ed0ec8a9e1493ae.jpg)
80
+ Figure 1: Construction of the TT–matrix from the standard embedding matrix. Blue color depicts how the single element in the initial matrix is transformed into the product of the highlighted vectors and matrices in the TT–cores.
81
+
82
+ In order to compute the embedding for a particular word indexed $i$ in the vocabulary, we first map the row index $i$ into the $N$ -dimensional vector index $( i _ { 1 } , \dots , i _ { N } )$ , and then calculate components of the embedding with formula (1). Note, that the computation of all its components is equivalent to selecting the particular slices in TT-cores (slices of shapes $J _ { 1 } \times R _ { 1 }$ in $\pmb { \mathcal { G } } ^ { ( 1 ) }$ , $R _ { 1 } \times J _ { 2 } \times R _ { 2 }$ in ${ \mathfrak { g } } ^ { ( 2 ) }$ and so on) and performing a sequence of matrix multiplications, which is executed efficiently in modern linear algebra packages, such as BLAS. Pseudocode for the procedure of computing the mapping $i \to ( i _ { 1 } , \dots , i _ { N } )$ is given in Appendix A.
83
+
84
+ In order to construct TT–embedding layer for a vocabulary of size $I$ and embedding dimension $J$ , and to train a model with such a layer, one has to perform the following steps.
85
+
86
+ • Provide factorizations of $I$ and $J$ into factors $I ~ = ~ I _ { 1 } ~ \times ~ I _ { 2 } ~ \times ~ \cdot \cdot ~ \times ~ I _ { N }$ and $J = J _ { 1 } \times J _ { 2 } \times \cdot \cdot \cdot \times J _ { N }$ , and specify the set of TT–ranks $\{ R _ { 1 } , R _ { 2 } , \ldots , R _ { N - 1 } \}$ .
87
+ • Initialize the set of parameters of the embedding $\begin{array} { r } { \Theta = \{ \pmb { \mathcal { G } } ^ { ( k ) } \in \mathbb { R } ^ { R _ { k - 1 } \times I _ { k } \times J _ { k } \times R _ { k } } \} _ { k = 1 } ^ { N } , } \end{array}$ . Concrete initialization scenarios are discussed further in the text.
88
+ • During training, given a batch of indices $\{ i _ { 1 } , i _ { 2 } , \dots i _ { b } \}$ , compute the corresponding embeddings $\{ \mathbf { e } _ { 1 } , \mathbf { e } _ { 2 } , \ldots , \mathbf { e } _ { b } \}$ using Eq. (1) and Algorithm 1.
89
+ • Computed embeddings can be followed by any standard layer such as LSTM (Hochreiter & Schmidhuber, 1997) or self-attention (Vaswani et al., 2017), and trained with backpropagation since they differentially depend on the parameters $\Theta$ .
90
+
91
+ TT–embedding implies a specific structure on the order of tokens in the vocabulary (the order of rows in the embedding matrix), and determining the optimal order is an appealing problem to solve. However, we leave this problem for future work and use the order produced by the standard tokenizer (sorted by frequency) in our current experiments.
92
+
93
+ We also experimented with a more general form of TT-decomposition, namely Tensor Ring decomposition (Zhao et al., 2016; Wang et al., 2018). This decomposition by construction has the appealing property of being circular permutation invariant (and, thus, more robust with respect to the order of the tokens), which could have potentially provided an improvement over the TT-based models with simple frequency based ordering. Our experiments with TR decomposition on Transformer for NMT can be found in Appendix B.
94
+
95
+ Initialization The standard way to initialize an embedding matrix $\mathbf { E } \in \mathbb { R } ^ { I \times J }$ is via, e.g., Glorot initializer (Glorot & Bengio, 2010), which initializes each element as $\begin{array} { r } { \mathbf { E } ( i , j ) \sim \mathcal { N } \left( 0 , \frac { \mathrm { \bar { ~ } 2 ~ } } { I + J } \right) } \end{array}$ . For the TT–embedding, we can only initialize the TT–cores, and the distribution of the elements of the resulting matrix $\varepsilon$ is rather non–trivial. However, it is easy to verify that if we initialize each TT–core element as $\mathscr { G } ^ { ( k ) } ( r _ { k - 1 } , i _ { k } , r _ { k } ) \sim \mathcal { N } ( 0 , 1 )$ , the resulting distribution of the matrix elements $\pmb { \varepsilon } ( i , j )$ has the property that $\mathbb { E } [ \pmb { \mathscr { E } } ( i , j ) ] = 0$ and $\begin{array} { r } { \mathrm { V a r } [ \pmb { \mathcal { E } } ( i , j ) ] = \prod _ { k = 1 } ^ { N } R _ { k } = R ^ { 2 } } \end{array}$ . Capitalizing on this observation, in order to obtain the desired variance $\mathrm { V a r } [ \pmb { \mathcal { E } } ( i , j ) ] = \sigma ^ { 2 }$ while keeping $\mathbb { E } [ \pmb { \mathscr { E } } ( i , j ) ] = 0$ , we can simply initialize each TT–core as
96
+
97
+ $$
98
+ { \pmb \mathcal { G } } ^ { ( k ) } ( r _ { k - 1 } , i _ { k } , r _ { k } ) \sim { \mathcal { N } } \left( 0 , \left( \frac { \sigma } { R } \right) ^ { 2 / N } \right) .
99
+ $$
100
+
101
+ The resulting distribution is not Gaussian, however, it approaches the Gaussian distribution with the increase of the TT–rank (Figure 2).
102
+
103
+ ![](images/2275e9dadcc11eefddfcb03b6f1471939b14e8175df07e2bde19088138de7c5e.jpg)
104
+ Figure 2: Distribution of matrix elements of the TT–matrix of shape $( 5 , 5 , 5 , 5 ) \times ( 5 , 5 , 5 , 5 )$ initialized by formula (2) with $\sigma = 1$ . As the TT–rank increases, the resulting distribution approaches $\mathcal { N } ( 0 , 1 )$ .
105
+
106
+ In our experiments, we have used the modified Glorot initializer implemented by formula (2), which greatly improved performance, as opposed to initializing TT–cores simply via a standard normal distribution. It is also possible to initialize TT–embedding layer by converting the learned embedding matrix into TT–format using the TT–SVD algorithm (Oseledets, 2011), however, this approach requires the pretrained embedding matrix and does not exhibit better performance in practice.
107
+
108
+ Hyperparameter selection Our embedding layer introduces two additional structure-specific hyperparameters, namely TT–shapes and TT–ranks.
109
+
110
+ TT–embedding does not require the vocabulary size $I$ to be represented exactly as the product of factors $I _ { 1 } , \ldots , I _ { N }$ , in fact, any factorization $\begin{array} { r } { \dot { \prod _ { k = 1 } ^ { k } { I _ { k } } } = \widetilde { I } \ge \dot { I } } \end{array}$ will suffice. However, in order to achieve the highest possible compression ratio for a fixed value of $\widetilde { I }$ , the factors $\{ I _ { k } \} _ { k = 1 } ^ { N }$ should be as close to each other as possible. Our implementation includes a simple automated procedure for selecting a good values of $\{ I _ { k } \} _ { k = 1 } ^ { N }$ during TT–embedding initialization. The factors $J _ { 1 } , \ldots , J _ { N }$ are defined by the embedding dimensionality $J$ which can be easily chosen to support good factorization, e.g., $5 1 2 = 8 \times 8 \times 8$ or $4 8 0 = 6 \times 5 \times 4 \times 4$ .
111
+
112
+ The values of TT–ranks directly define the compression ratio, so choosing them to be too small or too large will result into either significant performance drop or little reduction of the number of parameters. In our experiments, we set all TT–ranks to 16 for the problems with small vocabularies and $6 4 - 1 9 2$ for the problems with larger vocabularies, which allowed us to achieve significant compression of the embedding layer, at the cost of a tiny sacrifice in the metrics of interest.
113
+
114
+ # 4 EXPERIMENTS
115
+
116
+ Code We have implemented TT–embeddings described in Section 3 in Python using PyTorch (Paszke et al., 2017). The code is available at the anonymous repository https://github.com/ttembedding/tt-embeddings.
117
+
118
+ Experimental setup We tested our approach on several popular NLP tasks:
119
+
120
+ • Sentiment analysis — as a starting point in our experiments, we test TT–embeddings on a rather simple task of predicting polarity of a sentence.
121
+ • Neural Machine Translation (NMT) — to verify the applicability of TT–embeddings in more practical problems, we test it on a more challenging task of machine translation.
122
+ • Language Modeling (LM) — then, we evaluate TT–embeddings on language modeling tasks in the case of extremely large vocabularies.
123
+
124
+ • Click Through Rate (CTR) prediction — finally, we show that TT–embeddings can be applied for the binary classification with categorical features of significant cardinality.
125
+
126
+ To prove the generality and wide applicability of the proposed approach, we tested it on various architectures, such as MLPs (CTR), LSTMs (sentiment analysis), and Transformers (NMT, LM).
127
+
128
+ Note that Transformers in LM and NMT use the same weight matrix for their embedding and softmax layers (Press & Wolf, 2016; Inan et al., 2016) which already significantly reduces model size. Untying weights and tensorizing the embedding layer only will lead to the increase in the number of parameters instead of compression. In our experiments, we use two separate TT-decompositions of the same shape for embedding and softmax layers and report the compression ratios as $\frac { \vert V \vert \times d _ { \mathrm { m o d e l } } } { 2 \times \mathrm { T T - p a r a m s } }$ .
129
+
130
+ # 4.1 SENTIMENT ANALYSIS
131
+
132
+ For this experiment, we have used the IMDB dataset (Maas et al., 2011) with two categories, and the Stanford Sentiment Treebank (SST) (Socher et al., 2013) with five categories. We have taken the most frequent 25000 words for the IMDB dataset and 17200 for SST, embedded them into a $J .$ –dimensional space using either standard embedding or TT–embedding layer, and performed classification using a standard bidirectional two–layer LSTM with hidden size $h = 1 2 8$ , and dropout rate $P _ { \mathrm { d r o p } } = 0 . 5$ .
133
+
134
+ Our findings are summarized in Table 1. We observe that the models with largely compressed embedding layers can perform equally or even better than the full uncompressed models. This suggests that learning individual independent embeddings for each particular word is superfluous, as the expressive power of LSTM is sufficient to make use of these intertwined, yet more compact embeddings. Moreover, slightly better test accuracy of the compressed models in certain cases (e.g., for the SST dataset of a rather small size) insinuates that imposing specific tensorial low–rank structure on the embedding matrix can be viewed as a special form of regularization, thus potentially improving model generalization. A detailed and comprehensive test of this hypothesis goes beyond the scope of this paper, and we leave it for future work.
135
+
136
+ Table 1: Sentiment analysis, LSTM on IMDB and SST datasets. Embedding compression is calculated as the ratio between the number of parameters in the full embedding layer and TT–embedding layer. The LSTM parts are identical in both models, and the TT–ranks were set to 16 in these experiments.
137
+
138
+ <table><tr><td>Dataset</td><td>Model</td><td>Embedding shape</td><td>Test acc.</td><td>Emb compr.</td><td>Total params</td></tr><tr><td rowspan="4">IMDB</td><td>Full</td><td>25000 × 256</td><td>0.886</td><td>1</td><td>7.19M</td></tr><tr><td>TT1</td><td>(25,30,40) × (4,8,8)</td><td>0.871</td><td>93</td><td>0.86M</td></tr><tr><td>TT2</td><td>(10,10,15,20) × (4,4,4,4)</td><td>0.888</td><td>232</td><td>0.82M</td></tr><tr><td>TT3</td><td>(5,5,5,5,6,8) ×( (2,2,2,2,4,4)</td><td>0.897</td><td>441</td><td>0.81M</td></tr><tr><td rowspan="4">SST</td><td>Full</td><td>17200 × 256</td><td>0.374</td><td>1</td><td>5.19M</td></tr><tr><td>TT1</td><td>(24,25,30) × (4,8,8)</td><td>0.415</td><td>78</td><td>0.85M</td></tr><tr><td>TT2</td><td>(10,10,12,15) × (4,4,4,4)</td><td>0.411</td><td>182</td><td>0.82M</td></tr><tr><td>TT3</td><td>(4,5,5,5,6,6) × (2,2,2,2,4,4)</td><td>0.399</td><td>307</td><td>0.81M</td></tr></table>
139
+
140
+ # 4.2 NEURAL MACHINE TRANSLATION
141
+
142
+ For this experiment, we have trained the Transformer-big model $\dot { d } _ { \mathrm { m o d e l } } = 1 0 2 4$ , $d _ { \mathrm { f f } } = 4 0 9 6$ , $h = 1 6$ ) from (Vaswani et al., 2017) on WMT 2014 English–German dataset consisting of roughly 4.5 million sentence pairs. We evaluated on newstest2014 dataset using beam search with a beam size of 4 and no length penalty. We did not employ checkpoint averaging and used the last checkpoint to compute the BLEU score. Sentences were tokenized with YouTokenToMe2 byte-pair-encodings, resulting in a joint vocabulary of 32768 tokens. For the full list of hyperparameters, see Appendix C.
143
+
144
+ Our results are summarized in Table 2. We observe that even in this rather challenging task, both embedding and softmax layers can be compressed significantly, at the cost of a small drop in the
145
+
146
+ BLEU score. However, with the increase of compression factor, the performance deteriorates rapidly. Compared to the sentiment analysis, NMT is a much more complex task which benefits more from additional capacity (in the form of more powerful RNN or more transformer blocks) rather than regularization (Bahdanau et al., 2014; Vaswani et al., 2017; Wu et al., 2019), which may explain why we did not manage to improve the model by regularizing its embedding layers.
147
+
148
+ TT-embeddings induce $8 \%$ training iteration time overhead if compared to the baseline Transformerbig due to our current implementation heavy relying on slow torch.einsum function while standard embedding and softmax layers make use of fast and highly-optimized Tensor Cores for mixed-precision training. We expect a dedicated CUDA kernel to be much more efficient.
149
+
150
+ Table 2: NMT, Transformer-big on WMT‘14 English-to-German dataset. Both case-sensitive tokenized BLEU and de-tokenized SacreBLEU (Post, 2018) on newstest2014 are reported.
151
+
152
+ <table><tr><td>Model</td><td>Embedding shape</td><td>TT rank</td><td>Token BLEU</td><td>Sacre BLEU</td><td>Emb compr.</td><td>Total params</td><td>Iter time</td></tr><tr><td>Big</td><td>32768× 1024</td><td></td><td>29.58</td><td>28.84</td><td>1</td><td>210M</td><td>1.14</td></tr><tr><td>Big+TT1</td><td>(32,32,32) × (8,8,16)</td><td>64</td><td>29.17</td><td>28.53</td><td>15.3</td><td>179M</td><td>1.23</td></tr><tr><td>Big+TT2</td><td>(32,32,32) × (8,8,16)</td><td>48</td><td>28.53</td><td>27.97</td><td>26.8</td><td>178M</td><td>1.22</td></tr><tr><td>Big+TT3</td><td>(32,32,32) × (8,8,16)</td><td>32</td><td>28.26</td><td>27.70</td><td>58.5</td><td>177M</td><td>1.22</td></tr></table>
153
+
154
+ # 4.3 LANGUAGE MODELING
155
+
156
+ We took the Transformer-XL (Dai et al., 2019), an open source3 state-of-the-art language modeling architecture at the time of this writing, and replaced its embedding and softmax layers with TT– factorizations. Then, we tested different model configurations on the WikiText–103 (Merity et al., 2016) dataset and reported the results in Table 3. For the full list of hyperparameters, see Appendix C.
157
+
158
+ Compared to sentiment analysis and NMT, we were not able to achieve that high compression ratios for embedding and softmax layers in LM. However, even moderate 3.8 times compression allowed us to save 100M of weights at the cost of $\sim 1 . 5$ perplexity drop.
159
+
160
+ Table 3: LM, Transformer-XL (Dai et al., 2019) on WikiText-103 dataset.
161
+
162
+ <table><tr><td>Model</td><td>Embedding shape</td><td>TT rank</td><td>Valid PPL</td><td>Test PPL</td><td>Emb compr.</td><td>Total params</td></tr><tr><td>TXL</td><td>267735 × 512</td><td>一</td><td>22.55</td><td>24.37</td><td>1</td><td>192M</td></tr><tr><td>TXL+TT1</td><td>(60,60,75) × (8,8,8)</td><td>192</td><td>24.38</td><td>25.67</td><td>3.8</td><td>94M</td></tr><tr><td>TXL+TT2</td><td>(60,60,75) ×(8,8,8)</td><td>128</td><td>25.53</td><td>26.73</td><td>8.6</td><td>73M</td></tr><tr><td>TXL+TT3</td><td>(60,60,75) ×(8,8,8)</td><td>96</td><td>26.73</td><td>28.04</td><td>15.1</td><td>65M</td></tr></table>
163
+
164
+ # 4.4 CLICK THROUGH RATE PREDICTION
165
+
166
+ Among other applications of the TT–embedding layer, we chose to focus on CTR prediction, a popular task in digital advertising (He et al., 2014). We consider open dataset provided by Criteo for Kaggle Display Advertising Challenge (Criteo Labs, 2014) which consists of 39 categorical features, $4 5 . 8 \mathbf { M }$ samples and is binary labeled according to whether the user clicked on the given advertisement. Unique values of categorical features are bijectively mapped into integers. To reduce the memory footprint, if the size of a corresponding vocabulary is immense (e.g., a cardinality of some features in this dataset is of order $1 0 ^ { 6 }$ ), these integers are further hashed by taking modulus with respect to some fixed number such as $1 0 ^ { 5 }$ . However, due to strong compression properties of TT–embeddings, this is not necessary for our approach, and we consider both full and hashed datasets in our experiments.
167
+
168
+ CTR with the baseline algorithm The task at hand can be treated as a binary classification problem. As a baseline algorithm, we consider the neural network with the following architecture. First, each of the categorical features is passed through a separate embedding layer with embedding size $J$ . After that, the embedded features are concatenated and passed through 4 fully-connected layers of 1024 neurons and ReLU activation functions. In all experiments, we used Adam optimizer with the learning rate equal to 0.0005. Since many input features have a large number of unique values (e.g., 10131227) and storing the corresponding embedding matrices would be costly, we employ the hashing procedure mentioned earlier.
169
+
170
+ CTR with TT–embeddings We substitute the embedding layers with the TT–embedding layers. Besides that, we leave the overall structure of the neural network unchanged with the same parameters as in the baseline approach. Table 4 presents the experimental results on the Criteo CTR dataset. To the best of our knowledge, our loss value is very close to the state-of-the-art result (Juan et al., 2016). These experiments indicate that the substitution of large embedding layers with TT–embeddings leads to significant compression ratios (up to 2011 times) with a slight improvement in the test loss, and up to 4200 with a small drop in the test loss. The total size of the compressed model does not exceed $2 0 ~ \mathrm { { M b } }$ , while the baseline model weighs about $1 6 0 ~ \mathrm { M b }$ . The obtained compression ratio suggests that the usage of TT–embedding layers may be beneficial in CTR prediction tasks.
171
+
172
+ Table 4: CTR prediction. The hashed dataset is constructed as specified in Section 4.4 with hashing value $1 0 ^ { 5 }$ . Embedding layers with more than 2000 unique tokens were replaced by TT–embeddings with shape factorizations consisting of 3 or 4 factors.
173
+
174
+ <table><tr><td>Hash</td><td>Model</td><td>Factorization</td><td>TT rank</td><td>Hidden size</td><td>Test loss</td><td>Emb. compr.</td><td>Total params</td></tr><tr><td rowspan="6">105</td><td>Full</td><td></td><td>一</td><td>1024</td><td>0.4440</td><td>1</td><td>41.2M</td></tr><tr><td>TT1</td><td>3 factors</td><td>16</td><td>1024</td><td>0.4433</td><td>61</td><td>4.7M</td></tr><tr><td>TT2</td><td>4 factors</td><td>16</td><td>1024</td><td>0.4440</td><td>92</td><td>4.5M</td></tr><tr><td>TT3</td><td>3 factors</td><td>2</td><td>128</td><td>0.4515</td><td>2100</td><td>0.53M</td></tr><tr><td>TT4</td><td>4 factors</td><td>2</td><td>128</td><td>0.4530</td><td>4193</td><td>0.53M</td></tr><tr><td>TT1</td><td>3 factors</td><td>16</td><td>1024</td><td>0.4444</td><td>1004</td><td>5.2M</td></tr><tr><td></td><td>TT2</td><td>4 factors</td><td>16</td><td>1024</td><td>0.4438</td><td>2011</td><td>4.7M</td></tr></table>
175
+
176
+ # 5 DISCUSSION AND FUTURE WORK
177
+
178
+ We propose a novel embedding layer, the TT–embedding, for compressing huge lookup tables used for encoding categorical features of significant cardinality, such as the index of a token in natural language processing tasks. The proposed approach, based on the TT–decomposition, experimentally proved to be effective, as it heavily decreases the number of training parameters at the cost of a small deterioration in performance. In addition, our method can be easily integrated into any deep learning framework and trained via backpropagation, while capitalizing on reduced memory requirements and increased training batch size.
179
+
180
+ Our experimental results suggest several appealing directions for future work. First of all, TT– embeddings impose a concrete tensorial low-rank structure on the embedding matrix, which was shown to improve the generalization ability of the networks acting as a regularizer. The properties and conditions of applicability of this regularizer are subject to more rigorous analysis. Secondly, unlike standard embedding, we can introduce non-linearity into TT-cores to improve their expressive power (Khrulkov et al., 2019). Additionally, it is important to understand how the order of tokens in the vocabulary affects the properties of the networks with TT–embedding. We hypothesize that there exists the optimal order of tokens which better exploits the particular structure of TT–embedding and leads to a boost in performance and/or compression ratio. Finally, the idea of applying higher–order tensor decompositions to reduce the number of parameters in neural nets is complementary to more traditional methods such as pruning (Han et al., 2015) and quantization (Hubara et al., 2017; Xu et al., 2018). Thus, it would be interesting to make a thorough comparison of all these methods and investigate whether their combination may lead to even stronger compression.
181
+
182
+ # REFERENCES
183
+
184
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
185
+
186
+ J Douglas Carroll and Jih-Jie Chang. Analysis of individual differences in multidimensional scaling via an n-way generalization of Eckart-Young decomposition. Psychometrika, 35(3), 1970.
187
+
188
+ Patrick H Chen, Si Si, Yang Li, Ciprian Chelba, and Cho-jui Hsieh. GroupReduce: Block-wise low-rank approximation for neural language model shrinking. NIPS, 2018a.
189
+
190
+ Ting Chen, Martin Renqiang Min, and Yizhou Sun. Learning K-way D-dimensional Discrete Codes for Compact Embedding Representations. arXiv preprint arXiv:1806.09464, 2018b.
191
+
192
+ Criteo Labs. Kaggle Display Advertising Challenge, 2014. URL https://www.kaggle.com/ c/criteo-display-ad-challenge.
193
+
194
+ Zihang Dai, Zhilin Yang, Yiming Yang, William W Cohen, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860, 2019.
195
+
196
+ Timur Garipov, Dmitry Podoprikhin, Alexander Novikov, and Dmitry Vetrov. Ultimate tensorization: compressing convolutional and FC layers alike. arXiv preprint arXiv:1611.03214, 2016.
197
+
198
+ Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, pp. 249–256, 2010.
199
+
200
+ Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in Neural Information Processing Systems, pp. 1135–1143, 2015.
201
+
202
+ Richard A Harshman. Foundations of the PARAFAC procedure: Models and conditions for an” explanatory” multimodal factor analysis. UCLA Working Papers in Phonetics, 1970.
203
+
204
+ Xinran He, Junfeng Pan, Ou Jin, Tianbing Xu, Bo Liu, Tao Xu, Yanxin Shi, Antoine Atallah, Ralf Herbrich, Stuart Bowers, et al. Practical lessons from predicting clicks on ads at facebook. In Proceedings of the Eighth International Workshop on Data Mining for Online Advertising, pp. 1–9. ACM, 2014.
205
+
206
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997.
207
+
208
+ Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. Journal of Machine Learning Research, 18(187):1–30, 2017.
209
+
210
+ Hakan Inan, Khashayar Khosravi, and Richard Socher. Tying word vectors and word classifiers: A loss framework for language modeling. arXiv preprint arXiv:1611.01462, 2016.
211
+
212
+ Armand Joulin, Edouard Grave, Piotr Bojanowski, Matthijs Douze, Herve J ´ egou, and Tomas Mikolov. ´ Fasttext. zip: Compressing text classification models. arXiv preprint arXiv:1612.03651, 2016.
213
+
214
+ Yuchin Juan, Yong Zhuang, Wei-Sheng Chin, and Chih-Jen Lin. Field-aware factorization machines for CTR prediction. In Proceedings of the 10th ACM Conference on Recommender Systems, pp. 43–50. ACM, 2016.
215
+
216
+ Valentin Khrulkov, Oleksii Hrinchuk, and Ivan Oseledets. Generalized tensor models for recurrent neural networks. arXiv preprint arXiv:1901.10801, 2019.
217
+
218
+ Durk P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparameterization trick. In Advances in Neural Information Processing Systems, pp. 2575–2583, 2015.
219
+
220
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012.
221
+
222
+ Maximilian Lam. Word2Bits-quantized word vectors. arXiv preprint arXiv:1803.05651, 2018.
223
+
224
+ Vadim Lebedev, Yaroslav Ganin, Maksim Rakhuba, Ivan Oseledets, and Victor Lempitsky. Speedingup convolutional neural networks using fine-tuned CP-decomposition. ICLR, 2015.
225
+
226
+ Ekaterina Lobacheva, Nadezhda Chirkova, and Dmitry Vetrov. Bayesian sparsification of recurrent neural networks. arXiv preprint arXiv:1708.00077, 2017.
227
+
228
+ Xindian Ma, Peng Zhang, Shuai Zhang, Nan Duan, Yuexian Hou, Dawei Song, and Ming Zhou. A tensorized transformer for language modeling. arXiv preprint arXiv:1906.09777, 2019.
229
+
230
+ Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pp. 142–150, Portland, Oregon, USA, June 2011. Association for Computational Linguistics.
231
+
232
+ Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
233
+
234
+ Alexander Novikov, Dmitrii Podoprikhin, Anton Osokin, and Dmitry P Vetrov. Tensorizing neural networks. In Advances in Neural Information Processing Systems, pp. 442–450, 2015.
235
+
236
+ Ivan V Oseledets. Approximation of $2 ^ { d } \times 2 ^ { d }$ matrices using tensor decomposition. SIAM Journal on Matrix Analysis and Applications, 31(4):2130–2145, 2010.
237
+
238
+ Ivan V Oseledets. Tensor-train decomposition. SIAM Journal on Scientific Computing, 33(5): 2295–2317, 2011.
239
+
240
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In NeurIPS 2017 Autodiff Workshop, 2017.
241
+
242
+ Bogdan Pirvu, Valentin Murg, J Ignacio Cirac, and Frank Verstraete. Matrix product operator representations. New Journal of Physics, 12(2):025012, 2010.
243
+
244
+ Matt Post. A call for clarity in reporting bleu scores. arXiv:1804.0877, 2018.
245
+
246
+ Ofir Press and Lior Wolf. Using the output embedding to improve language models. arXiv preprint arXiv:1608.05859, 2016.
247
+
248
+ Abigail See, Minh-Thang Luong, and Christopher D Manning. Compression of neural machine translation models via pruning. arXiv preprint arXiv:1606.09274, 2016.
249
+
250
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
251
+
252
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013.
253
+
254
+ Andros Tjandra, Sakriani Sakti, and Satoshi Nakamura. Compressing recurrent neural network with tensor train. arXiv preprint arXiv:1705.08052, 2017.
255
+
256
+ Ehsan Variani, Ananda Theertha Suresh, and Mitchel Weintraub. WEST: Word Encoded Sequence Transducers. arXiv preprint arXiv:1811.08417, 2018.
257
+
258
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 5998–6008, 2017.
259
+
260
+ Wenqi Wang, Yifan Sun, Brian Eriksson, Wenlin Wang, and Vaneet Aggarwal. Wide compression: Tensor ring nets. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9329–9338, 2018.
261
+
262
+ Felix Wu, Angela Fan, Alexei Baevski, Yann N Dauphin, and Michael Auli. Pay less attention with lightweight and dynamic convolutions. arXiv preprint arXiv:1901.10430, 2019.
263
+
264
+ Yuhui Xu, Yongzhuang Wang, Aojun Zhou, Weiyao Lin, and Hongkai Xiong. Deep neural network compression with single and multiple level quantization. arXiv preprint arXiv:1803.03289, 2018.
265
+
266
+ Yinchong Yang, Denis Krompass, and Volker Tresp. Tensor-train recurrent neural networks for video classification. arXiv preprint arXiv:1707.01786, 2017.
267
+
268
+ Rose Yu, Stephan Zheng, Anima Anandkumar, and Yisong Yue. Long-term forecasting using tensor-train RNNs. arXiv preprint arXiv:1711.00073, 2017.
269
+
270
+ Qibin Zhao, Guoxu Zhou, Shengli Xie, Liqing Zhang, and Andrzej Cichocki. Tensor ring decomposition. arXiv preprint arXiv:1606.05535, 2016.
271
+
272
+ # A MULTIINDEX CONSTRUCTION
273
+
274
+ <table><tr><td>Algorithm 1 The algorithm implementing the bijection I(i) as described in Section 3.3.</td></tr><tr><td>Require: I- vocabulary size,{Ik}=1-an arbitrary factorization of I,i - index of the target</td></tr><tr><td>word in vocabulary.</td></tr><tr><td>Returns: I(i)= (i1,...,in)-N-dimensional index.</td></tr><tr><td>Initialize:L={1,I1,II2,...,II2...IN-1}</td></tr><tr><td>for k = N to 1 do</td></tr><tr><td>ik ←floor(i/[k]) i←i mod L[k]</td></tr><tr><td>end for</td></tr></table>
275
+
276
+ <table><tr><td>Igorithm 2 Tne algorithm implementing tne bijection (i,...,&#x27;N) →ε,inverse to L(ε).</td></tr><tr><td>Require: I - vocabulary size, {Ik}N=1 - an arbitrary factorization of I, (i1..,in)- N- dimensional index.</td></tr><tr><td>Returns: i - index of the target word in vocabulary</td></tr><tr><td>Initialize:L={1,I1,I1I2,...,I1I2...IN-1}</td></tr><tr><td>i↑0</td></tr><tr><td></td></tr><tr><td>for k=1 to N do</td></tr><tr><td>i←i+ik×L[k] end for</td></tr></table>
277
+
278
+ # B TENSOR RING EMBEDDING
279
+
280
+ Tensor Ring (TR) decomposition is a generalization to TT-decomposition where the first and the last cores are 3-dimensional tensors which corresponds to $R _ { 0 } = R _ { N } > 1$ . Formally, a tensor $_ { x }$ is said to be represented in the TR format (Zhao et al., 2016) if each element of $_ { x }$ can be computed as:
281
+
282
+ $$
283
+ \pmb { \mathcal { X } } ( i _ { 1 } , i _ { 2 } , \dots , i _ { d } ) = \sum _ { r _ { 0 } = 1 } ^ { R _ { 0 } } \sum _ { r _ { 1 } = 1 } ^ { R _ { 1 } } \cdots \sum _ { r _ { N - 1 } = 1 } ^ { R _ { N - 1 } } \pmb { \mathcal { G } } ^ { ( 1 ) } ( r _ { 0 } , i _ { 1 } , r _ { 1 } ) \pmb { \mathcal { G } } ^ { ( 2 ) } ( r _ { 1 } , i _ { 2 } , r _ { 2 } ) \dots \pmb { \mathcal { G } } ^ { ( N ) } ( r _ { N - 1 } , i _ { N } , r _ { 0 } ) .
284
+ $$
285
+
286
+ Similar to TT, we can define TR-matrix (see Figure 3) and corresponding TR-embedding layer.
287
+
288
+ ![](images/4c3cbc63e0c62179be64365f490f962e03c18b4bae41365276eeb5f08830cea5.jpg)
289
+ Figure 3: Construction of the TR–matrix from the standard embedding matrix. Blue color depicts how the single element in the initial matrix is transformed into the product of the highlighted matrices.
290
+
291
+ Table 5 shows the performance of different NMT models with both embedding and softmax layers replaced by either TT or TR factorizations. To achieve the same compression factor as the corresponding TT models, TR models should have smaller ranks which negatively affects their performance. Furthermore, TR is more computationally heavy.
292
+
293
+ # C COMPLETE LIST OF HYPERPARAMETERS
294
+
295
+ Table 5: NMT, Transformer-big on WMT‘14 English-to-German dataset. Both case-sensitive tokenized BLEU and de-tokenized SacreBLEU (Post, 2018) on newstest2014 are reported.
296
+
297
+ <table><tr><td>Model</td><td>Embedding shape</td><td>TT rank</td><td>Token BLEU</td><td>Sacre BLEU</td><td>Emb compr.</td><td>Total params</td><td>Iter time</td></tr><tr><td>Big</td><td>32768 × 1024</td><td></td><td>29.58</td><td>28.84</td><td>1</td><td>210M</td><td>1.14</td></tr><tr><td>Big+TT1</td><td>(32,32,32) ×(8,8,16)</td><td>64</td><td>29.17</td><td>28.53</td><td>15.3</td><td>179M</td><td>1.23</td></tr><tr><td>Big+TT2</td><td>(32,32,32) × (8,8,16)</td><td>48</td><td>28.53</td><td>27.97</td><td>26.8</td><td>178M</td><td>1.22</td></tr><tr><td>Big+TT3</td><td>(32,32,32) × (8,8,16)</td><td>32</td><td>28.26</td><td>27.70</td><td>58.5</td><td>177M</td><td>1.22</td></tr><tr><td>Big+TR1</td><td>(32,32,32) × (8,8,16)</td><td>32</td><td>28.64</td><td>28.07</td><td>16</td><td>179M</td><td>1.28</td></tr><tr><td>Big+TR2</td><td>(32,32,32) × (8,8,16)</td><td>16</td><td>28.10</td><td>27.50</td><td>64</td><td>177M</td><td>1.23</td></tr></table>
298
+
299
+ Table 6: Full list of hyperparameters used to train Transformer-big for NMT.
300
+
301
+ <table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Data cleaning max training sequence length in tokens min training sequence length in tokens max source /target difference in tokens max source/target ratio Model</td><td>128 3 25 2.5</td></tr><tr><td>vocabulary size, |V| hidden size,dmodel intermediate FF layer size, dff number of attentionheads,h number of layers in encoder/decoder</td><td>32768 1024 4096 16 6</td></tr><tr><td>Optimization optimizer learning rate betas,(β1,β2) learning rate decay policy weight decay batch size in tokens number of training steps number of warmup steps</td><td>NovoGrad 0.04 (0.95,0.25) cosine 0.0001 393216 80000 4000</td></tr><tr><td>Regularization global dropout, Pdrop label smoothing Inference</td><td>0.2 0.1</td></tr><tr><td>beam search beam size length penalty max source /target difference in tokens</td><td>4 0 50</td></tr></table>
302
+
303
+ Table 7: Full list of hyperparameters used to train Transformer-XL for LM.
304
+
305
+ <table><tr><td>Parameter Model</td><td>Value</td></tr><tr><td>vocabulary size, |V| hidden size,dmodel intermediate FF layer size,dff number of attention heads, h number of layers softmax layer Optimization</td><td>267735 512 2048 8 16 adaptive</td></tr><tr><td>optimizer learning rate betas,(β1, β2) learning rate decay policy weight decay batch size in sequences target sequence length memory sequence length number of training steps number of warmup steps</td><td>NovoGrad 0.025 (0.95,0.25) cosine 0.0001 1024 128 128 150000 1500</td></tr><tr><td>Regularization global dropout, Pdrop</td><td>0.15</td></tr><tr><td>Inference batch size target sequence length memory sequence length max positional encodings length</td><td>4 128 640 400</td></tr></table>
parse/train/S1e4Q6EtDH/S1e4Q6EtDH_content_list.json ADDED
@@ -0,0 +1,1593 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "TENSORIZED EMBEDDING LAYERS FOR EFFICIENT MODEL COMPRESSION ",
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
+ 170,
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": "The embedding layers transforming input words into real vectors are the key components of deep neural networks used in natural language processing. However, when the vocabulary is large, the corresponding weight matrices can be enormous, which precludes their deployment in a limited resource setting. We introduce a novel way of parametrizing embedding layers based on the Tensor Train (TT) decomposition, which allows compressing the model significantly at the cost of a negligible drop or even a slight gain in performance. We evaluate our method on a wide range of benchmarks in natural language processing and analyze the trade-off between performance and compression ratios for a wide range of architectures, from MLPs to LSTMs and Transformers. ",
40
+ "bbox": [
41
+ 233,
42
+ 266,
43
+ 766,
44
+ 405
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 178,
54
+ 433,
55
+ 336,
56
+ 448
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deep neural networks (DNNs) typically used in natural language processing (NLP) employ large embeddings layers, which map the input words into continuous representations and usually have the form of lookup tables. Despite such simplicity and, arguably because of it, the resulting models are cumbersome, which may cause problems in training and deploying them in a limited resource setting. Thus, the compression of large neural networks and the development of novel lightweight architectures have become essential problems in NLP research. ",
63
+ "bbox": [
64
+ 174,
65
+ 463,
66
+ 825,
67
+ 546
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "One way to reduce the number of parameters in the trained model is to imply a specific structure on its weight matrices (e.g., assume that they are low-rank or can be well approximated by low-rank tensor networks). Such approaches are successful at compressing the pre-trained models, but they do not facilitate the training itself. Furthermore, they usually require an additional fine-tuning stage to recover the performance of the original model. ",
74
+ "bbox": [
75
+ 174,
76
+ 554,
77
+ 825,
78
+ 625
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this paper, we introduce a new, parameter efficient embedding layer, termed TT–embedding, which can be plugged in into any model and trained end-to-end. The benefits of our compressed TT–layer are twofold. Firstly, instead of storing huge embedding matrix, we store a sequence of much smaller 2-dimensional and 3-dimensional tensors, necessary for reconstructing the required embeddings, which allows compressing the model significantly at the cost of a negligible performance drop. Secondly, the overall number of parameters can be relatively small (and constant) during the whole training stage, which allows to use larger batches or train efficiently in a case of limited resources. ",
85
+ "bbox": [
86
+ 174,
87
+ 631,
88
+ 825,
89
+ 728
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "To validate the efficiency of the proposed approach, we have tested it on several popular NLP tasks. In our experiments, we have observed that the standard embeddings can be replaced by TT–embeddings with the compression ratio of $1 - 3$ orders without any significant drop (and sometimes even with a slight gain) of the metric of interest. Specifically, we report the following compression ratios of the embedding layers: 441 on the IMDB dataset with $0 . 2 \\%$ absolute increase in classification accuracy; 15 on the WMT 2014 En–De dataset with 0.3 drop in the BLEU score. ",
96
+ "bbox": [
97
+ 174,
98
+ 736,
99
+ 825,
100
+ 819
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Additionally, we have also evaluated our algorithm on a task of binary classification based on a large number of categorical features. More concretely, we applied TT–embedding to the click through rate (CTR) prediction problem, a crucial task in the field of digital advertising. Neural networks, typically used for solving this problem, while being rather elementary, include a large number of embedding layers of significant size. As a result, a majority of model parameters that represent these layers, may occupy hundreds of gigabytes of space. We show that TT–embedding not only considerably reduces the number of parameters in such models, but also sometimes improves their accuracy. ",
107
+ "bbox": [
108
+ 174,
109
+ 825,
110
+ 825,
111
+ 924
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 RELATED WORK ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 176,
121
+ 103,
122
+ 339,
123
+ 119
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "In recent years, a large body of research was devoted to compressing and speeding up various components of neural networks used in NLP tasks. Joulin et al. (2016) adapted the framework of product quantization to reduce the number of parameters in linear models used for text classification. See et al. (2016) proposed to compress LSTM-based neural machine translation models with pruning algorithms. Lobacheva et al. (2017) showed that the recurrent models could be significantly sparsified with the help of variational dropout (Kingma et al., 2015). Chen et al. (2018b) proposed more compact K-way D-dimensional discrete encoding scheme to replace the “one-hot” encoding of categorical features, such as words in NLP taks. Very recently, Chen et al. (2018a) and Variani et al. (2018) introduced GroupReduce and WEST, two very efficient compression methods for the embedding and softmax layers, based on structured low-rank matrix approximation. Concurrently, Lam (2018) proposed the quantization algorithm for compressing word vectors and showed the superiority of the obtained embeddings on word similarity, word analogy, and question answering tasks. ",
130
+ "bbox": [
131
+ 174,
132
+ 133,
133
+ 825,
134
+ 301
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Tensor methods have also been already successfully applied to neural networks compression. Novikov et al. (2015) coined the idea of reshaping weights of fully-connected layers into high-dimensional tensors and representing them in Tensor Train (TT) (Oseledets, 2011) format. This approach was later extended to convolutional (Garipov et al., 2016) and recurrent (Yang et al., 2017; Tjandra et al., 2017; Yu et al., 2017) neural networks. Furthermore, Lebedev et al. (2015) showed that convolutional layers could be also compressed with canonical (CP) tensor decomposition (Carroll & Chang, 1970; Harshman, 1970). Finally, Wang et al. (2018) compressed both fully-connected and convolutional layers with Tensor Ring decomposition (Zhao et al., 2016). While all these methods allowed to reduce the number of parameters in the networks dramatically, they mostly capitalized on heavy fullyconnected and convolutional layers (present in AlexNet (Krizhevsky et al., 2012) or VGG (Simonyan & Zisserman, 2014)), which became outdated in the following years. Recently, Ma et al. (2019) succesfully applied Block-Term Tensor Decomposition to the compression of self-attention modules in the Transformer (Vaswani et al., 2017) architecture. In this work, we show the benefits of applying tensor machinery to the compression of embedding layers, which are still widely used in NLP. ",
141
+ "bbox": [
142
+ 174,
143
+ 308,
144
+ 825,
145
+ 502
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "3 TENSOR TRAIN EMBEDDING ",
152
+ "text_level": 1,
153
+ "bbox": [
154
+ 176,
155
+ 522,
156
+ 441,
157
+ 539
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "In this section, we briefly introduce the necessary notation and present the algorithm for training the TT–embedding layer. Hereinafter, by $N$ -way tensor $_ { x }$ we mean a multidimensional array: ",
164
+ "bbox": [
165
+ 171,
166
+ 554,
167
+ 823,
168
+ 583
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "equation",
174
+ "img_path": "images/17444bb288a1cd7319450dcd0a18390691b4fbe1e507e1606cfeff125882f414.jpg",
175
+ "text": "$$\n\\pmb { \\chi } \\in \\mathbb { R } ^ { I _ { 1 } \\times I _ { 2 } \\times \\cdots \\times I _ { N } } .\n$$",
176
+ "text_format": "latex",
177
+ "bbox": [
178
+ 429,
179
+ 588,
180
+ 568,
181
+ 604
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "with entries $\\pmb { \\chi } ( i _ { 1 } , \\dots , i _ { N } )$ , such that $\\{ 0 \\leq i _ { k } < I _ { k } \\} _ { k = 1 } ^ { N }$ ",
188
+ "bbox": [
189
+ 173,
190
+ 611,
191
+ 547,
192
+ 628
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "3.1 MOTIVATION ",
199
+ "text_level": 1,
200
+ "bbox": [
201
+ 176,
202
+ 643,
203
+ 305,
204
+ 659
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Since most of the parameters in the NLP models occupy the embedding layers, we can greatly reduce size of the entire model by compressing these layers. Our goal is to replace the standard embedding matrix with a more compact, yet powerful and trainable, representation which would allow us to efficiently map words into vectors. ",
211
+ "bbox": [
212
+ 174,
213
+ 670,
214
+ 825,
215
+ 726
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "The simplest approach to compactly represent a matrix of a large size is to use the low–rank matrix factorization, which treats matrix $\\mathbf { E } \\in \\mathbb { R } ^ { I \\times J }$ as a product of two matrices $\\mathbf { E } = \\mathbf { U } \\mathbf { V } ^ { \\top }$ . Here $\\mathbf { U } \\in \\mathbb { R } ^ { I \\times R }$ and $V \\in \\mathbb { R } ^ { J \\times R }$ are much “thinner” matrices, and $R$ is the rank hyperparameter. Note that rather than training the model with the standard embedding layer, and then trying to compress the obtained embedding, we can initially seek the embedding matrix in the described low–rank format. Then, for evaluation and training, the individual word embedding $\\mathbf { E } [ i , : ]$ can be computed as a product $\\mathbf { U } [ i , : ] \\mathbf { V } ^ { \\top }$ which does not require materializing the full matrix $\\mathbf { E }$ . This approach reduces the number of degrees of freedom in the embedding layer from $I J$ to $( I + J ) R$ . ",
222
+ "bbox": [
223
+ 174,
224
+ 733,
225
+ 825,
226
+ 844
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "However, typically, in the NLP tasks the embedding dimension $J$ is much smaller than the vocabulary size $I$ , and obtaining significant compression ratio using low-rank matrix factorization is problematic. In order to preserve the model performance, the rank $R$ cannot be taken very small, and the compression ratio is bounded by $\\begin{array} { r } { \\frac { I J ^ { \\bullet } } { ( I + J ) R } \\le \\frac { J } { R } } \\end{array}$ , which is close to 1 for usually full-rank embedding matrix (see Figure 1 in Chen et al. (2018b)). To overcome this bound and achieve significant compression ratio even for matrices of disproportional dimensionalities, we reshape them into multidimensional tensors and apply the Tensor Train decomposition, which allows for more compact representation, where the number of parameters falls down to logarithmic with respect to $I$ . ",
233
+ "bbox": [
234
+ 174,
235
+ 851,
236
+ 825,
237
+ 924
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "",
244
+ "bbox": [
245
+ 174,
246
+ 104,
247
+ 825,
248
+ 147
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "3.2 TENSOR TRAIN DECOMPOSITION ",
255
+ "text_level": 1,
256
+ "bbox": [
257
+ 176,
258
+ 162,
259
+ 444,
260
+ 178
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "A tensor $_ { x }$ is said to be represented in the Tensor Train (TT) format (Oseledets, 2011) if each element of $_ { x }$ can be computed as: ",
267
+ "bbox": [
268
+ 171,
269
+ 189,
270
+ 825,
271
+ 218
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "equation",
277
+ "img_path": "images/078f1fe0b0d74b0ab6dfc51e310b10be51a8112ad6636fdce65914a9786301e0.jpg",
278
+ "text": "$$\n\\pmb { \\chi } ( i _ { 1 } , i _ { 2 } , \\dots , i _ { d } ) = \\sum _ { r _ { 1 } = 1 } ^ { R _ { 1 } } \\sum _ { r _ { 2 } = 1 } ^ { R _ { 2 } } \\cdots \\sum _ { r _ { N - 1 } = 1 } ^ { R _ { N - 1 } } \\pmb { \\mathcal { G } } ^ { ( 1 ) } ( i _ { 1 } , r _ { 1 } ) \\pmb { \\mathcal { G } } ^ { ( 2 ) } ( r _ { 1 } , i _ { 2 } , r _ { 2 } ) \\dots \\pmb { \\mathcal { G } } ^ { ( N ) } ( r _ { N - 1 } , i _ { N } ) ,\n$$",
279
+ "text_format": "latex",
280
+ "bbox": [
281
+ 205,
282
+ 223,
283
+ 790,
284
+ 270
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "where the tensors $\\pmb { \\mathcal { G } } ^ { ( k ) } \\in \\mathbb { R } ^ { R _ { k - 1 } \\times I _ { k } \\times R _ { k } }$ are the so-called $T T$ –cores and $R _ { 0 } = R _ { N } = 1$ by definition. The minimal values of {Rk}N−1k=1 for which the TT–decomposition exists are called TT–ranks. Note, ",
291
+ "bbox": [
292
+ 173,
293
+ 282,
294
+ 826,
295
+ 329
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "equation",
301
+ "img_path": "images/498a063de167ab7b43b7775ce746b64cb4b716973f7884911c4608b02bc9233b.jpg",
302
+ "text": "$$\n\\pmb { \\mathscr { X } } ( i _ { 1 } , \\dots , i _ { N } ) = \\underbrace { \\pmb { \\mathscr { G } } ^ { ( 1 ) } [ i _ { 1 } , : ] } _ { 1 \\times R _ { 1 } } \\underbrace { \\pmb { \\mathscr { G } } ^ { ( 2 ) } [ : , i _ { 2 } , : ] } _ { R _ { 1 } \\times R _ { 2 } } \\cdot \\underbrace { \\pmb { \\mathscr { G } } ^ { ( N - 1 ) } [ : , i _ { N - 1 } , : ] } _ { R _ { N - 2 } \\times R _ { N - 1 } } \\underbrace { \\pmb { \\mathscr { G } } ^ { ( N ) } [ : , i _ { N } ] } _ { R _ { N - 1 } \\times 1 } ,\n$$",
303
+ "text_format": "latex",
304
+ "bbox": [
305
+ 254,
306
+ 333,
307
+ 741,
308
+ 372
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "where $\\mathcal { G } ^ { ( k ) } [ : , i _ { k } , : ]$ stands for the slice (a subset of a tensor with some indices fixed) of the corresponding TT–core G(k). ",
315
+ "bbox": [
316
+ 171,
317
+ 380,
318
+ 825,
319
+ 411
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "The number of degrees of freedom in such a decomposition can be evaluated as $\\begin{array} { r } { \\sum _ { k = 1 } ^ { N } R _ { k - 1 } I _ { k } R _ { k } } \\end{array}$ . Thus, in the case of small ranks, the total number of parameters required to store a tensor in TT– representation is significantly smaller than $\\textstyle \\prod _ { k = 1 } ^ { N } I _ { k }$ parameters required to store the full tensor of the corresponding size. This observation makes the application of the TT–decomposition appealing in many problems dealing with extremely large tensors. ",
326
+ "bbox": [
327
+ 173,
328
+ 419,
329
+ 826,
330
+ 493
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "3.3 TT–MATRIX ",
337
+ "text_level": 1,
338
+ "bbox": [
339
+ 174,
340
+ 508,
341
+ 299,
342
+ 523
343
+ ],
344
+ "page_idx": 2
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "Let $\\mathbf { X } \\in \\mathbb { R } ^ { I \\times J }$ be a matrix of size $I \\times J$ . Given two arbitrary factorizations of its dimensions into natural numbers, $\\begin{array} { r } { I = \\prod _ { k = 1 } ^ { N } I _ { k } } \\end{array}$ and $\\begin{array} { r } { J = \\prod _ { k = 1 } ^ { N } J _ { k } } \\end{array}$ , we can reshape1 and transpose this matrix into an $N$ -way tensor $\\pmb { \\chi } \\in \\mathbb { R } ^ { I _ { 1 } J _ { 1 } \\times I _ { 2 } J _ { 2 } \\times \\cdots \\times I _ { N } J _ { N } }$ and then apply the TT–decomposition to it, resulting in a more compact representation. ",
349
+ "bbox": [
350
+ 173,
351
+ 534,
352
+ 825,
353
+ 597
354
+ ],
355
+ "page_idx": 2
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "More concretely, define the bijections $\\pmb { \\mathcal { T } } ( i ) = ( i _ { 1 } , \\ldots , i _ { N } )$ and $\\mathcal { I } ( j ) = ( j _ { 1 } , . . . , j _ { N } )$ that map row and column indices $i$ and $j$ of the matrix $X$ to the $N$ -dimensional vector-indices such that $0 \\leq i _ { k } < I _ { k } , \\ 0 \\leq j _ { k } < J _ { k } , \\ \\forall k = 1 , \\ldots , N$ . From the matrix $\\mathbf { X }$ we can form an $N$ -way tensor $_ { x }$ whose $k$ -th dimension is of length $I _ { k } J _ { k }$ and is indexed by the tuple $( i _ { k } , j _ { k } )$ . This tensor is then represented in the TT–format: ",
360
+ "bbox": [
361
+ 173,
362
+ 602,
363
+ 825,
364
+ 672
365
+ ],
366
+ "page_idx": 2
367
+ },
368
+ {
369
+ "type": "equation",
370
+ "img_path": "images/1d29bd2e2ccc8969f0a50c274ccee3c61d174cd6112d31894f59a094f2f8fd9a.jpg",
371
+ "text": "$$\n\\pmb { \\mathscr { X } } ( ( i _ { 1 } , j _ { 1 } ) \\dots ( i _ { N } , j _ { N } ) ) = \\pmb { \\mathscr { G } } ^ { ( 1 ) } [ ( i _ { 1 } , j _ { 1 } ) , : ] \\dots \\pmb { \\mathscr { G } } ^ { ( N ) } [ : , ( i _ { N } , j _ { N } ) ] .\n$$",
372
+ "text_format": "latex",
373
+ "bbox": [
374
+ 289,
375
+ 678,
376
+ 710,
377
+ 696
378
+ ],
379
+ "page_idx": 2
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "Such representation of the matrix in the TT–format is called $T T$ –matrix (Oseledets, 2010; Novikov et al., 2015) and is also known as Matrix Product Operator (Pirvu et al., 2010) in physics literature. The factorizations $( I _ { 1 } , I _ { 2 } , \\ldots I _ { N } ) \\times ( J _ { 1 } , J _ { 2 } , \\ldots J _ { N } )$ will be referred to as the shape of TT–matrix, or TT–shapes. The process of constructing the TT–matrix from the standard matrix is visualized in Figure 1 for the tensor of order 3. Note, that in this case the TT–cores are in fact 4-th order tensors, but all the operations defined for tensors in the TT–format are naturally extended to TT–matrices. ",
384
+ "bbox": [
385
+ 173,
386
+ 700,
387
+ 826,
388
+ 786
389
+ ],
390
+ "page_idx": 2
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "3.4 TT–EMBEDDING ",
395
+ "text_level": 1,
396
+ "bbox": [
397
+ 174,
398
+ 801,
399
+ 330,
400
+ 816
401
+ ],
402
+ "page_idx": 2
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "By TT–embedding, we call a layer with trainable parameters (TT–cores) represented as a TT–matrix $\\varepsilon$ of the underlying tensor shape $( I _ { 1 } , I _ { 2 } , \\ldots I _ { N } ) \\times ( J _ { 1 } , J _ { 2 } , \\ldots J _ { N } )$ , which can be transformed into a valid embedding layer TT–cores one has also t $\\boldsymbol { E } \\in \\mathbb { R } ^ { I \\times J }$ , with he TT– $\\begin{array} { r } { I = \\prod _ { k = 1 } ^ { N } I _ { k } } \\end{array}$ and are $\\begin{array} { r } { J = \\prod _ { k = 1 } ^ { N } J _ { k } } \\end{array}$ . To specify the shapes oferparameters of the layer and explicitly define the total compression ratio. ",
407
+ "bbox": [
408
+ 173,
409
+ 827,
410
+ 826,
411
+ 901
412
+ ],
413
+ "page_idx": 2
414
+ },
415
+ {
416
+ "type": "image",
417
+ "img_path": "images/ebd295ae5cc2824bf887c0465a9dd884f08ef5f1083540065ed0ec8a9e1493ae.jpg",
418
+ "image_caption": [
419
+ "Figure 1: Construction of the TT–matrix from the standard embedding matrix. Blue color depicts how the single element in the initial matrix is transformed into the product of the highlighted vectors and matrices in the TT–cores. "
420
+ ],
421
+ "image_footnote": [],
422
+ "bbox": [
423
+ 173,
424
+ 99,
425
+ 825,
426
+ 198
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "In order to compute the embedding for a particular word indexed $i$ in the vocabulary, we first map the row index $i$ into the $N$ -dimensional vector index $( i _ { 1 } , \\dots , i _ { N } )$ , and then calculate components of the embedding with formula (1). Note, that the computation of all its components is equivalent to selecting the particular slices in TT-cores (slices of shapes $J _ { 1 } \\times R _ { 1 }$ in $\\pmb { \\mathcal { G } } ^ { ( 1 ) }$ , $R _ { 1 } \\times J _ { 2 } \\times R _ { 2 }$ in ${ \\mathfrak { g } } ^ { ( 2 ) }$ and so on) and performing a sequence of matrix multiplications, which is executed efficiently in modern linear algebra packages, such as BLAS. Pseudocode for the procedure of computing the mapping $i \\to ( i _ { 1 } , \\dots , i _ { N } )$ is given in Appendix A. ",
433
+ "bbox": [
434
+ 173,
435
+ 281,
436
+ 825,
437
+ 385
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "In order to construct TT–embedding layer for a vocabulary of size $I$ and embedding dimension $J$ , and to train a model with such a layer, one has to perform the following steps. ",
444
+ "bbox": [
445
+ 171,
446
+ 390,
447
+ 825,
448
+ 420
449
+ ],
450
+ "page_idx": 3
451
+ },
452
+ {
453
+ "type": "text",
454
+ "text": "• Provide factorizations of $I$ and $J$ into factors $I ~ = ~ I _ { 1 } ~ \\times ~ I _ { 2 } ~ \\times ~ \\cdot \\cdot ~ \\times ~ I _ { N }$ and $J = J _ { 1 } \\times J _ { 2 } \\times \\cdot \\cdot \\cdot \\times J _ { N }$ , and specify the set of TT–ranks $\\{ R _ { 1 } , R _ { 2 } , \\ldots , R _ { N - 1 } \\}$ . \n• Initialize the set of parameters of the embedding $\\begin{array} { r } { \\Theta = \\{ \\pmb { \\mathcal { G } } ^ { ( k ) } \\in \\mathbb { R } ^ { R _ { k - 1 } \\times I _ { k } \\times J _ { k } \\times R _ { k } } \\} _ { k = 1 } ^ { N } , } \\end{array}$ . Concrete initialization scenarios are discussed further in the text. \n• During training, given a batch of indices $\\{ i _ { 1 } , i _ { 2 } , \\dots i _ { b } \\}$ , compute the corresponding embeddings $\\{ \\mathbf { e } _ { 1 } , \\mathbf { e } _ { 2 } , \\ldots , \\mathbf { e } _ { b } \\}$ using Eq. (1) and Algorithm 1. \n• Computed embeddings can be followed by any standard layer such as LSTM (Hochreiter & Schmidhuber, 1997) or self-attention (Vaswani et al., 2017), and trained with backpropagation since they differentially depend on the parameters $\\Theta$ . ",
455
+ "bbox": [
456
+ 217,
457
+ 431,
458
+ 826,
459
+ 582
460
+ ],
461
+ "page_idx": 3
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "TT–embedding implies a specific structure on the order of tokens in the vocabulary (the order of rows in the embedding matrix), and determining the optimal order is an appealing problem to solve. However, we leave this problem for future work and use the order produced by the standard tokenizer (sorted by frequency) in our current experiments. ",
466
+ "bbox": [
467
+ 173,
468
+ 594,
469
+ 826,
470
+ 650
471
+ ],
472
+ "page_idx": 3
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "We also experimented with a more general form of TT-decomposition, namely Tensor Ring decomposition (Zhao et al., 2016; Wang et al., 2018). This decomposition by construction has the appealing property of being circular permutation invariant (and, thus, more robust with respect to the order of the tokens), which could have potentially provided an improvement over the TT-based models with simple frequency based ordering. Our experiments with TR decomposition on Transformer for NMT can be found in Appendix B. ",
477
+ "bbox": [
478
+ 173,
479
+ 656,
480
+ 825,
481
+ 741
482
+ ],
483
+ "page_idx": 3
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "Initialization The standard way to initialize an embedding matrix $\\mathbf { E } \\in \\mathbb { R } ^ { I \\times J }$ is via, e.g., Glorot initializer (Glorot & Bengio, 2010), which initializes each element as $\\begin{array} { r } { \\mathbf { E } ( i , j ) \\sim \\mathcal { N } \\left( 0 , \\frac { \\mathrm { \\bar { ~ } 2 ~ } } { I + J } \\right) } \\end{array}$ . For the TT–embedding, we can only initialize the TT–cores, and the distribution of the elements of the resulting matrix $\\varepsilon$ is rather non–trivial. However, it is easy to verify that if we initialize each TT–core element as $\\mathscr { G } ^ { ( k ) } ( r _ { k - 1 } , i _ { k } , r _ { k } ) \\sim \\mathcal { N } ( 0 , 1 )$ , the resulting distribution of the matrix elements $\\pmb { \\varepsilon } ( i , j )$ has the property that $\\mathbb { E } [ \\pmb { \\mathscr { E } } ( i , j ) ] = 0$ and $\\begin{array} { r } { \\mathrm { V a r } [ \\pmb { \\mathcal { E } } ( i , j ) ] = \\prod _ { k = 1 } ^ { N } R _ { k } = R ^ { 2 } } \\end{array}$ . Capitalizing on this observation, in order to obtain the desired variance $\\mathrm { V a r } [ \\pmb { \\mathcal { E } } ( i , j ) ] = \\sigma ^ { 2 }$ while keeping $\\mathbb { E } [ \\pmb { \\mathscr { E } } ( i , j ) ] = 0$ , we can simply initialize each TT–core as ",
488
+ "bbox": [
489
+ 173,
490
+ 757,
491
+ 826,
492
+ 886
493
+ ],
494
+ "page_idx": 3
495
+ },
496
+ {
497
+ "type": "equation",
498
+ "img_path": "images/2bef0d46022bb69171cc8804a1229aad9a77faa67b8602b4f8a3a2113b6ebe23.jpg",
499
+ "text": "$$\n{ \\pmb \\mathcal { G } } ^ { ( k ) } ( r _ { k - 1 } , i _ { k } , r _ { k } ) \\sim { \\mathcal { N } } \\left( 0 , \\left( \\frac { \\sigma } { R } \\right) ^ { 2 / N } \\right) .\n$$",
500
+ "text_format": "latex",
501
+ "bbox": [
502
+ 366,
503
+ 893,
504
+ 632,
505
+ 929
506
+ ],
507
+ "page_idx": 3
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "The resulting distribution is not Gaussian, however, it approaches the Gaussian distribution with the increase of the TT–rank (Figure 2). ",
512
+ "bbox": [
513
+ 173,
514
+ 104,
515
+ 825,
516
+ 133
517
+ ],
518
+ "page_idx": 4
519
+ },
520
+ {
521
+ "type": "image",
522
+ "img_path": "images/2275e9dadcc11eefddfcb03b6f1471939b14e8175df07e2bde19088138de7c5e.jpg",
523
+ "image_caption": [
524
+ "Figure 2: Distribution of matrix elements of the TT–matrix of shape $( 5 , 5 , 5 , 5 ) \\times ( 5 , 5 , 5 , 5 )$ initialized by formula (2) with $\\sigma = 1$ . As the TT–rank increases, the resulting distribution approaches $\\mathcal { N } ( 0 , 1 )$ . "
525
+ ],
526
+ "image_footnote": [],
527
+ "bbox": [
528
+ 336,
529
+ 150,
530
+ 660,
531
+ 319
532
+ ],
533
+ "page_idx": 4
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "In our experiments, we have used the modified Glorot initializer implemented by formula (2), which greatly improved performance, as opposed to initializing TT–cores simply via a standard normal distribution. It is also possible to initialize TT–embedding layer by converting the learned embedding matrix into TT–format using the TT–SVD algorithm (Oseledets, 2011), however, this approach requires the pretrained embedding matrix and does not exhibit better performance in practice. ",
538
+ "bbox": [
539
+ 174,
540
+ 380,
541
+ 825,
542
+ 450
543
+ ],
544
+ "page_idx": 4
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "Hyperparameter selection Our embedding layer introduces two additional structure-specific hyperparameters, namely TT–shapes and TT–ranks. ",
549
+ "bbox": [
550
+ 174,
551
+ 467,
552
+ 823,
553
+ 496
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "TT–embedding does not require the vocabulary size $I$ to be represented exactly as the product of factors $I _ { 1 } , \\ldots , I _ { N }$ , in fact, any factorization $\\begin{array} { r } { \\dot { \\prod _ { k = 1 } ^ { k } { I _ { k } } } = \\widetilde { I } \\ge \\dot { I } } \\end{array}$ will suffice. However, in order to achieve the highest possible compression ratio for a fixed value of $\\widetilde { I }$ , the factors $\\{ I _ { k } \\} _ { k = 1 } ^ { N }$ should be as close to each other as possible. Our implementation includes a simple automated procedure for selecting a good values of $\\{ I _ { k } \\} _ { k = 1 } ^ { N }$ during TT–embedding initialization. The factors $J _ { 1 } , \\ldots , J _ { N }$ are defined by the embedding dimensionality $J$ which can be easily chosen to support good factorization, e.g., $5 1 2 = 8 \\times 8 \\times 8$ or $4 8 0 = 6 \\times 5 \\times 4 \\times 4$ . ",
560
+ "bbox": [
561
+ 173,
562
+ 502,
563
+ 825,
564
+ 606
565
+ ],
566
+ "page_idx": 4
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "The values of TT–ranks directly define the compression ratio, so choosing them to be too small or too large will result into either significant performance drop or little reduction of the number of parameters. In our experiments, we set all TT–ranks to 16 for the problems with small vocabularies and $6 4 - 1 9 2$ for the problems with larger vocabularies, which allowed us to achieve significant compression of the embedding layer, at the cost of a tiny sacrifice in the metrics of interest. ",
571
+ "bbox": [
572
+ 174,
573
+ 613,
574
+ 825,
575
+ 684
576
+ ],
577
+ "page_idx": 4
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "4 EXPERIMENTS ",
582
+ "text_level": 1,
583
+ "bbox": [
584
+ 176,
585
+ 705,
586
+ 326,
587
+ 722
588
+ ],
589
+ "page_idx": 4
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "Code We have implemented TT–embeddings described in Section 3 in Python using PyTorch (Paszke et al., 2017). The code is available at the anonymous repository https://github.com/ttembedding/tt-embeddings. ",
594
+ "bbox": [
595
+ 174,
596
+ 738,
597
+ 825,
598
+ 781
599
+ ],
600
+ "page_idx": 4
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "Experimental setup We tested our approach on several popular NLP tasks: ",
605
+ "bbox": [
606
+ 173,
607
+ 797,
608
+ 681,
609
+ 814
610
+ ],
611
+ "page_idx": 4
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "• Sentiment analysis — as a starting point in our experiments, we test TT–embeddings on a rather simple task of predicting polarity of a sentence. \n• Neural Machine Translation (NMT) — to verify the applicability of TT–embeddings in more practical problems, we test it on a more challenging task of machine translation. \n• Language Modeling (LM) — then, we evaluate TT–embeddings on language modeling tasks in the case of extremely large vocabularies. ",
616
+ "bbox": [
617
+ 217,
618
+ 825,
619
+ 826,
620
+ 924
621
+ ],
622
+ "page_idx": 4
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "• Click Through Rate (CTR) prediction — finally, we show that TT–embeddings can be applied for the binary classification with categorical features of significant cardinality. ",
627
+ "bbox": [
628
+ 212,
629
+ 104,
630
+ 823,
631
+ 133
632
+ ],
633
+ "page_idx": 5
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "To prove the generality and wide applicability of the proposed approach, we tested it on various architectures, such as MLPs (CTR), LSTMs (sentiment analysis), and Transformers (NMT, LM). ",
638
+ "bbox": [
639
+ 174,
640
+ 142,
641
+ 821,
642
+ 171
643
+ ],
644
+ "page_idx": 5
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "Note that Transformers in LM and NMT use the same weight matrix for their embedding and softmax layers (Press & Wolf, 2016; Inan et al., 2016) which already significantly reduces model size. Untying weights and tensorizing the embedding layer only will lead to the increase in the number of parameters instead of compression. In our experiments, we use two separate TT-decompositions of the same shape for embedding and softmax layers and report the compression ratios as $\\frac { \\vert V \\vert \\times d _ { \\mathrm { m o d e l } } } { 2 \\times \\mathrm { T T - p a r a m s } }$ . ",
649
+ "bbox": [
650
+ 174,
651
+ 178,
652
+ 825,
653
+ 252
654
+ ],
655
+ "page_idx": 5
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "4.1 SENTIMENT ANALYSIS ",
660
+ "text_level": 1,
661
+ "bbox": [
662
+ 174,
663
+ 268,
664
+ 370,
665
+ 282
666
+ ],
667
+ "page_idx": 5
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "For this experiment, we have used the IMDB dataset (Maas et al., 2011) with two categories, and the Stanford Sentiment Treebank (SST) (Socher et al., 2013) with five categories. We have taken the most frequent 25000 words for the IMDB dataset and 17200 for SST, embedded them into a $J .$ –dimensional space using either standard embedding or TT–embedding layer, and performed classification using a standard bidirectional two–layer LSTM with hidden size $h = 1 2 8$ , and dropout rate $P _ { \\mathrm { d r o p } } = 0 . 5$ . ",
672
+ "bbox": [
673
+ 174,
674
+ 295,
675
+ 825,
676
+ 364
677
+ ],
678
+ "page_idx": 5
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "Our findings are summarized in Table 1. We observe that the models with largely compressed embedding layers can perform equally or even better than the full uncompressed models. This suggests that learning individual independent embeddings for each particular word is superfluous, as the expressive power of LSTM is sufficient to make use of these intertwined, yet more compact embeddings. Moreover, slightly better test accuracy of the compressed models in certain cases (e.g., for the SST dataset of a rather small size) insinuates that imposing specific tensorial low–rank structure on the embedding matrix can be viewed as a special form of regularization, thus potentially improving model generalization. A detailed and comprehensive test of this hypothesis goes beyond the scope of this paper, and we leave it for future work. ",
683
+ "bbox": [
684
+ 173,
685
+ 371,
686
+ 825,
687
+ 496
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "table",
693
+ "img_path": "images/6519151af2ca2894d6690be2bb6c91a02b9c6cb4f847c82ba25d8d1164badffa.jpg",
694
+ "table_caption": [
695
+ "Table 1: Sentiment analysis, LSTM on IMDB and SST datasets. Embedding compression is calculated as the ratio between the number of parameters in the full embedding layer and TT–embedding layer. The LSTM parts are identical in both models, and the TT–ranks were set to 16 in these experiments. "
696
+ ],
697
+ "table_footnote": [],
698
+ "table_body": "<table><tr><td>Dataset</td><td>Model</td><td>Embedding shape</td><td>Test acc.</td><td>Emb compr.</td><td>Total params</td></tr><tr><td rowspan=\"4\">IMDB</td><td>Full</td><td>25000 × 256</td><td>0.886</td><td>1</td><td>7.19M</td></tr><tr><td>TT1</td><td>(25,30,40) × (4,8,8)</td><td>0.871</td><td>93</td><td>0.86M</td></tr><tr><td>TT2</td><td>(10,10,15,20) × (4,4,4,4)</td><td>0.888</td><td>232</td><td>0.82M</td></tr><tr><td>TT3</td><td>(5,5,5,5,6,8) ×( (2,2,2,2,4,4)</td><td>0.897</td><td>441</td><td>0.81M</td></tr><tr><td rowspan=\"4\">SST</td><td>Full</td><td>17200 × 256</td><td>0.374</td><td>1</td><td>5.19M</td></tr><tr><td>TT1</td><td>(24,25,30) × (4,8,8)</td><td>0.415</td><td>78</td><td>0.85M</td></tr><tr><td>TT2</td><td>(10,10,12,15) × (4,4,4,4)</td><td>0.411</td><td>182</td><td>0.82M</td></tr><tr><td>TT3</td><td>(4,5,5,5,6,6) × (2,2,2,2,4,4)</td><td>0.399</td><td>307</td><td>0.81M</td></tr></table>",
699
+ "bbox": [
700
+ 200,
701
+ 566,
702
+ 795,
703
+ 731
704
+ ],
705
+ "page_idx": 5
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "4.2 NEURAL MACHINE TRANSLATION ",
710
+ "text_level": 1,
711
+ "bbox": [
712
+ 176,
713
+ 757,
714
+ 452,
715
+ 771
716
+ ],
717
+ "page_idx": 5
718
+ },
719
+ {
720
+ "type": "text",
721
+ "text": "For this experiment, we have trained the Transformer-big model $\\dot { d } _ { \\mathrm { m o d e l } } = 1 0 2 4$ , $d _ { \\mathrm { f f } } = 4 0 9 6$ , $h = 1 6$ ) from (Vaswani et al., 2017) on WMT 2014 English–German dataset consisting of roughly 4.5 million sentence pairs. We evaluated on newstest2014 dataset using beam search with a beam size of 4 and no length penalty. We did not employ checkpoint averaging and used the last checkpoint to compute the BLEU score. Sentences were tokenized with YouTokenToMe2 byte-pair-encodings, resulting in a joint vocabulary of 32768 tokens. For the full list of hyperparameters, see Appendix C. ",
722
+ "bbox": [
723
+ 174,
724
+ 782,
725
+ 825,
726
+ 867
727
+ ],
728
+ "page_idx": 5
729
+ },
730
+ {
731
+ "type": "text",
732
+ "text": "Our results are summarized in Table 2. We observe that even in this rather challenging task, both embedding and softmax layers can be compressed significantly, at the cost of a small drop in the ",
733
+ "bbox": [
734
+ 176,
735
+ 873,
736
+ 825,
737
+ 902
738
+ ],
739
+ "page_idx": 5
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "BLEU score. However, with the increase of compression factor, the performance deteriorates rapidly. Compared to the sentiment analysis, NMT is a much more complex task which benefits more from additional capacity (in the form of more powerful RNN or more transformer blocks) rather than regularization (Bahdanau et al., 2014; Vaswani et al., 2017; Wu et al., 2019), which may explain why we did not manage to improve the model by regularizing its embedding layers. ",
744
+ "bbox": [
745
+ 174,
746
+ 104,
747
+ 825,
748
+ 175
749
+ ],
750
+ "page_idx": 6
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "TT-embeddings induce $8 \\%$ training iteration time overhead if compared to the baseline Transformerbig due to our current implementation heavy relying on slow torch.einsum function while standard embedding and softmax layers make use of fast and highly-optimized Tensor Cores for mixed-precision training. We expect a dedicated CUDA kernel to be much more efficient. ",
755
+ "bbox": [
756
+ 174,
757
+ 181,
758
+ 825,
759
+ 238
760
+ ],
761
+ "page_idx": 6
762
+ },
763
+ {
764
+ "type": "table",
765
+ "img_path": "images/4e7b97d26b148862c235d33cb2aed536b3a56e5b8e225a948aeed917de3ecffe.jpg",
766
+ "table_caption": [
767
+ "Table 2: NMT, Transformer-big on WMT‘14 English-to-German dataset. Both case-sensitive tokenized BLEU and de-tokenized SacreBLEU (Post, 2018) on newstest2014 are reported. "
768
+ ],
769
+ "table_footnote": [],
770
+ "table_body": "<table><tr><td>Model</td><td>Embedding shape</td><td>TT rank</td><td>Token BLEU</td><td>Sacre BLEU</td><td>Emb compr.</td><td>Total params</td><td>Iter time</td></tr><tr><td>Big</td><td>32768× 1024</td><td></td><td>29.58</td><td>28.84</td><td>1</td><td>210M</td><td>1.14</td></tr><tr><td>Big+TT1</td><td>(32,32,32) × (8,8,16)</td><td>64</td><td>29.17</td><td>28.53</td><td>15.3</td><td>179M</td><td>1.23</td></tr><tr><td>Big+TT2</td><td>(32,32,32) × (8,8,16)</td><td>48</td><td>28.53</td><td>27.97</td><td>26.8</td><td>178M</td><td>1.22</td></tr><tr><td>Big+TT3</td><td>(32,32,32) × (8,8,16)</td><td>32</td><td>28.26</td><td>27.70</td><td>58.5</td><td>177M</td><td>1.22</td></tr></table>",
771
+ "bbox": [
772
+ 181,
773
+ 297,
774
+ 815,
775
+ 398
776
+ ],
777
+ "page_idx": 6
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "4.3 LANGUAGE MODELING ",
782
+ "text_level": 1,
783
+ "bbox": [
784
+ 174,
785
+ 433,
786
+ 375,
787
+ 446
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "We took the Transformer-XL (Dai et al., 2019), an open source3 state-of-the-art language modeling architecture at the time of this writing, and replaced its embedding and softmax layers with TT– factorizations. Then, we tested different model configurations on the WikiText–103 (Merity et al., 2016) dataset and reported the results in Table 3. For the full list of hyperparameters, see Appendix C. ",
794
+ "bbox": [
795
+ 174,
796
+ 458,
797
+ 826,
798
+ 515
799
+ ],
800
+ "page_idx": 6
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "Compared to sentiment analysis and NMT, we were not able to achieve that high compression ratios for embedding and softmax layers in LM. However, even moderate 3.8 times compression allowed us to save 100M of weights at the cost of $\\sim 1 . 5$ perplexity drop. ",
805
+ "bbox": [
806
+ 174,
807
+ 521,
808
+ 825,
809
+ 564
810
+ ],
811
+ "page_idx": 6
812
+ },
813
+ {
814
+ "type": "table",
815
+ "img_path": "images/da94aa16808dd5c3df68b62f6b843a617dedaa870ff9c6407e69283e5d531c03.jpg",
816
+ "table_caption": [
817
+ "Table 3: LM, Transformer-XL (Dai et al., 2019) on WikiText-103 dataset. "
818
+ ],
819
+ "table_footnote": [],
820
+ "table_body": "<table><tr><td>Model</td><td>Embedding shape</td><td>TT rank</td><td>Valid PPL</td><td>Test PPL</td><td>Emb compr.</td><td>Total params</td></tr><tr><td>TXL</td><td>267735 × 512</td><td>一</td><td>22.55</td><td>24.37</td><td>1</td><td>192M</td></tr><tr><td>TXL+TT1</td><td>(60,60,75) × (8,8,8)</td><td>192</td><td>24.38</td><td>25.67</td><td>3.8</td><td>94M</td></tr><tr><td>TXL+TT2</td><td>(60,60,75) ×(8,8,8)</td><td>128</td><td>25.53</td><td>26.73</td><td>8.6</td><td>73M</td></tr><tr><td>TXL+TT3</td><td>(60,60,75) ×(8,8,8)</td><td>96</td><td>26.73</td><td>28.04</td><td>15.1</td><td>65M</td></tr></table>",
821
+ "bbox": [
822
+ 212,
823
+ 609,
824
+ 787,
825
+ 710
826
+ ],
827
+ "page_idx": 6
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "4.4 CLICK THROUGH RATE PREDICTION",
832
+ "text_level": 1,
833
+ "bbox": [
834
+ 176,
835
+ 744,
836
+ 467,
837
+ 758
838
+ ],
839
+ "page_idx": 6
840
+ },
841
+ {
842
+ "type": "text",
843
+ "text": "Among other applications of the TT–embedding layer, we chose to focus on CTR prediction, a popular task in digital advertising (He et al., 2014). We consider open dataset provided by Criteo for Kaggle Display Advertising Challenge (Criteo Labs, 2014) which consists of 39 categorical features, $4 5 . 8 \\mathbf { M }$ samples and is binary labeled according to whether the user clicked on the given advertisement. Unique values of categorical features are bijectively mapped into integers. To reduce the memory footprint, if the size of a corresponding vocabulary is immense (e.g., a cardinality of some features in this dataset is of order $1 0 ^ { 6 }$ ), these integers are further hashed by taking modulus with respect to some fixed number such as $1 0 ^ { 5 }$ . However, due to strong compression properties of TT–embeddings, this is not necessary for our approach, and we consider both full and hashed datasets in our experiments. ",
844
+ "bbox": [
845
+ 173,
846
+ 771,
847
+ 826,
848
+ 896
849
+ ],
850
+ "page_idx": 6
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "CTR with the baseline algorithm The task at hand can be treated as a binary classification problem. As a baseline algorithm, we consider the neural network with the following architecture. First, each of the categorical features is passed through a separate embedding layer with embedding size $J$ . After that, the embedded features are concatenated and passed through 4 fully-connected layers of 1024 neurons and ReLU activation functions. In all experiments, we used Adam optimizer with the learning rate equal to 0.0005. Since many input features have a large number of unique values (e.g., 10131227) and storing the corresponding embedding matrices would be costly, we employ the hashing procedure mentioned earlier. ",
855
+ "bbox": [
856
+ 173,
857
+ 104,
858
+ 825,
859
+ 217
860
+ ],
861
+ "page_idx": 7
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "CTR with TT–embeddings We substitute the embedding layers with the TT–embedding layers. Besides that, we leave the overall structure of the neural network unchanged with the same parameters as in the baseline approach. Table 4 presents the experimental results on the Criteo CTR dataset. To the best of our knowledge, our loss value is very close to the state-of-the-art result (Juan et al., 2016). These experiments indicate that the substitution of large embedding layers with TT–embeddings leads to significant compression ratios (up to 2011 times) with a slight improvement in the test loss, and up to 4200 with a small drop in the test loss. The total size of the compressed model does not exceed $2 0 ~ \\mathrm { { M b } }$ , while the baseline model weighs about $1 6 0 ~ \\mathrm { M b }$ . The obtained compression ratio suggests that the usage of TT–embedding layers may be beneficial in CTR prediction tasks. ",
866
+ "bbox": [
867
+ 174,
868
+ 231,
869
+ 825,
870
+ 357
871
+ ],
872
+ "page_idx": 7
873
+ },
874
+ {
875
+ "type": "table",
876
+ "img_path": "images/8e7c7f6a7522e5d4bfe4828a064fa185be8344feeb386a4ea3cc44e90cc58620.jpg",
877
+ "table_caption": [
878
+ "Table 4: CTR prediction. The hashed dataset is constructed as specified in Section 4.4 with hashing value $1 0 ^ { 5 }$ . Embedding layers with more than 2000 unique tokens were replaced by TT–embeddings with shape factorizations consisting of 3 or 4 factors. "
879
+ ],
880
+ "table_footnote": [],
881
+ "table_body": "<table><tr><td>Hash</td><td>Model</td><td>Factorization</td><td>TT rank</td><td>Hidden size</td><td>Test loss</td><td>Emb. compr.</td><td>Total params</td></tr><tr><td rowspan=\"6\">105</td><td>Full</td><td></td><td>一</td><td>1024</td><td>0.4440</td><td>1</td><td>41.2M</td></tr><tr><td>TT1</td><td>3 factors</td><td>16</td><td>1024</td><td>0.4433</td><td>61</td><td>4.7M</td></tr><tr><td>TT2</td><td>4 factors</td><td>16</td><td>1024</td><td>0.4440</td><td>92</td><td>4.5M</td></tr><tr><td>TT3</td><td>3 factors</td><td>2</td><td>128</td><td>0.4515</td><td>2100</td><td>0.53M</td></tr><tr><td>TT4</td><td>4 factors</td><td>2</td><td>128</td><td>0.4530</td><td>4193</td><td>0.53M</td></tr><tr><td>TT1</td><td>3 factors</td><td>16</td><td>1024</td><td>0.4444</td><td>1004</td><td>5.2M</td></tr><tr><td></td><td>TT2</td><td>4 factors</td><td>16</td><td>1024</td><td>0.4438</td><td>2011</td><td>4.7M</td></tr></table>",
882
+ "bbox": [
883
+ 214,
884
+ 426,
885
+ 785,
886
+ 577
887
+ ],
888
+ "page_idx": 7
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "5 DISCUSSION AND FUTURE WORK ",
893
+ "text_level": 1,
894
+ "bbox": [
895
+ 176,
896
+ 608,
897
+ 478,
898
+ 625
899
+ ],
900
+ "page_idx": 7
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "We propose a novel embedding layer, the TT–embedding, for compressing huge lookup tables used for encoding categorical features of significant cardinality, such as the index of a token in natural language processing tasks. The proposed approach, based on the TT–decomposition, experimentally proved to be effective, as it heavily decreases the number of training parameters at the cost of a small deterioration in performance. In addition, our method can be easily integrated into any deep learning framework and trained via backpropagation, while capitalizing on reduced memory requirements and increased training batch size. ",
905
+ "bbox": [
906
+ 174,
907
+ 638,
908
+ 825,
909
+ 736
910
+ ],
911
+ "page_idx": 7
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "Our experimental results suggest several appealing directions for future work. First of all, TT– embeddings impose a concrete tensorial low-rank structure on the embedding matrix, which was shown to improve the generalization ability of the networks acting as a regularizer. The properties and conditions of applicability of this regularizer are subject to more rigorous analysis. Secondly, unlike standard embedding, we can introduce non-linearity into TT-cores to improve their expressive power (Khrulkov et al., 2019). Additionally, it is important to understand how the order of tokens in the vocabulary affects the properties of the networks with TT–embedding. We hypothesize that there exists the optimal order of tokens which better exploits the particular structure of TT–embedding and leads to a boost in performance and/or compression ratio. Finally, the idea of applying higher–order tensor decompositions to reduce the number of parameters in neural nets is complementary to more traditional methods such as pruning (Han et al., 2015) and quantization (Hubara et al., 2017; Xu et al., 2018). Thus, it would be interesting to make a thorough comparison of all these methods and investigate whether their combination may lead to even stronger compression. ",
916
+ "bbox": [
917
+ 174,
918
+ 743,
919
+ 825,
920
+ 924
921
+ ],
922
+ "page_idx": 7
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "REFERENCES ",
927
+ "text_level": 1,
928
+ "bbox": [
929
+ 174,
930
+ 103,
931
+ 287,
932
+ 119
933
+ ],
934
+ "page_idx": 8
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. ",
939
+ "bbox": [
940
+ 173,
941
+ 127,
942
+ 823,
943
+ 156
944
+ ],
945
+ "page_idx": 8
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "J Douglas Carroll and Jih-Jie Chang. Analysis of individual differences in multidimensional scaling via an n-way generalization of Eckart-Young decomposition. Psychometrika, 35(3), 1970. ",
950
+ "bbox": [
951
+ 173,
952
+ 166,
953
+ 823,
954
+ 196
955
+ ],
956
+ "page_idx": 8
957
+ },
958
+ {
959
+ "type": "text",
960
+ "text": "Patrick H Chen, Si Si, Yang Li, Ciprian Chelba, and Cho-jui Hsieh. GroupReduce: Block-wise low-rank approximation for neural language model shrinking. NIPS, 2018a. ",
961
+ "bbox": [
962
+ 169,
963
+ 205,
964
+ 823,
965
+ 234
966
+ ],
967
+ "page_idx": 8
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "Ting Chen, Martin Renqiang Min, and Yizhou Sun. Learning K-way D-dimensional Discrete Codes for Compact Embedding Representations. arXiv preprint arXiv:1806.09464, 2018b. ",
972
+ "bbox": [
973
+ 174,
974
+ 244,
975
+ 823,
976
+ 275
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "Criteo Labs. Kaggle Display Advertising Challenge, 2014. URL https://www.kaggle.com/ c/criteo-display-ad-challenge. ",
983
+ "bbox": [
984
+ 174,
985
+ 285,
986
+ 823,
987
+ 314
988
+ ],
989
+ "page_idx": 8
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "Zihang Dai, Zhilin Yang, Yiming Yang, William W Cohen, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860, 2019. ",
994
+ "bbox": [
995
+ 173,
996
+ 324,
997
+ 826,
998
+ 367
999
+ ],
1000
+ "page_idx": 8
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "Timur Garipov, Dmitry Podoprikhin, Alexander Novikov, and Dmitry Vetrov. Ultimate tensorization: compressing convolutional and FC layers alike. arXiv preprint arXiv:1611.03214, 2016. ",
1005
+ "bbox": [
1006
+ 169,
1007
+ 377,
1008
+ 823,
1009
+ 407
1010
+ ],
1011
+ "page_idx": 8
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, pp. 249–256, 2010. ",
1016
+ "bbox": [
1017
+ 174,
1018
+ 416,
1019
+ 823,
1020
+ 460
1021
+ ],
1022
+ "page_idx": 8
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in Neural Information Processing Systems, pp. 1135–1143, 2015. ",
1027
+ "bbox": [
1028
+ 173,
1029
+ 469,
1030
+ 826,
1031
+ 512
1032
+ ],
1033
+ "page_idx": 8
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "Richard A Harshman. Foundations of the PARAFAC procedure: Models and conditions for an” explanatory” multimodal factor analysis. UCLA Working Papers in Phonetics, 1970. ",
1038
+ "bbox": [
1039
+ 171,
1040
+ 523,
1041
+ 826,
1042
+ 554
1043
+ ],
1044
+ "page_idx": 8
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "Xinran He, Junfeng Pan, Ou Jin, Tianbing Xu, Bo Liu, Tao Xu, Yanxin Shi, Antoine Atallah, Ralf Herbrich, Stuart Bowers, et al. Practical lessons from predicting clicks on ads at facebook. In Proceedings of the Eighth International Workshop on Data Mining for Online Advertising, pp. 1–9. ACM, 2014. ",
1049
+ "bbox": [
1050
+ 174,
1051
+ 563,
1052
+ 826,
1053
+ 619
1054
+ ],
1055
+ "page_idx": 8
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997. ",
1060
+ "bbox": [
1061
+ 169,
1062
+ 630,
1063
+ 825,
1064
+ 659
1065
+ ],
1066
+ "page_idx": 8
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. Journal of Machine Learning Research, 18(187):1–30, 2017. ",
1071
+ "bbox": [
1072
+ 173,
1073
+ 670,
1074
+ 826,
1075
+ 713
1076
+ ],
1077
+ "page_idx": 8
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "Hakan Inan, Khashayar Khosravi, and Richard Socher. Tying word vectors and word classifiers: A loss framework for language modeling. arXiv preprint arXiv:1611.01462, 2016. ",
1082
+ "bbox": [
1083
+ 173,
1084
+ 723,
1085
+ 823,
1086
+ 753
1087
+ ],
1088
+ "page_idx": 8
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Armand Joulin, Edouard Grave, Piotr Bojanowski, Matthijs Douze, Herve J ´ egou, and Tomas Mikolov. ´ Fasttext. zip: Compressing text classification models. arXiv preprint arXiv:1612.03651, 2016. ",
1093
+ "bbox": [
1094
+ 173,
1095
+ 762,
1096
+ 826,
1097
+ 792
1098
+ ],
1099
+ "page_idx": 8
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Yuchin Juan, Yong Zhuang, Wei-Sheng Chin, and Chih-Jen Lin. Field-aware factorization machines for CTR prediction. In Proceedings of the 10th ACM Conference on Recommender Systems, pp. 43–50. ACM, 2016. ",
1104
+ "bbox": [
1105
+ 174,
1106
+ 801,
1107
+ 825,
1108
+ 845
1109
+ ],
1110
+ "page_idx": 8
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "Valentin Khrulkov, Oleksii Hrinchuk, and Ivan Oseledets. Generalized tensor models for recurrent neural networks. arXiv preprint arXiv:1901.10801, 2019. ",
1115
+ "bbox": [
1116
+ 169,
1117
+ 856,
1118
+ 825,
1119
+ 885
1120
+ ],
1121
+ "page_idx": 8
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Durk P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparameterization trick. In Advances in Neural Information Processing Systems, pp. 2575–2583, 2015. ",
1126
+ "bbox": [
1127
+ 173,
1128
+ 895,
1129
+ 823,
1130
+ 924
1131
+ ],
1132
+ "page_idx": 8
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012. ",
1137
+ "bbox": [
1138
+ 173,
1139
+ 104,
1140
+ 826,
1141
+ 133
1142
+ ],
1143
+ "page_idx": 9
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "Maximilian Lam. Word2Bits-quantized word vectors. arXiv preprint arXiv:1803.05651, 2018. ",
1148
+ "bbox": [
1149
+ 174,
1150
+ 142,
1151
+ 795,
1152
+ 159
1153
+ ],
1154
+ "page_idx": 9
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "Vadim Lebedev, Yaroslav Ganin, Maksim Rakhuba, Ivan Oseledets, and Victor Lempitsky. Speedingup convolutional neural networks using fine-tuned CP-decomposition. ICLR, 2015. ",
1159
+ "bbox": [
1160
+ 173,
1161
+ 167,
1162
+ 825,
1163
+ 196
1164
+ ],
1165
+ "page_idx": 9
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "Ekaterina Lobacheva, Nadezhda Chirkova, and Dmitry Vetrov. Bayesian sparsification of recurrent neural networks. arXiv preprint arXiv:1708.00077, 2017. ",
1170
+ "bbox": [
1171
+ 173,
1172
+ 207,
1173
+ 823,
1174
+ 236
1175
+ ],
1176
+ "page_idx": 9
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "Xindian Ma, Peng Zhang, Shuai Zhang, Nan Duan, Yuexian Hou, Dawei Song, and Ming Zhou. A tensorized transformer for language modeling. arXiv preprint arXiv:1906.09777, 2019. ",
1181
+ "bbox": [
1182
+ 173,
1183
+ 244,
1184
+ 823,
1185
+ 275
1186
+ ],
1187
+ "page_idx": 9
1188
+ },
1189
+ {
1190
+ "type": "text",
1191
+ "text": "Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pp. 142–150, Portland, Oregon, USA, June 2011. Association for Computational Linguistics. ",
1192
+ "bbox": [
1193
+ 173,
1194
+ 284,
1195
+ 826,
1196
+ 340
1197
+ ],
1198
+ "page_idx": 9
1199
+ },
1200
+ {
1201
+ "type": "text",
1202
+ "text": "Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016. ",
1203
+ "bbox": [
1204
+ 176,
1205
+ 349,
1206
+ 825,
1207
+ 380
1208
+ ],
1209
+ "page_idx": 9
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Alexander Novikov, Dmitrii Podoprikhin, Anton Osokin, and Dmitry P Vetrov. Tensorizing neural networks. In Advances in Neural Information Processing Systems, pp. 442–450, 2015. ",
1214
+ "bbox": [
1215
+ 173,
1216
+ 388,
1217
+ 823,
1218
+ 420
1219
+ ],
1220
+ "page_idx": 9
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "Ivan V Oseledets. Approximation of $2 ^ { d } \\times 2 ^ { d }$ matrices using tensor decomposition. SIAM Journal on Matrix Analysis and Applications, 31(4):2130–2145, 2010. ",
1225
+ "bbox": [
1226
+ 171,
1227
+ 426,
1228
+ 823,
1229
+ 458
1230
+ ],
1231
+ "page_idx": 9
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "Ivan V Oseledets. Tensor-train decomposition. SIAM Journal on Scientific Computing, 33(5): 2295–2317, 2011. ",
1236
+ "bbox": [
1237
+ 171,
1238
+ 465,
1239
+ 825,
1240
+ 496
1241
+ ],
1242
+ "page_idx": 9
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "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. In NeurIPS 2017 Autodiff Workshop, 2017. ",
1247
+ "bbox": [
1248
+ 178,
1249
+ 505,
1250
+ 825,
1251
+ 549
1252
+ ],
1253
+ "page_idx": 9
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "Bogdan Pirvu, Valentin Murg, J Ignacio Cirac, and Frank Verstraete. Matrix product operator representations. New Journal of Physics, 12(2):025012, 2010. ",
1258
+ "bbox": [
1259
+ 174,
1260
+ 558,
1261
+ 821,
1262
+ 587
1263
+ ],
1264
+ "page_idx": 9
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "Matt Post. A call for clarity in reporting bleu scores. arXiv:1804.0877, 2018. ",
1269
+ "bbox": [
1270
+ 173,
1271
+ 595,
1272
+ 681,
1273
+ 612
1274
+ ],
1275
+ "page_idx": 9
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "Ofir Press and Lior Wolf. Using the output embedding to improve language models. arXiv preprint arXiv:1608.05859, 2016. ",
1280
+ "bbox": [
1281
+ 176,
1282
+ 621,
1283
+ 825,
1284
+ 650
1285
+ ],
1286
+ "page_idx": 9
1287
+ },
1288
+ {
1289
+ "type": "text",
1290
+ "text": "Abigail See, Minh-Thang Luong, and Christopher D Manning. Compression of neural machine translation models via pruning. arXiv preprint arXiv:1606.09274, 2016. ",
1291
+ "bbox": [
1292
+ 174,
1293
+ 660,
1294
+ 825,
1295
+ 689
1296
+ ],
1297
+ "page_idx": 9
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
1302
+ "bbox": [
1303
+ 173,
1304
+ 698,
1305
+ 823,
1306
+ 728
1307
+ ],
1308
+ "page_idx": 9
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013. ",
1313
+ "bbox": [
1314
+ 174,
1315
+ 737,
1316
+ 825,
1317
+ 794
1318
+ ],
1319
+ "page_idx": 9
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "Andros Tjandra, Sakriani Sakti, and Satoshi Nakamura. Compressing recurrent neural network with tensor train. arXiv preprint arXiv:1705.08052, 2017. ",
1324
+ "bbox": [
1325
+ 169,
1326
+ 803,
1327
+ 823,
1328
+ 833
1329
+ ],
1330
+ "page_idx": 9
1331
+ },
1332
+ {
1333
+ "type": "text",
1334
+ "text": "Ehsan Variani, Ananda Theertha Suresh, and Mitchel Weintraub. WEST: Word Encoded Sequence Transducers. arXiv preprint arXiv:1811.08417, 2018. ",
1335
+ "bbox": [
1336
+ 171,
1337
+ 842,
1338
+ 823,
1339
+ 872
1340
+ ],
1341
+ "page_idx": 9
1342
+ },
1343
+ {
1344
+ "type": "text",
1345
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 5998–6008, 2017. ",
1346
+ "bbox": [
1347
+ 174,
1348
+ 881,
1349
+ 825,
1350
+ 924
1351
+ ],
1352
+ "page_idx": 9
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "Wenqi Wang, Yifan Sun, Brian Eriksson, Wenlin Wang, and Vaneet Aggarwal. Wide compression: Tensor ring nets. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9329–9338, 2018. ",
1357
+ "bbox": [
1358
+ 178,
1359
+ 104,
1360
+ 823,
1361
+ 147
1362
+ ],
1363
+ "page_idx": 10
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "Felix Wu, Angela Fan, Alexei Baevski, Yann N Dauphin, and Michael Auli. Pay less attention with lightweight and dynamic convolutions. arXiv preprint arXiv:1901.10430, 2019. ",
1368
+ "bbox": [
1369
+ 173,
1370
+ 156,
1371
+ 820,
1372
+ 186
1373
+ ],
1374
+ "page_idx": 10
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "Yuhui Xu, Yongzhuang Wang, Aojun Zhou, Weiyao Lin, and Hongkai Xiong. Deep neural network compression with single and multiple level quantization. arXiv preprint arXiv:1803.03289, 2018. ",
1379
+ "bbox": [
1380
+ 174,
1381
+ 195,
1382
+ 823,
1383
+ 226
1384
+ ],
1385
+ "page_idx": 10
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "Yinchong Yang, Denis Krompass, and Volker Tresp. Tensor-train recurrent neural networks for video classification. arXiv preprint arXiv:1707.01786, 2017. ",
1390
+ "bbox": [
1391
+ 173,
1392
+ 236,
1393
+ 823,
1394
+ 263
1395
+ ],
1396
+ "page_idx": 10
1397
+ },
1398
+ {
1399
+ "type": "text",
1400
+ "text": "Rose Yu, Stephan Zheng, Anima Anandkumar, and Yisong Yue. Long-term forecasting using tensor-train RNNs. arXiv preprint arXiv:1711.00073, 2017. ",
1401
+ "bbox": [
1402
+ 173,
1403
+ 273,
1404
+ 825,
1405
+ 303
1406
+ ],
1407
+ "page_idx": 10
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "Qibin Zhao, Guoxu Zhou, Shengli Xie, Liqing Zhang, and Andrzej Cichocki. Tensor ring decomposition. arXiv preprint arXiv:1606.05535, 2016. ",
1412
+ "bbox": [
1413
+ 174,
1414
+ 313,
1415
+ 825,
1416
+ 342
1417
+ ],
1418
+ "page_idx": 10
1419
+ },
1420
+ {
1421
+ "type": "text",
1422
+ "text": "A MULTIINDEX CONSTRUCTION ",
1423
+ "text_level": 1,
1424
+ "bbox": [
1425
+ 176,
1426
+ 103,
1427
+ 455,
1428
+ 119
1429
+ ],
1430
+ "page_idx": 11
1431
+ },
1432
+ {
1433
+ "type": "table",
1434
+ "img_path": "images/bffbe871a614330cbb723c7fe4c5eeafb034629b8460073d8344773ceb73a6b5.jpg",
1435
+ "table_caption": [],
1436
+ "table_footnote": [],
1437
+ "table_body": "<table><tr><td>Algorithm 1 The algorithm implementing the bijection I(i) as described in Section 3.3.</td></tr><tr><td>Require: I- vocabulary size,{Ik}=1-an arbitrary factorization of I,i - index of the target</td></tr><tr><td>word in vocabulary.</td></tr><tr><td>Returns: I(i)= (i1,...,in)-N-dimensional index.</td></tr><tr><td>Initialize:L={1,I1,II2,...,II2...IN-1}</td></tr><tr><td>for k = N to 1 do</td></tr><tr><td>ik ←floor(i/[k]) i←i mod L[k]</td></tr><tr><td>end for</td></tr></table>",
1438
+ "bbox": [
1439
+ 178,
1440
+ 140,
1441
+ 825,
1442
+ 275
1443
+ ],
1444
+ "page_idx": 11
1445
+ },
1446
+ {
1447
+ "type": "table",
1448
+ "img_path": "images/d09e3c24ff55f6b5c5c36541cfdabe4f827a2e5ffc852d139971aa1dc6db695a.jpg",
1449
+ "table_caption": [],
1450
+ "table_footnote": [],
1451
+ "table_body": "<table><tr><td>Igorithm 2 Tne algorithm implementing tne bijection (i,...,&#x27;N) →ε,inverse to L(ε).</td></tr><tr><td>Require: I - vocabulary size, {Ik}N=1 - an arbitrary factorization of I, (i1..,in)- N- dimensional index.</td></tr><tr><td>Returns: i - index of the target word in vocabulary</td></tr><tr><td>Initialize:L={1,I1,I1I2,...,I1I2...IN-1}</td></tr><tr><td>i↑0</td></tr><tr><td></td></tr><tr><td>for k=1 to N do</td></tr><tr><td>i←i+ik×L[k] end for</td></tr></table>",
1452
+ "bbox": [
1453
+ 173,
1454
+ 305,
1455
+ 826,
1456
+ 433
1457
+ ],
1458
+ "page_idx": 11
1459
+ },
1460
+ {
1461
+ "type": "text",
1462
+ "text": "B TENSOR RING EMBEDDING ",
1463
+ "text_level": 1,
1464
+ "bbox": [
1465
+ 176,
1466
+ 462,
1467
+ 437,
1468
+ 479
1469
+ ],
1470
+ "page_idx": 11
1471
+ },
1472
+ {
1473
+ "type": "text",
1474
+ "text": "Tensor Ring (TR) decomposition is a generalization to TT-decomposition where the first and the last cores are 3-dimensional tensors which corresponds to $R _ { 0 } = R _ { N } > 1$ . Formally, a tensor $_ { x }$ is said to be represented in the TR format (Zhao et al., 2016) if each element of $_ { x }$ can be computed as: ",
1475
+ "bbox": [
1476
+ 174,
1477
+ 494,
1478
+ 825,
1479
+ 536
1480
+ ],
1481
+ "page_idx": 11
1482
+ },
1483
+ {
1484
+ "type": "equation",
1485
+ "img_path": "images/50fcbdef221ab94db6b0611ed2f32da12fc565191b796e1ac0debae3fdf71733.jpg",
1486
+ "text": "$$\n\\pmb { \\mathcal { X } } ( i _ { 1 } , i _ { 2 } , \\dots , i _ { d } ) = \\sum _ { r _ { 0 } = 1 } ^ { R _ { 0 } } \\sum _ { r _ { 1 } = 1 } ^ { R _ { 1 } } \\cdots \\sum _ { r _ { N - 1 } = 1 } ^ { R _ { N - 1 } } \\pmb { \\mathcal { G } } ^ { ( 1 ) } ( r _ { 0 } , i _ { 1 } , r _ { 1 } ) \\pmb { \\mathcal { G } } ^ { ( 2 ) } ( r _ { 1 } , i _ { 2 } , r _ { 2 } ) \\dots \\pmb { \\mathcal { G } } ^ { ( N ) } ( r _ { N - 1 } , i _ { N } , r _ { 0 } ) .\n$$",
1487
+ "text_format": "latex",
1488
+ "bbox": [
1489
+ 184,
1490
+ 542,
1491
+ 813,
1492
+ 590
1493
+ ],
1494
+ "page_idx": 11
1495
+ },
1496
+ {
1497
+ "type": "text",
1498
+ "text": "Similar to TT, we can define TR-matrix (see Figure 3) and corresponding TR-embedding layer. ",
1499
+ "bbox": [
1500
+ 169,
1501
+ 595,
1502
+ 795,
1503
+ 612
1504
+ ],
1505
+ "page_idx": 11
1506
+ },
1507
+ {
1508
+ "type": "image",
1509
+ "img_path": "images/4c3cbc63e0c62179be64365f490f962e03c18b4bae41365276eeb5f08830cea5.jpg",
1510
+ "image_caption": [
1511
+ "Figure 3: Construction of the TR–matrix from the standard embedding matrix. Blue color depicts how the single element in the initial matrix is transformed into the product of the highlighted matrices. "
1512
+ ],
1513
+ "image_footnote": [],
1514
+ "bbox": [
1515
+ 173,
1516
+ 630,
1517
+ 820,
1518
+ 762
1519
+ ],
1520
+ "page_idx": 11
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "Table 5 shows the performance of different NMT models with both embedding and softmax layers replaced by either TT or TR factorizations. To achieve the same compression factor as the corresponding TT models, TR models should have smaller ranks which negatively affects their performance. Furthermore, TR is more computationally heavy. ",
1525
+ "bbox": [
1526
+ 173,
1527
+ 819,
1528
+ 826,
1529
+ 877
1530
+ ],
1531
+ "page_idx": 11
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "C COMPLETE LIST OF HYPERPARAMETERS ",
1536
+ "text_level": 1,
1537
+ "bbox": [
1538
+ 174,
1539
+ 897,
1540
+ 544,
1541
+ 914
1542
+ ],
1543
+ "page_idx": 11
1544
+ },
1545
+ {
1546
+ "type": "table",
1547
+ "img_path": "images/1d96e620a1b618acd747346c8acff177bf05fe98ebc137e74ec49458694a87eb.jpg",
1548
+ "table_caption": [
1549
+ "Table 5: NMT, Transformer-big on WMT‘14 English-to-German dataset. Both case-sensitive tokenized BLEU and de-tokenized SacreBLEU (Post, 2018) on newstest2014 are reported. "
1550
+ ],
1551
+ "table_footnote": [],
1552
+ "table_body": "<table><tr><td>Model</td><td>Embedding shape</td><td>TT rank</td><td>Token BLEU</td><td>Sacre BLEU</td><td>Emb compr.</td><td>Total params</td><td>Iter time</td></tr><tr><td>Big</td><td>32768 × 1024</td><td></td><td>29.58</td><td>28.84</td><td>1</td><td>210M</td><td>1.14</td></tr><tr><td>Big+TT1</td><td>(32,32,32) ×(8,8,16)</td><td>64</td><td>29.17</td><td>28.53</td><td>15.3</td><td>179M</td><td>1.23</td></tr><tr><td>Big+TT2</td><td>(32,32,32) × (8,8,16)</td><td>48</td><td>28.53</td><td>27.97</td><td>26.8</td><td>178M</td><td>1.22</td></tr><tr><td>Big+TT3</td><td>(32,32,32) × (8,8,16)</td><td>32</td><td>28.26</td><td>27.70</td><td>58.5</td><td>177M</td><td>1.22</td></tr><tr><td>Big+TR1</td><td>(32,32,32) × (8,8,16)</td><td>32</td><td>28.64</td><td>28.07</td><td>16</td><td>179M</td><td>1.28</td></tr><tr><td>Big+TR2</td><td>(32,32,32) × (8,8,16)</td><td>16</td><td>28.10</td><td>27.50</td><td>64</td><td>177M</td><td>1.23</td></tr></table>",
1553
+ "bbox": [
1554
+ 181,
1555
+ 185,
1556
+ 815,
1557
+ 320
1558
+ ],
1559
+ "page_idx": 12
1560
+ },
1561
+ {
1562
+ "type": "table",
1563
+ "img_path": "images/bd1a25db51b68e370fc8ac5caf4fe1bfee637bd94f4ce151cf275e6062b78772.jpg",
1564
+ "table_caption": [
1565
+ "Table 6: Full list of hyperparameters used to train Transformer-big for NMT. "
1566
+ ],
1567
+ "table_footnote": [],
1568
+ "table_body": "<table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Data cleaning max training sequence length in tokens min training sequence length in tokens max source /target difference in tokens max source/target ratio Model</td><td>128 3 25 2.5</td></tr><tr><td>vocabulary size, |V| hidden size,dmodel intermediate FF layer size, dff number of attentionheads,h number of layers in encoder/decoder</td><td>32768 1024 4096 16 6</td></tr><tr><td>Optimization optimizer learning rate betas,(β1,β2) learning rate decay policy weight decay batch size in tokens number of training steps number of warmup steps</td><td>NovoGrad 0.04 (0.95,0.25) cosine 0.0001 393216 80000 4000</td></tr><tr><td>Regularization global dropout, Pdrop label smoothing Inference</td><td>0.2 0.1</td></tr><tr><td>beam search beam size length penalty max source /target difference in tokens</td><td>4 0 50</td></tr></table>",
1569
+ "bbox": [
1570
+ 302,
1571
+ 443,
1572
+ 694,
1573
+ 877
1574
+ ],
1575
+ "page_idx": 12
1576
+ },
1577
+ {
1578
+ "type": "table",
1579
+ "img_path": "images/6c0b9edfc8ad1111dc209cb07aec6d89d59e7fe598515a490ecf6b557a5b7a17.jpg",
1580
+ "table_caption": [
1581
+ "Table 7: Full list of hyperparameters used to train Transformer-XL for LM. "
1582
+ ],
1583
+ "table_footnote": [],
1584
+ "table_body": "<table><tr><td>Parameter Model</td><td>Value</td></tr><tr><td>vocabulary size, |V| hidden size,dmodel intermediate FF layer size,dff number of attention heads, h number of layers softmax layer Optimization</td><td>267735 512 2048 8 16 adaptive</td></tr><tr><td>optimizer learning rate betas,(β1, β2) learning rate decay policy weight decay batch size in sequences target sequence length memory sequence length number of training steps number of warmup steps</td><td>NovoGrad 0.025 (0.95,0.25) cosine 0.0001 1024 128 128 150000 1500</td></tr><tr><td>Regularization global dropout, Pdrop</td><td>0.15</td></tr><tr><td>Inference batch size target sequence length memory sequence length max positional encodings length</td><td>4 128 640 400</td></tr></table>",
1585
+ "bbox": [
1586
+ 323,
1587
+ 325,
1588
+ 673,
1589
+ 722
1590
+ ],
1591
+ "page_idx": 13
1592
+ }
1593
+ ]
parse/train/S1e4Q6EtDH/S1e4Q6EtDH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1e4Q6EtDH/S1e4Q6EtDH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1lXnhVKPr/S1lXnhVKPr.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1lXnhVKPr/S1lXnhVKPr_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1lXnhVKPr/S1lXnhVKPr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1lXnhVKPr/S1lXnhVKPr_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJNDWNOlg/SJNDWNOlg.md ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WHAT IS THE BEST PRACTICE FOR CNNS APPLIED TO VISUAL INSTANCE RETRIEVAL?
2
+
3
+ Jiedong Hao, Jing Dong, Wei Wang, Tieniu Tan Center for Research on Intelligent Perception and Computing Institute of Automation, Chinese Academy of Sciences
4
+
5
+ # ABSTRACT
6
+
7
+ Previous work has shown that feature maps of deep convolutional neural networks (CNNs) can be interpreted as feature representation of a particular image region. Features aggregated from these feature maps have been exploited for image retrieval tasks and achieved state-of-the-art performances in recent years. The key to the success of such methods is the feature representation. However, the different factors that impact the effectiveness of features are still not explored thoroughly. There are much less discussion about the best combination of them.
8
+
9
+ The main contribution of our paper is the thorough evaluations of the various factors that affect the discriminative ability of the features extracted from CNNs. Based on the evaluation results, we also identify the best choices for different factors and propose a new multi-scale image feature representation method to encode the image effectively. Finally, we show that the proposed method generalises well and outperforms the state-of-the-art methods on four typical datasets used for visual instance retrieval.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Image retrieval is an important problem both for academic research and for industrial applications. Although it has been studied for many years (Sivic & Zisserman, 2003; Philbin et al., 2007; Tolias et al., 2015), it is still a challenging task. Generally, image retrieval is divided into two groups. The first one is the category-level image retrieval (Sharma & Schiele, 2015), in which an image in the dataset is deemed to be similar to the query image if they share the same class or they are similar in shape and local structures. The other group is the instance-level image retrieval (Tolias et al., 2015), in which an image is considered to match the query if they contain the same object or the same scene. The instance-level image retrieval is harder in that the retrieval method need to encode the local and detailed information in order to tell two images apart, e.g., the algorithm should be able to detect the differences between the Eiffel Tower and other steel towers although they have similar shapes. In this paper, we focus on the instance-level image retrieval.
14
+
15
+ Traditionally, visual instance retrieval is mainly addressed by the BoF (bag of features) based methods using the local feature descriptors such as SIFT (Lowe, 2004). In order to boost the retrieval performances, post-processing techniques such as query expansion (Chum et al., 2007) and spatial verification (Philbin et al., 2007) are also employed.
16
+
17
+ With the decisive victory (Krizhevsky et al., 2012) over traditional models in the ImageNet (Russakovsky et al., 2015) image classification challenge, convolutional neural networks (Lecun et al., 1998) continue to achieve remarkable success in diverse fields such as object detection (Liu et al., 2015; Shaoqing Ren, 2015), semantic segmentation (Dai et al., 2016) and even image style transfer (Gatys et al., 2016). Networks trained on the Imagenet classification task can generalize quite well to other tasks, which are either used off-the-shelf (Razavian et al., 2014a) or fine-tuned on the task-specific datasets (Azizpour et al., 2014; Long et al., 2015). Inspired by all these, researchers in the field of image retrieval also shift their interest to the CNNs. Their experiments have shown promising and surprising results (Babenko et al., 2014; Razavian et al., 2014c; Tolias et al., 2015), which are on par with or surpass the performances of conventional methods like BoF and VLAD (vector of locally aggregated descriptors) (Jegou et al., 2010; Arandjelovi ´ c & Zisserman, 2013) . ´
18
+
19
+ Despite all these previous advances (Babenko et al., 2014; Babenko & Lempitsky, 2015; Tolias et al., 2015) on using CNNs for image feature representation, the underlying factors that contribute to the success of off-the-shelf CNNs on the image retrieval tasks are still largely unclear and unexplored, e.g., which layer is the best choice for instance retrieval, the convolutional layer or the fully-connected layer? What is the best way to represent the multi-scale information of an image? Clarifying these questions will help us advance a further step towards building a more robust and accurate retrieval system. Also in situations where a large numbers of training samples are not available, instance retrieval using unsupervised method is still preferable and may be the only option.
20
+
21
+ In this paper, we aim to answer these questions and make three novel contributions. Unlike previous papers, we explicitly choose five factors to study the image representations based on CNNs and conduct extensive experiments to evaluate their impacts on the retrieval performances. We also give detailed analysis on these factors and give our recommendations for combining them. During experiments, we borrow wisdoms from literatures and evaluate their usefulness, but find that they are not as effective as some of the simpler design choices. Second, by combining the insights obtained during the individual experiments, we are able to propose a new multi-scale image representation, which is compact yet effective. Finally, we evaluate our method on four challenging datasets, i.e., Oxford5k, Paris6k, Oxford105k and UKB. Experimental results show that our method is generally applicable and outperforms all previous methods on compact image representations by a large margin.
22
+
23
+ # 2 RELATED WORK
24
+
25
+ Multi-scale image representation. Lazebnik et al. (2006) propose the spatial pyramid matching approach to encode the spatial information using BoF based methods. They represent an image using a pyramid of several levels or scales. Features from different scales are combined to form the image representation in such a way that coarser levels get less weight while finer levels get more weight. Their argument is that matches found in coarser levels may involve increasingly dissimilar image features. In our paper, we also explore the multi-scale paradigm in the same spirit using the convolutional feature maps as the local descriptors. We find that the deep features from the convolutional feature maps are distinct from the traditional descriptors: the weighted sum of different level of features shows no superior performances than a simple summation of them. Kaiming et al. (2014) devise an approach called SPP (spatial pyramid pooling). In SPP, feature maps of the last convolutional layer are divided into a 3 or 4 scale pyramid. First the regional features in each scale are concatenated, then the scale-level features are concatenated to a fixed length vector to be forwarded to the next fully-connected layers. We find that this strategy is ineffective for unsupervised instance retrieval, leading to inferior performances compared to other simple combination methods (see the part about multi-scale representation in section 5.2 for more details.).
26
+
27
+ Image representation using off-the-shelf CNNs. Gong et al. (2014) propose the MOP (multiscale orderless pooling) method to represent an image in which VLAD is used to encode the level 2 and level 3 features. Then features from different scales are PCA-compressed and concatenated to form the image features. This method is rather complicated and time-consuming. At the same time, Babenko et al. (2014) use Alexnet (Krizhevsky et al., 2012) trained on the Imagenet 1000-class classification task and retrain the network on task-related dataset. The retraining procedure gives a boost to the retrieval performances. Instead of using the output of the fully-connected layers as the image feature representations, Babenko & Lempitsky (2015) use the output feature maps of last convolutional layer to compute the image features. Recently, instead of sum-pooling the convolutional features, Tolias et al. (2015) use max-pooling to aggregate the deep descriptors. Their multi-scale method, called R-MAC (regional maximum activation of convolutions), further improves the previous results on four common instance retrieval datasets. Our work differs from these papers in that we explicitly explore the various factors that underpin the success of unsupervised instance retrieval, which have not been fully explored and analysed. By carefully choosing the different setting for each factor and combining them in a complementary way, we show that a large improvement can be achieved without additional cost.
28
+
29
+ # 3 IMPACTING FACTORS
30
+
31
+ When we employ off-the-shelf CNNs for the task of instance-level image retrieval, a natural question is: what kind of design choices should we make in order to make full use of the representational power of existing models? In this section, we summarize the five factors that may greatly impact the performance of the final image retrieval system. In section 5.2, we will show our experimental results on each key factor. Before we delve into the impacting factors, first we will give a brief introduction about how to represent an image using the activation feature maps of a certain layer.
32
+
33
+ # 3.1 CNN FEATURES FOR INSTANCE RETRIEVAL
34
+
35
+ In this paper, we are mainly interested in extracting compact and discriminative image features using the off-the-shelf CNNs in an efficient way. For a given image $I$ , we simply subtract the mean value of the RGB channels from the original image and do not do other sophisticated preprocessing. Then the image is fed into the convolutional network and goes through a series of convolutions, non-linear activations and pooling operations. The feature activation maps of a certain layer can be interpreted as the raw image features, based on which we build the final image features. These feature maps form a tensor of size $K \times H \times W$ , where $K$ is the number of feature channels, and $H$ and $W$ are height and width of a feature map. Each feature map represents a specific pattern which encodes a small part of information about the original image. If we represent the set of feature maps as $F = \{ \bar { F _ { i } } \} , i = 1 , 2 , \dots , K$ , where $F _ { i }$ is the $i ^ { t h }$ activation feature map, then the most simple image feature is formulated as:
36
+
37
+ $$
38
+ \boldsymbol { f } = [ f _ { 1 } , f _ { 2 } , \ldots , f _ { i } , \ldots , f _ { K } ] ^ { T } .
39
+ $$
40
+
41
+ In the above equation 1, $f _ { i }$ is obtained by applying the feature aggregation method (see section 3.2) over the $i ^ { t h }$ feature map $F _ { i }$ . Throughout this paper, we use feature maps after the non-linear activations (ReLU) so that the elements in each feature map are all non-negative. We also experiment with feature maps prior to ReLU, but find that they lead to inferior performances. After the image feature representation is obtained, post-processing techniques such as PCA and whitening can be further applied.
42
+
43
+ # 3.2 IMPACTING FACTORS ON PERFORMANCE
44
+
45
+ Feature aggregation and normalization. After the feature maps of a certain layer are obtained, it is still challenging to aggregate the 3-dimensional feature maps to get compact vector representations for images. Previous papers use either sum-pooling (Babenko & Lempitsky, 2015) or maxpooling (Tolias et al., 2015) followed by $l _ { 2 }$ -normalization. Sum-pooling over a particular feature map $F _ { i }$ is expressed as
46
+
47
+ $$
48
+ f _ { i } = \sum _ { m = 1 } ^ { H } \sum _ { n = 1 } ^ { W } F _ { i } ( m , n ) , i \in \{ 1 , 2 , \ldots , K \} ,
49
+ $$
50
+
51
+ while max-pooling is given by
52
+
53
+ $$
54
+ f _ { i } = \operatorname* { m a x } _ { m , n } F _ { i } ( m , n ) ,
55
+ $$
56
+
57
+ where $m , n$ are all the possible values over the spatial coordinate of size $H \times W$ . In this paper, for the first time, different combinations of aggregation and normalization methods $l _ { 2 }$ and $l _ { 1 }$ in the manner of RootSIFT (Arandjelovic & Zisserman, 2012)) are evaluated and their results are reported. ´
58
+
59
+ Output layer selection. Zeiler & Fergus (2014) has shown that image features aggregated from the feature activation maps of certain layers have interpretable semantic meanings. Gong et al. (2014) and Babenko et al. (2014) use the output of the first fully-connected layer to obtain the image features, while Babenko & Lempitsky (2015) and Tolias et al. (2015) use the output feature maps of the last convolutional layer. But these choices are somewhat subjective. In this paper, we extract dataset image features from the output feature maps of different layers and compare their retrieval performances. Based on the finding in this experiment, we choose the best-performing layer and also come up with a layer ensemble approach which outperforms state-of-the-art methods (see section 5.3).
60
+
61
+ Image resizing. Famous models such as Alexnet (Krizhevsky et al., 2012) and VGGnet (Simonyan & Zisserman, 2014) all require that the input images have fixed size. In order to meet this requirement, previous papers (Gong et al., 2014; Babenko & Lempitsky, 2015) usually resize the input images to the fixed size. We postulate that the resizing operation may lead to the distortion of important information about the objects in the natural images. Ultimately, this kind of operation may hurt the discriminative power of image features extracted from the network, thus degrading the retrieval performances. For the task of image retrieval, we think it is best to keep the images their original sizes and feed them directly to the network whenever possible. In this paper, three image resizing strategies are explored:
62
+
63
+ ![](images/2984feb83e2f20d11b4eea0a0a18acd87f8ce71707dc7e783ada9b5f541d5352.jpg)
64
+ Figure 1: An illustration of multi-scale representation of an image. The whole image is divided into 3 levels from the coarsest (level 1) to the finest (level 3). At each level, the image is divided into different number of equal-sized regions.
65
+
66
+ • Both the height and width of the dataset images are set to the same fixed value (denoted as two-fixed).
67
+ • The minimum of each dataset image’s size is set to a fixed value. (The aspect ratio of the original image is kept.) (denoted as one-fixed).
68
+ • The images are kept their original sizes. (denoted as free).
69
+
70
+ Multi-scale feature representation. Unlike local feature descriptors such as SIFT (Lowe, 2004), the feature vector extracted from the deep convolutional networks for an image is a global descriptor which encodes the holistic information. When used for image retrieval, this kind of features still lack the detailed and local information desired to accurately match two images. Inspired by spatial pyramid matching (Lazebnik et al., 2006) and SPP (Kaiming et al., 2014), we explore the feasibility of applying this powerful method to obtain discriminative image features. An image is represented by a $L$ -level pyramid, and at each level, the image is divided evenly into several overlapping or non-overlapping regions. The vector representations of these small regions are computed, then the regional vectors are combined to form the image feature vectors. The single scale representation of an image is just a special case of the multi-scale method in which the number of level $L$ equals 1.
71
+
72
+ Figure 1 shows an example of 3 level representations of an image. The time cost of re-feeding those small regions into the network to compute the regional vectors would be huge, thus unacceptable for instance retrieval tasks. Inspired by the work of Girshick (2015) and Tolias et al. (2015), we assume a linear projection between the original image regions and the regions in the feature maps of a certain layer. Then the regional feature vectors can be efficiently computed without re-feeding the corresponding image regions. In section 5.2, various settings for the multi-scale and scalelevel feature combination methods are explored and their retrieval performances are reported and analysed.
73
+
74
+ PCA and whitening. Principal Component Analysis (PCA) is a simple yet efficient method for reducing the dimensionality of feature vectors and decorrelating the feature elements. Previous work (Babenko et al., 2014; Jegou et al., 2010) has shown evidences that PCA and whitened features ´ can actually boost the performances of image retrieval. In this paper, we further investigate the usefulness of PCA and whitening within our pipeline and give some recommendations.
75
+
76
+ # 4 IMPLEMENTATION
77
+
78
+ We use the open source deep learning framework Caffe (Jia et al., 2014) for our whole experiments. The aim of this research is to investigate the most effective ways to exploit the feature activations of existing deep convolutional models. Based on past practices for networks to go deeper (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014; Szegedy et al., 2015; He et al., 2015), a consideration for moderate computational cost, and also the results from Tolias et al. (2015) that deeper networks work better than shallower ones, we decide to use the popular VGG-19 model (Simonyan & Zisserman, 2014) trained on ImageNet as our model.
79
+
80
+ Network transformation. The original VGG-19 network only accepts an image of fixed size $( 2 2 4 \times$ 224), which is not the optimal choice when extracting image features for retrieval tasks. In order for the network to be able to process an image of arbitrary size (of course, the image size can not exceed the GPU’s memory limit) and for us to experiment with different input image resizing strategies, we adapt the original VGG-19 network and change the fully-connected layers to convolutional (Long et al., 2015) layers. For more details about network transformations, see appendix A.
81
+
82
+ # 5 EXPERIMENTS
83
+
84
+ In this section, we first introduce the datasets used and the evaluation metrics. Then we report our experimental results for different impacting factors and give detailed analysis. In the last part, we show the performance of our method considering all these impacting factors and compare our method with the state-of-the-art methods on four datasets.
85
+
86
+ # 5.1 DATASETS AND EVALUATION METRICS
87
+
88
+ The Oxford5k dataset (Philbin et al., 2007) contains 5062 images crawled from Flickr by using 11 Oxford landmarks as queries. A total of 11 groups of queries — each having 5 queries with their ground truth relevant image list, are provided. For each query, a bounding box annotation is also provided to denote the query region. During experiment, we report results using the full query images (denoted as full-query) and image regions within the bounding boxes of the query images (denoted as cropped-query). The performance on this dataset is measured by mAP (mean average precision) over all queries.
89
+
90
+ The Paris6k dataset (Philbin et al., 2008) includes 6412 images1 from Flickr which contains 11 landmark buildings and the general scenes from Paris. Similar to the Oxford5k dataset, a total of 55 queries belonging to 11 groups and the ground truth bounding boxes for each query are provided . The performance is reported as mAP over 55 queries.
91
+
92
+ The Oxford1 $\mathbf { 0 5 k ^ { 2 } }$ dataset contains the original Oxford5k dataset and additional 100,000 images (Philbin et al., 2007) from Flickr. The 100,000 images are disjoint with the Oxford5k dataset and are used as distractors to test the retrieval performance when the dataset scales to larger size. We use the same evaluation protocol as the Oxford5k on this dataset.
93
+
94
+ The UKB dataset (Nister & Stew ´ enius, 2006) consists of 10200 photographs of 2550 objects, each ´ object having exactly 4 images. The pictures of these objects are all taken indoor with large variation in orientation, scale, lighting and shooting angles. During experiment, each image is used to query the whole dataset. The performance is measured by the average number of same-object images in the top-4 results.
95
+
96
+ # 5.2 RESULTS AND DISCUSSION
97
+
98
+ In this section, we report the results of experiments on the impact of different factors and analyse their particular impact. The experiments in this section are conducted on the Oxford5k dataset.
99
+
100
+ Feature aggregation and normalization. In this experiment, we compare the different combinations of feature aggregation (sum-pooling and max-pooling) and normalization methods $l _ { 2 }$ and $l _ { 1 }$ in terms of their retrieval performances. We use features from the layer conv5 4 with the free input image size. The results $( \% )$ are shown in Table 1. Sum-pooling followed by $l _ { 1 }$ normalization leads to slightly better results than the other combinations, especially for the cropped-query. However, after preliminary experiment with a multi-scale version of sum- $\mathbf { \nabla } _ { l _ { 1 } }$ and max- $\mathbf { \cdot } l _ { 2 }$ , we find that max- $\mathbf { \cdot } l _ { 2 }$ is much better than sum- $\boldsymbol { \cdot } \boldsymbol { l } _ { 1 }$ . For example, employing a 4 level representation of images in the Oxford5k dataset, for the case of full-query, we find that the mAP for the max- $\mathbf { \cdot } l _ { 2 }$ method is 65.1, while the mAP for sum- $\mathbf { \nabla } \cdot l _ { 1 }$ is only 51.3 (even lower than the single scale representation). Base on these results, we stick to max- $\mathbf { \cdot } l _ { 2 }$ in computing the final image features.
101
+
102
+ Table 1: Comparison between different combinations of feature aggregation and normalization methods.
103
+
104
+ <table><tr><td>Method</td><td>full-query</td><td>cropped-query</td></tr><tr><td>max-li</td><td>52.4</td><td>48.0</td></tr><tr><td>sum-l2</td><td>58.0</td><td>52.6</td></tr><tr><td>sum-li</td><td>60.3</td><td>56.3</td></tr><tr><td>max-l2</td><td>60.1</td><td>53.5</td></tr></table>
105
+
106
+ Table 2: Comparison between different image resizing strategies. The numbers in the parentheses denote the sizes in which the maximum mAPs are achieved.
107
+
108
+ <table><tr><td>Method</td><td>full-query</td><td>cropped-query</td></tr><tr><td>two-fixed</td><td>55.5 (864)</td><td>38.7 (896)</td></tr><tr><td>one-fixed</td><td>59.0 (800)</td><td>39.3 (737)</td></tr><tr><td>free</td><td>58.0</td><td>52.6</td></tr></table>
109
+
110
+ Output layer selection. In order to verify their feasibility for instance retrieval, we extract from the network the output feature maps of different layers and aggregate them to get the image feature vectors. We evaluate the performances using features from layer conv3 3 up to the highest fc7-conv layer (except the pooling layers, i.e. pool3, pool4 and pool5). Single-scale representations of the dataset images are used in this experiment.
111
+
112
+ Figure 2 shows the retrieval performances of image features corresponding to different layers. The retrieval performances for both the full and cropped queries increase as the layer increases from lower layer conv3 3 to higher layers and plateau in layer conv5 4 and fc6-conv, then the performances begin to decrease as the layers increase to fc7-conv. The result shows that features from lower layers such as conv3 3 and conv3 4 are too generic and lack the semantic meanings of the object in the image, thus rendering them unsuitable for instance retrieval. On the other hand, features from the highest layer (fc7-conv) contain the semantic meaning of objects but lack the detailed and local information needed to match two similar images. The best results are obtained in layer conv5 4 (0.601) and fc6-conv (0.618), where the feature vectors combine both the low-level detailed information and high level semantic meanings of the image. Based on these observations and the requirement for keeping the image features compact, we mainly focus on image features from the layer conv5 4 (dimensionality $= 5 1 2$ compared to 4096 of layer fc6-conv).
113
+
114
+ ![](images/42da37b79c4d475abd8fd27ea5172781b6f7039f1f8a42a2695872b36bc5df03.jpg)
115
+ Figure 2: Performance comparison between different layers. This experiment is conducted using the free input image size.
116
+
117
+ Image resizing. We experiment with 3 kinds of image resizing strategies which are detailed in section 3.2. We use grid search to find the optimal size for the two-fixed and one-fixed strategy. As is shown in Table 2, the free input strategy outperforms or is close to the other two strategies: it performs especially well in the cropped-query case. This experiment shows that changing the image aspect ratio (two-fixed) distorts the image information, thus reducing the performance dramatically. The one-fixed way is better than the two-fixed method. But information loss still occurs due to the resizing operation. The free method is able to capture more natural and un-distorted information from the images, which explains its superior performance over the other two methods. It is best to keep the images their original sizes for the instance retrieval tasks.
118
+
119
+ The benefit of multi-scale representation. In our multi-scale approach, the regional vectors from each scale are simply added together and $l _ { 2 }$ -normalized to form the scale-level feature vectors. Then features from different scales are combined and $l _ { 2 }$ -normalized to form the image representations. In fact, we also experimented with two methods which concatenate features from different scales. The first method is in same vein to spatial pyramid pooling (Kaiming et al., 2014), i.e., region-level as well as the scale-level features are all concatenated to form a high dimensional vector. In the second method, region-level features are added while scale-level features are concatenated. We find that these two methods all lead to inferior results. The performance drop for the first in the case of cropped-query can be as large as $41 \%$ . The high dimensionality of the concatenated features (larger than 1.5k) will also lead to longer running times. Considering all these, we do not use concatenation of features in the following experiments.
120
+
121
+ Table 3: Multi-scale representation: comparison between different methods. “overlap” denotes whether the regions in each level (see Figure 1) have some overlapping areas. “s2”,“s3” mean that overlap occurs in level 2 or 3. “weighing” means if the features from each level are added using same weight or different weight. “version” means the different choice of the number of regions in each scale.
122
+
123
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>scale</td><td rowspan=1 colspan=1>overlap</td><td rowspan=1 colspan=1>weighing</td><td rowspan=1 colspan=1>version</td><td rowspan=1 colspan=1>full-query</td><td rowspan=1 colspan=1>cropped-query</td></tr><tr><td rowspan=1 colspan=1>(a1)(a2)</td><td rowspan=1 colspan=1>22</td><td rowspan=1 colspan=1>××</td><td rowspan=1 colspan=1>×√</td><td rowspan=1 colspan=1>1=</td><td rowspan=1 colspan=1>63.563.9</td><td rowspan=1 colspan=1>59.061.0</td></tr><tr><td rowspan=1 colspan=1>(b1)(b2)(b3)</td><td rowspan=1 colspan=1>333</td><td rowspan=1 colspan=1>××s2</td><td rowspan=1 colspan=1>×√×</td><td rowspan=1 colspan=1>1-</td><td rowspan=1 colspan=1>64.262.664.8</td><td rowspan=1 colspan=1>60.961.060.8</td></tr><tr><td rowspan=8 colspan=1>(c1)(c2)(c3)(c4)(c5)(c6)(c7)(c8)</td><td rowspan=8 colspan=1>44444444</td><td rowspan=1 colspan=1>s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v1</td><td rowspan=1 colspan=1>65.1</td><td rowspan=1 colspan=1>61.4</td></tr><tr><td rowspan=1 colspan=1>s3</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>v1</td><td rowspan=1 colspan=1>64.8</td><td rowspan=1 colspan=1>60.7</td></tr><tr><td rowspan=1 colspan=1>s2,s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v1</td><td rowspan=1 colspan=1>65.5</td><td rowspan=6 colspan=1>60.861.561.261.362.262.6</td></tr><tr><td rowspan=1 colspan=1>s2,s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v2</td><td rowspan=1 colspan=1>65.9</td></tr><tr><td rowspan=1 colspan=1>s2.s3</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>v2</td><td rowspan=1 colspan=1>65.4</td></tr><tr><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v3</td><td rowspan=1 colspan=1>64.5</td></tr><tr><td rowspan=1 colspan=1>s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v3</td><td rowspan=1 colspan=1>65.8</td></tr><tr><td rowspan=1 colspan=1>s2.s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v3</td><td rowspan=1 colspan=1>66.3</td></tr></table>
124
+
125
+ We conduct extensive experiments to decide the best configurations for the multi-scale approach and report our results in Table 3. First, we explore the impact of the number of scales on the retrieval performances. For the 2 and 3 scale representations, The region number for each level are $\{ 1 \times 1$ , $2 \times 2 \}$ , $\{ 1 \times 1 , 2 \times 2 , 3 \times 3 \}$ . For the 4 scale representation, 3 versions are used and they differ in the number of regions in each scale: for “v1”, “v2”, and “v3”, the number of regions are $\{ 1 \times 1 , 2 \times 2$ , $3 \times 3 , 4 \times 4 \}$ , $\{ 1 \times 1 , 2 \times 2 , 3 \times 3 , 5 \times 5 \}$ and $\{ 1 \times 1 , 2 \times 2 , 3 \times 3 , 6 \times 6 \}$ . Table 3 (a1)(b1)(c6) show the performances of using 2, 3, and 4 scales to represent the dataset images, respectively. Clearly, more scale levels improve the results and in the case of cropped-query, increase the performance by an absolute $2 \%$ .
126
+
127
+ We also conduct experiments to find whether the weighing of different scales leads to improved performance. The weighing method for features from different scales is similar to the manner of spatial pyramid matching (Lazebnik et al., 2006) — features from coarser level are given less weight while features from the finer levels are given more weight. Suppose the features of different scales for an $L$ scale representation are $f ^ { 1 } , f ^ { 2 } , \ldots , f ^ { L }$ , then the image representation $f$ is expressed as:
128
+
129
+ $$
130
+ f = { \frac { 1 } { 2 ^ { L - 1 } } } f ^ { 1 } + \sum _ { i = 2 } ^ { L } { \frac { 1 } { 2 ^ { L - i + 1 } } } f ^ { i } .
131
+ $$
132
+
133
+ More details can be found in Lazebnik et al. (2006). Comparing the results of row (a1) and (a2), it seems that weighing different scales leads to better performance. But after more experiments, we find that the weighing method generally leads to inferior results as the number of scales increase, e.g., compare the results of row pair(b1)(b2) and (c1)(c2). These results suggest that deep features are different from the traditional local feature descriptors such as SIFT. We should exercise with caution when we apply the traditional wisdom found in SIFT to the deep convolutional descriptors, which is also suggested in Babenko & Lempitsky (2015). Based on the results of this experiment, no weighing methods are used in computing our final image feature representations.
134
+
135
+ ![](images/504d95016996e727b0ea71350f5d46b765315294afce90ac06172172d4ab49bf.jpg)
136
+ Figure 3: The number of principal component reserved VS mAP. We show the results of full and cropped query using the PCA and whitening matrix learned from the Oxford5k itself and Paris6k, denoted as “full-self”, “full-paris” and “crop-self”, “crop-paris”.
137
+
138
+ Next, we look into the issue of overlapping between different scales and try to verify its usefulness. For each scale and its different versions, we set some overlapping areas between the neighboring regions in either one or two scales of the pyramid (For the exact configurations of overlap in all cases in Table 3, see appendix B for the complete descriptions). From the row pair (b1)(b3) and (c1)(c3), we can see that overlap increase the performance for full-query but decrease a little the performance for cropped-query. But for 4 scale v3 (note the pair(c7)(c8)), we see a consistent improvement for both the full and cropped queries. So we decided to use overlap in level 2 and 3 in computing our final features.
139
+
140
+ Table 4: The impact of PCA and whitening. “PCA on self” and “PCA on Paris” mean that the corresponding features are post-processed by the PCA and whitening matrices learned on the Oxford5k and Paris6k datasets, respectively. The numbers in the parentheses indicate the dimensionality of features used for obtaining the corresponding results.
141
+
142
+ <table><tr><td rowspan=1 colspan=1>Feature</td><td rowspan=1 colspan=1>full-query</td><td rowspan=1 colspan=1>cropped-query</td></tr><tr><td rowspan=1 colspan=1>3scale_overlap,original3scale_overlap,l,PCA on self3scale_overlap,PCA on Paris</td><td rowspan=1 colspan=1>64.865.4(80)70.6(464)</td><td rowspan=1 colspan=1>60.860.9(112)67.3(480)</td></tr><tr><td rowspan=1 colspan=1>4scale_v3_overlap(s3),original4scale_v3_overlap(s3),PCA on self4scale_v3_overlap(s3),PCA on Paris</td><td rowspan=1 colspan=1>65.166.9(80)72.3(464)</td><td rowspan=1 colspan=1>61.461.9(96)70.8(496)</td></tr><tr><td rowspan=1 colspan=1>4scale_v3_overlap(s2,s3),original4scale_v3_overlap(s2,s3),PCA on self4scale_v3-overlap(s2,s3),PCA on Paris</td><td rowspan=1 colspan=1>66.369.0(80)73.2(496)</td><td rowspan=1 colspan=1>62.863.9(144)71.2(448)</td></tr></table>
143
+
144
+ PCA and whitening. We perform PCA and whitening for the features extracted from the Oxford5k dataset using the PCA and whitening matrix learned from the Oxford5k or the Paris6k dataset and $l _ { 2 }$ -normalize these features to get the final image representations.
145
+
146
+ The retrieval results for 3 groups of features (from Table 3(b3)(c1)(c8)) are shown in Table 4. Clearly, PCA and whitening lead to better performances. For all 3 groups of features, PCA and whitening on the same dataset lead to insignificant improvement both in the case of full and cropped query. But after doing PCA and whitening on the Paris6k dataset, the results for both the full and cropped queries improve greatly. In fact, the improvement for the case of cropped-query is even more surprising. For example, for the third feature group, the improvement are $1 0 . 4 \%$ and $1 3 . 4 \%$ for the full and cropped queries. It should also be noted that as the the number of principal component reserved increases, the performance for “PCA on self” and “PCA on Paris” differs greatly. As is shown in Figure 3, the performance for the former peaks at a relatively low dimension (around 100) and begins to decrease, while for the latter, the performance increases as the number of principal component gets larger and then plateaus.
147
+
148
+ Table 5: Comparison with state-of-the-art methods. “single” means multi-scale features from single layer (conv5 4) are used. “single, compression” uses the same features but compresses them to get the best performances. “layer ensemble” combines the similarity score from layer conv5 4 and fc6-conv. The dimensionality of the combined feature is set to 1024 for compactness considerations. All our methods use PCA and whitening.
149
+
150
+ <table><tr><td rowspan="2">method</td><td rowspan="2">D</td><td colspan="2">Oxford5k</td><td colspan="2">Paris6k</td><td colspan="2">Oxford105k</td><td rowspan="2">UKB</td></tr><tr><td>full</td><td>cropped</td><td>full</td><td>cropped</td><td>full</td><td>cropped</td></tr><tr><td>Jégou &amp; Zisserman (2014) Arandjelovic &amp; Zisserman (2012)</td><td>128 128</td><td>1 /</td><td>43.3 44.8</td><td>1 -</td><td>1</td><td>1 1</td><td>35.3 37.4</td><td>3.40 1</td></tr><tr><td>Jégou &amp; Zisserman (2014) Razavian et al. (2014b) Babenko et al. (2014)</td><td>1024 256</td><td>- 53.3</td><td>56.0 -</td><td>1 67.0</td><td>- -</td><td>1 48.9</td><td>50.2 -</td><td>3.51 3.38</td></tr><tr><td>Babenko &amp; Lempitsky (2015)</td><td>512 256</td><td>55.7 58.9</td><td>- 53.1</td><td>-</td><td>=</td><td>52.2</td><td>-</td><td>3.56 3.65</td></tr><tr><td></td><td></td><td></td><td></td><td>-</td><td>-</td><td>57.8</td><td>50.1</td><td></td></tr><tr><td>Arandjelovic et al. (2016)</td><td>256</td><td>62.5</td><td>63.5</td><td>72.0</td><td>73.5</td><td></td><td>-</td><td>-</td></tr><tr><td>Tolias et al. (2015)</td><td>512</td><td></td><td></td><td></td><td></td><td>-</td><td></td><td></td></tr><tr><td></td><td></td><td>-</td><td>66.8</td><td>-</td><td>83.0</td><td>1</td><td>61.6</td><td>-</td></tr><tr><td>ours (single)</td><td>512</td><td>73.0</td><td>70.6</td><td>82.0</td><td>83.3</td><td>68.9</td><td>65.3</td><td>3.75</td></tr><tr><td>ours (single,compression)</td><td>-</td><td>73.2</td><td>71.2</td><td>83.0</td><td>84.0</td><td>68.9</td><td>65.8</td><td>3.76</td></tr><tr><td>ours (layer ensemble)</td><td>1024</td><td>75.6</td><td>73.7</td><td>85.7</td><td>85.9</td><td>71.6</td><td>69.2</td><td>3.81</td></tr></table>
151
+
152
+ Do the above results mean that we should always compute the PCA and whitening matrix from any datasets other than the query dataset itself? The short answer is no. We find that for UKB, learning the PCA and whitening matrix on the Oxford5k dataset shows inferior results compared to learning the PCA and whitening matrix on UKB itself (about $2 \%$ drop in accuracy). This may be due to the large differences between the images of the two datasets as the Oxford5k dataset are mainly images of buildings while the images in UKB are mainly small indoor objects. We therefore recommend learning the PCA and whitening matrix on a similar dataset to achieve good performances.
153
+
154
+ # 5.3 COMPARISON WITH OTHER METHODS
155
+
156
+ Based on the previous experimental results and our analysis of different impacting factors on the retrieval performances, we propose a new multi-scale image feature representation. For a given image in the dataset, the whole process of image feature representation is divided into two steps. First, the input image is fed into the network without the resizing operation (the free way) and a 4-scale feature representation is built on top of the feature maps of layer conv5 4. During the multiscale representation step, max-pooling of feature maps are used and regional vectors from the same scale are added together and $l _ { 2 }$ -normalized. After that, features from different scales are summed and $l _ { 2 }$ -normalized again. The second step involves applying the PCA and whitening operations on features from the first step. The PCA and whitening matrix used are either learned from different or same dataset: specifically, for the Oxford5k and Oxford $1 0 5 \mathrm { k }$ , it is learned in the Paris6k, while for Paris6k and UKB, it is learned on Oxford5k and UKB respectively. The final PCA and whitened image features are used for reporting our method’s performances.
157
+
158
+ Layer ensemble. Inspired by previous work on model ensemble to boost the classification performances (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014), we consider fusing the similarity score from different layers to improve the retrieval performances. Specifically, for two images, their similarity score is computed as the weighted sum of the scores from different layers (these weights sum to 1 so that overall similarity score between two images are still in the range $[ 0 , 1 ]$ .). We have evaluated various combination of layers to see their performances and find that best performance is achieved by combining the score from conv5 4 and fc6-conv. For the fc6-conv features of an image, we use a 3-scale representation as the size of output feature maps are already very small.
159
+
160
+ The fc6-conv features are compressed to low dimensional vectors for faster computation. Our layer ensemble achieves $7 5 . 6 \%$ and $7 3 . 7 \%$ on Oxford5k for the full and cropped queries respectively, showing a large improvement over previous methods. This suggests that features from the fc6-conv and conv5 4 are complementary. See Table 5 for the complete results on all four datasets.
161
+
162
+ Comparison. We compare the performance of our method with several state-of-the-art methods which use small footprint representations and do not employ the complicated post-processing techniques such as geometric re-ranking (Philbin et al., 2007) and query expansion (Arandjelovic &´ Zisserman, 2012). The results are shown in Table 5. In all the datasets and different scenarios (full or cropped), our method achieves the best performance with comparable cost. For Oxford5k (cropped) and UKB dataset, the relative improvement of our best results over previous methods (from Tolias et al. (2015) and Babenko & Lempitsky (2015)) are $1 0 . 3 \%$ and $4 . 4 \%$ .
163
+
164
+ # 6 CONCLUSION
165
+
166
+ In this paper, we focus on instance retrieval based on features extracted from CNNs. we have conducted extensive experiments to evaluate the impact of five factors on the performances of image retrieval and analysed their particular impacts. Based on the insights gained from these experiments, we have proposed a new multi-scale image representation which shows superior performances over previous methods on four datasets. When combined with the technique “layer ensemble”, our method can achieve further improvements. Overall, we have provided a viable and efficient solution to apply CNNs in an unsupervised way to datasets with a relatively small number of images.
167
+
168
+ # REFERENCES
169
+
170
+ R. Arandjelovic and A. Zisserman. Three things everyone should know to improve object retrieval. In ´ Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pp. 2911–2918, June 2012. doi: 10. 1109/CVPR.2012.6248018.
171
+ R. Arandjelovic and A. Zisserman. All about vlad. In ´ Computer Vision and Pattern Recognition (CVPR), 2013 IEEE Conference on, pp. 1578–1585, June 2013. doi: 10.1109/CVPR.2013.207.
172
+ R. Arandjelovic, P. Gronat, A. Torii, T. Pajdla, and J. Sivic. NetVLAD: CNN architecture for weakly supervised ´ place recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2016.
173
+ Hossein Azizpour, Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. From generic to specific deep representations for visual recognition. CoRR, abs/1406.5774, 2014. URL http://arxiv. org/abs/1406.5774.
174
+ Artem Babenko and Victor Lempitsky. Aggregating local deep features for image retrieval. In The IEEE International Conference on Computer Vision (ICCV), December 2015.
175
+ Artem Babenko, Anton Slesarev, Alexandr Chigorin, and Victor Lempitsky. Neural Codes for Image Retrieval, pp. 584–599. Springer International Publishing, Cham, 2014. ISBN 978-3-319-10590-1. doi: 10.1007/ 978-3-319-10590-1 38. URL http://dx.doi.org/10.1007/978-3-31s9-10590-1_38.
176
+ Ondˇrej Chum, James Philbin, Josef Sivic, Michael Isard, and Andrew Zisserman. Total recall: Automatic query expansion with a generative feature model for object retrieval. In Computer Vision, 2007. ICCV 2007. IEEE 11th International Conference on, pp. 1–8. IEEE, 2007.
177
+ Jifeng Dai, Kaiming He, and Jian Sun. Instance-aware semantic segmentation via multi-task network cascades. In CVPR, 2016.
178
+ Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016.
179
+ Ross Girshick. Fast r-cnn. In International Conference on Computer Vision (ICCV), 2015.
180
+ Yunchao Gong, Liwei Wang, Ruiqi Guo, and Svetlana Lazebnik. Multi-scale Orderless Pooling of Deep Convolutional Activation Features, pp. 392–407. Springer International Publishing, Cham, 2014. ISBN 978-3-319-10584-0. doi: 10.1007/978-3-319-10584-0 26. URL http://dx.doi.org/10.1007/ 978-3-319-10584-0_26.
181
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015.
182
+
183
+ H. Jegou and A. Zisserman. Triangulation embedding and democratic aggregation for image search. In ´ 2014 IEEE Conference on Computer Vision and Pattern Recognition, pp. 3310–3317, June 2014. doi: 10.1109/ CVPR.2014.417.
184
+
185
+ H. Jegou, M. Douze, C. Schmid, and P. P ´ erez. Aggregating local descriptors into a compact image representa- ´ tion. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pp. 3304–3311, June 2010. doi: 10.1109/CVPR.2010.5540039.
186
+
187
+ Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014.
188
+
189
+ He Kaiming, Zhang Xiangyu, Ren Shaoqing, and Jian Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In European Conference on Computer Vision, 2014.
190
+
191
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
192
+
193
+ Svetlana Lazebnik, Cordelia Schmid, and Jean Ponce. Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories. In Proceedings of the 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition - Volume 2, CVPR ’06, pp. 2169–2178, Washington, DC, USA, 2006. IEEE Computer Society. ISBN 0-7695-2597-0. doi: 10.1109/CVPR.2006.68. URL http: //dx.doi.org/10.1109/CVPR.2006.68.
194
+
195
+ Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, Nov 1998. ISSN 0018-9219. doi: 10.1109/5.726791.
196
+
197
+ Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C. Berg. SSD: Single shot multibox detector. arXiv preprint arXiv:1512.02325, 2015.
198
+
199
+ 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, 2015.
200
+
201
+ David G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004. ISSN 1573-1405. doi: 10.1023/B:VISI.0000029664.99615.94. URL http: //dx.doi.org/10.1023/B:VISI.0000029664.99615.94.
202
+
203
+ D. Nister and H. Stew ´ enius. Scalable recognition with a vocabulary tree. In ´ IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 2, pp. 2161–2168, June 2006.
204
+
205
+ J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman. Lost in quantization: Improving particular object retrieval in large scale image databases. In Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on, pp. 1–8, June 2008. doi: 10.1109/CVPR.2008.4587635.
206
+
207
+ James Philbin, Ondrej Chum, Michael Isard, Josef Sivic, and Andrew Zisserman. Object retrieval with large vocabularies and fast spatial matching. In 2007 IEEE Conference on Computer Vision and Pattern Recognition, pp. 1–8, June 2007. doi: 10.1109/CVPR.2007.383172.
208
+
209
+ Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: An astounding baseline for recognition. In Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPRW ’14, pp. 512–519, Washington, DC, USA, 2014a. IEEE Computer Society. ISBN 978-1-4799-4308-1. doi: 10.1109/CVPRW.2014.131. URL http://dx.doi.org/10. 1109/CVPRW.2014.131.
210
+
211
+ Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. Visual instance retrieval with deep convolutional networks. CoRR, abs/1412.6574, 2014b. URL http://arxiv.org/abs/1412.6574.
212
+
213
+ Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. Visual instance retrieval with deep convolutional networks. CoRR, abs/1412.6574, 2014c. URL http://arxiv.org/abs/1412.6574.
214
+
215
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
216
+
217
+ Ross Girshick Jian Sun Shaoqing Ren, Kaiming He. Faster R-CNN: Towards real-time object detection with region proposal networks. arXiv preprint arXiv:1506.01497, 2015.
218
+
219
+ Gaurav Sharma and Bernt Schiele. Scalable nonlinear embeddings for semantic category-based image retrieval. In ICCV, 2015.
220
+ K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014.
221
+ Josef Sivic and Andrew Zisserman. Video google: A text retrieval approach to object matching in videos. In Computer Vision, 2003. Proceedings. Ninth IEEE International Conference on, pp. 1470–1477. IEEE, 2003.
222
+ C. Szegedy, Wei Liu, Yangqing Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1–9, June 2015. doi: 10.1109/CVPR.2015.7298594.
223
+ G. Tolias, R. Sicre, and H. Jegou. Particular object retrieval with integral max-pooling of CNN activations. ´ ArXiv e-prints, November 2015.
224
+ Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In Computer vision–ECCV 2014, pp. 818–833. Springer, 2014.
225
+
226
+ # APPENDIX A THE NETWORK TRANSFORMATIONS
227
+
228
+ In order for the network to process images of varying sizes, We change the layer fc6, fc7 and fc8 from the original model to fc6-conv, fc7-conv and fc8-conv. It should be noted there are certain constraints on the input image size due to the network’s inherent design. The original network accepts an image of fixed size $( 2 2 4 \times 2 2 4 )$ , so the output feature maps of the last convolutional layer conv5 4 is of size $5 1 2 \times 7 \times 7$ . As a result, when we change the operation between layer conv5 4 and fc6 from inner product to convolution, each filter bank kernel between conv5 4 and fc6-conv has size $7 \times 7$ . This in turn means that if we are to extract features from layer fc6-conv and above, the minimum size of an input image must equal to or be greater than 224. For output feature maps of layer conv5 4 and below, there are no restrictions on the input image size. During the experiment, when we are extracting features from layer fc6-conv and above, the minimum size of an image is set to be 224 if it is less than 224.
229
+
230
+ # APPENDIX B THE DETAIL OF OVERLAP IN EACH SCALE
231
+
232
+ In this paper, the overlaps between different regions occur in the 3 and 4 scale pyramid. A single region in each scale can be specified as the combination of a slice from the the width and height of the feature map. If a scale has $N \times N$ regions, then the number of slices in width and height of the feature map are both $N$ . We use the same set of slices for both the width and height in this experiment.
233
+
234
+ In 3 scale (see Table 3 (b3)), overlap occurs only in scale 2, and the slice (in the proportion to the length of feature map width or height: $\{ ( 0 , \frac { 2 } { 3 } ) , ( \frac { 1 } { 3 } , 1 ) \}$ . In 4 scale v1 (Table 3 (c1)–(c3)), the slices for scale 2 and 3 are $\scriptstyle \{ ( 0 , { \frac { 3 } { 4 } } ) , ( { \frac { 1 } { 4 } } , 1 ) \}$ and $\{ ( \bar { 0 } , { \textstyle \frac { 2 } { 4 } } ) , ( { \textstyle \frac { 1 } { 4 } } , { \textstyle \frac { 3 } { 4 } } ) , ( { \textstyle \frac { 2 } { 4 } } , 1 ) \}$ . In 4 scale v2 (Table 3 (c4)(c5)), the slices for scale 2 and 3 are $\left\{ ( 0 , \frac { 3 } { 5 } ) , ( \frac { 2 } { 5 } , 1 ) \right\}$ and $\{ ( \bar { 0 } , \textstyle { \frac { 3 } { 5 } } ) , ( \textstyle { \frac { 1 } { 5 } } , \textstyle { \frac { 4 } { 5 } } ) , ( \textstyle { \frac { 2 } { 5 } } , 1 ) \}$ . In 4 scale v3 (Table 3 (c6)–(c8)), the slices are $\{ ( 0 , \frac { 4 } { 6 } ) , ( \frac { 2 } { 6 } , 1 ) \}$ and $\begin{array} { r } { \{ ( 0 , \frac { 3 } { 6 } ) , ( \frac { 1 } { 6 } , \frac { 4 } { 6 } ) , ( \frac { 3 } { 6 } , 1 ) \} } \end{array}$ , for scale 2 and 3, respectively.
parse/train/SJNDWNOlg/SJNDWNOlg_content_list.json ADDED
@@ -0,0 +1,1214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "WHAT IS THE BEST PRACTICE FOR CNNS APPLIED TO VISUAL INSTANCE RETRIEVAL? ",
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": "Jiedong Hao, Jing Dong, Wei Wang, Tieniu Tan Center for Research on Intelligent Perception and Computing Institute of Automation, Chinese Academy of Sciences ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 586,
21
+ 212
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
+ 263
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Previous work has shown that feature maps of deep convolutional neural networks (CNNs) can be interpreted as feature representation of a particular image region. Features aggregated from these feature maps have been exploited for image retrieval tasks and achieved state-of-the-art performances in recent years. The key to the success of such methods is the feature representation. However, the different factors that impact the effectiveness of features are still not explored thoroughly. There are much less discussion about the best combination of them. ",
40
+ "bbox": [
41
+ 233,
42
+ 282,
43
+ 764,
44
+ 380
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "The main contribution of our paper is the thorough evaluations of the various factors that affect the discriminative ability of the features extracted from CNNs. Based on the evaluation results, we also identify the best choices for different factors and propose a new multi-scale image feature representation method to encode the image effectively. Finally, we show that the proposed method generalises well and outperforms the state-of-the-art methods on four typical datasets used for visual instance retrieval. ",
51
+ "bbox": [
52
+ 233,
53
+ 383,
54
+ 764,
55
+ 481
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 513,
66
+ 336,
67
+ 530
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Image retrieval is an important problem both for academic research and for industrial applications. Although it has been studied for many years (Sivic & Zisserman, 2003; Philbin et al., 2007; Tolias et al., 2015), it is still a challenging task. Generally, image retrieval is divided into two groups. The first one is the category-level image retrieval (Sharma & Schiele, 2015), in which an image in the dataset is deemed to be similar to the query image if they share the same class or they are similar in shape and local structures. The other group is the instance-level image retrieval (Tolias et al., 2015), in which an image is considered to match the query if they contain the same object or the same scene. The instance-level image retrieval is harder in that the retrieval method need to encode the local and detailed information in order to tell two images apart, e.g., the algorithm should be able to detect the differences between the Eiffel Tower and other steel towers although they have similar shapes. In this paper, we focus on the instance-level image retrieval. ",
74
+ "bbox": [
75
+ 174,
76
+ 547,
77
+ 825,
78
+ 700
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Traditionally, visual instance retrieval is mainly addressed by the BoF (bag of features) based methods using the local feature descriptors such as SIFT (Lowe, 2004). In order to boost the retrieval performances, post-processing techniques such as query expansion (Chum et al., 2007) and spatial verification (Philbin et al., 2007) are also employed. ",
85
+ "bbox": [
86
+ 174,
87
+ 708,
88
+ 823,
89
+ 763
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "With the decisive victory (Krizhevsky et al., 2012) over traditional models in the ImageNet (Russakovsky et al., 2015) image classification challenge, convolutional neural networks (Lecun et al., 1998) continue to achieve remarkable success in diverse fields such as object detection (Liu et al., 2015; Shaoqing Ren, 2015), semantic segmentation (Dai et al., 2016) and even image style transfer (Gatys et al., 2016). Networks trained on the Imagenet classification task can generalize quite well to other tasks, which are either used off-the-shelf (Razavian et al., 2014a) or fine-tuned on the task-specific datasets (Azizpour et al., 2014; Long et al., 2015). Inspired by all these, researchers in the field of image retrieval also shift their interest to the CNNs. Their experiments have shown promising and surprising results (Babenko et al., 2014; Razavian et al., 2014c; Tolias et al., 2015), which are on par with or surpass the performances of conventional methods like BoF and VLAD (vector of locally aggregated descriptors) (Jegou et al., 2010; Arandjelovi ´ c & Zisserman, 2013) . ´ ",
96
+ "bbox": [
97
+ 174,
98
+ 770,
99
+ 825,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Despite all these previous advances (Babenko et al., 2014; Babenko & Lempitsky, 2015; Tolias et al., 2015) on using CNNs for image feature representation, the underlying factors that contribute to the success of off-the-shelf CNNs on the image retrieval tasks are still largely unclear and unexplored, e.g., which layer is the best choice for instance retrieval, the convolutional layer or the fully-connected layer? What is the best way to represent the multi-scale information of an image? Clarifying these questions will help us advance a further step towards building a more robust and accurate retrieval system. Also in situations where a large numbers of training samples are not available, instance retrieval using unsupervised method is still preferable and may be the only option. ",
107
+ "bbox": [
108
+ 173,
109
+ 103,
110
+ 825,
111
+ 215
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "In this paper, we aim to answer these questions and make three novel contributions. Unlike previous papers, we explicitly choose five factors to study the image representations based on CNNs and conduct extensive experiments to evaluate their impacts on the retrieval performances. We also give detailed analysis on these factors and give our recommendations for combining them. During experiments, we borrow wisdoms from literatures and evaluate their usefulness, but find that they are not as effective as some of the simpler design choices. Second, by combining the insights obtained during the individual experiments, we are able to propose a new multi-scale image representation, which is compact yet effective. Finally, we evaluate our method on four challenging datasets, i.e., Oxford5k, Paris6k, Oxford105k and UKB. Experimental results show that our method is generally applicable and outperforms all previous methods on compact image representations by a large margin. ",
118
+ "bbox": [
119
+ 174,
120
+ 222,
121
+ 825,
122
+ 375
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 RELATED WORK ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 176,
132
+ 431,
133
+ 343,
134
+ 448
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Multi-scale image representation. Lazebnik et al. (2006) propose the spatial pyramid matching approach to encode the spatial information using BoF based methods. They represent an image using a pyramid of several levels or scales. Features from different scales are combined to form the image representation in such a way that coarser levels get less weight while finer levels get more weight. Their argument is that matches found in coarser levels may involve increasingly dissimilar image features. In our paper, we also explore the multi-scale paradigm in the same spirit using the convolutional feature maps as the local descriptors. We find that the deep features from the convolutional feature maps are distinct from the traditional descriptors: the weighted sum of different level of features shows no superior performances than a simple summation of them. Kaiming et al. (2014) devise an approach called SPP (spatial pyramid pooling). In SPP, feature maps of the last convolutional layer are divided into a 3 or 4 scale pyramid. First the regional features in each scale are concatenated, then the scale-level features are concatenated to a fixed length vector to be forwarded to the next fully-connected layers. We find that this strategy is ineffective for unsupervised instance retrieval, leading to inferior performances compared to other simple combination methods (see the part about multi-scale representation in section 5.2 for more details.). ",
141
+ "bbox": [
142
+ 174,
143
+ 487,
144
+ 825,
145
+ 694
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Image representation using off-the-shelf CNNs. Gong et al. (2014) propose the MOP (multiscale orderless pooling) method to represent an image in which VLAD is used to encode the level 2 and level 3 features. Then features from different scales are PCA-compressed and concatenated to form the image features. This method is rather complicated and time-consuming. At the same time, Babenko et al. (2014) use Alexnet (Krizhevsky et al., 2012) trained on the Imagenet 1000-class classification task and retrain the network on task-related dataset. The retraining procedure gives a boost to the retrieval performances. Instead of using the output of the fully-connected layers as the image feature representations, Babenko & Lempitsky (2015) use the output feature maps of last convolutional layer to compute the image features. Recently, instead of sum-pooling the convolutional features, Tolias et al. (2015) use max-pooling to aggregate the deep descriptors. Their multi-scale method, called R-MAC (regional maximum activation of convolutions), further improves the previous results on four common instance retrieval datasets. Our work differs from these papers in that we explicitly explore the various factors that underpin the success of unsupervised instance retrieval, which have not been fully explored and analysed. By carefully choosing the different setting for each factor and combining them in a complementary way, we show that a large improvement can be achieved without additional cost. ",
152
+ "bbox": [
153
+ 173,
154
+ 702,
155
+ 825,
156
+ 922
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "3 IMPACTING FACTORS ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 176,
166
+ 102,
167
+ 383,
168
+ 118
169
+ ],
170
+ "page_idx": 2
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "When we employ off-the-shelf CNNs for the task of instance-level image retrieval, a natural question is: what kind of design choices should we make in order to make full use of the representational power of existing models? In this section, we summarize the five factors that may greatly impact the performance of the final image retrieval system. In section 5.2, we will show our experimental results on each key factor. Before we delve into the impacting factors, first we will give a brief introduction about how to represent an image using the activation feature maps of a certain layer. ",
175
+ "bbox": [
176
+ 174,
177
+ 132,
178
+ 825,
179
+ 217
180
+ ],
181
+ "page_idx": 2
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "3.1 CNN FEATURES FOR INSTANCE RETRIEVAL ",
186
+ "text_level": 1,
187
+ "bbox": [
188
+ 174,
189
+ 233,
190
+ 517,
191
+ 247
192
+ ],
193
+ "page_idx": 2
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "In this paper, we are mainly interested in extracting compact and discriminative image features using the off-the-shelf CNNs in an efficient way. For a given image $I$ , we simply subtract the mean value of the RGB channels from the original image and do not do other sophisticated preprocessing. Then the image is fed into the convolutional network and goes through a series of convolutions, non-linear activations and pooling operations. The feature activation maps of a certain layer can be interpreted as the raw image features, based on which we build the final image features. These feature maps form a tensor of size $K \\times H \\times W$ , where $K$ is the number of feature channels, and $H$ and $W$ are height and width of a feature map. Each feature map represents a specific pattern which encodes a small part of information about the original image. If we represent the set of feature maps as $F = \\{ \\bar { F _ { i } } \\} , i = 1 , 2 , \\dots , K$ , where $F _ { i }$ is the $i ^ { t h }$ activation feature map, then the most simple image feature is formulated as: ",
198
+ "bbox": [
199
+ 173,
200
+ 258,
201
+ 825,
202
+ 410
203
+ ],
204
+ "page_idx": 2
205
+ },
206
+ {
207
+ "type": "equation",
208
+ "img_path": "images/996d3386c4ba19be69f448be5117f61c6158e7354a4f8eca407e8f16c804f4cc.jpg",
209
+ "text": "$$\n\\boldsymbol { f } = [ f _ { 1 } , f _ { 2 } , \\ldots , f _ { i } , \\ldots , f _ { K } ] ^ { T } .\n$$",
210
+ "text_format": "latex",
211
+ "bbox": [
212
+ 397,
213
+ 409,
214
+ 599,
215
+ 426
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "In the above equation 1, $f _ { i }$ is obtained by applying the feature aggregation method (see section 3.2) over the $i ^ { t h }$ feature map $F _ { i }$ . Throughout this paper, we use feature maps after the non-linear activations (ReLU) so that the elements in each feature map are all non-negative. We also experiment with feature maps prior to ReLU, but find that they lead to inferior performances. After the image feature representation is obtained, post-processing techniques such as PCA and whitening can be further applied. ",
222
+ "bbox": [
223
+ 174,
224
+ 428,
225
+ 825,
226
+ 511
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "3.2 IMPACTING FACTORS ON PERFORMANCE ",
233
+ "text_level": 1,
234
+ "bbox": [
235
+ 176,
236
+ 527,
237
+ 496,
238
+ 541
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "Feature aggregation and normalization. After the feature maps of a certain layer are obtained, it is still challenging to aggregate the 3-dimensional feature maps to get compact vector representations for images. Previous papers use either sum-pooling (Babenko & Lempitsky, 2015) or maxpooling (Tolias et al., 2015) followed by $l _ { 2 }$ -normalization. Sum-pooling over a particular feature map $F _ { i }$ is expressed as ",
245
+ "bbox": [
246
+ 173,
247
+ 553,
248
+ 825,
249
+ 622
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "equation",
255
+ "img_path": "images/b2fde9ee51691f23d9ec8dd05851fbb29adaa175ca61a1862cc38187263d407e.jpg",
256
+ "text": "$$\nf _ { i } = \\sum _ { m = 1 } ^ { H } \\sum _ { n = 1 } ^ { W } F _ { i } ( m , n ) , i \\in \\{ 1 , 2 , \\ldots , K \\} ,\n$$",
257
+ "text_format": "latex",
258
+ "bbox": [
259
+ 356,
260
+ 619,
261
+ 640,
262
+ 665
263
+ ],
264
+ "page_idx": 2
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "while max-pooling is given by ",
269
+ "bbox": [
270
+ 174,
271
+ 664,
272
+ 375,
273
+ 678
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "equation",
279
+ "img_path": "images/11399053c416631a6dc6858df6c813ee9c1f60346bc7d85b874b0ced8c71e403.jpg",
280
+ "text": "$$\nf _ { i } = \\operatorname* { m a x } _ { m , n } F _ { i } ( m , n ) ,\n$$",
281
+ "text_format": "latex",
282
+ "bbox": [
283
+ 431,
284
+ 676,
285
+ 566,
286
+ 699
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "where $m , n$ are all the possible values over the spatial coordinate of size $H \\times W$ . In this paper, for the first time, different combinations of aggregation and normalization methods $l _ { 2 }$ and $l _ { 1 }$ in the manner of RootSIFT (Arandjelovic & Zisserman, 2012)) are evaluated and their results are reported. ´ ",
293
+ "bbox": [
294
+ 174,
295
+ 700,
296
+ 825,
297
+ 742
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "Output layer selection. Zeiler & Fergus (2014) has shown that image features aggregated from the feature activation maps of certain layers have interpretable semantic meanings. Gong et al. (2014) and Babenko et al. (2014) use the output of the first fully-connected layer to obtain the image features, while Babenko & Lempitsky (2015) and Tolias et al. (2015) use the output feature maps of the last convolutional layer. But these choices are somewhat subjective. In this paper, we extract dataset image features from the output feature maps of different layers and compare their retrieval performances. Based on the finding in this experiment, we choose the best-performing layer and also come up with a layer ensemble approach which outperforms state-of-the-art methods (see section 5.3). ",
304
+ "bbox": [
305
+ 173,
306
+ 748,
307
+ 825,
308
+ 875
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "Image resizing. Famous models such as Alexnet (Krizhevsky et al., 2012) and VGGnet (Simonyan & Zisserman, 2014) all require that the input images have fixed size. In order to meet this requirement, previous papers (Gong et al., 2014; Babenko & Lempitsky, 2015) usually resize the input images to the fixed size. We postulate that the resizing operation may lead to the distortion of important information about the objects in the natural images. Ultimately, this kind of operation may hurt the discriminative power of image features extracted from the network, thus degrading the retrieval performances. For the task of image retrieval, we think it is best to keep the images their original sizes and feed them directly to the network whenever possible. In this paper, three image resizing strategies are explored: ",
315
+ "bbox": [
316
+ 176,
317
+ 882,
318
+ 823,
319
+ 924
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "image",
325
+ "img_path": "images/2984feb83e2f20d11b4eea0a0a18acd87f8ce71707dc7e783ada9b5f541d5352.jpg",
326
+ "image_caption": [
327
+ "Figure 1: An illustration of multi-scale representation of an image. The whole image is divided into 3 levels from the coarsest (level 1) to the finest (level 3). At each level, the image is divided into different number of equal-sized regions. "
328
+ ],
329
+ "image_footnote": [],
330
+ "bbox": [
331
+ 173,
332
+ 99,
333
+ 825,
334
+ 277
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "",
341
+ "bbox": [
342
+ 174,
343
+ 369,
344
+ 825,
345
+ 454
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "• Both the height and width of the dataset images are set to the same fixed value (denoted as two-fixed). \n• The minimum of each dataset image’s size is set to a fixed value. (The aspect ratio of the original image is kept.) (denoted as one-fixed). \n• The images are kept their original sizes. (denoted as free). ",
352
+ "bbox": [
353
+ 212,
354
+ 470,
355
+ 825,
356
+ 574
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Multi-scale feature representation. Unlike local feature descriptors such as SIFT (Lowe, 2004), the feature vector extracted from the deep convolutional networks for an image is a global descriptor which encodes the holistic information. When used for image retrieval, this kind of features still lack the detailed and local information desired to accurately match two images. Inspired by spatial pyramid matching (Lazebnik et al., 2006) and SPP (Kaiming et al., 2014), we explore the feasibility of applying this powerful method to obtain discriminative image features. An image is represented by a $L$ -level pyramid, and at each level, the image is divided evenly into several overlapping or non-overlapping regions. The vector representations of these small regions are computed, then the regional vectors are combined to form the image feature vectors. The single scale representation of an image is just a special case of the multi-scale method in which the number of level $L$ equals 1. ",
363
+ "bbox": [
364
+ 173,
365
+ 589,
366
+ 825,
367
+ 728
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "Figure 1 shows an example of 3 level representations of an image. The time cost of re-feeding those small regions into the network to compute the regional vectors would be huge, thus unacceptable for instance retrieval tasks. Inspired by the work of Girshick (2015) and Tolias et al. (2015), we assume a linear projection between the original image regions and the regions in the feature maps of a certain layer. Then the regional feature vectors can be efficiently computed without re-feeding the corresponding image regions. In section 5.2, various settings for the multi-scale and scalelevel feature combination methods are explored and their retrieval performances are reported and analysed. ",
374
+ "bbox": [
375
+ 173,
376
+ 734,
377
+ 825,
378
+ 847
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "PCA and whitening. Principal Component Analysis (PCA) is a simple yet efficient method for reducing the dimensionality of feature vectors and decorrelating the feature elements. Previous work (Babenko et al., 2014; Jegou et al., 2010) has shown evidences that PCA and whitened features ´ can actually boost the performances of image retrieval. In this paper, we further investigate the usefulness of PCA and whitening within our pipeline and give some recommendations. ",
385
+ "bbox": [
386
+ 174,
387
+ 853,
388
+ 823,
389
+ 924
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "4 IMPLEMENTATION ",
396
+ "text_level": 1,
397
+ "bbox": [
398
+ 176,
399
+ 102,
400
+ 356,
401
+ 117
402
+ ],
403
+ "page_idx": 4
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "We use the open source deep learning framework Caffe (Jia et al., 2014) for our whole experiments. The aim of this research is to investigate the most effective ways to exploit the feature activations of existing deep convolutional models. Based on past practices for networks to go deeper (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014; Szegedy et al., 2015; He et al., 2015), a consideration for moderate computational cost, and also the results from Tolias et al. (2015) that deeper networks work better than shallower ones, we decide to use the popular VGG-19 model (Simonyan & Zisserman, 2014) trained on ImageNet as our model. ",
408
+ "bbox": [
409
+ 174,
410
+ 133,
411
+ 825,
412
+ 231
413
+ ],
414
+ "page_idx": 4
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "Network transformation. The original VGG-19 network only accepts an image of fixed size $( 2 2 4 \\times$ 224), which is not the optimal choice when extracting image features for retrieval tasks. In order for the network to be able to process an image of arbitrary size (of course, the image size can not exceed the GPU’s memory limit) and for us to experiment with different input image resizing strategies, we adapt the original VGG-19 network and change the fully-connected layers to convolutional (Long et al., 2015) layers. For more details about network transformations, see appendix A. ",
419
+ "bbox": [
420
+ 174,
421
+ 238,
422
+ 825,
423
+ 321
424
+ ],
425
+ "page_idx": 4
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "5 EXPERIMENTS ",
430
+ "text_level": 1,
431
+ "bbox": [
432
+ 176,
433
+ 344,
434
+ 326,
435
+ 359
436
+ ],
437
+ "page_idx": 4
438
+ },
439
+ {
440
+ "type": "text",
441
+ "text": "In this section, we first introduce the datasets used and the evaluation metrics. Then we report our experimental results for different impacting factors and give detailed analysis. In the last part, we show the performance of our method considering all these impacting factors and compare our method with the state-of-the-art methods on four datasets. ",
442
+ "bbox": [
443
+ 174,
444
+ 376,
445
+ 825,
446
+ 431
447
+ ],
448
+ "page_idx": 4
449
+ },
450
+ {
451
+ "type": "text",
452
+ "text": "5.1 DATASETS AND EVALUATION METRICS ",
453
+ "text_level": 1,
454
+ "bbox": [
455
+ 176,
456
+ 450,
457
+ 485,
458
+ 464
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "The Oxford5k dataset (Philbin et al., 2007) contains 5062 images crawled from Flickr by using 11 Oxford landmarks as queries. A total of 11 groups of queries — each having 5 queries with their ground truth relevant image list, are provided. For each query, a bounding box annotation is also provided to denote the query region. During experiment, we report results using the full query images (denoted as full-query) and image regions within the bounding boxes of the query images (denoted as cropped-query). The performance on this dataset is measured by mAP (mean average precision) over all queries. ",
465
+ "bbox": [
466
+ 174,
467
+ 476,
468
+ 825,
469
+ 574
470
+ ],
471
+ "page_idx": 4
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "The Paris6k dataset (Philbin et al., 2008) includes 6412 images1 from Flickr which contains 11 landmark buildings and the general scenes from Paris. Similar to the Oxford5k dataset, a total of 55 queries belonging to 11 groups and the ground truth bounding boxes for each query are provided . The performance is reported as mAP over 55 queries. ",
476
+ "bbox": [
477
+ 174,
478
+ 580,
479
+ 823,
480
+ 636
481
+ ],
482
+ "page_idx": 4
483
+ },
484
+ {
485
+ "type": "text",
486
+ "text": "The Oxford1 $\\mathbf { 0 5 k ^ { 2 } }$ dataset contains the original Oxford5k dataset and additional 100,000 images (Philbin et al., 2007) from Flickr. The 100,000 images are disjoint with the Oxford5k dataset and are used as distractors to test the retrieval performance when the dataset scales to larger size. We use the same evaluation protocol as the Oxford5k on this dataset. ",
487
+ "bbox": [
488
+ 174,
489
+ 643,
490
+ 825,
491
+ 699
492
+ ],
493
+ "page_idx": 4
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "The UKB dataset (Nister & Stew ´ enius, 2006) consists of 10200 photographs of 2550 objects, each ´ object having exactly 4 images. The pictures of these objects are all taken indoor with large variation in orientation, scale, lighting and shooting angles. During experiment, each image is used to query the whole dataset. The performance is measured by the average number of same-object images in the top-4 results. ",
498
+ "bbox": [
499
+ 174,
500
+ 705,
501
+ 825,
502
+ 776
503
+ ],
504
+ "page_idx": 4
505
+ },
506
+ {
507
+ "type": "text",
508
+ "text": "5.2 RESULTS AND DISCUSSION ",
509
+ "text_level": 1,
510
+ "bbox": [
511
+ 176,
512
+ 794,
513
+ 403,
514
+ 809
515
+ ],
516
+ "page_idx": 4
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "In this section, we report the results of experiments on the impact of different factors and analyse their particular impact. The experiments in this section are conducted on the Oxford5k dataset. ",
521
+ "bbox": [
522
+ 176,
523
+ 820,
524
+ 823,
525
+ 849
526
+ ],
527
+ "page_idx": 4
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "Feature aggregation and normalization. In this experiment, we compare the different combinations of feature aggregation (sum-pooling and max-pooling) and normalization methods $l _ { 2 }$ and $l _ { 1 }$ in terms of their retrieval performances. We use features from the layer conv5 4 with the free input image size. The results $( \\% )$ are shown in Table 1. Sum-pooling followed by $l _ { 1 }$ normalization leads to slightly better results than the other combinations, especially for the cropped-query. However, after preliminary experiment with a multi-scale version of sum- $\\mathbf { \\nabla } _ { l _ { 1 } }$ and max- $\\mathbf { \\cdot } l _ { 2 }$ , we find that max- $\\mathbf { \\cdot } l _ { 2 }$ is much better than sum- $\\boldsymbol { \\cdot } \\boldsymbol { l } _ { 1 }$ . For example, employing a 4 level representation of images in the Oxford5k dataset, for the case of full-query, we find that the mAP for the max- $\\mathbf { \\cdot } l _ { 2 }$ method is 65.1, while the mAP for sum- $\\mathbf { \\nabla } \\cdot l _ { 1 }$ is only 51.3 (even lower than the single scale representation). Base on these results, we stick to max- $\\mathbf { \\cdot } l _ { 2 }$ in computing the final image features. ",
532
+ "bbox": [
533
+ 174,
534
+ 856,
535
+ 821,
536
+ 885
537
+ ],
538
+ "page_idx": 4
539
+ },
540
+ {
541
+ "type": "table",
542
+ "img_path": "images/da75d6d7a28957912df2b267c092eceee024674110c7e3500fec9ac453d735a3.jpg",
543
+ "table_caption": [
544
+ "Table 1: Comparison between different combinations of feature aggregation and normalization methods. "
545
+ ],
546
+ "table_footnote": [],
547
+ "table_body": "<table><tr><td>Method</td><td>full-query</td><td>cropped-query</td></tr><tr><td>max-li</td><td>52.4</td><td>48.0</td></tr><tr><td>sum-l2</td><td>58.0</td><td>52.6</td></tr><tr><td>sum-li</td><td>60.3</td><td>56.3</td></tr><tr><td>max-l2</td><td>60.1</td><td>53.5</td></tr></table>",
548
+ "bbox": [
549
+ 196,
550
+ 162,
551
+ 449,
552
+ 229
553
+ ],
554
+ "page_idx": 5
555
+ },
556
+ {
557
+ "type": "table",
558
+ "img_path": "images/601aa3d73ac8ac8df21ecbf96ea22bc5bf6ae6c8c29d92534108de3f184ff77f.jpg",
559
+ "table_caption": [
560
+ "Table 2: Comparison between different image resizing strategies. The numbers in the parentheses denote the sizes in which the maximum mAPs are achieved. "
561
+ ],
562
+ "table_footnote": [],
563
+ "table_body": "<table><tr><td>Method</td><td>full-query</td><td>cropped-query</td></tr><tr><td>two-fixed</td><td>55.5 (864)</td><td>38.7 (896)</td></tr><tr><td>one-fixed</td><td>59.0 (800)</td><td>39.3 (737)</td></tr><tr><td>free</td><td>58.0</td><td>52.6</td></tr></table>",
564
+ "bbox": [
565
+ 540,
566
+ 169,
567
+ 805,
568
+ 223
569
+ ],
570
+ "page_idx": 5
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "",
575
+ "bbox": [
576
+ 173,
577
+ 256,
578
+ 825,
579
+ 367
580
+ ],
581
+ "page_idx": 5
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "Output layer selection. In order to verify their feasibility for instance retrieval, we extract from the network the output feature maps of different layers and aggregate them to get the image feature vectors. We evaluate the performances using features from layer conv3 3 up to the highest fc7-conv layer (except the pooling layers, i.e. pool3, pool4 and pool5). Single-scale representations of the dataset images are used in this experiment. ",
586
+ "bbox": [
587
+ 173,
588
+ 373,
589
+ 825,
590
+ 444
591
+ ],
592
+ "page_idx": 5
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "Figure 2 shows the retrieval performances of image features corresponding to different layers. The retrieval performances for both the full and cropped queries increase as the layer increases from lower layer conv3 3 to higher layers and plateau in layer conv5 4 and fc6-conv, then the performances begin to decrease as the layers increase to fc7-conv. The result shows that features from lower layers such as conv3 3 and conv3 4 are too generic and lack the semantic meanings of the object in the image, thus rendering them unsuitable for instance retrieval. On the other hand, features from the highest layer (fc7-conv) contain the semantic meaning of objects but lack the detailed and local information needed to match two similar images. The best results are obtained in layer conv5 4 (0.601) and fc6-conv (0.618), where the feature vectors combine both the low-level detailed information and high level semantic meanings of the image. Based on these observations and the requirement for keeping the image features compact, we mainly focus on image features from the layer conv5 4 (dimensionality $= 5 1 2$ compared to 4096 of layer fc6-conv). ",
597
+ "bbox": [
598
+ 173,
599
+ 450,
600
+ 825,
601
+ 617
602
+ ],
603
+ "page_idx": 5
604
+ },
605
+ {
606
+ "type": "image",
607
+ "img_path": "images/42da37b79c4d475abd8fd27ea5172781b6f7039f1f8a42a2695872b36bc5df03.jpg",
608
+ "image_caption": [
609
+ "Figure 2: Performance comparison between different layers. This experiment is conducted using the free input image size. "
610
+ ],
611
+ "image_footnote": [],
612
+ "bbox": [
613
+ 178,
614
+ 636,
615
+ 820,
616
+ 820
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Image resizing. We experiment with 3 kinds of image resizing strategies which are detailed in section 3.2. We use grid search to find the optimal size for the two-fixed and one-fixed strategy. As is shown in Table 2, the free input strategy outperforms or is close to the other two strategies: it performs especially well in the cropped-query case. This experiment shows that changing the image aspect ratio (two-fixed) distorts the image information, thus reducing the performance dramatically. The one-fixed way is better than the two-fixed method. But information loss still occurs due to the resizing operation. The free method is able to capture more natural and un-distorted information from the images, which explains its superior performance over the other two methods. It is best to keep the images their original sizes for the instance retrieval tasks. ",
623
+ "bbox": [
624
+ 174,
625
+ 881,
626
+ 825,
627
+ 924
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "",
634
+ "bbox": [
635
+ 174,
636
+ 103,
637
+ 825,
638
+ 188
639
+ ],
640
+ "page_idx": 6
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "The benefit of multi-scale representation. In our multi-scale approach, the regional vectors from each scale are simply added together and $l _ { 2 }$ -normalized to form the scale-level feature vectors. Then features from different scales are combined and $l _ { 2 }$ -normalized to form the image representations. In fact, we also experimented with two methods which concatenate features from different scales. The first method is in same vein to spatial pyramid pooling (Kaiming et al., 2014), i.e., region-level as well as the scale-level features are all concatenated to form a high dimensional vector. In the second method, region-level features are added while scale-level features are concatenated. We find that these two methods all lead to inferior results. The performance drop for the first in the case of cropped-query can be as large as $41 \\%$ . The high dimensionality of the concatenated features (larger than 1.5k) will also lead to longer running times. Considering all these, we do not use concatenation of features in the following experiments. ",
645
+ "bbox": [
646
+ 174,
647
+ 194,
648
+ 825,
649
+ 348
650
+ ],
651
+ "page_idx": 6
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "Table 3: Multi-scale representation: comparison between different methods. “overlap” denotes whether the regions in each level (see Figure 1) have some overlapping areas. “s2”,“s3” mean that overlap occurs in level 2 or 3. “weighing” means if the features from each level are added using same weight or different weight. “version” means the different choice of the number of regions in each scale. ",
656
+ "bbox": [
657
+ 174,
658
+ 359,
659
+ 825,
660
+ 415
661
+ ],
662
+ "page_idx": 6
663
+ },
664
+ {
665
+ "type": "table",
666
+ "img_path": "images/d12391ce1c0592b27f885bd1908569d36da028a19f7723c257bd111ebf9b3404.jpg",
667
+ "table_caption": [],
668
+ "table_footnote": [],
669
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>scale</td><td rowspan=1 colspan=1>overlap</td><td rowspan=1 colspan=1>weighing</td><td rowspan=1 colspan=1>version</td><td rowspan=1 colspan=1>full-query</td><td rowspan=1 colspan=1>cropped-query</td></tr><tr><td rowspan=1 colspan=1>(a1)(a2)</td><td rowspan=1 colspan=1>22</td><td rowspan=1 colspan=1>××</td><td rowspan=1 colspan=1>×√</td><td rowspan=1 colspan=1>1=</td><td rowspan=1 colspan=1>63.563.9</td><td rowspan=1 colspan=1>59.061.0</td></tr><tr><td rowspan=1 colspan=1>(b1)(b2)(b3)</td><td rowspan=1 colspan=1>333</td><td rowspan=1 colspan=1>××s2</td><td rowspan=1 colspan=1>×√×</td><td rowspan=1 colspan=1>1-</td><td rowspan=1 colspan=1>64.262.664.8</td><td rowspan=1 colspan=1>60.961.060.8</td></tr><tr><td rowspan=8 colspan=1>(c1)(c2)(c3)(c4)(c5)(c6)(c7)(c8)</td><td rowspan=8 colspan=1>44444444</td><td rowspan=1 colspan=1>s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v1</td><td rowspan=1 colspan=1>65.1</td><td rowspan=1 colspan=1>61.4</td></tr><tr><td rowspan=1 colspan=1>s3</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>v1</td><td rowspan=1 colspan=1>64.8</td><td rowspan=1 colspan=1>60.7</td></tr><tr><td rowspan=1 colspan=1>s2,s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v1</td><td rowspan=1 colspan=1>65.5</td><td rowspan=6 colspan=1>60.861.561.261.362.262.6</td></tr><tr><td rowspan=1 colspan=1>s2,s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v2</td><td rowspan=1 colspan=1>65.9</td></tr><tr><td rowspan=1 colspan=1>s2.s3</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>v2</td><td rowspan=1 colspan=1>65.4</td></tr><tr><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v3</td><td rowspan=1 colspan=1>64.5</td></tr><tr><td rowspan=1 colspan=1>s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v3</td><td rowspan=1 colspan=1>65.8</td></tr><tr><td rowspan=1 colspan=1>s2.s3</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>v3</td><td rowspan=1 colspan=1>66.3</td></tr></table>",
670
+ "bbox": [
671
+ 256,
672
+ 428,
673
+ 740,
674
+ 608
675
+ ],
676
+ "page_idx": 6
677
+ },
678
+ {
679
+ "type": "text",
680
+ "text": "We conduct extensive experiments to decide the best configurations for the multi-scale approach and report our results in Table 3. First, we explore the impact of the number of scales on the retrieval performances. For the 2 and 3 scale representations, The region number for each level are $\\{ 1 \\times 1$ , $2 \\times 2 \\}$ , $\\{ 1 \\times 1 , 2 \\times 2 , 3 \\times 3 \\}$ . For the 4 scale representation, 3 versions are used and they differ in the number of regions in each scale: for “v1”, “v2”, and “v3”, the number of regions are $\\{ 1 \\times 1 , 2 \\times 2$ , $3 \\times 3 , 4 \\times 4 \\}$ , $\\{ 1 \\times 1 , 2 \\times 2 , 3 \\times 3 , 5 \\times 5 \\}$ and $\\{ 1 \\times 1 , 2 \\times 2 , 3 \\times 3 , 6 \\times 6 \\}$ . Table 3 (a1)(b1)(c6) show the performances of using 2, 3, and 4 scales to represent the dataset images, respectively. Clearly, more scale levels improve the results and in the case of cropped-query, increase the performance by an absolute $2 \\%$ . ",
681
+ "bbox": [
682
+ 173,
683
+ 627,
684
+ 825,
685
+ 753
686
+ ],
687
+ "page_idx": 6
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "We also conduct experiments to find whether the weighing of different scales leads to improved performance. The weighing method for features from different scales is similar to the manner of spatial pyramid matching (Lazebnik et al., 2006) — features from coarser level are given less weight while features from the finer levels are given more weight. Suppose the features of different scales for an $L$ scale representation are $f ^ { 1 } , f ^ { 2 } , \\ldots , f ^ { L }$ , then the image representation $f$ is expressed as: ",
692
+ "bbox": [
693
+ 174,
694
+ 760,
695
+ 825,
696
+ 830
697
+ ],
698
+ "page_idx": 6
699
+ },
700
+ {
701
+ "type": "equation",
702
+ "img_path": "images/3ef40cdd9de1b55b57bb1c4665e8fb72be167d0bb9caebc649cdc075d268cd3f.jpg",
703
+ "text": "$$\nf = { \\frac { 1 } { 2 ^ { L - 1 } } } f ^ { 1 } + \\sum _ { i = 2 } ^ { L } { \\frac { 1 } { 2 ^ { L - i + 1 } } } f ^ { i } .\n$$",
704
+ "text_format": "latex",
705
+ "bbox": [
706
+ 393,
707
+ 834,
708
+ 604,
709
+ 877
710
+ ],
711
+ "page_idx": 6
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "More details can be found in Lazebnik et al. (2006). Comparing the results of row (a1) and (a2), it seems that weighing different scales leads to better performance. But after more experiments, we find that the weighing method generally leads to inferior results as the number of scales increase, e.g., compare the results of row pair(b1)(b2) and (c1)(c2). These results suggest that deep features are different from the traditional local feature descriptors such as SIFT. We should exercise with caution when we apply the traditional wisdom found in SIFT to the deep convolutional descriptors, which is also suggested in Babenko & Lempitsky (2015). Based on the results of this experiment, no weighing methods are used in computing our final image feature representations. ",
716
+ "bbox": [
717
+ 174,
718
+ 881,
719
+ 825,
720
+ 924
721
+ ],
722
+ "page_idx": 6
723
+ },
724
+ {
725
+ "type": "image",
726
+ "img_path": "images/504d95016996e727b0ea71350f5d46b765315294afce90ac06172172d4ab49bf.jpg",
727
+ "image_caption": [
728
+ "Figure 3: The number of principal component reserved VS mAP. We show the results of full and cropped query using the PCA and whitening matrix learned from the Oxford5k itself and Paris6k, denoted as “full-self”, “full-paris” and “crop-self”, “crop-paris”. "
729
+ ],
730
+ "image_footnote": [],
731
+ "bbox": [
732
+ 178,
733
+ 101,
734
+ 820,
735
+ 327
736
+ ],
737
+ "page_idx": 7
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "",
742
+ "bbox": [
743
+ 174,
744
+ 420,
745
+ 825,
746
+ 491
747
+ ],
748
+ "page_idx": 7
749
+ },
750
+ {
751
+ "type": "text",
752
+ "text": "Next, we look into the issue of overlapping between different scales and try to verify its usefulness. For each scale and its different versions, we set some overlapping areas between the neighboring regions in either one or two scales of the pyramid (For the exact configurations of overlap in all cases in Table 3, see appendix B for the complete descriptions). From the row pair (b1)(b3) and (c1)(c3), we can see that overlap increase the performance for full-query but decrease a little the performance for cropped-query. But for 4 scale v3 (note the pair(c7)(c8)), we see a consistent improvement for both the full and cropped queries. So we decided to use overlap in level 2 and 3 in computing our final features. ",
753
+ "bbox": [
754
+ 173,
755
+ 497,
756
+ 825,
757
+ 608
758
+ ],
759
+ "page_idx": 7
760
+ },
761
+ {
762
+ "type": "text",
763
+ "text": "Table 4: The impact of PCA and whitening. “PCA on self” and “PCA on Paris” mean that the corresponding features are post-processed by the PCA and whitening matrices learned on the Oxford5k and Paris6k datasets, respectively. The numbers in the parentheses indicate the dimensionality of features used for obtaining the corresponding results. ",
764
+ "bbox": [
765
+ 174,
766
+ 622,
767
+ 823,
768
+ 678
769
+ ],
770
+ "page_idx": 7
771
+ },
772
+ {
773
+ "type": "table",
774
+ "img_path": "images/b2402813ced8515255667d70e05ef6e3aecc03749cc0bdc63d31144f21384f0e.jpg",
775
+ "table_caption": [],
776
+ "table_footnote": [],
777
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Feature</td><td rowspan=1 colspan=1>full-query</td><td rowspan=1 colspan=1>cropped-query</td></tr><tr><td rowspan=1 colspan=1>3scale_overlap,original3scale_overlap,l,PCA on self3scale_overlap,PCA on Paris</td><td rowspan=1 colspan=1>64.865.4(80)70.6(464)</td><td rowspan=1 colspan=1>60.860.9(112)67.3(480)</td></tr><tr><td rowspan=1 colspan=1>4scale_v3_overlap(s3),original4scale_v3_overlap(s3),PCA on self4scale_v3_overlap(s3),PCA on Paris</td><td rowspan=1 colspan=1>65.166.9(80)72.3(464)</td><td rowspan=1 colspan=1>61.461.9(96)70.8(496)</td></tr><tr><td rowspan=1 colspan=1>4scale_v3_overlap(s2,s3),original4scale_v3_overlap(s2,s3),PCA on self4scale_v3-overlap(s2,s3),PCA on Paris</td><td rowspan=1 colspan=1>66.369.0(80)73.2(496)</td><td rowspan=1 colspan=1>62.863.9(144)71.2(448)</td></tr></table>",
778
+ "bbox": [
779
+ 277,
780
+ 690,
781
+ 718,
782
+ 820
783
+ ],
784
+ "page_idx": 7
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "PCA and whitening. We perform PCA and whitening for the features extracted from the Oxford5k dataset using the PCA and whitening matrix learned from the Oxford5k or the Paris6k dataset and $l _ { 2 }$ -normalize these features to get the final image representations. ",
789
+ "bbox": [
790
+ 176,
791
+ 847,
792
+ 823,
793
+ 888
794
+ ],
795
+ "page_idx": 7
796
+ },
797
+ {
798
+ "type": "text",
799
+ "text": "The retrieval results for 3 groups of features (from Table 3(b3)(c1)(c8)) are shown in Table 4. Clearly, PCA and whitening lead to better performances. For all 3 groups of features, PCA and whitening on the same dataset lead to insignificant improvement both in the case of full and cropped query. But after doing PCA and whitening on the Paris6k dataset, the results for both the full and cropped queries improve greatly. In fact, the improvement for the case of cropped-query is even more surprising. For example, for the third feature group, the improvement are $1 0 . 4 \\%$ and $1 3 . 4 \\%$ for the full and cropped queries. It should also be noted that as the the number of principal component reserved increases, the performance for “PCA on self” and “PCA on Paris” differs greatly. As is shown in Figure 3, the performance for the former peaks at a relatively low dimension (around 100) and begins to decrease, while for the latter, the performance increases as the number of principal component gets larger and then plateaus. ",
800
+ "bbox": [
801
+ 173,
802
+ 895,
803
+ 823,
804
+ 924
805
+ ],
806
+ "page_idx": 7
807
+ },
808
+ {
809
+ "type": "table",
810
+ "img_path": "images/f1d6f1e12a6c5f683ef2371c6f506f98cf0ca822997f511dfe47bc1a3e3da355.jpg",
811
+ "table_caption": [
812
+ "Table 5: Comparison with state-of-the-art methods. “single” means multi-scale features from single layer (conv5 4) are used. “single, compression” uses the same features but compresses them to get the best performances. “layer ensemble” combines the similarity score from layer conv5 4 and fc6-conv. The dimensionality of the combined feature is set to 1024 for compactness considerations. All our methods use PCA and whitening. "
813
+ ],
814
+ "table_footnote": [],
815
+ "table_body": "<table><tr><td rowspan=\"2\">method</td><td rowspan=\"2\">D</td><td colspan=\"2\">Oxford5k</td><td colspan=\"2\">Paris6k</td><td colspan=\"2\">Oxford105k</td><td rowspan=\"2\">UKB</td></tr><tr><td>full</td><td>cropped</td><td>full</td><td>cropped</td><td>full</td><td>cropped</td></tr><tr><td>Jégou &amp; Zisserman (2014) Arandjelovic &amp; Zisserman (2012)</td><td>128 128</td><td>1 /</td><td>43.3 44.8</td><td>1 -</td><td>1</td><td>1 1</td><td>35.3 37.4</td><td>3.40 1</td></tr><tr><td>Jégou &amp; Zisserman (2014) Razavian et al. (2014b) Babenko et al. (2014)</td><td>1024 256</td><td>- 53.3</td><td>56.0 -</td><td>1 67.0</td><td>- -</td><td>1 48.9</td><td>50.2 -</td><td>3.51 3.38</td></tr><tr><td>Babenko &amp; Lempitsky (2015)</td><td>512 256</td><td>55.7 58.9</td><td>- 53.1</td><td>-</td><td>=</td><td>52.2</td><td>-</td><td>3.56 3.65</td></tr><tr><td></td><td></td><td></td><td></td><td>-</td><td>-</td><td>57.8</td><td>50.1</td><td></td></tr><tr><td>Arandjelovic et al. (2016)</td><td>256</td><td>62.5</td><td>63.5</td><td>72.0</td><td>73.5</td><td></td><td>-</td><td>-</td></tr><tr><td>Tolias et al. (2015)</td><td>512</td><td></td><td></td><td></td><td></td><td>-</td><td></td><td></td></tr><tr><td></td><td></td><td>-</td><td>66.8</td><td>-</td><td>83.0</td><td>1</td><td>61.6</td><td>-</td></tr><tr><td>ours (single)</td><td>512</td><td>73.0</td><td>70.6</td><td>82.0</td><td>83.3</td><td>68.9</td><td>65.3</td><td>3.75</td></tr><tr><td>ours (single,compression)</td><td>-</td><td>73.2</td><td>71.2</td><td>83.0</td><td>84.0</td><td>68.9</td><td>65.8</td><td>3.76</td></tr><tr><td>ours (layer ensemble)</td><td>1024</td><td>75.6</td><td>73.7</td><td>85.7</td><td>85.9</td><td>71.6</td><td>69.2</td><td>3.81</td></tr></table>",
816
+ "bbox": [
817
+ 189,
818
+ 169,
819
+ 808,
820
+ 342
821
+ ],
822
+ "page_idx": 8
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "",
827
+ "bbox": [
828
+ 174,
829
+ 366,
830
+ 825,
831
+ 492
832
+ ],
833
+ "page_idx": 8
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "Do the above results mean that we should always compute the PCA and whitening matrix from any datasets other than the query dataset itself? The short answer is no. We find that for UKB, learning the PCA and whitening matrix on the Oxford5k dataset shows inferior results compared to learning the PCA and whitening matrix on UKB itself (about $2 \\%$ drop in accuracy). This may be due to the large differences between the images of the two datasets as the Oxford5k dataset are mainly images of buildings while the images in UKB are mainly small indoor objects. We therefore recommend learning the PCA and whitening matrix on a similar dataset to achieve good performances. ",
838
+ "bbox": [
839
+ 174,
840
+ 498,
841
+ 825,
842
+ 597
843
+ ],
844
+ "page_idx": 8
845
+ },
846
+ {
847
+ "type": "text",
848
+ "text": "5.3 COMPARISON WITH OTHER METHODS ",
849
+ "text_level": 1,
850
+ "bbox": [
851
+ 176,
852
+ 612,
853
+ 478,
854
+ 627
855
+ ],
856
+ "page_idx": 8
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "Based on the previous experimental results and our analysis of different impacting factors on the retrieval performances, we propose a new multi-scale image feature representation. For a given image in the dataset, the whole process of image feature representation is divided into two steps. First, the input image is fed into the network without the resizing operation (the free way) and a 4-scale feature representation is built on top of the feature maps of layer conv5 4. During the multiscale representation step, max-pooling of feature maps are used and regional vectors from the same scale are added together and $l _ { 2 }$ -normalized. After that, features from different scales are summed and $l _ { 2 }$ -normalized again. The second step involves applying the PCA and whitening operations on features from the first step. The PCA and whitening matrix used are either learned from different or same dataset: specifically, for the Oxford5k and Oxford $1 0 5 \\mathrm { k }$ , it is learned in the Paris6k, while for Paris6k and UKB, it is learned on Oxford5k and UKB respectively. The final PCA and whitened image features are used for reporting our method’s performances. ",
861
+ "bbox": [
862
+ 174,
863
+ 638,
864
+ 825,
865
+ 805
866
+ ],
867
+ "page_idx": 8
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "Layer ensemble. Inspired by previous work on model ensemble to boost the classification performances (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014), we consider fusing the similarity score from different layers to improve the retrieval performances. Specifically, for two images, their similarity score is computed as the weighted sum of the scores from different layers (these weights sum to 1 so that overall similarity score between two images are still in the range $[ 0 , 1 ]$ .). We have evaluated various combination of layers to see their performances and find that best performance is achieved by combining the score from conv5 4 and fc6-conv. For the fc6-conv features of an image, we use a 3-scale representation as the size of output feature maps are already very small. ",
872
+ "bbox": [
873
+ 174,
874
+ 811,
875
+ 825,
876
+ 924
877
+ ],
878
+ "page_idx": 8
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "The fc6-conv features are compressed to low dimensional vectors for faster computation. Our layer ensemble achieves $7 5 . 6 \\%$ and $7 3 . 7 \\%$ on Oxford5k for the full and cropped queries respectively, showing a large improvement over previous methods. This suggests that features from the fc6-conv and conv5 4 are complementary. See Table 5 for the complete results on all four datasets. ",
883
+ "bbox": [
884
+ 174,
885
+ 103,
886
+ 823,
887
+ 159
888
+ ],
889
+ "page_idx": 9
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "Comparison. We compare the performance of our method with several state-of-the-art methods which use small footprint representations and do not employ the complicated post-processing techniques such as geometric re-ranking (Philbin et al., 2007) and query expansion (Arandjelovic &´ Zisserman, 2012). The results are shown in Table 5. In all the datasets and different scenarios (full or cropped), our method achieves the best performance with comparable cost. For Oxford5k (cropped) and UKB dataset, the relative improvement of our best results over previous methods (from Tolias et al. (2015) and Babenko & Lempitsky (2015)) are $1 0 . 3 \\%$ and $4 . 4 \\%$ . ",
894
+ "bbox": [
895
+ 174,
896
+ 166,
897
+ 825,
898
+ 263
899
+ ],
900
+ "page_idx": 9
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "6 CONCLUSION ",
905
+ "text_level": 1,
906
+ "bbox": [
907
+ 176,
908
+ 284,
909
+ 318,
910
+ 300
911
+ ],
912
+ "page_idx": 9
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "In this paper, we focus on instance retrieval based on features extracted from CNNs. we have conducted extensive experiments to evaluate the impact of five factors on the performances of image retrieval and analysed their particular impacts. Based on the insights gained from these experiments, we have proposed a new multi-scale image representation which shows superior performances over previous methods on four datasets. When combined with the technique “layer ensemble”, our method can achieve further improvements. Overall, we have provided a viable and efficient solution to apply CNNs in an unsupervised way to datasets with a relatively small number of images. ",
917
+ "bbox": [
918
+ 174,
919
+ 315,
920
+ 825,
921
+ 412
922
+ ],
923
+ "page_idx": 9
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "REFERENCES ",
928
+ "text_level": 1,
929
+ "bbox": [
930
+ 174,
931
+ 433,
932
+ 285,
933
+ 448
934
+ ],
935
+ "page_idx": 9
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "R. Arandjelovic and A. Zisserman. Three things everyone should know to improve object retrieval. In ´ Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pp. 2911–2918, June 2012. doi: 10. 1109/CVPR.2012.6248018. \nR. Arandjelovic and A. Zisserman. All about vlad. In ´ Computer Vision and Pattern Recognition (CVPR), 2013 IEEE Conference on, pp. 1578–1585, June 2013. doi: 10.1109/CVPR.2013.207. \nR. Arandjelovic, P. Gronat, A. Torii, T. Pajdla, and J. Sivic. NetVLAD: CNN architecture for weakly supervised ´ place recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. \nHossein Azizpour, Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. From generic to specific deep representations for visual recognition. CoRR, abs/1406.5774, 2014. URL http://arxiv. org/abs/1406.5774. \nArtem Babenko and Victor Lempitsky. Aggregating local deep features for image retrieval. In The IEEE International Conference on Computer Vision (ICCV), December 2015. \nArtem Babenko, Anton Slesarev, Alexandr Chigorin, and Victor Lempitsky. Neural Codes for Image Retrieval, pp. 584–599. Springer International Publishing, Cham, 2014. ISBN 978-3-319-10590-1. doi: 10.1007/ 978-3-319-10590-1 38. URL http://dx.doi.org/10.1007/978-3-31s9-10590-1_38. \nOndˇrej Chum, James Philbin, Josef Sivic, Michael Isard, and Andrew Zisserman. Total recall: Automatic query expansion with a generative feature model for object retrieval. In Computer Vision, 2007. ICCV 2007. IEEE 11th International Conference on, pp. 1–8. IEEE, 2007. \nJifeng Dai, Kaiming He, and Jian Sun. Instance-aware semantic segmentation via multi-task network cascades. In CVPR, 2016. \nLeon A. Gatys, Alexander S. Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. \nRoss Girshick. Fast r-cnn. In International Conference on Computer Vision (ICCV), 2015. \nYunchao Gong, Liwei Wang, Ruiqi Guo, and Svetlana Lazebnik. Multi-scale Orderless Pooling of Deep Convolutional Activation Features, pp. 392–407. Springer International Publishing, Cham, 2014. ISBN 978-3-319-10584-0. doi: 10.1007/978-3-319-10584-0 26. URL http://dx.doi.org/10.1007/ 978-3-319-10584-0_26. \nKaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. ",
940
+ "bbox": [
941
+ 171,
942
+ 452,
943
+ 826,
944
+ 928
945
+ ],
946
+ "page_idx": 9
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "H. Jegou and A. Zisserman. Triangulation embedding and democratic aggregation for image search. In ´ 2014 IEEE Conference on Computer Vision and Pattern Recognition, pp. 3310–3317, June 2014. doi: 10.1109/ CVPR.2014.417. ",
951
+ "bbox": [
952
+ 174,
953
+ 104,
954
+ 825,
955
+ 143
956
+ ],
957
+ "page_idx": 10
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "H. Jegou, M. Douze, C. Schmid, and P. P ´ erez. Aggregating local descriptors into a compact image representa- ´ tion. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pp. 3304–3311, June 2010. doi: 10.1109/CVPR.2010.5540039. ",
962
+ "bbox": [
963
+ 176,
964
+ 154,
965
+ 821,
966
+ 193
967
+ ],
968
+ "page_idx": 10
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. ",
973
+ "bbox": [
974
+ 173,
975
+ 202,
976
+ 823,
977
+ 241
978
+ ],
979
+ "page_idx": 10
980
+ },
981
+ {
982
+ "type": "text",
983
+ "text": "He Kaiming, Zhang Xiangyu, Ren Shaoqing, and Jian Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In European Conference on Computer Vision, 2014. ",
984
+ "bbox": [
985
+ 169,
986
+ 251,
987
+ 823,
988
+ 277
989
+ ],
990
+ "page_idx": 10
991
+ },
992
+ {
993
+ "type": "text",
994
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. ",
995
+ "bbox": [
996
+ 173,
997
+ 286,
998
+ 821,
999
+ 314
1000
+ ],
1001
+ "page_idx": 10
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "Svetlana Lazebnik, Cordelia Schmid, and Jean Ponce. Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories. In Proceedings of the 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition - Volume 2, CVPR ’06, pp. 2169–2178, Washington, DC, USA, 2006. IEEE Computer Society. ISBN 0-7695-2597-0. doi: 10.1109/CVPR.2006.68. URL http: //dx.doi.org/10.1109/CVPR.2006.68. ",
1006
+ "bbox": [
1007
+ 173,
1008
+ 323,
1009
+ 825,
1010
+ 387
1011
+ ],
1012
+ "page_idx": 10
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, Nov 1998. ISSN 0018-9219. doi: 10.1109/5.726791. ",
1017
+ "bbox": [
1018
+ 173,
1019
+ 397,
1020
+ 821,
1021
+ 424
1022
+ ],
1023
+ "page_idx": 10
1024
+ },
1025
+ {
1026
+ "type": "text",
1027
+ "text": "Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C. Berg. SSD: Single shot multibox detector. arXiv preprint arXiv:1512.02325, 2015. ",
1028
+ "bbox": [
1029
+ 173,
1030
+ 433,
1031
+ 820,
1032
+ 460
1033
+ ],
1034
+ "page_idx": 10
1035
+ },
1036
+ {
1037
+ "type": "text",
1038
+ "text": "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, 2015. ",
1039
+ "bbox": [
1040
+ 169,
1041
+ 469,
1042
+ 823,
1043
+ 497
1044
+ ],
1045
+ "page_idx": 10
1046
+ },
1047
+ {
1048
+ "type": "text",
1049
+ "text": "David G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004. ISSN 1573-1405. doi: 10.1023/B:VISI.0000029664.99615.94. URL http: //dx.doi.org/10.1023/B:VISI.0000029664.99615.94. ",
1050
+ "bbox": [
1051
+ 173,
1052
+ 507,
1053
+ 823,
1054
+ 546
1055
+ ],
1056
+ "page_idx": 10
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "D. Nister and H. Stew ´ enius. Scalable recognition with a vocabulary tree. In ´ IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 2, pp. 2161–2168, June 2006. ",
1061
+ "bbox": [
1062
+ 169,
1063
+ 555,
1064
+ 823,
1065
+ 583
1066
+ ],
1067
+ "page_idx": 10
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman. Lost in quantization: Improving particular object retrieval in large scale image databases. In Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on, pp. 1–8, June 2008. doi: 10.1109/CVPR.2008.4587635. ",
1072
+ "bbox": [
1073
+ 173,
1074
+ 592,
1075
+ 823,
1076
+ 631
1077
+ ],
1078
+ "page_idx": 10
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "James Philbin, Ondrej Chum, Michael Isard, Josef Sivic, and Andrew Zisserman. Object retrieval with large vocabularies and fast spatial matching. In 2007 IEEE Conference on Computer Vision and Pattern Recognition, pp. 1–8, June 2007. doi: 10.1109/CVPR.2007.383172. ",
1083
+ "bbox": [
1084
+ 173,
1085
+ 640,
1086
+ 821,
1087
+ 679
1088
+ ],
1089
+ "page_idx": 10
1090
+ },
1091
+ {
1092
+ "type": "text",
1093
+ "text": "Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: An astounding baseline for recognition. In Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPRW ’14, pp. 512–519, Washington, DC, USA, 2014a. IEEE Computer Society. ISBN 978-1-4799-4308-1. doi: 10.1109/CVPRW.2014.131. URL http://dx.doi.org/10. 1109/CVPRW.2014.131. ",
1094
+ "bbox": [
1095
+ 173,
1096
+ 689,
1097
+ 826,
1098
+ 753
1099
+ ],
1100
+ "page_idx": 10
1101
+ },
1102
+ {
1103
+ "type": "text",
1104
+ "text": "Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. Visual instance retrieval with deep convolutional networks. CoRR, abs/1412.6574, 2014b. URL http://arxiv.org/abs/1412.6574. ",
1105
+ "bbox": [
1106
+ 173,
1107
+ 763,
1108
+ 823,
1109
+ 790
1110
+ ],
1111
+ "page_idx": 10
1112
+ },
1113
+ {
1114
+ "type": "text",
1115
+ "text": "Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. Visual instance retrieval with deep convolutional networks. CoRR, abs/1412.6574, 2014c. URL http://arxiv.org/abs/1412.6574. ",
1116
+ "bbox": [
1117
+ 173,
1118
+ 799,
1119
+ 823,
1120
+ 827
1121
+ ],
1122
+ "page_idx": 10
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y. ",
1127
+ "bbox": [
1128
+ 173,
1129
+ 835,
1130
+ 825,
1131
+ 888
1132
+ ],
1133
+ "page_idx": 10
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "Ross Girshick Jian Sun Shaoqing Ren, Kaiming He. Faster R-CNN: Towards real-time object detection with region proposal networks. arXiv preprint arXiv:1506.01497, 2015. ",
1138
+ "bbox": [
1139
+ 174,
1140
+ 897,
1141
+ 820,
1142
+ 924
1143
+ ],
1144
+ "page_idx": 10
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "Gaurav Sharma and Bernt Schiele. Scalable nonlinear embeddings for semantic category-based image retrieval. In ICCV, 2015. \nK. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. \nJosef Sivic and Andrew Zisserman. Video google: A text retrieval approach to object matching in videos. In Computer Vision, 2003. Proceedings. Ninth IEEE International Conference on, pp. 1470–1477. IEEE, 2003. \nC. Szegedy, Wei Liu, Yangqing Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1–9, June 2015. doi: 10.1109/CVPR.2015.7298594. \nG. Tolias, R. Sicre, and H. Jegou. Particular object retrieval with integral max-pooling of CNN activations. ´ ArXiv e-prints, November 2015. \nMatthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In Computer vision–ECCV 2014, pp. 818–833. Springer, 2014. ",
1149
+ "bbox": [
1150
+ 169,
1151
+ 104,
1152
+ 826,
1153
+ 320
1154
+ ],
1155
+ "page_idx": 11
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "APPENDIX A THE NETWORK TRANSFORMATIONS ",
1160
+ "text_level": 1,
1161
+ "bbox": [
1162
+ 174,
1163
+ 102,
1164
+ 598,
1165
+ 117
1166
+ ],
1167
+ "page_idx": 12
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "In order for the network to process images of varying sizes, We change the layer fc6, fc7 and fc8 from the original model to fc6-conv, fc7-conv and fc8-conv. It should be noted there are certain constraints on the input image size due to the network’s inherent design. The original network accepts an image of fixed size $( 2 2 4 \\times 2 2 4 )$ , so the output feature maps of the last convolutional layer conv5 4 is of size $5 1 2 \\times 7 \\times 7$ . As a result, when we change the operation between layer conv5 4 and fc6 from inner product to convolution, each filter bank kernel between conv5 4 and fc6-conv has size $7 \\times 7$ . This in turn means that if we are to extract features from layer fc6-conv and above, the minimum size of an input image must equal to or be greater than 224. For output feature maps of layer conv5 4 and below, there are no restrictions on the input image size. During the experiment, when we are extracting features from layer fc6-conv and above, the minimum size of an image is set to be 224 if it is less than 224. ",
1172
+ "bbox": [
1173
+ 174,
1174
+ 133,
1175
+ 825,
1176
+ 286
1177
+ ],
1178
+ "page_idx": 12
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "APPENDIX B THE DETAIL OF OVERLAP IN EACH SCALE ",
1183
+ "text_level": 1,
1184
+ "bbox": [
1185
+ 176,
1186
+ 306,
1187
+ 645,
1188
+ 321
1189
+ ],
1190
+ "page_idx": 12
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "In this paper, the overlaps between different regions occur in the 3 and 4 scale pyramid. A single region in each scale can be specified as the combination of a slice from the the width and height of the feature map. If a scale has $N \\times N$ regions, then the number of slices in width and height of the feature map are both $N$ . We use the same set of slices for both the width and height in this experiment. ",
1195
+ "bbox": [
1196
+ 174,
1197
+ 338,
1198
+ 825,
1199
+ 407
1200
+ ],
1201
+ "page_idx": 12
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "In 3 scale (see Table 3 (b3)), overlap occurs only in scale 2, and the slice (in the proportion to the length of feature map width or height: $\\{ ( 0 , \\frac { 2 } { 3 } ) , ( \\frac { 1 } { 3 } , 1 ) \\}$ . In 4 scale v1 (Table 3 (c1)–(c3)), the slices for scale 2 and 3 are $\\scriptstyle \\{ ( 0 , { \\frac { 3 } { 4 } } ) , ( { \\frac { 1 } { 4 } } , 1 ) \\}$ and $\\{ ( \\bar { 0 } , { \\textstyle \\frac { 2 } { 4 } } ) , ( { \\textstyle \\frac { 1 } { 4 } } , { \\textstyle \\frac { 3 } { 4 } } ) , ( { \\textstyle \\frac { 2 } { 4 } } , 1 ) \\}$ . In 4 scale v2 (Table 3 (c4)(c5)), the slices for scale 2 and 3 are $\\left\\{ ( 0 , \\frac { 3 } { 5 } ) , ( \\frac { 2 } { 5 } , 1 ) \\right\\}$ and $\\{ ( \\bar { 0 } , \\textstyle { \\frac { 3 } { 5 } } ) , ( \\textstyle { \\frac { 1 } { 5 } } , \\textstyle { \\frac { 4 } { 5 } } ) , ( \\textstyle { \\frac { 2 } { 5 } } , 1 ) \\}$ . In 4 scale v3 (Table 3 (c6)–(c8)), the slices are $\\{ ( 0 , \\frac { 4 } { 6 } ) , ( \\frac { 2 } { 6 } , 1 ) \\}$ and $\\begin{array} { r } { \\{ ( 0 , \\frac { 3 } { 6 } ) , ( \\frac { 1 } { 6 } , \\frac { 4 } { 6 } ) , ( \\frac { 3 } { 6 } , 1 ) \\} } \\end{array}$ , for scale 2 and 3, respectively. ",
1206
+ "bbox": [
1207
+ 174,
1208
+ 415,
1209
+ 825,
1210
+ 494
1211
+ ],
1212
+ "page_idx": 12
1213
+ }
1214
+ ]
parse/train/SJNDWNOlg/SJNDWNOlg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJNDWNOlg/SJNDWNOlg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skw0n-W0Z/Skw0n-W0Z.md ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TEMPORAL DIFFERENCE MODELS: MODEL-FREE DEEP RL FOR MODEL-BASED CONTROL
2
+
3
+ Vitchyr Pong∗ University of California, Berkeley vitchyr@berkeley.edu
4
+
5
+ Shixiang $\mathbf { G u } ^ { * }$
6
+ University of Cambridge
7
+ Max Planck Institute
8
+ Google Brain
9
+ sg717@cam.ac.uk
10
+
11
+ Murtaza Dalal University of California, Berkeley mdalal@berkeley.edu
12
+
13
+ Sergey Levine University of California, Berkeley svlevine@eecs.berkeley.edu
14
+
15
+ # ABSTRACT
16
+
17
+ Model-free reinforcement learning (RL) is a powerful, general tool for learning complex behaviors. However, its sample efficiency is often impractically large for solving challenging real-world problems, even with off-policy algorithms such as Q-learning. A limiting factor in classic model-free RL is that the learning signal consists only of scalar rewards, ignoring much of the rich information contained in state transition tuples. Model-based RL uses this information, by training a predictive model, but often does not achieve the same asymptotic performance as model-free RL due to model bias. We introduce temporal difference models (TDMs), a family of goal-conditioned value functions that can be trained with model-free learning and used for model-based control. TDMs combine the benefits of model-free and model-based RL: they leverage the rich information in state transitions to learn very efficiently, while still attaining asymptotic performance that exceeds that of direct model-based RL methods. Our experimental results show that, on a range of continuous control tasks, TDMs provide a substantial improvement in efficiency compared to state-of-the-art model-based and model-free methods.
18
+
19
+ # 1 INTRODUCTION
20
+
21
+ Reinforcement learning (RL) algorithms provide a formalism for autonomous learning of complex behaviors. When combined with rich function approximators such as deep neural networks, RL can provide impressive results on tasks ranging from playing games (Mnih et al., 2015; Silver et al., 2016), to flying and driving (Lillicrap et al., 2015; Zhang et al., 2016), to controlling robotic arms (Levine et al., 2016; Gu et al., 2017). However, these deep RL algorithms often require a large amount of experience to arrive at an effective solution, which can severely limit their application to real-world problems where this experience might need to be gathered directly on a real physical system. Part of the reason for this is that direct, model-free RL learns only from the reward: experience that receives no reward provides minimal supervision to the learner.
22
+
23
+ In contrast, model-based RL algorithms obtain a large amount of supervision from every sample, since they can use each sample to better learn how to predict the system dynamics – that is, to learn the “physics” of the problem. Once the dynamics are learned, near-optimal behavior can in principle be obtained by planning through these dynamics. Model-based algorithms tend to be substantially more efficient (Deisenroth et al., 2013; Nagabandi et al., 2017), but often at the cost of larger asymptotic bias: when the dynamics cannot be learned perfectly, as is the case for most complex problems, the final policy can be highly suboptimal. Therefore, conventional wisdom holds that model-free methods are less efficient but achieve the best asymptotic performance, while model-based methods are more efficient but do not produce policies that are as optimal.
24
+
25
+ Can we devise methods that retain the efficiency of model-based learning while still achieving the asymptotic performance of model-free learning? This is the question that we study in this paper. The search for methods that combine the best of model-based and model-free learning has been ongoing for decades, with techniques such as synthetic experience generation (Sutton, 1990), partial modelbased backpropagation (Nguyen & Widrow, 1990; Heess et al., 2015), and layering model-free learning on the residuals of model-based estimation (Chebotar et al., 2017) being a few examples. However, a direct connection between model-free and model-based RL has remained elusive. By effectively bridging the gap between model-free and model-based RL, we should be able to smoothly transition from learning models to learning policies, obtaining rich supervision from every sample to quickly gain a moderate level of proficiency, while still converging to an unbiased solution.
26
+
27
+ To arrive at a method that combines the strengths of model-free and model-based RL, we study a variant of goal-conditioned value functions (Sutton et al., 2011; Schaul et al., 2015; Andrychowicz et al., 2017). Goal-conditioned value functions learn to predict the value function for every possible goal state. That is, they answer the following question: what is the expected reward for reaching a particular state, given that the agent is attempting (as optimally as possible) to reach it? The particular choice of reward function determines what such a method actually does, but rewards based on distances to a goal hint at a connection to model-based learning: if we can predict how easy it is to reach any state from any current state, we must have some kind of understanding of the underlying “physics.” In this work, we show that we can develop a method for learning variable-horizon goalconditioned value functions where, for a specific choice of reward and horizon, the value function corresponds directly to a model, while for larger horizons, it more closely resembles model-free approaches. Extension toward more model-free learning is thus achieved by acquiring “multi-step models” that can be used to plan over progressively coarser temporal resolutions, eventually arriving at a fully model-free formulation.
28
+
29
+ The principle contribution of our work is a new RL algorithm that makes use of this connection between model-based and model-free learning to learn a specific type of goal-conditioned value function, which we call a temporal difference model (TDM). This value function can be learned very efficiently, with sample complexities that are competitive with model-based RL, and can then be used with an MPC-like method to accomplish desired tasks. Our empirical experiments demonstrate that this method achieves substantially better sample complexity than fully model-free learning on a range of challenging continuous control tasks, while outperforming purely model-based methods in terms of final performance. Furthermore, the connection that our method elucidates between model-based and model-free learning may lead to a range of interesting future methods.
30
+
31
+ # 2 PRELIMINARIES
32
+
33
+ In this section, we introduce the reinforcement learning (RL) formalism, temporal difference Qlearning methods, model-based RL methods, and goal-conditioned value functions. We will build on these components to develop temporal difference models (TDMs) in the next section. RL deals with decision making problems that consist of a state space $s$ , action space $\mathcal { A }$ , transition dynamics $P ( s ^ { \prime } \mid s , a )$ , and an initial state distribution $p _ { 0 }$ . The goal of the learner is encapsulated by a reward function $r ( s , a , s ^ { \prime } )$ . Typically, long or infinite horizon tasks also employ a discount factor $\gamma$ , and the standard objective is to find a policy $\pi ( a \mid s )$ that maximizes the expected discounted sum of rewards, $\begin{array} { r } { \mathbb { E } _ { \pi } [ \sum _ { t } \gamma ^ { t } r ( s _ { t } , a _ { t } , s _ { t + 1 } ) ] } \end{array}$ , where $s _ { 0 } \sim p _ { 0 }$ , $a _ { t } \sim \pi ( a _ { t } | s _ { t } )$ , and $s _ { t + 1 } \sim P ( s ^ { \prime } \mid s , a )$ .
34
+
35
+ Q-functions. We will focus on RL algorithms that learn a Q-function. The Q-function represents the expected total (discounted) reward that can be obtained by the optimal policy after taking action $a _ { t }$ in state $s _ { t }$ , and can be defined recursively as following:
36
+
37
+ $$
38
+ Q ( s _ { t } , a _ { t } ) = \mathbb { E } _ { p ( s _ { t + 1 } | s _ { t } , a _ { t } ) } [ r ( s _ { t } , a _ { t } , s _ { t + 1 } ) + \gamma \operatorname* { m a x } _ { a } Q ( s _ { t + 1 } , a ) ] .
39
+ $$
40
+
41
+ The optimal policy can then recovered according to $\begin{array} { r } { \pi ( a _ { t } | s _ { t } ) = \delta ( a _ { t } = \arg \operatorname* { m a x } _ { a } Q ( s _ { t } , a ) ) } \end{array}$ . Qlearning algorithms (Watkins & Dayan, 1992; Riedmiller, 2005) learn the Q-function via an offpolicy stochastic gradient descent algorithm, estimating the expectation in the above equation with samples collected from the environment and computing its gradient. Q-learning methods can use transition tuples $( s _ { t } , a _ { t } , s _ { t + 1 } , r _ { t } )$ collected from any exploration policy, which generally makes them more efficient than direct policy search, though still less efficient than purely model-based methods.
42
+
43
+ Model-based RL and optimal control. Model-based RL takes a different approach to maximize the expected reward. In model-based RL, the aim is to train a model of the form $f ( s _ { t } , a _ { t } )$ to predict the next state $s _ { t + 1 }$ . Once trained, this model can be used to choose actions, either by backpropagating reward gradients into a policy, or planning directly through the model. In the latter case, a particularly effective method for employing a learned model is model-predictive control (MPC), where a new action plan is generated at each time step, and the first action of that plan is executed, before replanning begins from scratch. MPC can be formalized as the following optimization problem:
44
+
45
+ $$
46
+ a _ { t } = \underset { a _ { t : t + T } } { \operatorname { a r g m a x } } \sum _ { i = t } ^ { t + T } r ( s _ { i } , a _ { i } ) \mathrm { ~ w h e r e ~ } s _ { i + 1 } = f ( s _ { i } , a _ { i } ) \forall \ i \in \{ t , . . . , t + T - 1 \} .
47
+ $$
48
+
49
+ We can also write the dynamics constraint in the above equation in terms of an implicit dynamics, according to
50
+
51
+ $$
52
+ a _ { t } = \operatorname * { a r g m a x } _ { a _ { t : t + T } , s _ { t + 1 : t + T } } \sum _ { i = t } ^ { t + T } r ( s _ { i } , a _ { i } ) \mathrm { ~ s u c h ~ t h a t ~ } C ( s _ { i } , a _ { i } , s _ { i + 1 } ) = 0 \vee i \in \{ t , . . . , t + T - 1 \} ,
53
+ $$
54
+
55
+ where $C ( s _ { i } , a _ { i } , s _ { i + 1 } ) = 0$ if and only if $s _ { i + 1 } = f ( s _ { i } , a _ { i } )$ . This implicit version will be important in understanding the connection between model-based and model-free RL.
56
+
57
+ Goal-conditioned value functions. Q-functions trained for a specific reward are specific to the corresponding task, and learning a new task requires optimizing an entirely new Q-function. Goalconditioned value functions address this limitation by conditioning the Q-value on some task description vector $s _ { g } ~ \in ~ \mathcal { G }$ in a goal space $\mathcal { G }$ . This goal vector induces a parameterized reward $r ( s _ { t } , a _ { t } , s _ { t + 1 } , s _ { g } )$ , which in turn gives rise to parameterized Q-functions of the form $Q ( s , a , s _ { g } )$ . A number of goal-conditioned value function methods have been proposed in the literature, such as universal value functions (Schaul et al., 2015) and Horde (Sutton et al., 2011). When the goal corresponds to an entire state, such goal-conditioned value functions usually predict how well an agent can reach a particular state, when it is trying to reach it. The knowledge contained in such a value function is intriguingly close to a model: knowing how well you can reach any state is closely related to understanding the physics of the environment. With Q-learning, these value functions can be learned for any goal $s _ { g }$ using the same off-policy $\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \right)$ tuples. Relabeling previously visited states with the reward for any goal leads to a natural data augmentation strategy, since each tuple can be replicated many times for many different goals without additional data collection. Andrychowicz et al. (2017) used this property to produce an effective curriculum for solving multi-goal task with delayed rewards. As we discuss below, relabeling past experience with different goals enables goal-conditioned value functions to learn much more quickly from the same amount of data.
58
+
59
+ # 3 TEMPORAL DIFFERENCE MODEL LEARNING
60
+
61
+ In this section, we introduce a type of goal-conditioned value functions called temporal difference models (TDMs) that provide a direct connection to model-based RL. We will first motivate this connection by relating the model-based MPC optimizations in Equations (2) and (3) to goal-conditioned value functions, and then present our temporal difference model derivation, which extends this connection from a purely model-based setting into one that becomes increasingly model-free.
62
+
63
+ # 3.1 FROM GOAL-CONDITIONED VALUE FUNCTIONS TO MODELS
64
+
65
+ Let us consider the choice of reward function for the goal conditioned value function. Although a variety of options have been explored in the literature (Sutton et al., 2011; Schaul et al., 2015; Andrychowicz et al., 2017), a particularly intriguing connection to model-based RL emerges if we set ${ \mathcal { G } } = { \mathcal { S } }$ , such that $g \in { \mathcal { G } }$ corresponds to a goal state $s _ { g } \in \mathcal S$ , and we consider distance-based reward functions $r _ { d }$ of the following form:
66
+
67
+ $$
68
+ r _ { d } ( s _ { t } , a _ { t } , s _ { t + 1 } , s _ { g } ) = - D ( s _ { t + 1 } , s _ { g } ) ,
69
+ $$
70
+
71
+ where $D ( s _ { t + 1 } , s _ { g } )$ is a distance, such as the Euclidean distance $D ( s _ { t + 1 } , s _ { g } ) = \| s _ { t + 1 } - s _ { g } \| _ { 2 }$ . If $\gamma = 0$ , we have $Q ( s _ { t } , a _ { t } , s _ { g } ) = - D ( s _ { t + 1 } , s _ { g } )$ at convergence of Q-learning, which means that
72
+
73
+ $Q ( s _ { t } , a _ { t } , s _ { g } ) = 0$ implies that $s _ { t + 1 } ~ = ~ s _ { g }$ . Plug this Q-function into the model-based planning optimization in Equation (3), denoting the task control reward as $r _ { c }$ , such that the solution to
74
+
75
+ $$
76
+ a _ { t } = \operatorname * { a r g m a x } _ { a _ { t : t + T } , s _ { t + 1 : t + T } } \sum _ { i = t } ^ { t + T } r _ { c } \big ( s _ { i } , a _ { i } \big ) \mathrm { ~ s u c h ~ t h a t ~ } Q ( s _ { i } , a _ { i } , s _ { i + 1 } ) = 0 \ \forall \ i \in \{ t , . . . , t + T - 1 \}
77
+ $$
78
+
79
+ yields a model-based plan. We have now derived a precise connection between model-free and model-based RL, in that model-free learning of goal-conditioned value functions can be used to directly produce an implicit model that can be used with MPC-based planning. However, this connection by itself is not very useful: the resulting implicit model is fully model-based, and does not provide any kind of long-horizon capability. In the next section, we show how to extend this connection into the long-horizon setting by introducing the temporal difference model (TDM).
80
+
81
+ # 3.2 LONG-HORIZON LEARNING WITH TEMPORAL DIFFERENCE MODELS
82
+
83
+ If we consider the case where $\gamma > 0$ , the optimization in Equation (4) no longer corresponds to any optimal control method. In fact, when $\gamma = 0$ , Q-values have well-defined units: units of distance between states. For $\gamma > 0$ , no such interpretation is possible. The key insight in temporal difference models is to introduce a different mechanism for aggregating long-horizon rewards. Instead of evaluating Q-values as discounted sums of rewards, we introduce an additional input $\tau$ , which represents the planning horizon, and define the Q-learning recursion as
84
+
85
+ $$
86
+ Q ( s _ { t } , a _ { t } , s _ { g } , \tau ) = \mathbb { E } _ { p ( s _ { t + 1 } \mid s _ { t } , a _ { t } ) } [ - D ( s _ { t + 1 } , s _ { g } ) \mathbb { 1 } [ \tau = 0 ] + \operatorname* { m a x } _ { a } Q ( s _ { t + 1 } , a , s _ { g } , \tau - 1 ) \mathbb { 1 } [ \tau \neq 0 ] ] .
87
+ $$
88
+
89
+ The Q-function uses a reward of $- D ( s _ { t + 1 } , s _ { g } )$ when $\tau = 0$ (at which point the episode terminates), and decrements $\tau$ by one at every other step. Since this is still a well-defined Q-learning recursion, it can be optimized with off-policy data and, just as with goal-conditioned value functions, we can resample new goals $s _ { g }$ and new horizons $\tau$ for each tuple $( s _ { t } , a _ { t } , s _ { t + 1 } )$ , even ones that were not actually used when the data was collected. In this way, the TDM can be trained very efficiently, since every tuple provides supervision for every possible goal and every possible horizon.
90
+
91
+ The intuitive interpretation of the TDM is that it tells us how close the agent will get to a given goal state $s _ { g }$ after $\tau$ time steps, when it is attempting to reach that state in $\tau$ steps. Alternatively, TDMs can be interpreted as $\mathrm { Q }$ -values in a finite-horizon MDP, where the horizon is determined by $\tau$ . For the case where $\tau = 0$ , TDMs effectively learn a model, allowing TDMs to be incorporated into a variety of planning and optimal control schemes at test time as in Equation (4). Thus, we can view TDM learning as an interpolation between model-based and model-free learning, where $\tau = 0$ corresponds to the single-step prediction made in model-based learning and $\tau > 0$ corresponds to the long-term prediction made by typical Q-functions. While the correspondence to models is not the same for $\tau > 0$ , if we only care about the reward at every $K$ step, then we can recover a correspondence by replace Equation (4) with
92
+
93
+ $$
94
+ \mathop { \mathrm { a r g m a x } } _ { \substack { n _ { t : K : t + T } , s _ { t + K : K : t + T } } } \sum _ { i = t , t + K , . . . , t + T } r _ { c } ( s _ { i } , a _ { i } )
95
+ $$
96
+
97
+ where we only optimize over every $K ^ { \mathrm { t h } }$ state and action. As the TDM becomes effective for longer horizons, we can increase $K$ until $K = T$ , and plan over only a single effective time step:
98
+
99
+ $a _ { t } = \underset { a _ { t } , a _ { t + T } , s _ { t + T } } { \arg \operatorname* { m a x } } r _ { c } ( s _ { t + T } , a _ { t + T } )$ such that $Q ( s _ { t } , a _ { t } , s _ { t + T } , T - 1 ) = 0 .$
100
+
101
+ This formulation does result in some loss of generality, since we no longer optimize the reward at the intermediate steps. This limits the multi-step formulation to terminal reward problems, but does allow us to accommodate arbitrary reward functions on the terminal state $s _ { t + T }$ , which still describes a broad range of practically relevant tasks. In the next section, we describe how TDMs can be implemented and used in practice for continuous state and action spaces.
102
+
103
+ # 4 TRAINING AND USING TEMPORAL DIFFERENCE MODELS
104
+
105
+ The TDM can be trained with any off-policy Q-learning algorithm, such as DQN (Mnih et al., 2015), DDPG (Lillicrap et al., 2015), NAF (Gu et al., 2016), and SDQN (Metz et al., 2017). During off-policy Q-learning, TDMs can benefit from arbitrary relabeling of the goal states $g$ and the horizon $\tau$ , given the same $\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \right)$ tuples from the behavioral policy as done in (Andrychowicz et al., 2017). This relabeling enables simultaneous, data-efficient learning of short-horizon and long-horizon behaviors for arbitrary goal states, unlike previously proposed goal-conditioned value functions that only learn for a single time scale, typically determined by a discount factor (Schaul et al., 2015; Andrychowicz et al., 2017). In this section, we describe the design decisions needed to make practical a TDM algorithm.
106
+
107
+ # 4.1 REWARD FUNCTION SPECIFICATION
108
+
109
+ Q-learning typically optimizes scalar rewards, but TDMs enable us to increase the amount of supervision available to the Q-function by using a vector-valued reward. Specifically, if the distance $D ( s , s _ { g } )$ factors additively over the dimensions, we can train a vector-valued Q-function that predicts per-dimension distance, with the reward function for dimension $j$ given by $- D _ { j } ( s _ { j } , s _ { g , j } )$ . We use the $\ell _ { 1 }$ norm in our implementation, which corresponds to absolute value reward $- | s _ { j } - s _ { g , j } |$ . The resulting vector-valued Q-function can learn distances along each dimension separately, providing it with more supervision from each training point. Empirically, we found that this modifications provides a substantial boost in sample efficiency.
110
+
111
+ We can optionally make an improvement to TDMs if we know that the task reward $r _ { c }$ depends only on some subset of the state or, more generally, state features. In that case, we can train the TDM to predict distances along only those dimensions or features that are used by $r _ { c }$ , which in practice can substantially simplify the corresponding prediction problem. In our experiments, we illustrate this property by training TDMs for pushing tasks that predict distances from an end-effector and pushed object, without accounting for internal joints of the arm, and similarly for various locomotion tasks.
112
+
113
+ # 4.2 POLICY EXTRACTION WITH TDMS
114
+
115
+ While the TDM optimal control formulation Equation (7) drastically reduces the number of states and actions to be optimized for long-term planning, it requires solving a constrained optimization problem, which is more computationally expensive than unconstrained problems. We can remove the need for a constrained optimization through a specific architectural decision in the design of the function approximator for $Q ( s , a , s _ { g } , \tau )$ . We define the Q-function as $Q ( s , a , s _ { g } , \tau ) =$ $- \mathbf { \bar { | } } f ( s , a , s _ { g } , \tau ) - s _ { g } \mathbf { | | } ^ { \mathbf { \bar { | } } }$ , where $f ( s , a , s _ { g } , \tau )$ outputs a state vector. By training the TDM with a standard Q-learning method, $f ( s , a , s _ { g } , \tau )$ is trained to explicitly predict the state that will be reached by a policy attempting to reach $s _ { g }$ in $\tau$ steps. This model can then be used to choose the action with fully explicit MPC as below, which also allows straightforward derivation of a multi-step version as in Equation (6).
116
+
117
+ $$
118
+ a _ { t } = \operatorname * { a r g m a x } _ { a _ { t } , a _ { t + T } , s _ { t + T } } r _ { c } ( f ( s _ { t } , a _ { t } , s _ { t + T } , T - 1 ) , a _ { t + T } )
119
+ $$
120
+
121
+ In the case where the task is to reach a goal state $s _ { g }$ , a simpler approach to extract a policy is to use the TDM directly:
122
+
123
+ $$
124
+ a _ { t } = \mathop { \mathrm { a r g m a x } } _ { a } Q ( s _ { t } , a , s _ { g } , T )
125
+ $$
126
+
127
+ In our experiments, we use Equations (8) and (9) to extract a policy.
128
+
129
+ # 4.3 ALGORITHM SUMMARY
130
+
131
+ The algorithm is summarized as Algorithm 1. A crucial difference from prior goal-conditioned value function methods (Schaul et al., 2015; Andrychowicz et al., 2017) is that our algorithm can be used to act according to an arbitrary terminal reward function $r _ { c }$ , both during exploration and at test time. Like other off-policy algorithms (Mnih et al., 2015; Lillicrap et al., 2015), it consists of exploration and Q-function fitting. Noise is injected for exploration, and Q-function fitting uses standard Qlearning techniques, with target networks $Q ^ { \prime }$ and experience replay (Mnih et al., 2015; Lillicrap et al., 2015). If we view the Q-function fitting as model fitting, the algorithm also resembles iterative model-based RL, which alternates between collecting data using the learned dynamics model for planning (Deisenroth & Rasmussen, 2011) and fitting the model. Since we focus on continuous tasks, we use DDPG (Lillicrap et al., 2015), though any Q-learning method could be used.
132
+
133
+ The computation cost of the algorithm is mostly determined by the number of updates to fit the Q-function per transition, $I$ . In general, TDMs can benefit from substantially larger $I$ than classic
134
+
135
+ # Algorithm 1 Temporal Difference Model Learning
136
+
137
+ Require: Task reward function $r _ { c } ( s , a )$ , parameterized TDM $Q _ { w } ( s , a , s _ { g } , \tau )$ , replay buffer $\boldsymbol { B }$
138
+ 1: for $n = 0 , . . . , N - 1$ episodes do
139
+ 2: $s _ { 0 } \sim p ( s _ { 0 } )$
140
+ 3: for $t = 0 , . . . , T - 1$ time steps do
141
+ 4: $a _ { t } ^ { * } = \mathsf { M P C } ( r _ { c } , s _ { t } , Q _ { w } , T - t )$ // Eq. 6, Eq. 7, Eq. 8, or Eq. 9
142
+ 5: $a _ { t } = \mathsf { A d d N o i s e } ( a _ { t } ^ { * } )$ // Noisy exploration
143
+ 6: $s _ { t + 1 } \sim p ( s _ { t } , a _ { t } )$ , and store $\left\{ { { s } _ { t } } , { { a } _ { t } } , { { s } _ { t + 1 } } \right\}$ in the replay buffer $\boldsymbol { B }$ // Step environment
144
+ 7: for $i = 0 , I - 1$ iterations do
145
+ 8: Sample $M$ transitions $\{ s _ { m } , a _ { m } , s _ { m } ^ { \prime } \}$ from the replay $\boldsymbol { B }$ .
146
+ 9: Relabel time horizons and goal states τm, sg,m // Section A.1
147
+ 10: $\begin{array} { r } { y _ { m } = - \| s _ { m } ^ { \prime } - s _ { g , m } \| \mathbb { I } \left[ \tau _ { m } = 0 \right] + \operatorname* { m a x } _ { a } \tilde { Q } ^ { \prime } ( s _ { m } ^ { \prime } , a , s _ { \ell } } \end{array}$ g,m, τm − 1)1[τm 6= 0]
148
+ 11: $\begin{array} { r } { L ( w ) = \sum _ { m } ( Q _ { w } ( s _ { m } , a _ { m } , s _ { g , m } , \tau _ { m } ) - y _ { m } ) ^ { 2 } / M } \end{array}$ // Compute the loss
149
+ 12: Minimize $( w , L ( w ) )$ ) // Optimize
150
+ 13: end for
151
+ 14: end for
152
+ 15: end for
153
+
154
+ model-free methods such as DDPG due to relabeling increasing the amount of supervision signals. In real-world applications such as robotics where we care most of the sample efficiency (Gu et al., 2017), the learning is often bottlenecked by the data collection rather than the computation, and therefore large $I$ values are usually not a significant problem and can continuously benefit from the acceleration in computation.
155
+
156
+ # 5 RELATED WORK
157
+
158
+ Combining model-based and model-free reinforcement learning techniques is a well-studied problem, though no single solution has demonstrated all of the benefits of model-based and model-free learning. Some methods first learn a model and use this model to simulate experience (Sutton, 1990; Gu et al., 2016) or compute better gradients for model-free updates (Heess et al., 2015; Nguyen & Widrow, 1990). Other methods use model-free algorithms to correct for the local errors made by the model (Chebotar et al., 2017; Bansal et al., 2017). While these prior methods focused on combining different model-based and model-free RL techniques, our method proposes an equivalence between these two branches of RL through a specific generalization of goal-conditioned value function. As a result, our approach achieves much better sample efficiency in practice on a variety of challenging reinforcement learning tasks than model-free alternatives, while exceeding the performance of purely model-based approaches.
159
+
160
+ We are not the first to study the connection between model-free and model-based methods, with Boyan (1999) and Parr et al. (2008) being two notable examples. Boyan (1999) shows that one can extract a model from a value function when using a tabular representation of the transition function. Parr et al. (2008) shows that, for linear function approximators, the model-free and model-based RL approaches produce the same value function at convergence. Our contribution differs substantially from these: we are not aiming to show that model-free RL performs similarly to model-based RL at convergence, but rather how we can achieve sample complexity comparable to model-based RL while retaining the favorable asymptotic performance of model-free RL in complex tasks with nonlinear function approximation.
161
+
162
+ A central component of our method is to train goal-conditioned value functions. Many variants of goal-conditioned value functions have been proposed in the literature Foster & Dayan (2002); Sutton et al. (2011); Schaul et al. (2015); Dosovitskiy & Koltun (2016). Critically, unlike the works on contextual policies (Caruana, 1998; Da Silva et al., 2012; Kober et al., 2012) which require onpolicy trajectories with each new goal, the value function approaches such as Horde (Sutton et al., 2011) and UVF (Schaul et al., 2015) can reuse off-policy data to learn rich contextual value functions using the same data.
163
+
164
+ TDMs condition on a policy trying to reach a goal and must predict $\tau$ steps into the future. This type of prediction is similar to the prediction made by prior work on multi-step models (Mishra et al., 2017; Venkatraman et al., 2016): predict the state after $\tau$ actions. An important difference is that multi-step models do not condition on a policy reaching a goal, and so they require optimizing over a sequence of actions, making the input space grow linearly with the planning horizon.
165
+
166
+ A particularly related UVF extension is hindsight experience replay (HER) Andrychowicz et al. (2017). Both HER and our method retroactively relabel past experience with goal states that are different from the goal aimed for during data collection. However, unlike our method, the standard UVF in HER uses a single temporal scale when learning, and does not explicitly provide for a connection between model-based and model-free learning. The practical result of these differences is that our approach empirically achieves substantially better sample complexity than HER on a wide range of complex continuous control tasks, while the theoretical connection between modelbased and model-free learning suggests a much more flexible use of the learned Q-function inside a planning or optimal control framework.
167
+
168
+ Lastly, our motivation is shared by other lines of work besides goal-conditioned value functions that aim to enhance supervision signals for model-free RL (Silver et al., 2017; Jaderberg et al., 2017; Bellemare et al., 2017). Predictions (Silver et al., 2017) augment classic RL with multi-step reward predictions, while UNREAL (Jaderberg et al., 2017) also augments it with pixel control as a secondary reward objective. These are substantially different methods from our work, but share the motivation to achieve efficient RL by increasing the amount of learning signals from finite data.
169
+
170
+ # 6 EXPERIMENTS
171
+
172
+ Our experiments examine how the sample efficiency and performance of TDMs compare to both model-based and model-free RL algorithms. We expect to have the efficiency of model-based RL but with less model bias. We also aim to study the importance of several key design decisions in TDMs, and evaluate the algorithm on a real-world robotic platform. For the model-free comparison, we compare to DDPG (Lillicrap et al., 2015), which typically achieves the best sample efficiency on benchmark tasks (Duan et al., 2016); HER, which uses goal-conditioned value functions (Andrychowicz et al., 2017); and DDPG with the same sparse rewards of HER. For the modelbased comparison, we compare to the model-based component in Nagabandi et al. (2017), a recent work that reports highly efficient learning with neural network dynamics models. Details of the baseline implementations are in the Appendix. We perform the comparison on five simulated tasks: (1) a 7 DoF arm reaching various random end-effector targets, (2) an arm pushing a puck to a target location, (3) a planar cheetah attempting to reach a goal velocity (either forward or backward), (4) a quadrupedal ant attempting to reach a goal position, and (5) an ant attempting to reach a goal position and velocity. The tasks are shown in Figure 1 and terminate when either the goal is reached or the time horizon is reached. The pushing task requires long-horizon reasoning to reach and push the puck. The cheetah and ant tasks require handling many contact discontinuities which is challenging for model-based methods, with the ant environment having particularly difficult dynamics given the larger state and action space. The ant position and velocity task presents a scenario where reward shaping as in traditional RL methods may not lead to optimal behavior, since one cannot maintain both a desired position and velocity. However, such a task can be very valuable in realistic settings. For example, if we want the ant to jump, we might instruct it to achieve a particular velocity at a particular location. We also tested TDMs on a real-world robot arm reaching end-effector positions, to study its applicability to real-world tasks.
173
+
174
+ For the simulated and real-world 7-DoF arm, our TDM is trained on all state components. For the pushing task, our TDM is trained on the hand and puck XY-position. For the half cheetah task, our TDM is trained on the velocity of the cheetah. For the ant tasks, our TDM is trained on either the position or the position and velocity for the respective task. Full details are in the Appendix.
175
+
176
+ 6.1 TDMS VS MODEL-FREE, MODE-BASED, AND DIRECT GOAL-CONDITIONED RL
177
+
178
+ The results are shown in Figure 2. When compared to the model-free baselines, the pure modelbased method learns learns much faster on all the tasks. However, on the harder cheetah and ant tasks, its final performance is worse due to model bias. TDMs learn as quickly or faster than the model-based method, but also always learn policies that are as good as if not better than the modelfree policies. Furthermore, TDMs requires fewer samples than the model-free baselines on ant tasks and drastically fewer samples on the other tasks. We also see that using HER does not lead to an improvement over DDPG. While we were initially surprised, we realized that a selling point of HER is that it can solve sparse tasks that would otherwise be unsolvable. In this paper, we were interested in improving the sample efficiency and not the feasibility of model-free reinforcement learning algorithms, and so we focused on tasks that DDPG could already solve. In these sorts of tasks, the advantage of HER over DDPG with a dense reward is not expected. To evaluate HER as a method to solve sparse tasks, we included the DDPG-Sparse baseline and we see that HER significantly outperforms it as expected. In summary, TDMs converge as fast or faster than modelbased learning (which learns faster than the model-free baselines), while achieving final performance that is as good or better that the model-free methods on all tasks.
179
+
180
+ ![](images/a52a124cd7105e55bdbb67cd74f7c775543ed77acf9c5d7f99e2b7fd981c51fb.jpg)
181
+ Figure 1: The tasks in our experiments: (a) reaching target locations, (b) pushing a puck to a random target, (c) training the cheetah to run at target velocities, (d) training an ant to run to a target position or a target position and velocity, and (e) reaching target locations (real-world Sawyer robot).
182
+
183
+ ![](images/bf53cef9be27eafccda3d6c7586ec36667d835b2ea2c155a1e2f8e9f876acc9a.jpg)
184
+ Figure 2: The comparison of TDM with the baseline methods in model-free (DDPG), model-based, and goal-conditioned value functions (HER - Dense) on various tasks. All plots show the final distance to the goal versus 1000 environment steps (not rollouts). The bold line shows the mean across 3 random seeds, and the shaded region show one standard deviation. Our method, which uses model-free learning, is generally more sample-efficient than model-free alternatives including DDPG and HER and improves upon the best model-based performance.
185
+
186
+ Lastly, we ran the algorithm on a 7-DoF Sawyer robotic arm to learn a real-world analogue of the reaching task. Figure 2f shows that the algorithm outperforms and learns with fewer samples than DDPG, our model-free baseline. These results show that TDMs can scale to real-world tasks.
187
+
188
+ # 6.2 ABLATION STUDIES
189
+
190
+ In this section, we discuss two key design choices for TDMs that provide substantially improved performance. First, Figure 3a examines the tradeoffs between the vectorized and scalar rewards. The results show that the vectorized formulation learns substantially faster than the na¨ıve scalar variant. Second, Figure 3b compares the learning speed for different horizon values $\tau _ { m a x }$ . Performance degrades when the horizon is too low, and learning becomes slower when the horizon is too high.
191
+
192
+ ![](images/49e4b3f3d9897876c3fc12f4884106ce4b9b3445da6a488c71f3236c1882b250.jpg)
193
+ Figure 3: Ablation experiments for (a) scalar vs. vectorized TDMs on 7-DoF simulated reacher task and (b) different $\tau _ { m a x }$ on pusher task. The vectorized variant performs substantially better, while the horizon effectively interpolates between model-based and model-free learning.
194
+
195
+ # 7 CONCLUSION
196
+
197
+ In this paper, we derive a connection between model-based and model-free reinforcement learning, and present a novel RL algorithm that exploits this connection to greatly improve on the sample efficiency of state-of-the-art model-free deep RL algorithms. Our temporal difference models can be viewed both as goal-conditioned value functions and implicit dynamics models, which enables them to be trained efficiently on off-policy data while still minimizing the effects of model bias. As a result, they achieve asymptotic performance that compares favorably with model-free algorithms, but with a sample complexity that is comparable to purely model-based methods.
198
+
199
+ While the experiments focus primarily on the new RL algorithm, the relationship between modelbased and model-free RL explored in this paper provides a number of avenues for future work. We demonstrated the use of TDMs with a very basic planning approach, but further exploring how TDMs can be incorporated into powerful constrained optimization methods for model-predictive control or trajectory optimization is an exciting avenue for future work. Another direction for future is to further explore how TDMs can be applied to complex state representations, such as images, where simple distance metrics may no longer be effective. Although direct application of TDMs to these domains is not straightforward, a number of works have studied how to construct metric embeddings of images that could in principle provide viable distance functions. We also note that while the presentation of TDMs have been in the context of deterministic environments, the extension to stochastic environments is straightforward: TDMs would learn to predict the expected distance between the future state and a goal state. Finally, the promise of enabling sample-efficient learning with the performance of model-free RL and the efficiency of model-based RL is to enable widespread RL application on real-world systems. Many applications in robotics, autonomous driving and flight, and other control domains could be explored in future work.
200
+
201
+ # 8 ACKNOWLEDGMENT
202
+
203
+ This research was supported by the Office of Naval Research and the National Science Foundation through IIS-1614653 and IIS-1651843.
204
+
205
+ # REFERENCES
206
+
207
+ Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Fong, Peter Welinder, Bob McGrew, Josh Tobin, Pieter Abbeel, and Wojciech Zaremba. Hindsight experience replay. arXiv preprint arXiv:1707.01495, 2017.
208
+ Somil Bansal, Roberto Calandra, Ted Xiao, Sergey Levine, and Claire J Tomlin. Goal-driven dynamics learning via bayesian optimization. arXiv preprint arXiv:1703.09260, 2017.
209
+ Marc G Bellemare, Will Dabney, and Remi Munos. A distributional perspective on reinforcement ´ learning. arXiv preprint arXiv:1707.06887, 2017.
210
+ Justin A Boyan. Least-squares temporal difference learning. In Proceedings of the 16th International Conference on Machine Learning, pp. 49–56, 1999.
211
+
212
+ Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
213
+
214
+ Rich Caruana. Multitask learning. In Learning to learn, pp. 95–133. Springer, 1998.
215
+
216
+ Yevgen Chebotar, Karol Hausman, Marvin Zhang, Gaurav Sukhatme, Stefan Schaal, and Sergey Levine. Combining model-based and model-free updates for trajectory-centric reinforcement learning. arXiv preprint arXiv:1703.03078, 2017.
217
+
218
+ Bruno Da Silva, George Konidaris, and Andrew Barto. Learning parameterized skills. arXiv preprint arXiv:1206.6398, 2012.
219
+
220
+ Marc Deisenroth and Carl E Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), pp. 465–472, 2011.
221
+
222
+ Marc Peter Deisenroth, Gerhard Neumann, Jan Peters, et al. A survey on policy search for robotics. Foundations and Trends $\textsuperscript { \textregistered }$ in Robotics, 2(1–2):1–142, 2013.
223
+
224
+ Alexey Dosovitskiy and Vladlen Koltun. Learning to act by predicting the future. arXiv preprint arXiv:1611.01779, 2016.
225
+
226
+ Y. Duan, R. Chen, X. Houthooft, J. Schulman, and P. Abbeel. Benchmarking deep reinforcement learning for continuous control. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016.
227
+
228
+ David Foster and Peter Dayan. Structure in the space of value functions. Machine Learning, 49(2): 325–346, 2002.
229
+
230
+ Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In International Conference on Machine Learning, pp. 2829– 2838, 2016.
231
+
232
+ Shixiang Gu, Ethan Holly, Timothy Lillicrap, and Sergey Levine. Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pp. 3389–3396. IEEE, 2017.
233
+
234
+ Nicolas Heess, Greg Wayne, David Silver, Timothy Lillicrap, Yuval Tassa, and Tom Erez. Learning Continuous Control Policies by Stochastic Value Gradients. arXiv, pp. 1–13, 2015. ISSN 10495258. URL http://arxiv.org/abs/1510.09142.
235
+
236
+ Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. International Conference on Learning Representations, 2017.
237
+
238
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
239
+
240
+ Jens Kober, Andreas Wilhelm, Erhan Oztop, and Jan Peters. Reinforcement learning to adjust parametrized motor primitives to new situations. Autonomous Robots, 33(4):361–379, 2012.
241
+
242
+ Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016.
243
+
244
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
245
+
246
+ Luke Metz, Julian Ibarz, Navdeep Jaitly, and James Davidson. Discrete sequential prediction of continuous actions for deep rl. arXiv preprint arXiv:1705.05035, 2017.
247
+
248
+ Nikhil Mishra, Pieter Abbeel, and Igor Mordatch. Prediction and control with temporal segment models. 2017.
249
+
250
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
251
+
252
+ Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. arXiv preprint arXiv:1708.02596, 2017.
253
+
254
+ Derrick H Nguyen and Bernard Widrow. Neural networks for self-learning control systems. IEEE Control systems magazine, 10(3):18–23, 1990.
255
+
256
+ Ronald Parr, Lihong Li, Gavin Taylor, Christopher Painter-Wakefield, and Michael L Littman. An analysis of linear models, linear value-function approximation, and feature selection for reinforcement learning. In International Conference on Machine learning, 2008.
257
+
258
+ Martin Riedmiller. Neural fitted q iteration-first experiences with a data efficient neural reinforcement learning method. In ECML, volume 3720, pp. 317–328. Springer, 2005.
259
+
260
+ Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In Proceedings of the 32nd International Conference on Machine Learning, pp. 1312–1320, 2015.
261
+
262
+ David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
263
+
264
+ David Silver, Hado van Hasselt, Matteo Hessel, Tom Schaul, Arthur Guez, Tim Harley, Gabriel Dulac-Arnold, David Reichert, Neil Rabinowitz, Andre Barreto, et al. The predictron: End-toend learning and planning. International Conference on Machine Learning, 2017.
265
+
266
+ Richard S Sutton. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In Proceedings of the seventh international conference on machine learning, pp. 216–224, 1990.
267
+
268
+ Richard S Sutton, Joseph Modayil, Michael Delp, Thomas Degris, Patrick M Pilarski, Adam White, and Doina Precup. Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume 2, pp. 761–768. International Foundation for Autonomous Agents and Multiagent Systems, 2011.
269
+
270
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012.
271
+
272
+ Arun Venkatraman, Roberto Capobianco, Lerrel Pinto, Martial Hebert, Daniele Nardi, and J Andrew Bagnell. Improved learning of dynamics models for control. In International Symposium on Experimental Robotics, 2016.
273
+
274
+ Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992.
275
+
276
+ Tianhao Zhang, Gregory Kahn, Sergey Levine, and Pieter Abbeel. Learning deep control policies for autonomous aerial vehicles with mpc-guided policy search. In Robotics and Automation (ICRA), 2016 IEEE International Conference on, pp. 528–535. IEEE, 2016.
277
+
278
+ # A EXPERIMENT DETAILS
279
+
280
+ In this section, we detail the experimental setups used in our results.
281
+
282
+ ![](images/002777a56a5b9aa1f987feb0c3977c5ea922b9a090915b53eed76ec32663c451.jpg)
283
+ Figure 4: TDMs with different number of updates per step $I$ on ant target position task. The maximum distance was set to 5 rather than 6 for this experiment, so the numbers should be lower than the ones reported in the paper.
284
+
285
+ # A.1 GOAL STATE AND $\tau$ SAMPLING STRATEGY
286
+
287
+ While Q-learning is valid for any value of $s _ { g }$ and $\tau$ for each transition tuple $\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \right)$ , the way in which these values are sampled during training can affect learning efficiency. Some potential strategies for sampling $s _ { g }$ are: (1) uniformly sample future states along the actual trajectory in the buffer (i.e., for $s _ { t }$ , choose $s _ { g } ~ = ~ s _ { t + k }$ for a random $k > 0$ ) as in (Andrychowicz et al., 2017); (2) uniformly sample goal states from the replay buffer; (3) uniformly sample goals from a uniform range of valid states. We found that the first strategy performed slightly better than the others, though not by much. In our experiments, we use the first strategy. The horizon $\tau$ is sampled uniformly at random between 0 and the maximum horizon $\tau _ { \mathrm { m a x } }$ .
288
+
289
+ # A.2 MODEL-FREE SETUP
290
+
291
+ In all our experiments, we used DDPG (Lillicrap et al., 2015) as the base off-policy model-free RL algorithm for learning the TDMs $Q ( s , a , g , s _ { \tau } )$ . Experience replay (Mnih et al., 2015) has size of 1 million transitions, and the soft target networks (Lillicrap et al., 2015) are used with a polyak averaging coefficient of 0.999 for DDPG and TDM and 0.95 for HER and DDPG-Sparse. For HER and DDPG-Sparse, we also added a penalty on the tanh pre-activation, as in Andrychowicz et al. (2017). Learning rates of the critic and the actor are chosen from $\{ 1 { \mathrm { e } } { - } 4 , 1 { \mathrm { e } } { - } 3 \}$ and $\{ 1 { \mathrm { e } } { - } 4 , 1 { \mathrm { e } } { - } 3 \}$ respectively. Adam (Kingma & Ba, 2014) is used as the base optimizer with default parameters except the learning rate. The batch size was 128. The policies and networks are parmaeterized with neural networks with ReLU hidden activation and two hidden layers of size 300 and 300. The policies have a tanh output activation, while the critic has no output activation (except for TDM, see A.5). For the TDM, the goal was concatenated to the observation. The planning horizon $\tau$ is also concatenated as an observation and represented as a single integer. While we tried various representations for $\tau$ such as one-hot encodings and binary-string encodings, we found that simply providing the integer was sufficient.
292
+
293
+ While any distance metric for the TDM reward function can be used, we chose L1 norm $- \Vert s _ { t + 1 } -$ $s _ { g } \| _ { 1 }$ to ensure that the scalar and vectorized TDMs are consistent.
294
+
295
+ # A.3 MODEL-BASED SETUP
296
+
297
+ For the model-based comparison, we trained a neural network dynamics model with ReLU activation, no output activation, and two hidden units of size 300 and 300. The model was trained to predict the difference in state, rather than the full state. The dynamics model is trained to minimize the mean squared error between the predicted difference and the actual difference. After each state is observed, we sample a minibatch of size 128 from the replay buffer (size 1 million) and perform one step of gradient descent on this mean squared error loss. Twenty rollouts were performed to compute the (per-dimension) mean and standard deviation of the states, actions, and state differences.
298
+
299
+ We used these statistics to normalize the states and actions before giving them to the model, and to normalize the state differences before computing the loss. For MPC, we simulated 512 random action sequences of length 15 through the learned dynamics model and chose the first action of the sequence with the highest reward.
300
+
301
+ # A.4 TUNED HYPERPARAMETERS
302
+
303
+ For TDMs, we found the most important hyperparameters to be the reward scale, $\tau _ { \mathrm { m a x } }$ , and the number of updates per observations, $I$ . As shown in Figure 4, TDMs can greatly benefit from larger values of $I$ , though eventually there are diminishing returns and potentially negative impact, mostly likely due to over-fitting. We found that the baselines did not benefit, except for HER which did benefit from larger $I$ values. For all the model-free algorithms (DDPG, DDPG-Sparse, HER, and TDMs), we performed a grid search over the reward scale in the range $\{ 0 . 0 1 , 1 , 1 0 0 , 1 0 0 0 0 \}$ and the number of updates per observations in the range $\{ 1 , 5 , 1 0 \}$ . For HER, we also tuned the weight given to the policy pre-tanh-activation $\{ 0 , 0 . 0 1 , 1 \}$ , which is described in Andrychowicz et al. (2017). For TDMs, we also tuned the best $\tau _ { \mathrm { m a x } }$ in the range $\{ 1 5 , 2 5 , \mathrm { H o r i z o n - 1 } \}$ . For the half cheetah task, we performed extra searches over $\tau _ { \mathrm { m a x } }$ and found $\tau _ { \mathrm { m a x } } = 9$ to be effective.
304
+
305
+ # A.5 TDM NETWORK ARCHITECTURE AND VECTOR-BASED SUPERVISION
306
+
307
+ For TDMs, since we know that the true Q-function must learn to predict (negative) distances, we incorporate this prior knowledge into the Q-function by parameterizing it as $Q ( s , a , s _ { g } , \tau ) =$ $- \| f ( s , a , s _ { g } , \tau ) - s _ { g } \| _ { 1 }$ . Here, $f$ is a vector outputted by a feed-forward neural network and has the same dimension as the goal. This parameterization ensures that the Q-function outputs non-positive values, while encouraging the Q-function to learn what we call a goal-conditioned model: $f$ is encouraged to predict what state will be reached after $\tau$ , when the policy is trying to reach goal $s _ { g }$ in $\tau$ time steps.
308
+
309
+ For the $\ell _ { 1 }$ norm, the scalar supervision regresses
310
+
311
+ $$
312
+ Q ( s _ { t } , a _ { t } , s _ { g } , \tau ) = - \sum _ { j } | f _ { j } ( s _ { t } , a _ { t } , s _ { g } , \tau ) - s _ { g , j } |
313
+ $$
314
+
315
+ onto
316
+
317
+ $$
318
+ \begin{array} { r l r } & { } & { r ( s _ { t } , a _ { t } , s _ { t + 1 } , s _ { g } ) + \mathbb { 1 } [ \tau = 0 ] + Q ( s _ { t + 1 } , a ^ { * } , s _ { g } , \tau - 1 ) \mathbb { 1 } [ \tau \neq 0 ] } \\ & { } & { \quad = - \displaystyle \sum _ { j } \{ | s _ { t + 1 , j } - s _ { g , j } | \mathbb { 1 } [ \tau = 0 ] + | f _ { j } ( s _ { t } , a ^ { * } , s _ { g } , \tau - 1 ) - s _ { g , j } | \mathbb { 1 } [ \tau \neq 0 ] \} } \end{array}
319
+ $$
320
+
321
+ where $a ^ { * } \ = \ \operatorname { a r g m a x } _ { a } Q ( s _ { t + 1 } , a , s _ { g } , \tau - 1 )$ . The vectorized supervision instead supervises each components of $f$ , so that
322
+
323
+ $$
324
+ \left| f _ { j } ( s _ { t } , a _ { t } , s _ { g } , \tau ) - s _ { g , j } \right|
325
+ $$
326
+
327
+ regresses onto
328
+
329
+ $$
330
+ | s _ { t + 1 , j } - s _ { g , j } | \mathbb { 1 } [ \tau = 0 ] + | f _ { j } ( s _ { t } , a ^ { * } , s _ { g } , \tau - 1 ) - s _ { g , j } | \mathbb { 1 } [ \tau \neq 0 ]
331
+ $$
332
+
333
+ for each dimension $j$ of the state.
334
+
335
+ # A.6 TASK AND REWARD DESCRIPTIONS
336
+
337
+ Benchmark tasks are designed on MuJoCo physics simulator (Todorov et al., 2012) and OpenAI Gym environments (Brockman et al., 2016). For the simulated reaching and pushing tasks, we use (8) and for the other tasks we use (9) for policy extraction. The horizon (length of episode) for the pusher and ant tasks are 50. The reaching tasks has a horizon of 100. The half-cheetah task has a horizon of 99.
338
+
339
+ 7-DoF reacher.: The state consists of 7 joint angles, 7 joint angular velocities, and 3 XYZ observation of the tip of the arm, making it 17 dimensional. The action controls torques for each joint, totally 7 dimensional. The reward function during optimization control and for the model-free baseline is the negative Euclidean distance between the XYZ of the tip and the target XYZ. The targets are sampled randomly from all reachable locations of the arm at the beginning of each episode.
340
+
341
+ The robot model is taken from the striker and pusher environments in OpenAI Gym MuJoCo domains (Brockman et al., 2016) and has the same joint limits and physical parameters.
342
+
343
+ Many tasks can be solved by expressing a desired goal state or desired goal state components. For example, the 7-Dof reacher solves the task when the end effector XYZ component of its state is equal to the goal location, $( x ^ { * } , y ^ { * } , z ^ { * } )$ . One advantage of using a goal-conditioned model $f$ as in Equation (8) is that this desire can be accounted for directly: if we already know the desired values of some components in $s _ { t + T }$ , then wen can simply fix those components of $s _ { t + T }$ and optimize over the other dimensions. For example for the 7-Dof reacher, the optimization problem in Equation (8) needed to choose an action becomes
344
+
345
+ $$
346
+ a _ { t } = \operatorname { a r g m a x } _ { a _ { t } , s _ { t + T } [ 0 : 1 4 ] } r _ { c } ( f ( s _ { t } , a _ { t } , s _ { t + T } [ 0 : 1 4 ] | [ x ^ { * } , y ^ { * } , z ^ { * } ] ) )
347
+ $$
348
+
349
+ where $| |$ denotes concatenation; $s _ { t + T } [ 0 : 1 4 ]$ denotes that we only optimize over the first 14 dimensions (the joint angles and velocities), and we omit $\boldsymbol { a } _ { t + T }$ since the reward is only a function of the state. Intuitively, this optimization chooses whatever goal joint angles and joint velocities make it easiest to reach $( x ^ { * } , y ^ { * } , z ^ { * } )$ . It then chooses the corresponding action to get to that goal state in $T$ time steps. We implement the optimization over $s [ 0 : 1 4 ]$ with stochastic optimization: sample 10,000 different vectors and choose the best value. Lastly, instead of optimizing over the actions, we use the policy trained in DDPG to choose the action, since the policy is already trained to choose an action with maximum Q-value for a given state, goal state, and planning horizon. We found this optimization scheme to be reliable, but any optimizer can be used to solve Equation (8),(7), or (6).
350
+
351
+ Pusher: The state consists of 3 joint angles, 3 joint angular velocities, the XY location of the hand, and the XY location of the puck. The action controls torques for each of the 3 joints. The reward function is the negative Euclidean distance between the puck and the puck. Once the hand is near (with 0.1) of the puck, the reward is increased by 2 minus the Euclidean distance between the puck and the goal location. This reward function encourages the arm to reach the puck. Once the arm reaches the puck, bonus reward begins to have affect, and the arm is encouraged to bring the puck to the target.
352
+
353
+ As in the 7-DoF reacher, we set components of the goal state for the optimal control formulation. Specifically, we set the goal hand position to be the puck location. To copy the two-stage reward shaping used by our baselines, the goal XY location for the puck is initially its current location until the hand reaches the puck, at which point the goal position for the puck is the target location. There are no other state dimensions to optimize over, so the optimal control problem is trivial.
354
+
355
+ Half-Cheetah: The environment is the same as in Brockman et al. (2016). The only difference is that the reward is the \`-1 norm between the velocity and desired velocity $v ^ { * }$ . Our optimal control formulation is again trivial since we set the goal velocity to be $v ^ { * }$ . The goal velocity for rollout was sampled uniformly in the range $[ - 6 , 6 ]$ . We found that the resulting TDM policy tends to “jump” at the last time step, which is the type of behavior we would expect to come out of this finite-horizon formulation but not of the infinite-time horizon of standard model-free deep RL techniques.
356
+
357
+ Ant: The environment is the same as in Brockman et al. (2016), except that we lowered the gear ratio to 30 for all joints. We found that this prevents the ant from flipping over frequently during the initially phase of training, allowing us to run all the experiments faster. The reward is the $\ell { - } 1$ norm between the actual and desired xy-position and xy-velocity (for the position and velocity task) of the torso center of mass. For the target-position task, the target position was any position within a 6-by-6 square. For the target-position-and-velocity task, the target position was any position within a 1-by1 square and any velocity within a 0.05-by-0.05 velocity-box. When computing the distance for the position-and-velocity task, the velocity distance was weighted by 0.9 and the position distance was weighted by 0.1.
358
+
359
+ Sawyer Robot: The state and action spaces are the same as in the 7-DoF simulated robot except that we also included the measured torques as part of the state space since these can different from the applied torques. The reward function used is also the $\ell _ { 1 }$ norm to the desired XYZ position.
parse/train/Skw0n-W0Z/Skw0n-W0Z_content_list.json ADDED
@@ -0,0 +1,1787 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "TEMPORAL DIFFERENCE MODELS: MODEL-FREE DEEP RL FOR MODEL-BASED CONTROL ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 725,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Vitchyr Pong∗ University of California, Berkeley vitchyr@berkeley.edu ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 408,
21
+ 212
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Shixiang $\\mathbf { G u } ^ { * }$ \nUniversity of Cambridge \nMax Planck Institute \nGoogle Brain \nsg717@cam.ac.uk ",
28
+ "bbox": [
29
+ 490,
30
+ 170,
31
+ 655,
32
+ 239
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Murtaza Dalal University of California, Berkeley mdalal@berkeley.edu ",
39
+ "bbox": [
40
+ 183,
41
+ 261,
42
+ 408,
43
+ 303
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Sergey Levine University of California, Berkeley svlevine@eecs.berkeley.edu ",
50
+ "bbox": [
51
+ 491,
52
+ 261,
53
+ 748,
54
+ 303
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "ABSTRACT ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 454,
64
+ 339,
65
+ 544,
66
+ 354
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Model-free reinforcement learning (RL) is a powerful, general tool for learning complex behaviors. However, its sample efficiency is often impractically large for solving challenging real-world problems, even with off-policy algorithms such as Q-learning. A limiting factor in classic model-free RL is that the learning signal consists only of scalar rewards, ignoring much of the rich information contained in state transition tuples. Model-based RL uses this information, by training a predictive model, but often does not achieve the same asymptotic performance as model-free RL due to model bias. We introduce temporal difference models (TDMs), a family of goal-conditioned value functions that can be trained with model-free learning and used for model-based control. TDMs combine the benefits of model-free and model-based RL: they leverage the rich information in state transitions to learn very efficiently, while still attaining asymptotic performance that exceeds that of direct model-based RL methods. Our experimental results show that, on a range of continuous control tasks, TDMs provide a substantial improvement in efficiency compared to state-of-the-art model-based and model-free methods. ",
73
+ "bbox": [
74
+ 233,
75
+ 369,
76
+ 764,
77
+ 590
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 176,
87
+ 614,
88
+ 336,
89
+ 631
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Reinforcement learning (RL) algorithms provide a formalism for autonomous learning of complex behaviors. When combined with rich function approximators such as deep neural networks, RL can provide impressive results on tasks ranging from playing games (Mnih et al., 2015; Silver et al., 2016), to flying and driving (Lillicrap et al., 2015; Zhang et al., 2016), to controlling robotic arms (Levine et al., 2016; Gu et al., 2017). However, these deep RL algorithms often require a large amount of experience to arrive at an effective solution, which can severely limit their application to real-world problems where this experience might need to be gathered directly on a real physical system. Part of the reason for this is that direct, model-free RL learns only from the reward: experience that receives no reward provides minimal supervision to the learner. ",
96
+ "bbox": [
97
+ 173,
98
+ 645,
99
+ 825,
100
+ 770
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In contrast, model-based RL algorithms obtain a large amount of supervision from every sample, since they can use each sample to better learn how to predict the system dynamics – that is, to learn the “physics” of the problem. Once the dynamics are learned, near-optimal behavior can in principle be obtained by planning through these dynamics. Model-based algorithms tend to be substantially more efficient (Deisenroth et al., 2013; Nagabandi et al., 2017), but often at the cost of larger asymptotic bias: when the dynamics cannot be learned perfectly, as is the case for most complex problems, the final policy can be highly suboptimal. Therefore, conventional wisdom holds that model-free methods are less efficient but achieve the best asymptotic performance, while model-based methods are more efficient but do not produce policies that are as optimal. ",
107
+ "bbox": [
108
+ 174,
109
+ 777,
110
+ 825,
111
+ 904
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Can we devise methods that retain the efficiency of model-based learning while still achieving the asymptotic performance of model-free learning? This is the question that we study in this paper. The search for methods that combine the best of model-based and model-free learning has been ongoing for decades, with techniques such as synthetic experience generation (Sutton, 1990), partial modelbased backpropagation (Nguyen & Widrow, 1990; Heess et al., 2015), and layering model-free learning on the residuals of model-based estimation (Chebotar et al., 2017) being a few examples. However, a direct connection between model-free and model-based RL has remained elusive. By effectively bridging the gap between model-free and model-based RL, we should be able to smoothly transition from learning models to learning policies, obtaining rich supervision from every sample to quickly gain a moderate level of proficiency, while still converging to an unbiased solution. ",
118
+ "bbox": [
119
+ 174,
120
+ 103,
121
+ 825,
122
+ 242
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "To arrive at a method that combines the strengths of model-free and model-based RL, we study a variant of goal-conditioned value functions (Sutton et al., 2011; Schaul et al., 2015; Andrychowicz et al., 2017). Goal-conditioned value functions learn to predict the value function for every possible goal state. That is, they answer the following question: what is the expected reward for reaching a particular state, given that the agent is attempting (as optimally as possible) to reach it? The particular choice of reward function determines what such a method actually does, but rewards based on distances to a goal hint at a connection to model-based learning: if we can predict how easy it is to reach any state from any current state, we must have some kind of understanding of the underlying “physics.” In this work, we show that we can develop a method for learning variable-horizon goalconditioned value functions where, for a specific choice of reward and horizon, the value function corresponds directly to a model, while for larger horizons, it more closely resembles model-free approaches. Extension toward more model-free learning is thus achieved by acquiring “multi-step models” that can be used to plan over progressively coarser temporal resolutions, eventually arriving at a fully model-free formulation. ",
129
+ "bbox": [
130
+ 174,
131
+ 250,
132
+ 825,
133
+ 444
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "The principle contribution of our work is a new RL algorithm that makes use of this connection between model-based and model-free learning to learn a specific type of goal-conditioned value function, which we call a temporal difference model (TDM). This value function can be learned very efficiently, with sample complexities that are competitive with model-based RL, and can then be used with an MPC-like method to accomplish desired tasks. Our empirical experiments demonstrate that this method achieves substantially better sample complexity than fully model-free learning on a range of challenging continuous control tasks, while outperforming purely model-based methods in terms of final performance. Furthermore, the connection that our method elucidates between model-based and model-free learning may lead to a range of interesting future methods. ",
140
+ "bbox": [
141
+ 174,
142
+ 450,
143
+ 825,
144
+ 575
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "2 PRELIMINARIES ",
151
+ "text_level": 1,
152
+ "bbox": [
153
+ 176,
154
+ 598,
155
+ 339,
156
+ 614
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "In this section, we introduce the reinforcement learning (RL) formalism, temporal difference Qlearning methods, model-based RL methods, and goal-conditioned value functions. We will build on these components to develop temporal difference models (TDMs) in the next section. RL deals with decision making problems that consist of a state space $s$ , action space $\\mathcal { A }$ , transition dynamics $P ( s ^ { \\prime } \\mid s , a )$ , and an initial state distribution $p _ { 0 }$ . The goal of the learner is encapsulated by a reward function $r ( s , a , s ^ { \\prime } )$ . Typically, long or infinite horizon tasks also employ a discount factor $\\gamma$ , and the standard objective is to find a policy $\\pi ( a \\mid s )$ that maximizes the expected discounted sum of rewards, $\\begin{array} { r } { \\mathbb { E } _ { \\pi } [ \\sum _ { t } \\gamma ^ { t } r ( s _ { t } , a _ { t } , s _ { t + 1 } ) ] } \\end{array}$ , where $s _ { 0 } \\sim p _ { 0 }$ , $a _ { t } \\sim \\pi ( a _ { t } | s _ { t } )$ , and $s _ { t + 1 } \\sim P ( s ^ { \\prime } \\mid s , a )$ . ",
163
+ "bbox": [
164
+ 174,
165
+ 630,
166
+ 825,
167
+ 744
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Q-functions. We will focus on RL algorithms that learn a Q-function. The Q-function represents the expected total (discounted) reward that can be obtained by the optimal policy after taking action $a _ { t }$ in state $s _ { t }$ , and can be defined recursively as following: ",
174
+ "bbox": [
175
+ 174,
176
+ 760,
177
+ 823,
178
+ 801
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "equation",
184
+ "img_path": "images/8085533daa5fa7fdd35fbad06159460b108687f5632693fbaceacbe774ce499a.jpg",
185
+ "text": "$$\nQ ( s _ { t } , a _ { t } ) = \\mathbb { E } _ { p ( s _ { t + 1 } | s _ { t } , a _ { t } ) } [ r ( s _ { t } , a _ { t } , s _ { t + 1 } ) + \\gamma \\operatorname* { m a x } _ { a } Q ( s _ { t + 1 } , a ) ] .\n$$",
186
+ "text_format": "latex",
187
+ "bbox": [
188
+ 290,
189
+ 809,
190
+ 707,
191
+ 832
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "The optimal policy can then recovered according to $\\begin{array} { r } { \\pi ( a _ { t } | s _ { t } ) = \\delta ( a _ { t } = \\arg \\operatorname* { m a x } _ { a } Q ( s _ { t } , a ) ) } \\end{array}$ . Qlearning algorithms (Watkins & Dayan, 1992; Riedmiller, 2005) learn the Q-function via an offpolicy stochastic gradient descent algorithm, estimating the expectation in the above equation with samples collected from the environment and computing its gradient. Q-learning methods can use transition tuples $( s _ { t } , a _ { t } , s _ { t + 1 } , r _ { t } )$ collected from any exploration policy, which generally makes them more efficient than direct policy search, though still less efficient than purely model-based methods. ",
198
+ "bbox": [
199
+ 174,
200
+ 839,
201
+ 825,
202
+ 924
203
+ ],
204
+ "page_idx": 1
205
+ },
206
+ {
207
+ "type": "text",
208
+ "text": "Model-based RL and optimal control. Model-based RL takes a different approach to maximize the expected reward. In model-based RL, the aim is to train a model of the form $f ( s _ { t } , a _ { t } )$ to predict the next state $s _ { t + 1 }$ . Once trained, this model can be used to choose actions, either by backpropagating reward gradients into a policy, or planning directly through the model. In the latter case, a particularly effective method for employing a learned model is model-predictive control (MPC), where a new action plan is generated at each time step, and the first action of that plan is executed, before replanning begins from scratch. MPC can be formalized as the following optimization problem: ",
209
+ "bbox": [
210
+ 173,
211
+ 103,
212
+ 825,
213
+ 214
214
+ ],
215
+ "page_idx": 2
216
+ },
217
+ {
218
+ "type": "equation",
219
+ "img_path": "images/1f208f825cab00c8989de5b3b971112349269ae5c60516bf60ec53997c215833.jpg",
220
+ "text": "$$\na _ { t } = \\underset { a _ { t : t + T } } { \\operatorname { a r g m a x } } \\sum _ { i = t } ^ { t + T } r ( s _ { i } , a _ { i } ) \\mathrm { ~ w h e r e ~ } s _ { i + 1 } = f ( s _ { i } , a _ { i } ) \\forall \\ i \\in \\{ t , . . . , t + T - 1 \\} .\n$$",
221
+ "text_format": "latex",
222
+ "bbox": [
223
+ 248,
224
+ 218,
225
+ 748,
226
+ 262
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "We can also write the dynamics constraint in the above equation in terms of an implicit dynamics, according to ",
233
+ "bbox": [
234
+ 173,
235
+ 267,
236
+ 825,
237
+ 296
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "equation",
243
+ "img_path": "images/c7ed33dbad5c3be2cafc37b8ee86fd48ba475df9d8508901480b01071081c781.jpg",
244
+ "text": "$$\na _ { t } = \\operatorname * { a r g m a x } _ { a _ { t : t + T } , s _ { t + 1 : t + T } } \\sum _ { i = t } ^ { t + T } r ( s _ { i } , a _ { i } ) \\mathrm { ~ s u c h ~ t h a t ~ } C ( s _ { i } , a _ { i } , s _ { i + 1 } ) = 0 \\vee i \\in \\{ t , . . . , t + T - 1 \\} ,\n$$",
245
+ "text_format": "latex",
246
+ "bbox": [
247
+ 210,
248
+ 301,
249
+ 784,
250
+ 345
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "where $C ( s _ { i } , a _ { i } , s _ { i + 1 } ) = 0$ if and only if $s _ { i + 1 } = f ( s _ { i } , a _ { i } )$ . This implicit version will be important in understanding the connection between model-based and model-free RL. ",
257
+ "bbox": [
258
+ 169,
259
+ 351,
260
+ 825,
261
+ 380
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "Goal-conditioned value functions. Q-functions trained for a specific reward are specific to the corresponding task, and learning a new task requires optimizing an entirely new Q-function. Goalconditioned value functions address this limitation by conditioning the Q-value on some task description vector $s _ { g } ~ \\in ~ \\mathcal { G }$ in a goal space $\\mathcal { G }$ . This goal vector induces a parameterized reward $r ( s _ { t } , a _ { t } , s _ { t + 1 } , s _ { g } )$ , which in turn gives rise to parameterized Q-functions of the form $Q ( s , a , s _ { g } )$ . A number of goal-conditioned value function methods have been proposed in the literature, such as universal value functions (Schaul et al., 2015) and Horde (Sutton et al., 2011). When the goal corresponds to an entire state, such goal-conditioned value functions usually predict how well an agent can reach a particular state, when it is trying to reach it. The knowledge contained in such a value function is intriguingly close to a model: knowing how well you can reach any state is closely related to understanding the physics of the environment. With Q-learning, these value functions can be learned for any goal $s _ { g }$ using the same off-policy $\\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \\right)$ tuples. Relabeling previously visited states with the reward for any goal leads to a natural data augmentation strategy, since each tuple can be replicated many times for many different goals without additional data collection. Andrychowicz et al. (2017) used this property to produce an effective curriculum for solving multi-goal task with delayed rewards. As we discuss below, relabeling past experience with different goals enables goal-conditioned value functions to learn much more quickly from the same amount of data. ",
268
+ "bbox": [
269
+ 173,
270
+ 393,
271
+ 825,
272
+ 631
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "3 TEMPORAL DIFFERENCE MODEL LEARNING ",
279
+ "text_level": 1,
280
+ "bbox": [
281
+ 174,
282
+ 651,
283
+ 575,
284
+ 667
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "In this section, we introduce a type of goal-conditioned value functions called temporal difference models (TDMs) that provide a direct connection to model-based RL. We will first motivate this connection by relating the model-based MPC optimizations in Equations (2) and (3) to goal-conditioned value functions, and then present our temporal difference model derivation, which extends this connection from a purely model-based setting into one that becomes increasingly model-free. ",
291
+ "bbox": [
292
+ 174,
293
+ 683,
294
+ 825,
295
+ 753
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "3.1 FROM GOAL-CONDITIONED VALUE FUNCTIONS TO MODELS ",
302
+ "text_level": 1,
303
+ "bbox": [
304
+ 176,
305
+ 768,
306
+ 637,
307
+ 785
308
+ ],
309
+ "page_idx": 2
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "Let us consider the choice of reward function for the goal conditioned value function. Although a variety of options have been explored in the literature (Sutton et al., 2011; Schaul et al., 2015; Andrychowicz et al., 2017), a particularly intriguing connection to model-based RL emerges if we set ${ \\mathcal { G } } = { \\mathcal { S } }$ , such that $g \\in { \\mathcal { G } }$ corresponds to a goal state $s _ { g } \\in \\mathcal S$ , and we consider distance-based reward functions $r _ { d }$ of the following form: ",
314
+ "bbox": [
315
+ 174,
316
+ 795,
317
+ 825,
318
+ 866
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "equation",
324
+ "img_path": "images/f4a8cadda4bff90c6ce399aeda9844a97fe00b0c8922a5d65118b6e111e53a17.jpg",
325
+ "text": "$$\nr _ { d } ( s _ { t } , a _ { t } , s _ { t + 1 } , s _ { g } ) = - D ( s _ { t + 1 } , s _ { g } ) ,\n$$",
326
+ "text_format": "latex",
327
+ "bbox": [
328
+ 377,
329
+ 872,
330
+ 619,
331
+ 890
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "where $D ( s _ { t + 1 } , s _ { g } )$ is a distance, such as the Euclidean distance $D ( s _ { t + 1 } , s _ { g } ) = \\| s _ { t + 1 } - s _ { g } \\| _ { 2 }$ . If $\\gamma = 0$ , we have $Q ( s _ { t } , a _ { t } , s _ { g } ) = - D ( s _ { t + 1 } , s _ { g } )$ at convergence of Q-learning, which means that ",
338
+ "bbox": [
339
+ 173,
340
+ 895,
341
+ 828,
342
+ 925
343
+ ],
344
+ "page_idx": 2
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "$Q ( s _ { t } , a _ { t } , s _ { g } ) = 0$ implies that $s _ { t + 1 } ~ = ~ s _ { g }$ . Plug this Q-function into the model-based planning optimization in Equation (3), denoting the task control reward as $r _ { c }$ , such that the solution to ",
349
+ "bbox": [
350
+ 171,
351
+ 103,
352
+ 825,
353
+ 132
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "equation",
359
+ "img_path": "images/1e796c7cc0eb348e2242890495ec3aaf3f687703b75a019995581307e55b0a2e.jpg",
360
+ "text": "$$\na _ { t } = \\operatorname * { a r g m a x } _ { a _ { t : t + T } , s _ { t + 1 : t + T } } \\sum _ { i = t } ^ { t + T } r _ { c } \\big ( s _ { i } , a _ { i } \\big ) \\mathrm { ~ s u c h ~ t h a t ~ } Q ( s _ { i } , a _ { i } , s _ { i + 1 } ) = 0 \\ \\forall \\ i \\in \\{ t , . . . , t + T - 1 \\}\n$$",
361
+ "text_format": "latex",
362
+ "bbox": [
363
+ 199,
364
+ 133,
365
+ 779,
366
+ 178
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "yields a model-based plan. We have now derived a precise connection between model-free and model-based RL, in that model-free learning of goal-conditioned value functions can be used to directly produce an implicit model that can be used with MPC-based planning. However, this connection by itself is not very useful: the resulting implicit model is fully model-based, and does not provide any kind of long-horizon capability. In the next section, we show how to extend this connection into the long-horizon setting by introducing the temporal difference model (TDM). ",
373
+ "bbox": [
374
+ 173,
375
+ 179,
376
+ 825,
377
+ 263
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "3.2 LONG-HORIZON LEARNING WITH TEMPORAL DIFFERENCE MODELS ",
384
+ "text_level": 1,
385
+ "bbox": [
386
+ 176,
387
+ 277,
388
+ 691,
389
+ 294
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "If we consider the case where $\\gamma > 0$ , the optimization in Equation (4) no longer corresponds to any optimal control method. In fact, when $\\gamma = 0$ , Q-values have well-defined units: units of distance between states. For $\\gamma > 0$ , no such interpretation is possible. The key insight in temporal difference models is to introduce a different mechanism for aggregating long-horizon rewards. Instead of evaluating Q-values as discounted sums of rewards, we introduce an additional input $\\tau$ , which represents the planning horizon, and define the Q-learning recursion as ",
396
+ "bbox": [
397
+ 173,
398
+ 304,
399
+ 825,
400
+ 388
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "equation",
406
+ "img_path": "images/f87c5da6452c014f1be0302d01b0ae9e1ff6a406d98f76bdc39e0e542fb6775c.jpg",
407
+ "text": "$$\nQ ( s _ { t } , a _ { t } , s _ { g } , \\tau ) = \\mathbb { E } _ { p ( s _ { t + 1 } \\mid s _ { t } , a _ { t } ) } [ - D ( s _ { t + 1 } , s _ { g } ) \\mathbb { 1 } [ \\tau = 0 ] + \\operatorname* { m a x } _ { a } Q ( s _ { t + 1 } , a , s _ { g } , \\tau - 1 ) \\mathbb { 1 } [ \\tau \\neq 0 ] ] .\n$$",
408
+ "text_format": "latex",
409
+ "bbox": [
410
+ 186,
411
+ 390,
412
+ 790,
413
+ 411
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "The Q-function uses a reward of $- D ( s _ { t + 1 } , s _ { g } )$ when $\\tau = 0$ (at which point the episode terminates), and decrements $\\tau$ by one at every other step. Since this is still a well-defined Q-learning recursion, it can be optimized with off-policy data and, just as with goal-conditioned value functions, we can resample new goals $s _ { g }$ and new horizons $\\tau$ for each tuple $( s _ { t } , a _ { t } , s _ { t + 1 } )$ , even ones that were not actually used when the data was collected. In this way, the TDM can be trained very efficiently, since every tuple provides supervision for every possible goal and every possible horizon. ",
420
+ "bbox": [
421
+ 173,
422
+ 412,
423
+ 825,
424
+ 497
425
+ ],
426
+ "page_idx": 3
427
+ },
428
+ {
429
+ "type": "text",
430
+ "text": "The intuitive interpretation of the TDM is that it tells us how close the agent will get to a given goal state $s _ { g }$ after $\\tau$ time steps, when it is attempting to reach that state in $\\tau$ steps. Alternatively, TDMs can be interpreted as $\\mathrm { Q }$ -values in a finite-horizon MDP, where the horizon is determined by $\\tau$ . For the case where $\\tau = 0$ , TDMs effectively learn a model, allowing TDMs to be incorporated into a variety of planning and optimal control schemes at test time as in Equation (4). Thus, we can view TDM learning as an interpolation between model-based and model-free learning, where $\\tau = 0$ corresponds to the single-step prediction made in model-based learning and $\\tau > 0$ corresponds to the long-term prediction made by typical Q-functions. While the correspondence to models is not the same for $\\tau > 0$ , if we only care about the reward at every $K$ step, then we can recover a correspondence by replace Equation (4) with ",
431
+ "bbox": [
432
+ 173,
433
+ 502,
434
+ 826,
435
+ 642
436
+ ],
437
+ "page_idx": 3
438
+ },
439
+ {
440
+ "type": "equation",
441
+ "img_path": "images/44d35f12e569a9f863e91186021be017fad10dba7164dfd9e7fd5932d58157c0.jpg",
442
+ "text": "$$\n\\mathop { \\mathrm { a r g m a x } } _ { \\substack { n _ { t : K : t + T } , s _ { t + K : K : t + T } } } \\sum _ { i = t , t + K , . . . , t + T } r _ { c } ( s _ { i } , a _ { i } )\n$$",
443
+ "text_format": "latex",
444
+ "bbox": [
445
+ 261,
446
+ 643,
447
+ 735,
448
+ 698
449
+ ],
450
+ "page_idx": 3
451
+ },
452
+ {
453
+ "type": "text",
454
+ "text": "where we only optimize over every $K ^ { \\mathrm { t h } }$ state and action. As the TDM becomes effective for longer horizons, we can increase $K$ until $K = T$ , and plan over only a single effective time step: ",
455
+ "bbox": [
456
+ 174,
457
+ 702,
458
+ 825,
459
+ 731
460
+ ],
461
+ "page_idx": 3
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "$a _ { t } = \\underset { a _ { t } , a _ { t + T } , s _ { t + T } } { \\arg \\operatorname* { m a x } } r _ { c } ( s _ { t + T } , a _ { t + T } )$ such that $Q ( s _ { t } , a _ { t } , s _ { t + T } , T - 1 ) = 0 .$ ",
466
+ "bbox": [
467
+ 264,
468
+ 733,
469
+ 732,
470
+ 760
471
+ ],
472
+ "page_idx": 3
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "This formulation does result in some loss of generality, since we no longer optimize the reward at the intermediate steps. This limits the multi-step formulation to terminal reward problems, but does allow us to accommodate arbitrary reward functions on the terminal state $s _ { t + T }$ , which still describes a broad range of practically relevant tasks. In the next section, we describe how TDMs can be implemented and used in practice for continuous state and action spaces. ",
477
+ "bbox": [
478
+ 174,
479
+ 762,
480
+ 825,
481
+ 832
482
+ ],
483
+ "page_idx": 3
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "4 TRAINING AND USING TEMPORAL DIFFERENCE MODELS ",
488
+ "text_level": 1,
489
+ "bbox": [
490
+ 174,
491
+ 851,
492
+ 683,
493
+ 867
494
+ ],
495
+ "page_idx": 3
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "The TDM can be trained with any off-policy Q-learning algorithm, such as DQN (Mnih et al., 2015), DDPG (Lillicrap et al., 2015), NAF (Gu et al., 2016), and SDQN (Metz et al., 2017). During off-policy Q-learning, TDMs can benefit from arbitrary relabeling of the goal states $g$ and the horizon $\\tau$ , given the same $\\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \\right)$ tuples from the behavioral policy as done in (Andrychowicz et al., 2017). This relabeling enables simultaneous, data-efficient learning of short-horizon and long-horizon behaviors for arbitrary goal states, unlike previously proposed goal-conditioned value functions that only learn for a single time scale, typically determined by a discount factor (Schaul et al., 2015; Andrychowicz et al., 2017). In this section, we describe the design decisions needed to make practical a TDM algorithm. ",
500
+ "bbox": [
501
+ 174,
502
+ 881,
503
+ 823,
504
+ 924
505
+ ],
506
+ "page_idx": 3
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "",
511
+ "bbox": [
512
+ 174,
513
+ 103,
514
+ 825,
515
+ 188
516
+ ],
517
+ "page_idx": 4
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "4.1 REWARD FUNCTION SPECIFICATION ",
522
+ "text_level": 1,
523
+ "bbox": [
524
+ 176,
525
+ 204,
526
+ 464,
527
+ 218
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "Q-learning typically optimizes scalar rewards, but TDMs enable us to increase the amount of supervision available to the Q-function by using a vector-valued reward. Specifically, if the distance $D ( s , s _ { g } )$ factors additively over the dimensions, we can train a vector-valued Q-function that predicts per-dimension distance, with the reward function for dimension $j$ given by $- D _ { j } ( s _ { j } , s _ { g , j } )$ . We use the $\\ell _ { 1 }$ norm in our implementation, which corresponds to absolute value reward $- | s _ { j } - s _ { g , j } |$ . The resulting vector-valued Q-function can learn distances along each dimension separately, providing it with more supervision from each training point. Empirically, we found that this modifications provides a substantial boost in sample efficiency. ",
534
+ "bbox": [
535
+ 173,
536
+ 229,
537
+ 825,
538
+ 342
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "We can optionally make an improvement to TDMs if we know that the task reward $r _ { c }$ depends only on some subset of the state or, more generally, state features. In that case, we can train the TDM to predict distances along only those dimensions or features that are used by $r _ { c }$ , which in practice can substantially simplify the corresponding prediction problem. In our experiments, we illustrate this property by training TDMs for pushing tasks that predict distances from an end-effector and pushed object, without accounting for internal joints of the arm, and similarly for various locomotion tasks. ",
545
+ "bbox": [
546
+ 174,
547
+ 348,
548
+ 825,
549
+ 433
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "4.2 POLICY EXTRACTION WITH TDMS ",
556
+ "text_level": 1,
557
+ "bbox": [
558
+ 176,
559
+ 448,
560
+ 457,
561
+ 463
562
+ ],
563
+ "page_idx": 4
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "While the TDM optimal control formulation Equation (7) drastically reduces the number of states and actions to be optimized for long-term planning, it requires solving a constrained optimization problem, which is more computationally expensive than unconstrained problems. We can remove the need for a constrained optimization through a specific architectural decision in the design of the function approximator for $Q ( s , a , s _ { g } , \\tau )$ . We define the Q-function as $Q ( s , a , s _ { g } , \\tau ) =$ $- \\mathbf { \\bar { | } } f ( s , a , s _ { g } , \\tau ) - s _ { g } \\mathbf { | | } ^ { \\mathbf { \\bar { | } } }$ , where $f ( s , a , s _ { g } , \\tau )$ outputs a state vector. By training the TDM with a standard Q-learning method, $f ( s , a , s _ { g } , \\tau )$ is trained to explicitly predict the state that will be reached by a policy attempting to reach $s _ { g }$ in $\\tau$ steps. This model can then be used to choose the action with fully explicit MPC as below, which also allows straightforward derivation of a multi-step version as in Equation (6). ",
568
+ "bbox": [
569
+ 173,
570
+ 473,
571
+ 825,
572
+ 613
573
+ ],
574
+ "page_idx": 4
575
+ },
576
+ {
577
+ "type": "equation",
578
+ "img_path": "images/6b57beb61809afcd657188ca18ee008a68eec63e8f7ee5e824fac6ff3372571c.jpg",
579
+ "text": "$$\na _ { t } = \\operatorname * { a r g m a x } _ { a _ { t } , a _ { t + T } , s _ { t + T } } r _ { c } ( f ( s _ { t } , a _ { t } , s _ { t + T } , T - 1 ) , a _ { t + T } )\n$$",
580
+ "text_format": "latex",
581
+ "bbox": [
582
+ 331,
583
+ 611,
584
+ 665,
585
+ 638
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "In the case where the task is to reach a goal state $s _ { g }$ , a simpler approach to extract a policy is to use the TDM directly: ",
592
+ "bbox": [
593
+ 178,
594
+ 640,
595
+ 820,
596
+ 667
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "equation",
602
+ "img_path": "images/7ba535d9547f121352c4533dd5782563615398433f64e8b0ae442416b12babd4.jpg",
603
+ "text": "$$\na _ { t } = \\mathop { \\mathrm { a r g m a x } } _ { a } Q ( s _ { t } , a , s _ { g } , T )\n$$",
604
+ "text_format": "latex",
605
+ "bbox": [
606
+ 403,
607
+ 666,
608
+ 596,
609
+ 690
610
+ ],
611
+ "page_idx": 4
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "In our experiments, we use Equations (8) and (9) to extract a policy. ",
616
+ "bbox": [
617
+ 173,
618
+ 693,
619
+ 619,
620
+ 707
621
+ ],
622
+ "page_idx": 4
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "4.3 ALGORITHM SUMMARY ",
627
+ "text_level": 1,
628
+ "bbox": [
629
+ 174,
630
+ 723,
631
+ 380,
632
+ 738
633
+ ],
634
+ "page_idx": 4
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "The algorithm is summarized as Algorithm 1. A crucial difference from prior goal-conditioned value function methods (Schaul et al., 2015; Andrychowicz et al., 2017) is that our algorithm can be used to act according to an arbitrary terminal reward function $r _ { c }$ , both during exploration and at test time. Like other off-policy algorithms (Mnih et al., 2015; Lillicrap et al., 2015), it consists of exploration and Q-function fitting. Noise is injected for exploration, and Q-function fitting uses standard Qlearning techniques, with target networks $Q ^ { \\prime }$ and experience replay (Mnih et al., 2015; Lillicrap et al., 2015). If we view the Q-function fitting as model fitting, the algorithm also resembles iterative model-based RL, which alternates between collecting data using the learned dynamics model for planning (Deisenroth & Rasmussen, 2011) and fitting the model. Since we focus on continuous tasks, we use DDPG (Lillicrap et al., 2015), though any Q-learning method could be used. ",
639
+ "bbox": [
640
+ 174,
641
+ 750,
642
+ 825,
643
+ 888
644
+ ],
645
+ "page_idx": 4
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "The computation cost of the algorithm is mostly determined by the number of updates to fit the Q-function per transition, $I$ . In general, TDMs can benefit from substantially larger $I$ than classic ",
650
+ "bbox": [
651
+ 174,
652
+ 895,
653
+ 823,
654
+ 924
655
+ ],
656
+ "page_idx": 4
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "Algorithm 1 Temporal Difference Model Learning ",
661
+ "text_level": 1,
662
+ "bbox": [
663
+ 174,
664
+ 103,
665
+ 509,
666
+ 118
667
+ ],
668
+ "page_idx": 5
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "Require: Task reward function $r _ { c } ( s , a )$ , parameterized TDM $Q _ { w } ( s , a , s _ { g } , \\tau )$ , replay buffer $\\boldsymbol { B }$ \n1: for $n = 0 , . . . , N - 1$ episodes do \n2: $s _ { 0 } \\sim p ( s _ { 0 } )$ \n3: for $t = 0 , . . . , T - 1$ time steps do \n4: $a _ { t } ^ { * } = \\mathsf { M P C } ( r _ { c } , s _ { t } , Q _ { w } , T - t )$ // Eq. 6, Eq. 7, Eq. 8, or Eq. 9 \n5: $a _ { t } = \\mathsf { A d d N o i s e } ( a _ { t } ^ { * } )$ // Noisy exploration \n6: $s _ { t + 1 } \\sim p ( s _ { t } , a _ { t } )$ , and store $\\left\\{ { { s } _ { t } } , { { a } _ { t } } , { { s } _ { t + 1 } } \\right\\}$ in the replay buffer $\\boldsymbol { B }$ // Step environment \n7: for $i = 0 , I - 1$ iterations do \n8: Sample $M$ transitions $\\{ s _ { m } , a _ { m } , s _ { m } ^ { \\prime } \\}$ from the replay $\\boldsymbol { B }$ . \n9: Relabel time horizons and goal states τm, sg,m // Section A.1 \n10: $\\begin{array} { r } { y _ { m } = - \\| s _ { m } ^ { \\prime } - s _ { g , m } \\| \\mathbb { I } \\left[ \\tau _ { m } = 0 \\right] + \\operatorname* { m a x } _ { a } \\tilde { Q } ^ { \\prime } ( s _ { m } ^ { \\prime } , a , s _ { \\ell } } \\end{array}$ g,m, τm − 1)1[τm 6= 0] \n11: $\\begin{array} { r } { L ( w ) = \\sum _ { m } ( Q _ { w } ( s _ { m } , a _ { m } , s _ { g , m } , \\tau _ { m } ) - y _ { m } ) ^ { 2 } / M } \\end{array}$ // Compute the loss \n12: Minimize $( w , L ( w ) )$ ) // Optimize \n13: end for \n14: end for \n15: end for ",
673
+ "bbox": [
674
+ 176,
675
+ 123,
676
+ 816,
677
+ 328
678
+ ],
679
+ "page_idx": 5
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "model-free methods such as DDPG due to relabeling increasing the amount of supervision signals. In real-world applications such as robotics where we care most of the sample efficiency (Gu et al., 2017), the learning is often bottlenecked by the data collection rather than the computation, and therefore large $I$ values are usually not a significant problem and can continuously benefit from the acceleration in computation. ",
684
+ "bbox": [
685
+ 174,
686
+ 357,
687
+ 825,
688
+ 428
689
+ ],
690
+ "page_idx": 5
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "5 RELATED WORK ",
695
+ "text_level": 1,
696
+ "bbox": [
697
+ 176,
698
+ 452,
699
+ 344,
700
+ 467
701
+ ],
702
+ "page_idx": 5
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "Combining model-based and model-free reinforcement learning techniques is a well-studied problem, though no single solution has demonstrated all of the benefits of model-based and model-free learning. Some methods first learn a model and use this model to simulate experience (Sutton, 1990; Gu et al., 2016) or compute better gradients for model-free updates (Heess et al., 2015; Nguyen & Widrow, 1990). Other methods use model-free algorithms to correct for the local errors made by the model (Chebotar et al., 2017; Bansal et al., 2017). While these prior methods focused on combining different model-based and model-free RL techniques, our method proposes an equivalence between these two branches of RL through a specific generalization of goal-conditioned value function. As a result, our approach achieves much better sample efficiency in practice on a variety of challenging reinforcement learning tasks than model-free alternatives, while exceeding the performance of purely model-based approaches. ",
707
+ "bbox": [
708
+ 174,
709
+ 484,
710
+ 825,
711
+ 637
712
+ ],
713
+ "page_idx": 5
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "We are not the first to study the connection between model-free and model-based methods, with Boyan (1999) and Parr et al. (2008) being two notable examples. Boyan (1999) shows that one can extract a model from a value function when using a tabular representation of the transition function. Parr et al. (2008) shows that, for linear function approximators, the model-free and model-based RL approaches produce the same value function at convergence. Our contribution differs substantially from these: we are not aiming to show that model-free RL performs similarly to model-based RL at convergence, but rather how we can achieve sample complexity comparable to model-based RL while retaining the favorable asymptotic performance of model-free RL in complex tasks with nonlinear function approximation. ",
718
+ "bbox": [
719
+ 174,
720
+ 645,
721
+ 825,
722
+ 770
723
+ ],
724
+ "page_idx": 5
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "A central component of our method is to train goal-conditioned value functions. Many variants of goal-conditioned value functions have been proposed in the literature Foster & Dayan (2002); Sutton et al. (2011); Schaul et al. (2015); Dosovitskiy & Koltun (2016). Critically, unlike the works on contextual policies (Caruana, 1998; Da Silva et al., 2012; Kober et al., 2012) which require onpolicy trajectories with each new goal, the value function approaches such as Horde (Sutton et al., 2011) and UVF (Schaul et al., 2015) can reuse off-policy data to learn rich contextual value functions using the same data. ",
729
+ "bbox": [
730
+ 174,
731
+ 776,
732
+ 825,
733
+ 875
734
+ ],
735
+ "page_idx": 5
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "TDMs condition on a policy trying to reach a goal and must predict $\\tau$ steps into the future. This type of prediction is similar to the prediction made by prior work on multi-step models (Mishra et al., 2017; Venkatraman et al., 2016): predict the state after $\\tau$ actions. An important difference is that multi-step models do not condition on a policy reaching a goal, and so they require optimizing over a sequence of actions, making the input space grow linearly with the planning horizon. ",
740
+ "bbox": [
741
+ 176,
742
+ 882,
743
+ 823,
744
+ 924
745
+ ],
746
+ "page_idx": 5
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "",
751
+ "bbox": [
752
+ 171,
753
+ 103,
754
+ 821,
755
+ 132
756
+ ],
757
+ "page_idx": 6
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "A particularly related UVF extension is hindsight experience replay (HER) Andrychowicz et al. (2017). Both HER and our method retroactively relabel past experience with goal states that are different from the goal aimed for during data collection. However, unlike our method, the standard UVF in HER uses a single temporal scale when learning, and does not explicitly provide for a connection between model-based and model-free learning. The practical result of these differences is that our approach empirically achieves substantially better sample complexity than HER on a wide range of complex continuous control tasks, while the theoretical connection between modelbased and model-free learning suggests a much more flexible use of the learned Q-function inside a planning or optimal control framework. ",
762
+ "bbox": [
763
+ 174,
764
+ 138,
765
+ 825,
766
+ 263
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "Lastly, our motivation is shared by other lines of work besides goal-conditioned value functions that aim to enhance supervision signals for model-free RL (Silver et al., 2017; Jaderberg et al., 2017; Bellemare et al., 2017). Predictions (Silver et al., 2017) augment classic RL with multi-step reward predictions, while UNREAL (Jaderberg et al., 2017) also augments it with pixel control as a secondary reward objective. These are substantially different methods from our work, but share the motivation to achieve efficient RL by increasing the amount of learning signals from finite data. ",
773
+ "bbox": [
774
+ 174,
775
+ 271,
776
+ 825,
777
+ 354
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "6 EXPERIMENTS ",
784
+ "text_level": 1,
785
+ "bbox": [
786
+ 176,
787
+ 378,
788
+ 326,
789
+ 393
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "Our experiments examine how the sample efficiency and performance of TDMs compare to both model-based and model-free RL algorithms. We expect to have the efficiency of model-based RL but with less model bias. We also aim to study the importance of several key design decisions in TDMs, and evaluate the algorithm on a real-world robotic platform. For the model-free comparison, we compare to DDPG (Lillicrap et al., 2015), which typically achieves the best sample efficiency on benchmark tasks (Duan et al., 2016); HER, which uses goal-conditioned value functions (Andrychowicz et al., 2017); and DDPG with the same sparse rewards of HER. For the modelbased comparison, we compare to the model-based component in Nagabandi et al. (2017), a recent work that reports highly efficient learning with neural network dynamics models. Details of the baseline implementations are in the Appendix. We perform the comparison on five simulated tasks: (1) a 7 DoF arm reaching various random end-effector targets, (2) an arm pushing a puck to a target location, (3) a planar cheetah attempting to reach a goal velocity (either forward or backward), (4) a quadrupedal ant attempting to reach a goal position, and (5) an ant attempting to reach a goal position and velocity. The tasks are shown in Figure 1 and terminate when either the goal is reached or the time horizon is reached. The pushing task requires long-horizon reasoning to reach and push the puck. The cheetah and ant tasks require handling many contact discontinuities which is challenging for model-based methods, with the ant environment having particularly difficult dynamics given the larger state and action space. The ant position and velocity task presents a scenario where reward shaping as in traditional RL methods may not lead to optimal behavior, since one cannot maintain both a desired position and velocity. However, such a task can be very valuable in realistic settings. For example, if we want the ant to jump, we might instruct it to achieve a particular velocity at a particular location. We also tested TDMs on a real-world robot arm reaching end-effector positions, to study its applicability to real-world tasks. ",
796
+ "bbox": [
797
+ 174,
798
+ 411,
799
+ 825,
800
+ 729
801
+ ],
802
+ "page_idx": 6
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "For the simulated and real-world 7-DoF arm, our TDM is trained on all state components. For the pushing task, our TDM is trained on the hand and puck XY-position. For the half cheetah task, our TDM is trained on the velocity of the cheetah. For the ant tasks, our TDM is trained on either the position or the position and velocity for the respective task. Full details are in the Appendix. ",
807
+ "bbox": [
808
+ 176,
809
+ 737,
810
+ 825,
811
+ 792
812
+ ],
813
+ "page_idx": 6
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "6.1 TDMS VS MODEL-FREE, MODE-BASED, AND DIRECT GOAL-CONDITIONED RL ",
818
+ "bbox": [
819
+ 173,
820
+ 813,
821
+ 766,
822
+ 827
823
+ ],
824
+ "page_idx": 6
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "The results are shown in Figure 2. When compared to the model-free baselines, the pure modelbased method learns learns much faster on all the tasks. However, on the harder cheetah and ant tasks, its final performance is worse due to model bias. TDMs learn as quickly or faster than the model-based method, but also always learn policies that are as good as if not better than the modelfree policies. Furthermore, TDMs requires fewer samples than the model-free baselines on ant tasks and drastically fewer samples on the other tasks. We also see that using HER does not lead to an improvement over DDPG. While we were initially surprised, we realized that a selling point of HER is that it can solve sparse tasks that would otherwise be unsolvable. In this paper, we were interested in improving the sample efficiency and not the feasibility of model-free reinforcement learning algorithms, and so we focused on tasks that DDPG could already solve. In these sorts of tasks, the advantage of HER over DDPG with a dense reward is not expected. To evaluate HER as a method to solve sparse tasks, we included the DDPG-Sparse baseline and we see that HER significantly outperforms it as expected. In summary, TDMs converge as fast or faster than modelbased learning (which learns faster than the model-free baselines), while achieving final performance that is as good or better that the model-free methods on all tasks. ",
829
+ "bbox": [
830
+ 174,
831
+ 840,
832
+ 823,
833
+ 922
834
+ ],
835
+ "page_idx": 6
836
+ },
837
+ {
838
+ "type": "image",
839
+ "img_path": "images/a52a124cd7105e55bdbb67cd74f7c775543ed77acf9c5d7f99e2b7fd981c51fb.jpg",
840
+ "image_caption": [
841
+ "Figure 1: The tasks in our experiments: (a) reaching target locations, (b) pushing a puck to a random target, (c) training the cheetah to run at target velocities, (d) training an ant to run to a target position or a target position and velocity, and (e) reaching target locations (real-world Sawyer robot). "
842
+ ],
843
+ "image_footnote": [],
844
+ "bbox": [
845
+ 174,
846
+ 101,
847
+ 816,
848
+ 181
849
+ ],
850
+ "page_idx": 7
851
+ },
852
+ {
853
+ "type": "image",
854
+ "img_path": "images/bf53cef9be27eafccda3d6c7586ec36667d835b2ea2c155a1e2f8e9f876acc9a.jpg",
855
+ "image_caption": [
856
+ "Figure 2: The comparison of TDM with the baseline methods in model-free (DDPG), model-based, and goal-conditioned value functions (HER - Dense) on various tasks. All plots show the final distance to the goal versus 1000 environment steps (not rollouts). The bold line shows the mean across 3 random seeds, and the shaded region show one standard deviation. Our method, which uses model-free learning, is generally more sample-efficient than model-free alternatives including DDPG and HER and improves upon the best model-based performance. "
857
+ ],
858
+ "image_footnote": [],
859
+ "bbox": [
860
+ 187,
861
+ 250,
862
+ 797,
863
+ 518
864
+ ],
865
+ "page_idx": 7
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "",
870
+ "bbox": [
871
+ 174,
872
+ 628,
873
+ 825,
874
+ 753
875
+ ],
876
+ "page_idx": 7
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "Lastly, we ran the algorithm on a 7-DoF Sawyer robotic arm to learn a real-world analogue of the reaching task. Figure 2f shows that the algorithm outperforms and learns with fewer samples than DDPG, our model-free baseline. These results show that TDMs can scale to real-world tasks. ",
881
+ "bbox": [
882
+ 176,
883
+ 761,
884
+ 825,
885
+ 803
886
+ ],
887
+ "page_idx": 7
888
+ },
889
+ {
890
+ "type": "text",
891
+ "text": "6.2 ABLATION STUDIES ",
892
+ "text_level": 1,
893
+ "bbox": [
894
+ 174,
895
+ 827,
896
+ 352,
897
+ 840
898
+ ],
899
+ "page_idx": 7
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "In this section, we discuss two key design choices for TDMs that provide substantially improved performance. First, Figure 3a examines the tradeoffs between the vectorized and scalar rewards. The results show that the vectorized formulation learns substantially faster than the na¨ıve scalar variant. Second, Figure 3b compares the learning speed for different horizon values $\\tau _ { m a x }$ . Performance degrades when the horizon is too low, and learning becomes slower when the horizon is too high. ",
904
+ "bbox": [
905
+ 174,
906
+ 853,
907
+ 825,
908
+ 924
909
+ ],
910
+ "page_idx": 7
911
+ },
912
+ {
913
+ "type": "image",
914
+ "img_path": "images/49e4b3f3d9897876c3fc12f4884106ce4b9b3445da6a488c71f3236c1882b250.jpg",
915
+ "image_caption": [
916
+ "Figure 3: Ablation experiments for (a) scalar vs. vectorized TDMs on 7-DoF simulated reacher task and (b) different $\\tau _ { m a x }$ on pusher task. The vectorized variant performs substantially better, while the horizon effectively interpolates between model-based and model-free learning. "
917
+ ],
918
+ "image_footnote": [],
919
+ "bbox": [
920
+ 290,
921
+ 113,
922
+ 694,
923
+ 246
924
+ ],
925
+ "page_idx": 8
926
+ },
927
+ {
928
+ "type": "text",
929
+ "text": "7 CONCLUSION ",
930
+ "text_level": 1,
931
+ "bbox": [
932
+ 174,
933
+ 305,
934
+ 318,
935
+ 320
936
+ ],
937
+ "page_idx": 8
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "In this paper, we derive a connection between model-based and model-free reinforcement learning, and present a novel RL algorithm that exploits this connection to greatly improve on the sample efficiency of state-of-the-art model-free deep RL algorithms. Our temporal difference models can be viewed both as goal-conditioned value functions and implicit dynamics models, which enables them to be trained efficiently on off-policy data while still minimizing the effects of model bias. As a result, they achieve asymptotic performance that compares favorably with model-free algorithms, but with a sample complexity that is comparable to purely model-based methods. ",
942
+ "bbox": [
943
+ 174,
944
+ 335,
945
+ 825,
946
+ 434
947
+ ],
948
+ "page_idx": 8
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "While the experiments focus primarily on the new RL algorithm, the relationship between modelbased and model-free RL explored in this paper provides a number of avenues for future work. We demonstrated the use of TDMs with a very basic planning approach, but further exploring how TDMs can be incorporated into powerful constrained optimization methods for model-predictive control or trajectory optimization is an exciting avenue for future work. Another direction for future is to further explore how TDMs can be applied to complex state representations, such as images, where simple distance metrics may no longer be effective. Although direct application of TDMs to these domains is not straightforward, a number of works have studied how to construct metric embeddings of images that could in principle provide viable distance functions. We also note that while the presentation of TDMs have been in the context of deterministic environments, the extension to stochastic environments is straightforward: TDMs would learn to predict the expected distance between the future state and a goal state. Finally, the promise of enabling sample-efficient learning with the performance of model-free RL and the efficiency of model-based RL is to enable widespread RL application on real-world systems. Many applications in robotics, autonomous driving and flight, and other control domains could be explored in future work. ",
953
+ "bbox": [
954
+ 174,
955
+ 440,
956
+ 825,
957
+ 648
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "8 ACKNOWLEDGMENT ",
964
+ "text_level": 1,
965
+ "bbox": [
966
+ 176,
967
+ 669,
968
+ 377,
969
+ 684
970
+ ],
971
+ "page_idx": 8
972
+ },
973
+ {
974
+ "type": "text",
975
+ "text": "This research was supported by the Office of Naval Research and the National Science Foundation through IIS-1614653 and IIS-1651843. ",
976
+ "bbox": [
977
+ 174,
978
+ 699,
979
+ 821,
980
+ 728
981
+ ],
982
+ "page_idx": 8
983
+ },
984
+ {
985
+ "type": "text",
986
+ "text": "REFERENCES ",
987
+ "text_level": 1,
988
+ "bbox": [
989
+ 174,
990
+ 748,
991
+ 285,
992
+ 763
993
+ ],
994
+ "page_idx": 8
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Fong, Peter Welinder, Bob McGrew, Josh Tobin, Pieter Abbeel, and Wojciech Zaremba. Hindsight experience replay. arXiv preprint arXiv:1707.01495, 2017. \nSomil Bansal, Roberto Calandra, Ted Xiao, Sergey Levine, and Claire J Tomlin. Goal-driven dynamics learning via bayesian optimization. arXiv preprint arXiv:1703.09260, 2017. \nMarc G Bellemare, Will Dabney, and Remi Munos. A distributional perspective on reinforcement ´ learning. arXiv preprint arXiv:1707.06887, 2017. \nJustin A Boyan. Least-squares temporal difference learning. In Proceedings of the 16th International Conference on Machine Learning, pp. 49–56, 1999. ",
999
+ "bbox": [
1000
+ 173,
1001
+ 770,
1002
+ 826,
1003
+ 924
1004
+ ],
1005
+ "page_idx": 8
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016. ",
1010
+ "bbox": [
1011
+ 171,
1012
+ 103,
1013
+ 823,
1014
+ 132
1015
+ ],
1016
+ "page_idx": 9
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "Rich Caruana. Multitask learning. In Learning to learn, pp. 95–133. Springer, 1998. ",
1021
+ "bbox": [
1022
+ 174,
1023
+ 141,
1024
+ 727,
1025
+ 157
1026
+ ],
1027
+ "page_idx": 9
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "Yevgen Chebotar, Karol Hausman, Marvin Zhang, Gaurav Sukhatme, Stefan Schaal, and Sergey Levine. Combining model-based and model-free updates for trajectory-centric reinforcement learning. arXiv preprint arXiv:1703.03078, 2017. ",
1032
+ "bbox": [
1033
+ 178,
1034
+ 166,
1035
+ 823,
1036
+ 209
1037
+ ],
1038
+ "page_idx": 9
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "Bruno Da Silva, George Konidaris, and Andrew Barto. Learning parameterized skills. arXiv preprint arXiv:1206.6398, 2012. ",
1043
+ "bbox": [
1044
+ 173,
1045
+ 218,
1046
+ 821,
1047
+ 248
1048
+ ],
1049
+ "page_idx": 9
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "Marc Deisenroth and Carl E Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), pp. 465–472, 2011. ",
1054
+ "bbox": [
1055
+ 174,
1056
+ 257,
1057
+ 823,
1058
+ 301
1059
+ ],
1060
+ "page_idx": 9
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "Marc Peter Deisenroth, Gerhard Neumann, Jan Peters, et al. A survey on policy search for robotics. Foundations and Trends $\\textsuperscript { \\textregistered }$ in Robotics, 2(1–2):1–142, 2013. ",
1065
+ "bbox": [
1066
+ 173,
1067
+ 310,
1068
+ 823,
1069
+ 339
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "Alexey Dosovitskiy and Vladlen Koltun. Learning to act by predicting the future. arXiv preprint arXiv:1611.01779, 2016. ",
1076
+ "bbox": [
1077
+ 173,
1078
+ 348,
1079
+ 823,
1080
+ 378
1081
+ ],
1082
+ "page_idx": 9
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "Y. Duan, R. Chen, X. Houthooft, J. Schulman, and P. Abbeel. Benchmarking deep reinforcement learning for continuous control. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016. ",
1087
+ "bbox": [
1088
+ 174,
1089
+ 387,
1090
+ 823,
1091
+ 430
1092
+ ],
1093
+ "page_idx": 9
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "David Foster and Peter Dayan. Structure in the space of value functions. Machine Learning, 49(2): 325–346, 2002. ",
1098
+ "bbox": [
1099
+ 169,
1100
+ 439,
1101
+ 823,
1102
+ 469
1103
+ ],
1104
+ "page_idx": 9
1105
+ },
1106
+ {
1107
+ "type": "text",
1108
+ "text": "Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In International Conference on Machine Learning, pp. 2829– 2838, 2016. ",
1109
+ "bbox": [
1110
+ 173,
1111
+ 478,
1112
+ 823,
1113
+ 521
1114
+ ],
1115
+ "page_idx": 9
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "Shixiang Gu, Ethan Holly, Timothy Lillicrap, and Sergey Levine. Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pp. 3389–3396. IEEE, 2017. ",
1120
+ "bbox": [
1121
+ 174,
1122
+ 530,
1123
+ 823,
1124
+ 574
1125
+ ],
1126
+ "page_idx": 9
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "Nicolas Heess, Greg Wayne, David Silver, Timothy Lillicrap, Yuval Tassa, and Tom Erez. Learning Continuous Control Policies by Stochastic Value Gradients. arXiv, pp. 1–13, 2015. ISSN 10495258. URL http://arxiv.org/abs/1510.09142. ",
1131
+ "bbox": [
1132
+ 173,
1133
+ 582,
1134
+ 825,
1135
+ 626
1136
+ ],
1137
+ "page_idx": 9
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. International Conference on Learning Representations, 2017. ",
1142
+ "bbox": [
1143
+ 174,
1144
+ 635,
1145
+ 825,
1146
+ 679
1147
+ ],
1148
+ "page_idx": 9
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
1153
+ "bbox": [
1154
+ 173,
1155
+ 688,
1156
+ 825,
1157
+ 717
1158
+ ],
1159
+ "page_idx": 9
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "Jens Kober, Andreas Wilhelm, Erhan Oztop, and Jan Peters. Reinforcement learning to adjust parametrized motor primitives to new situations. Autonomous Robots, 33(4):361–379, 2012. ",
1164
+ "bbox": [
1165
+ 171,
1166
+ 727,
1167
+ 823,
1168
+ 756
1169
+ ],
1170
+ "page_idx": 9
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016. ",
1175
+ "bbox": [
1176
+ 171,
1177
+ 765,
1178
+ 823,
1179
+ 795
1180
+ ],
1181
+ "page_idx": 9
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. ",
1186
+ "bbox": [
1187
+ 176,
1188
+ 804,
1189
+ 823,
1190
+ 847
1191
+ ],
1192
+ "page_idx": 9
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "Luke Metz, Julian Ibarz, Navdeep Jaitly, and James Davidson. Discrete sequential prediction of continuous actions for deep rl. arXiv preprint arXiv:1705.05035, 2017. ",
1197
+ "bbox": [
1198
+ 171,
1199
+ 856,
1200
+ 823,
1201
+ 886
1202
+ ],
1203
+ "page_idx": 9
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "Nikhil Mishra, Pieter Abbeel, and Igor Mordatch. Prediction and control with temporal segment models. 2017. ",
1208
+ "bbox": [
1209
+ 173,
1210
+ 895,
1211
+ 821,
1212
+ 924
1213
+ ],
1214
+ "page_idx": 9
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. ",
1219
+ "bbox": [
1220
+ 176,
1221
+ 103,
1222
+ 821,
1223
+ 146
1224
+ ],
1225
+ "page_idx": 10
1226
+ },
1227
+ {
1228
+ "type": "text",
1229
+ "text": "Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. arXiv preprint arXiv:1708.02596, 2017. ",
1230
+ "bbox": [
1231
+ 174,
1232
+ 159,
1233
+ 825,
1234
+ 202
1235
+ ],
1236
+ "page_idx": 10
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "Derrick H Nguyen and Bernard Widrow. Neural networks for self-learning control systems. IEEE Control systems magazine, 10(3):18–23, 1990. ",
1241
+ "bbox": [
1242
+ 171,
1243
+ 215,
1244
+ 823,
1245
+ 244
1246
+ ],
1247
+ "page_idx": 10
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "Ronald Parr, Lihong Li, Gavin Taylor, Christopher Painter-Wakefield, and Michael L Littman. An analysis of linear models, linear value-function approximation, and feature selection for reinforcement learning. In International Conference on Machine learning, 2008. ",
1252
+ "bbox": [
1253
+ 174,
1254
+ 257,
1255
+ 825,
1256
+ 300
1257
+ ],
1258
+ "page_idx": 10
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "Martin Riedmiller. Neural fitted q iteration-first experiences with a data efficient neural reinforcement learning method. In ECML, volume 3720, pp. 317–328. Springer, 2005. ",
1263
+ "bbox": [
1264
+ 174,
1265
+ 313,
1266
+ 823,
1267
+ 342
1268
+ ],
1269
+ "page_idx": 10
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In Proceedings of the 32nd International Conference on Machine Learning, pp. 1312–1320, 2015. ",
1274
+ "bbox": [
1275
+ 174,
1276
+ 354,
1277
+ 825,
1278
+ 397
1279
+ ],
1280
+ "page_idx": 10
1281
+ },
1282
+ {
1283
+ "type": "text",
1284
+ "text": "David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. ",
1285
+ "bbox": [
1286
+ 174,
1287
+ 411,
1288
+ 825,
1289
+ 454
1290
+ ],
1291
+ "page_idx": 10
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "text": "David Silver, Hado van Hasselt, Matteo Hessel, Tom Schaul, Arthur Guez, Tim Harley, Gabriel Dulac-Arnold, David Reichert, Neil Rabinowitz, Andre Barreto, et al. The predictron: End-toend learning and planning. International Conference on Machine Learning, 2017. ",
1296
+ "bbox": [
1297
+ 176,
1298
+ 467,
1299
+ 823,
1300
+ 511
1301
+ ],
1302
+ "page_idx": 10
1303
+ },
1304
+ {
1305
+ "type": "text",
1306
+ "text": "Richard S Sutton. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In Proceedings of the seventh international conference on machine learning, pp. 216–224, 1990. ",
1307
+ "bbox": [
1308
+ 173,
1309
+ 523,
1310
+ 825,
1311
+ 565
1312
+ ],
1313
+ "page_idx": 10
1314
+ },
1315
+ {
1316
+ "type": "text",
1317
+ "text": "Richard S Sutton, Joseph Modayil, Michael Delp, Thomas Degris, Patrick M Pilarski, Adam White, and Doina Precup. Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume 2, pp. 761–768. International Foundation for Autonomous Agents and Multiagent Systems, 2011. ",
1318
+ "bbox": [
1319
+ 174,
1320
+ 579,
1321
+ 825,
1322
+ 650
1323
+ ],
1324
+ "page_idx": 10
1325
+ },
1326
+ {
1327
+ "type": "text",
1328
+ "text": "Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012. ",
1329
+ "bbox": [
1330
+ 174,
1331
+ 662,
1332
+ 825,
1333
+ 705
1334
+ ],
1335
+ "page_idx": 10
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "Arun Venkatraman, Roberto Capobianco, Lerrel Pinto, Martial Hebert, Daniele Nardi, and J Andrew Bagnell. Improved learning of dynamics models for control. In International Symposium on Experimental Robotics, 2016. ",
1340
+ "bbox": [
1341
+ 174,
1342
+ 718,
1343
+ 825,
1344
+ 761
1345
+ ],
1346
+ "page_idx": 10
1347
+ },
1348
+ {
1349
+ "type": "text",
1350
+ "text": "Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992. ",
1351
+ "bbox": [
1352
+ 171,
1353
+ 773,
1354
+ 816,
1355
+ 790
1356
+ ],
1357
+ "page_idx": 10
1358
+ },
1359
+ {
1360
+ "type": "text",
1361
+ "text": "Tianhao Zhang, Gregory Kahn, Sergey Levine, and Pieter Abbeel. Learning deep control policies for autonomous aerial vehicles with mpc-guided policy search. In Robotics and Automation (ICRA), 2016 IEEE International Conference on, pp. 528–535. IEEE, 2016. ",
1362
+ "bbox": [
1363
+ 176,
1364
+ 803,
1365
+ 823,
1366
+ 845
1367
+ ],
1368
+ "page_idx": 10
1369
+ },
1370
+ {
1371
+ "type": "text",
1372
+ "text": "A EXPERIMENT DETAILS ",
1373
+ "text_level": 1,
1374
+ "bbox": [
1375
+ 176,
1376
+ 876,
1377
+ 400,
1378
+ 892
1379
+ ],
1380
+ "page_idx": 10
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "In this section, we detail the experimental setups used in our results. ",
1385
+ "bbox": [
1386
+ 173,
1387
+ 909,
1388
+ 619,
1389
+ 924
1390
+ ],
1391
+ "page_idx": 10
1392
+ },
1393
+ {
1394
+ "type": "image",
1395
+ "img_path": "images/002777a56a5b9aa1f987feb0c3977c5ea922b9a090915b53eed76ec32663c451.jpg",
1396
+ "image_caption": [
1397
+ "Figure 4: TDMs with different number of updates per step $I$ on ant target position task. The maximum distance was set to 5 rather than 6 for this experiment, so the numbers should be lower than the ones reported in the paper. "
1398
+ ],
1399
+ "image_footnote": [],
1400
+ "bbox": [
1401
+ 349,
1402
+ 122,
1403
+ 630,
1404
+ 286
1405
+ ],
1406
+ "page_idx": 11
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "A.1 GOAL STATE AND $\\tau$ SAMPLING STRATEGY",
1411
+ "text_level": 1,
1412
+ "bbox": [
1413
+ 176,
1414
+ 371,
1415
+ 513,
1416
+ 385
1417
+ ],
1418
+ "page_idx": 11
1419
+ },
1420
+ {
1421
+ "type": "text",
1422
+ "text": "While Q-learning is valid for any value of $s _ { g }$ and $\\tau$ for each transition tuple $\\left( { { s _ { t } } , { a _ { t } } , { s _ { t + 1 } } } \\right)$ , the way in which these values are sampled during training can affect learning efficiency. Some potential strategies for sampling $s _ { g }$ are: (1) uniformly sample future states along the actual trajectory in the buffer (i.e., for $s _ { t }$ , choose $s _ { g } ~ = ~ s _ { t + k }$ for a random $k > 0$ ) as in (Andrychowicz et al., 2017); (2) uniformly sample goal states from the replay buffer; (3) uniformly sample goals from a uniform range of valid states. We found that the first strategy performed slightly better than the others, though not by much. In our experiments, we use the first strategy. The horizon $\\tau$ is sampled uniformly at random between 0 and the maximum horizon $\\tau _ { \\mathrm { m a x } }$ . ",
1423
+ "bbox": [
1424
+ 174,
1425
+ 397,
1426
+ 825,
1427
+ 508
1428
+ ],
1429
+ "page_idx": 11
1430
+ },
1431
+ {
1432
+ "type": "text",
1433
+ "text": "A.2 MODEL-FREE SETUP ",
1434
+ "text_level": 1,
1435
+ "bbox": [
1436
+ 176,
1437
+ 526,
1438
+ 361,
1439
+ 540
1440
+ ],
1441
+ "page_idx": 11
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "text": "In all our experiments, we used DDPG (Lillicrap et al., 2015) as the base off-policy model-free RL algorithm for learning the TDMs $Q ( s , a , g , s _ { \\tau } )$ . Experience replay (Mnih et al., 2015) has size of 1 million transitions, and the soft target networks (Lillicrap et al., 2015) are used with a polyak averaging coefficient of 0.999 for DDPG and TDM and 0.95 for HER and DDPG-Sparse. For HER and DDPG-Sparse, we also added a penalty on the tanh pre-activation, as in Andrychowicz et al. (2017). Learning rates of the critic and the actor are chosen from $\\{ 1 { \\mathrm { e } } { - } 4 , 1 { \\mathrm { e } } { - } 3 \\}$ and $\\{ 1 { \\mathrm { e } } { - } 4 , 1 { \\mathrm { e } } { - } 3 \\}$ respectively. Adam (Kingma & Ba, 2014) is used as the base optimizer with default parameters except the learning rate. The batch size was 128. The policies and networks are parmaeterized with neural networks with ReLU hidden activation and two hidden layers of size 300 and 300. The policies have a tanh output activation, while the critic has no output activation (except for TDM, see A.5). For the TDM, the goal was concatenated to the observation. The planning horizon $\\tau$ is also concatenated as an observation and represented as a single integer. While we tried various representations for $\\tau$ such as one-hot encodings and binary-string encodings, we found that simply providing the integer was sufficient. ",
1446
+ "bbox": [
1447
+ 174,
1448
+ 553,
1449
+ 825,
1450
+ 747
1451
+ ],
1452
+ "page_idx": 11
1453
+ },
1454
+ {
1455
+ "type": "text",
1456
+ "text": "While any distance metric for the TDM reward function can be used, we chose L1 norm $- \\Vert s _ { t + 1 } -$ $s _ { g } \\| _ { 1 }$ to ensure that the scalar and vectorized TDMs are consistent. ",
1457
+ "bbox": [
1458
+ 176,
1459
+ 753,
1460
+ 820,
1461
+ 781
1462
+ ],
1463
+ "page_idx": 11
1464
+ },
1465
+ {
1466
+ "type": "text",
1467
+ "text": "A.3 MODEL-BASED SETUP ",
1468
+ "text_level": 1,
1469
+ "bbox": [
1470
+ 176,
1471
+ 800,
1472
+ 372,
1473
+ 814
1474
+ ],
1475
+ "page_idx": 11
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "For the model-based comparison, we trained a neural network dynamics model with ReLU activation, no output activation, and two hidden units of size 300 and 300. The model was trained to predict the difference in state, rather than the full state. The dynamics model is trained to minimize the mean squared error between the predicted difference and the actual difference. After each state is observed, we sample a minibatch of size 128 from the replay buffer (size 1 million) and perform one step of gradient descent on this mean squared error loss. Twenty rollouts were performed to compute the (per-dimension) mean and standard deviation of the states, actions, and state differences. ",
1480
+ "bbox": [
1481
+ 174,
1482
+ 825,
1483
+ 823,
1484
+ 922
1485
+ ],
1486
+ "page_idx": 11
1487
+ },
1488
+ {
1489
+ "type": "text",
1490
+ "text": "We used these statistics to normalize the states and actions before giving them to the model, and to normalize the state differences before computing the loss. For MPC, we simulated 512 random action sequences of length 15 through the learned dynamics model and chose the first action of the sequence with the highest reward. ",
1491
+ "bbox": [
1492
+ 174,
1493
+ 103,
1494
+ 825,
1495
+ 160
1496
+ ],
1497
+ "page_idx": 12
1498
+ },
1499
+ {
1500
+ "type": "text",
1501
+ "text": "A.4 TUNED HYPERPARAMETERS ",
1502
+ "text_level": 1,
1503
+ "bbox": [
1504
+ 176,
1505
+ 176,
1506
+ 415,
1507
+ 190
1508
+ ],
1509
+ "page_idx": 12
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "For TDMs, we found the most important hyperparameters to be the reward scale, $\\tau _ { \\mathrm { m a x } }$ , and the number of updates per observations, $I$ . As shown in Figure 4, TDMs can greatly benefit from larger values of $I$ , though eventually there are diminishing returns and potentially negative impact, mostly likely due to over-fitting. We found that the baselines did not benefit, except for HER which did benefit from larger $I$ values. For all the model-free algorithms (DDPG, DDPG-Sparse, HER, and TDMs), we performed a grid search over the reward scale in the range $\\{ 0 . 0 1 , 1 , 1 0 0 , 1 0 0 0 0 \\}$ and the number of updates per observations in the range $\\{ 1 , 5 , 1 0 \\}$ . For HER, we also tuned the weight given to the policy pre-tanh-activation $\\{ 0 , 0 . 0 1 , 1 \\}$ , which is described in Andrychowicz et al. (2017). For TDMs, we also tuned the best $\\tau _ { \\mathrm { m a x } }$ in the range $\\{ 1 5 , 2 5 , \\mathrm { H o r i z o n - 1 } \\}$ . For the half cheetah task, we performed extra searches over $\\tau _ { \\mathrm { m a x } }$ and found $\\tau _ { \\mathrm { m a x } } = 9$ to be effective. ",
1514
+ "bbox": [
1515
+ 174,
1516
+ 203,
1517
+ 825,
1518
+ 342
1519
+ ],
1520
+ "page_idx": 12
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "A.5 TDM NETWORK ARCHITECTURE AND VECTOR-BASED SUPERVISION ",
1525
+ "text_level": 1,
1526
+ "bbox": [
1527
+ 174,
1528
+ 358,
1529
+ 696,
1530
+ 373
1531
+ ],
1532
+ "page_idx": 12
1533
+ },
1534
+ {
1535
+ "type": "text",
1536
+ "text": "For TDMs, since we know that the true Q-function must learn to predict (negative) distances, we incorporate this prior knowledge into the Q-function by parameterizing it as $Q ( s , a , s _ { g } , \\tau ) =$ $- \\| f ( s , a , s _ { g } , \\tau ) - s _ { g } \\| _ { 1 }$ . Here, $f$ is a vector outputted by a feed-forward neural network and has the same dimension as the goal. This parameterization ensures that the Q-function outputs non-positive values, while encouraging the Q-function to learn what we call a goal-conditioned model: $f$ is encouraged to predict what state will be reached after $\\tau$ , when the policy is trying to reach goal $s _ { g }$ in $\\tau$ time steps. ",
1537
+ "bbox": [
1538
+ 174,
1539
+ 383,
1540
+ 825,
1541
+ 482
1542
+ ],
1543
+ "page_idx": 12
1544
+ },
1545
+ {
1546
+ "type": "text",
1547
+ "text": "For the $\\ell _ { 1 }$ norm, the scalar supervision regresses ",
1548
+ "bbox": [
1549
+ 174,
1550
+ 488,
1551
+ 493,
1552
+ 503
1553
+ ],
1554
+ "page_idx": 12
1555
+ },
1556
+ {
1557
+ "type": "equation",
1558
+ "img_path": "images/b671c54da832ec11acd97ae1ab3cd55efb2175930445169b284efa4de9c7349e.jpg",
1559
+ "text": "$$\nQ ( s _ { t } , a _ { t } , s _ { g } , \\tau ) = - \\sum _ { j } | f _ { j } ( s _ { t } , a _ { t } , s _ { g } , \\tau ) - s _ { g , j } |\n$$",
1560
+ "text_format": "latex",
1561
+ "bbox": [
1562
+ 338,
1563
+ 508,
1564
+ 660,
1565
+ 545
1566
+ ],
1567
+ "page_idx": 12
1568
+ },
1569
+ {
1570
+ "type": "text",
1571
+ "text": "onto ",
1572
+ "bbox": [
1573
+ 173,
1574
+ 550,
1575
+ 207,
1576
+ 563
1577
+ ],
1578
+ "page_idx": 12
1579
+ },
1580
+ {
1581
+ "type": "equation",
1582
+ "img_path": "images/45346aa816a1a31fb5e4b73f7b963682e11cbba065e3f1e033c1c667530fbe60.jpg",
1583
+ "text": "$$\n\\begin{array} { r l r } & { } & { r ( s _ { t } , a _ { t } , s _ { t + 1 } , s _ { g } ) + \\mathbb { 1 } [ \\tau = 0 ] + Q ( s _ { t + 1 } , a ^ { * } , s _ { g } , \\tau - 1 ) \\mathbb { 1 } [ \\tau \\neq 0 ] } \\\\ & { } & { \\quad = - \\displaystyle \\sum _ { j } \\{ | s _ { t + 1 , j } - s _ { g , j } | \\mathbb { 1 } [ \\tau = 0 ] + | f _ { j } ( s _ { t } , a ^ { * } , s _ { g } , \\tau - 1 ) - s _ { g , j } | \\mathbb { 1 } [ \\tau \\neq 0 ] \\} } \\end{array}\n$$",
1584
+ "text_format": "latex",
1585
+ "bbox": [
1586
+ 250,
1587
+ 568,
1588
+ 746,
1589
+ 625
1590
+ ],
1591
+ "page_idx": 12
1592
+ },
1593
+ {
1594
+ "type": "text",
1595
+ "text": "where $a ^ { * } \\ = \\ \\operatorname { a r g m a x } _ { a } Q ( s _ { t + 1 } , a , s _ { g } , \\tau - 1 )$ . The vectorized supervision instead supervises each components of $f$ , so that ",
1596
+ "bbox": [
1597
+ 169,
1598
+ 628,
1599
+ 825,
1600
+ 657
1601
+ ],
1602
+ "page_idx": 12
1603
+ },
1604
+ {
1605
+ "type": "equation",
1606
+ "img_path": "images/b62edeb4c09bc4274e2b7653db1fc30dd49b56519423997adb63b3e9c0408745.jpg",
1607
+ "text": "$$\n\\left| f _ { j } ( s _ { t } , a _ { t } , s _ { g } , \\tau ) - s _ { g , j } \\right|\n$$",
1608
+ "text_format": "latex",
1609
+ "bbox": [
1610
+ 418,
1611
+ 655,
1612
+ 578,
1613
+ 674
1614
+ ],
1615
+ "page_idx": 12
1616
+ },
1617
+ {
1618
+ "type": "text",
1619
+ "text": "regresses onto ",
1620
+ "bbox": [
1621
+ 173,
1622
+ 678,
1623
+ 269,
1624
+ 690
1625
+ ],
1626
+ "page_idx": 12
1627
+ },
1628
+ {
1629
+ "type": "equation",
1630
+ "img_path": "images/9364e98ce0bd337e31fe06b387fa92fc7a1fa64375b8c828c1743ae6bd03a93e.jpg",
1631
+ "text": "$$\n| s _ { t + 1 , j } - s _ { g , j } | \\mathbb { 1 } [ \\tau = 0 ] + | f _ { j } ( s _ { t } , a ^ { * } , s _ { g } , \\tau - 1 ) - s _ { g , j } | \\mathbb { 1 } [ \\tau \\neq 0 ]\n$$",
1632
+ "text_format": "latex",
1633
+ "bbox": [
1634
+ 289,
1635
+ 696,
1636
+ 709,
1637
+ 714
1638
+ ],
1639
+ "page_idx": 12
1640
+ },
1641
+ {
1642
+ "type": "text",
1643
+ "text": "for each dimension $j$ of the state. ",
1644
+ "bbox": [
1645
+ 174,
1646
+ 719,
1647
+ 392,
1648
+ 734
1649
+ ],
1650
+ "page_idx": 12
1651
+ },
1652
+ {
1653
+ "type": "text",
1654
+ "text": "A.6 TASK AND REWARD DESCRIPTIONS ",
1655
+ "text_level": 1,
1656
+ "bbox": [
1657
+ 176,
1658
+ 751,
1659
+ 465,
1660
+ 765
1661
+ ],
1662
+ "page_idx": 12
1663
+ },
1664
+ {
1665
+ "type": "text",
1666
+ "text": "Benchmark tasks are designed on MuJoCo physics simulator (Todorov et al., 2012) and OpenAI Gym environments (Brockman et al., 2016). For the simulated reaching and pushing tasks, we use (8) and for the other tasks we use (9) for policy extraction. The horizon (length of episode) for the pusher and ant tasks are 50. The reaching tasks has a horizon of 100. The half-cheetah task has a horizon of 99. ",
1667
+ "bbox": [
1668
+ 174,
1669
+ 776,
1670
+ 825,
1671
+ 847
1672
+ ],
1673
+ "page_idx": 12
1674
+ },
1675
+ {
1676
+ "type": "text",
1677
+ "text": "7-DoF reacher.: The state consists of 7 joint angles, 7 joint angular velocities, and 3 XYZ observation of the tip of the arm, making it 17 dimensional. The action controls torques for each joint, totally 7 dimensional. The reward function during optimization control and for the model-free baseline is the negative Euclidean distance between the XYZ of the tip and the target XYZ. The targets are sampled randomly from all reachable locations of the arm at the beginning of each episode. ",
1678
+ "bbox": [
1679
+ 176,
1680
+ 853,
1681
+ 823,
1682
+ 924
1683
+ ],
1684
+ "page_idx": 12
1685
+ },
1686
+ {
1687
+ "type": "text",
1688
+ "text": "The robot model is taken from the striker and pusher environments in OpenAI Gym MuJoCo domains (Brockman et al., 2016) and has the same joint limits and physical parameters. ",
1689
+ "bbox": [
1690
+ 173,
1691
+ 103,
1692
+ 821,
1693
+ 132
1694
+ ],
1695
+ "page_idx": 13
1696
+ },
1697
+ {
1698
+ "type": "text",
1699
+ "text": "Many tasks can be solved by expressing a desired goal state or desired goal state components. For example, the 7-Dof reacher solves the task when the end effector XYZ component of its state is equal to the goal location, $( x ^ { * } , y ^ { * } , z ^ { * } )$ . One advantage of using a goal-conditioned model $f$ as in Equation (8) is that this desire can be accounted for directly: if we already know the desired values of some components in $s _ { t + T }$ , then wen can simply fix those components of $s _ { t + T }$ and optimize over the other dimensions. For example for the 7-Dof reacher, the optimization problem in Equation (8) needed to choose an action becomes ",
1700
+ "bbox": [
1701
+ 174,
1702
+ 138,
1703
+ 825,
1704
+ 236
1705
+ ],
1706
+ "page_idx": 13
1707
+ },
1708
+ {
1709
+ "type": "equation",
1710
+ "img_path": "images/5bd59e769eae9faaec493855c5ace4b7544b85e9d05bb4cea5210edc1c0d34c5.jpg",
1711
+ "text": "$$\na _ { t } = \\operatorname { a r g m a x } _ { a _ { t } , s _ { t + T } [ 0 : 1 4 ] } r _ { c } ( f ( s _ { t } , a _ { t } , s _ { t + T } [ 0 : 1 4 ] | [ x ^ { * } , y ^ { * } , z ^ { * } ] ) )\n$$",
1712
+ "text_format": "latex",
1713
+ "bbox": [
1714
+ 313,
1715
+ 242,
1716
+ 684,
1717
+ 271
1718
+ ],
1719
+ "page_idx": 13
1720
+ },
1721
+ {
1722
+ "type": "text",
1723
+ "text": "where $| |$ denotes concatenation; $s _ { t + T } [ 0 : 1 4 ]$ denotes that we only optimize over the first 14 dimensions (the joint angles and velocities), and we omit $\\boldsymbol { a } _ { t + T }$ since the reward is only a function of the state. Intuitively, this optimization chooses whatever goal joint angles and joint velocities make it easiest to reach $( x ^ { * } , y ^ { * } , z ^ { * } )$ . It then chooses the corresponding action to get to that goal state in $T$ time steps. We implement the optimization over $s [ 0 : 1 4 ]$ with stochastic optimization: sample 10,000 different vectors and choose the best value. Lastly, instead of optimizing over the actions, we use the policy trained in DDPG to choose the action, since the policy is already trained to choose an action with maximum Q-value for a given state, goal state, and planning horizon. We found this optimization scheme to be reliable, but any optimizer can be used to solve Equation (8),(7), or (6). ",
1724
+ "bbox": [
1725
+ 174,
1726
+ 277,
1727
+ 825,
1728
+ 405
1729
+ ],
1730
+ "page_idx": 13
1731
+ },
1732
+ {
1733
+ "type": "text",
1734
+ "text": "Pusher: The state consists of 3 joint angles, 3 joint angular velocities, the XY location of the hand, and the XY location of the puck. The action controls torques for each of the 3 joints. The reward function is the negative Euclidean distance between the puck and the puck. Once the hand is near (with 0.1) of the puck, the reward is increased by 2 minus the Euclidean distance between the puck and the goal location. This reward function encourages the arm to reach the puck. Once the arm reaches the puck, bonus reward begins to have affect, and the arm is encouraged to bring the puck to the target. ",
1735
+ "bbox": [
1736
+ 173,
1737
+ 410,
1738
+ 825,
1739
+ 508
1740
+ ],
1741
+ "page_idx": 13
1742
+ },
1743
+ {
1744
+ "type": "text",
1745
+ "text": "As in the 7-DoF reacher, we set components of the goal state for the optimal control formulation. Specifically, we set the goal hand position to be the puck location. To copy the two-stage reward shaping used by our baselines, the goal XY location for the puck is initially its current location until the hand reaches the puck, at which point the goal position for the puck is the target location. There are no other state dimensions to optimize over, so the optimal control problem is trivial. ",
1746
+ "bbox": [
1747
+ 174,
1748
+ 515,
1749
+ 825,
1750
+ 585
1751
+ ],
1752
+ "page_idx": 13
1753
+ },
1754
+ {
1755
+ "type": "text",
1756
+ "text": "Half-Cheetah: The environment is the same as in Brockman et al. (2016). The only difference is that the reward is the \\`-1 norm between the velocity and desired velocity $v ^ { * }$ . Our optimal control formulation is again trivial since we set the goal velocity to be $v ^ { * }$ . The goal velocity for rollout was sampled uniformly in the range $[ - 6 , 6 ]$ . We found that the resulting TDM policy tends to “jump” at the last time step, which is the type of behavior we would expect to come out of this finite-horizon formulation but not of the infinite-time horizon of standard model-free deep RL techniques. ",
1757
+ "bbox": [
1758
+ 173,
1759
+ 592,
1760
+ 825,
1761
+ 676
1762
+ ],
1763
+ "page_idx": 13
1764
+ },
1765
+ {
1766
+ "type": "text",
1767
+ "text": "Ant: The environment is the same as in Brockman et al. (2016), except that we lowered the gear ratio to 30 for all joints. We found that this prevents the ant from flipping over frequently during the initially phase of training, allowing us to run all the experiments faster. The reward is the $\\ell { - } 1$ norm between the actual and desired xy-position and xy-velocity (for the position and velocity task) of the torso center of mass. For the target-position task, the target position was any position within a 6-by-6 square. For the target-position-and-velocity task, the target position was any position within a 1-by1 square and any velocity within a 0.05-by-0.05 velocity-box. When computing the distance for the position-and-velocity task, the velocity distance was weighted by 0.9 and the position distance was weighted by 0.1. ",
1768
+ "bbox": [
1769
+ 173,
1770
+ 681,
1771
+ 825,
1772
+ 808
1773
+ ],
1774
+ "page_idx": 13
1775
+ },
1776
+ {
1777
+ "type": "text",
1778
+ "text": "Sawyer Robot: The state and action spaces are the same as in the 7-DoF simulated robot except that we also included the measured torques as part of the state space since these can different from the applied torques. The reward function used is also the $\\ell _ { 1 }$ norm to the desired XYZ position. ",
1779
+ "bbox": [
1780
+ 173,
1781
+ 814,
1782
+ 823,
1783
+ 857
1784
+ ],
1785
+ "page_idx": 13
1786
+ }
1787
+ ]
parse/train/Skw0n-W0Z/Skw0n-W0Z_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skw0n-W0Z/Skw0n-W0Z_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/YqYt54gU-XV/YqYt54gU-XV.md ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DiBS: Differentiable Bayesian Structure Learning
2
+
3
+ Lars Lorch ETH Zurich Zurich, Switzerland lars.lorch@inf.ethz.ch
4
+
5
+ Jonas Rothfuss ETH Zurich Zurich, Switzerland jonas.rothfuss@inf.ethz.ch
6
+
7
+ Bernhard Schölkopf
8
+ MPI for Intelligent Systems
9
+ Tübingen, Germany
10
+ bs@tuebingen.mpg.de
11
+
12
+ Andreas Krause ETH Zurich Zurich, Switzerland krausea@ethz.ch
13
+
14
+ # Abstract
15
+
16
+ Bayesian structure learning allows inferring Bayesian network structure from data while reasoning about the epistemic uncertainty—a key element towards enabling active causal discovery and designing interventions in real world systems. In this work, we propose a general, fully differentiable framework for Bayesian structure learning (DiBS) that operates in the continuous space of a latent probabilistic graph representation. Contrary to existing work, DiBS is agnostic to the form of the local conditional distributions and allows for joint posterior inference of both the graph structure and the conditional distribution parameters. This makes our formulation directly applicable to posterior inference of complex Bayesian network models, e.g., with nonlinear dependencies encoded by neural networks. Using DiBS, we devise an efficient, general purpose variational inference method for approximating distributions over structural models. In evaluations on simulated and real-world data, our method significantly outperforms related approaches to joint posterior inference.1
17
+
18
+ # 1 Introduction
19
+
20
+ Discovering the statistical and causal dependencies that underlie the variables of a data-generating system is of central scientific interest. Bayesian networks (BNs) [1] and structural equation models are commonly used for this purpose [2–5]. Structure learning, the task of learning a BN from observations of its variables, is well-studied, but computationally very challenging due to the combinatorially large number of candidate graphs and the constraint of graph acyclicity.
21
+
22
+ While structure learning methods arrive at a single plausible graph or its Markov equivalence class (MEC), e.g., [6–9], Bayesian structure learning aims to infer a full posterior distribution over BNs given the observations. A distribution over structures allows quantifying the epistemic uncertainty and the degree of confidence in any given BN model, e.g., when the amount of data is small. Most importantly, downstream tasks such as experimental design and active causal discovery rely on a posterior distribution over BNs to quantify the information gain from specific interventions and uncover the causal structure in a small number of experiments [10–15].
23
+
24
+ A key challenge in Bayesian structure learning is working with a posterior over BNs—a distribution over the joint space of (discrete) directed acyclic graphs and (continuous) conditional distribution parameters. Most of the practically viable approaches to Bayesian structure learning revolve around
25
+
26
+ Markov chain Monte Carlo (MCMC) sampling in combinatorial spaces and bootstrapping of classical score and constraint-based structure learning methods, e.g., in causal discovery [10–15]. However, these methods marginalize out the parameters and thus require a closed form for the marginal likelihood of the observations given the graph to remain tractable. This limits inference to simple and by now well-studied linear Gaussian and categorical BN models [16–18] and makes it difficult to infer more expressive BNs that, e.g., model nonlinear relationships among the variables. Due to the discrete nature of these approaches, recent advances in approximate inference and gradient-based optimization could not yet be translated into similar performance improvements in Bayesian structure learning.
27
+
28
+ In this work, we propose a novel, fully differentiable framework for Bayesian structure learning (DiBS) that operates in the continuous space of a latent probabilistic graph representation. Contrary to existing work, our formulation is agnostic to the distributional form of the BN and allows for inference of the joint posterior over both the conditional distribution parameters and the graph structure. This makes our approach directly applicable to more flexible BN models where neither the marginal likelihood nor the maximum likelihood parameter estimate have a closed form. We instantiate DiBS with the particle variational inference method of Liu and Wang [19] and present a general purpose method for approximate Bayesian structure learning. In our experiments on synthetic and real-world data, DiBS outperforms all alternative approaches to joint posterior inference of graphs and parameters and when modeling nonlinear interactions among the variables, often by a significant margin. This allows us to narrow down plausible causal graphs with greater precision and make better predictions under interventions—an important stepping stone towards active causal discovery.
29
+
30
+ # 2 Background
31
+
32
+ Bayesian networks A Bayesian network $( \mathbf { G } , \mathbf { \Theta } _ { \mathbf { \Theta } }$ models the joint density $p ( \mathbf { x } )$ of a set of $d$ variables $\mathbf { x } = x _ { 1 : d }$ using (1) a directed acyclic graph (DAG) $\mathbf { G }$ encoding the conditional independencies of $\mathbf { x }$ and (2) parameters $\Theta$ defining the local conditional distributions of each variable given its parents in the DAG. When modeling $p ( \mathbf { x } )$ using a BN, each variable is assumed to be independent of its non-descendants given its parents, thus allowing for a compact factorization of the joint $p ( \mathbf { x } | \mathbf { G } , \Theta )$ into a product of local conditional distributions for each variable and its parents in $\mathbf { G }$ .
33
+
34
+ Bayesian inference of BNs Given independent observations $\mathcal { D } = \{ \mathbf { x } ^ { ( 1 ) } , \ldots , \mathbf { x } ^ { ( N ) } \}$ , we consider the task of inferring a full posterior density over Bayesian networks that model the observations. Following Friedman and Koller [20], given a prior distribution over DAGs $p ( \mathbf G )$ and a prior over BN parameters $p ( \Theta | \mathbf G )$ , Bayes’ Theorem yields the joint and marginal posterior distributions
35
+
36
+ $$
37
+ \begin{array} { r } { p ( \mathbf { G } , \boldsymbol { \Theta } | \mathcal { D } ) \propto p ( \mathbf { G } ) p ( \boldsymbol { \Theta } | \mathbf { G } ) p ( \mathcal { D } | \mathbf { G } , \boldsymbol { \Theta } ) \ , } \\ { p ( \mathbf { G } | \mathcal { D } ) \propto p ( \mathbf { G } ) p ( \mathcal { D } | \mathbf { G } ) \qquad } \end{array}
38
+ $$
39
+
40
+ where $\begin{array} { r } { p ( \mathcal { D } \mid \mathbf { G } ) = \int p ( \Theta \mid \mathbf { G } ) p ( \mathcal { D } \mid \mathbf { G } , \Theta ) d \Theta } \end{array}$ is the marginal likelihood. Thus, $p ( \mathbf G | \mathcal D )$ in (2) is only tractable in special conjugate cases where the integral over $\Theta$ can be computed in closed form. The Bayesian formalism allows us to compute expectations of the form
41
+
42
+ $$
43
+ \begin{array} { r l } { \mathbb { E } _ { p ( \mathbf { G } , \boldsymbol { \Theta } \mid \mathcal { D } ) } \Big [ f ( \mathbf { G } , \boldsymbol { \Theta } ) \Big ] \qquad \mathrm { o r } \qquad \mathbb { E } _ { p ( \mathbf { G } \mid \mathcal { D } ) } \Big [ f ( \mathbf { G } ) \Big ] } \end{array}
44
+ $$
45
+
46
+ for any function $f$ of interest. For instance, to perform Bayesian model averaging, we would use $f ( \mathbf { G } , \boldsymbol { \Theta } ) = p ( \mathbf { x } \mid \mathbf { G } , \boldsymbol { \Theta } )$ or $f ( \mathbf { G } ) = p ( \mathbf { x } | \mathbf { G } )$ , respectively [21, 22]. In active learning of causal BN structures, a commonly used $f$ is the expected decrease in entropy of $\mathbf { G }$ after an intervention [10–12, 14, 15]. Inferring either posterior is computationally challenging because there are $\mathcal { O } ( d ! 2 ^ { ( \frac { d } { 2 } ) } )$ possible DAGs with $d$ nodes [23]. Thus, computing the normalization constant $p ( \mathcal { D } )$ is generally intractable.
47
+
48
+ Continuous characterization of acyclic graphs Orthogonal to the work on Bayesian inference, Zheng et al. [9] have recently proposed a differentiable characterization of acyclic graphs for structure learning. In this work, we adopt the formulation of $\mathrm { Y u }$ et al. [24], who show that a graph with adjacency matrix $\mathbf { G } \in \{ 0 , 1 \} ^ { d \times \dot { d } }$ does not have any cycles if and only if $h ( \mathbf G ) = 0$ , where
49
+
50
+ $$
51
+ \begin{array} { r } { h ( \mathbf G ) : = \mathrm { t r } \left[ ( \mathbf I + \frac 1 d \mathbf G ) ^ { d } \right] - d . } \end{array}
52
+ $$
53
+
54
+ If $h ( \mathbf G ) > 0$ , the function can be interpreted as quantifying the cyclicity or non-DAG-ness of $\mathbf { G }$ . Follow-up work has leveraged this insight to model nonlinear relationships [24–27], time-series data [28], in the context of generative modeling [29, 30], for causal inference [31–33], and contributed to its theoretical understanding [34, 35]. So far, a connection to Bayesian structure learning has been missing.
55
+
56
+ # 3 Related Work
57
+
58
+ The existing literature on Bayesian Structure Learning predominantly focuses on inferring the marginal graph posterior $p ( \mathbf G | \mathcal D )$ . Since this requires $p ( \mathcal { D } | \mathbf { G } )$ to be tractable, inference is limited to BNs with linear Gaussian or Categorical conditional distributions [16–18]. By contrast, the formulation we introduce overcomes this fundamental restriction by allowing for joint inference of the graph and the parameters, thereby facilitating the active (causal) discovery of more expressive BNs.
59
+
60
+ MCMC Sampling from the posterior over graphs is the most general approach to approximate Bayesian structure learning. Structure MCMC $\mathrm { ( M C ^ { 3 } ) }$ [36, 37] performs Metropolis-Hastings in the space of DAGs by changing one edge at a time. Several works try to remedy its poor mixing behavior [38–40]. Alternatively, order MCMC draws samples in the smaller but still exponential space of node orders, which typically requires a hard limit on the maximum parent set size [20]. Attempts to correct for its unintended structural bias are themselves NP-hard to compute and/or limit the parent size [38, 41]. By performing variational inference in a continuous latent space, the method we propose circumvents such mixing issues and parent size limitations.
61
+
62
+ Bootstrapping The nonparametric DAG bootstrap [42] performs model averaging by bootstrapping $\mathcal { D }$ , where each resampled data set is used to learn a single graph, e.g., using the GES or PC algorithms [6, 7]. The obtained set of DAGs approximates the posterior by weighting each unique graph by its unnormalized posterior probability. In simple cases, a closed-form maximum likelihood parameter estimate may be used to approximate the joint posterior [14], but only if $p ( \mathcal { D } | \mathbf { G } )$ is tractable in the first place.
63
+
64
+ Exact methods A few notable exceptions use dynamic programming to achieve exact marginal inference in time $O ( d 2 ^ { d } )$ , which is only feasible for $d \leq 2 0$ nodes [43, 44]. In special cases, e.g., for tree structures or known node orderings, exact inference can be performed more efficiently [45, 46].
65
+
66
+ # 4 A Fully Differentiable Framework for Bayesian Structure Learning
67
+
68
+ # 4.1 General Approach
69
+
70
+ With the goal of moving beyond the restrictive conjugate setups required by most discrete sampling methods for Bayesian structure learning, we propose to transfer the posterior inference task into the latent space of a probabilistic graph representation. Our resulting framework is consistent with the original Bayesian structure learning task in (3), enforces the acyclicity of $\mathbf { G }$ via the latent space prior, and provides the score of the continuous latent posterior, thus making general purpose inference methods applicable off-the-shelf.
71
+
72
+ Without loss of generality, we assume that there exists a latent variable $\mathbf { Z }$ that models the generative process of $\mathbf { G }$ . Specifically, the default generative model described in Section 2 is generalized into the following factorization:
73
+
74
+ ![](images/22f86599c4cb97550be1c25b13c5cc8a54cae0c330d332c51900408f1f6ab749.jpg)
75
+ Figure 1: Generative model of BNs with latent variable $\mathbf { Z }$ This formulation generalizes the standard Bayesian setup in (1) where only $\mathbf { G }$ , $\Theta$ , and $\mathbf { x }$ are modeled explicitly.
76
+
77
+ $$
78
+ p ( \mathbf { Z } , \mathbf { G } , \boldsymbol { \Theta } , \mathcal { D } ) = p ( \mathbf { Z } ) p ( \mathbf { G } \mid \mathbf { Z } ) p ( \boldsymbol { \Theta } \mid \mathbf { G } ) p ( \mathcal { D } \mid \mathbf { G } , \boldsymbol { \Theta } )
79
+ $$
80
+
81
+ Figure 1 displays the corresponding graphical model. The following insight provides us with an equivalence between the expectation we ultimately want to approximate and an expectation over the posterior of the continuous variable $\mathbf { Z }$ :
82
+
83
+ Proposition 1 (Latent posterior expectation). Under the generative model in (5), it holds that
84
+
85
+ $$
86
+ \begin{array} { r l } & { \mathbb { E } _ { p ( { \mathbf G } \mid \mathcal { D } ) } \Big [ f ( { \mathbf G } ) \Big ] \ = \ \mathbb { E } _ { p ( { \mathbf G } \mid \mathcal { D } ) } \Bigg [ \frac { \mathbb { E } _ { p ( { \mathbf G } \mid { \mathbf Z } ) } \big [ f ( { \mathbf G } ) p ( \mathcal { D } \mid { \mathbf G } ) \big ] } { \mathbb { E } _ { p ( { \mathbf G } \mid { \mathbf Z } ) } \big [ p ( \mathcal { D } \mid { \mathbf G } ) \big ] } \Bigg ] \ , a n d } \\ & { \mathbb { E } _ { p ( { \mathbf G } , { \boldsymbol \Theta } \mid \mathcal { D } ) } \Big [ f ( { \mathbf G } , { \boldsymbol \Theta } ) \Big ] \ = \ \mathbb { E } _ { p ( { \mathbf Z } , { \boldsymbol \Theta } \mid \mathcal { D } ) } \Bigg [ \frac { \mathbb { E } _ { p ( { \mathbf G } \mid { \mathbf Z } ) } \big [ f ( { \mathbf G } , { \boldsymbol \Theta } ) p ( { \boldsymbol \Theta } \mid { \mathbf G } ) p ( \mathcal { D } \mid { \mathbf G } , { \boldsymbol \Theta } ) \big ] } { \mathbb { E } _ { p ( { \mathbf G } \mid { \mathbf Z } ) } \big [ p ( { \boldsymbol \Theta } \mid { \mathbf G } ) p ( \mathcal { D } \mid { \mathbf G } , { \boldsymbol \Theta } ) \big ] } \Bigg ] \ . } \end{array}
87
+ $$
88
+
89
+ A proof is provided in Appendix A.1. Rather than approximating $p ( \mathbf G | \mathcal D )$ or $p ( \mathbf { G } , \boldsymbol { \Theta } | \mathcal { D } )$ , our goal will be to infer $p ( \mathbf { Z } | \bar { \mathcal { D } } )$ or $p ( \mathbf { Z } , \boldsymbol { \Theta } | \mathcal { D } )$ instead, which by Proposition 1 allows us to compute
90
+
91
+ expectations of the form in (3). In the following, we first discuss how to define the two factors $p ( \mathbf { \bar { G } } | \mathbf { Z } )$ and $p ( \mathbf { Z } )$ in a way that models only directed acyclic graphs. Then, we provide the details necessary to perform black box inference of the posteriors of the continuous latent variable $\mathbf { Z }$ .
92
+
93
+ # 4.2 Representing DAGs in a Continuous Latent Space
94
+
95
+ Generative model of directed graphs We define the latent variable $\mathbf { Z }$ as consisting of two embedding matrices U $\boldsymbol { \mathrm { I } } , \boldsymbol { \mathbf { V } } \in \mathbb { R } ^ { k \times \smile }$ , i.e., $\mathbf { Z } = [ \mathbf { U } , \mathbf { V } ]$ . Building on Kipf and Welling [47], we propose to use a bilinear generative model for the adjacency matrix $\mathbf { G } \in \{ 0 , 1 \} ^ { d \times d }$ of directed graphs using the inner product between the latent variables in $\mathbf { Z }$ :
96
+
97
+ $$
98
+ p _ { \alpha } ( \mathbf { G } \mid \mathbf { Z } ) = \prod _ { i = 1 } ^ { d } \prod _ { j \neq i } ^ { d } p _ { \alpha } ( g _ { i j } \mid \mathbf { u } _ { i } , \mathbf { v } _ { j } ) \quad { \mathrm { w i t h } } \quad p _ { \alpha } ( g _ { i j } = 1 \mid \mathbf { u } _ { i } , \mathbf { v } _ { j } ) = \sigma _ { \alpha } ( \mathbf { u } _ { i } ^ { \top } \mathbf { v } _ { j } )
99
+ $$
100
+
101
+ where $\sigma _ { \alpha } ( x ) = 1 / ( 1 + \exp ( - \alpha x ) )$ denotes the sigmoid function with inverse temperature $\alpha$ . We denote the corresponding matrix of edge probabilities in $\mathbf { G }$ given $\mathbf { Z }$ by $\mathbf { G } _ { \alpha } ( \mathbf { Z } ) \in [ 0 , 1 ] ^ { d \times d }$ with
102
+
103
+ $$
104
+ \mathbf { G } _ { \alpha } ( \mathbf { Z } ) _ { i j } : = p _ { \alpha } ( g _ { i j } = 1 | \mathbf { u } _ { i } , \mathbf { v } _ { j } ) .
105
+ $$
106
+
107
+ Since we model acyclic graphs, which do not contain self-loops, we set $p _ { \alpha } ( g _ { i i } = 1 | \mathbf { Z } ) : = 0$ . The latent dimensionality $k$ trades off the complexity of the variable interactions with tractability during inference. For $k \geq d$ , the matrix of edge probabilities ${ \bf G } _ { \alpha } ( { \bf Z } )$ is not constrained in rank, and the generative model in (6) can represent any adjacency matrix without self-loops. That said, the size of the latent representation $\mathbf { Z }$ only grows $O ( d \cdot k )$ and, in principle, $k$ can be chosen independently of $d$ . Note that the formulation in (6) models directed graphs since $\sigma _ { \alpha } ( \mathbf { u } _ { i } ^ { \top } \mathbf { v } _ { j } ) \neq \sigma _ { \alpha } ( \mathbf { u } _ { j } ^ { \top } \mathbf { v } _ { i } )$ . We can even interpret $\mathbf { u } _ { i }$ and $\mathbf { v } _ { i }$ as node embeddings that may encode more information than mere edge probabilities, e.g., for graph neural networks. The fact that $p _ { \alpha } ( \mathbf { G } \mid \mathbf { Z } )$ is invariant to orthogonal transformations of $\mathbf { U }$ and $\mathbf { V }$ is not an issue in practice.
108
+
109
+ Acyclicity via the latent prior distribution A major constraint in learning BNs is the acyclicity of $\mathbf { G }$ . With a latent graph model $p ( \mathbf G | \mathbf Z )$ in place, we design the prior $p ( \mathbf { Z } )$ to act as a soft constraint enforcing that only DAGs are modeled. Specifically, we define the prior of $\mathbf { Z }$ as the product of independent Gaussians with a Gibbs distribution that penalizes the expected cyclicity of $\mathbf { G }$ given $\mathbf { Z }$ :
110
+
111
+ $$
112
+ p _ { \beta } ( \mathbf { Z } ) \propto \exp \left( - \beta \operatorname { \mathbb { E } } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } \Bigl [ h ( \mathbf { G } ) \Bigr ] \right) \prod _ { i j } \mathcal { N } ( z _ { i j } ; 0 , \sigma _ { z } ^ { 2 } )
113
+ $$
114
+
115
+ Here, $h$ is the DAG constraint function given in (4) and $\beta$ is an inverse temperature parameter controlling how strongly the acyclicity is enforced. As $\beta \to \infty$ , the support of $p _ { \beta } ( \mathbf { Z } )$ reduces to all $\mathbf { Z }$ that only model valid DAGs. The Gaussian component ensures that the norm of $\mathbf { Z }$ is well-behaved. Traditional graph priors of the form $p ( \mathbf { G } ) \propto f ( \bar { \mathbf { G } } )$ that induce, e.g., sparsity of $\mathbf { G }$ , can be flexibly incorporated into $p _ { \beta } ( \mathbf { Z } )$ by means of an additional factor involving $f ( \mathbf { G } _ { \alpha } ( \mathbf { Z } ) )$ or $\mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } [ f ( \mathbf { G } ) ]$ . Unless highlighting a specific point, we omit writing the hyperparameters $\alpha$ and $\beta$ to simplify notation.
116
+
117
+ # 4.3 Estimators for Gradient-Based Bayesian Inference
118
+
119
+ The extended generative model in (5) not only allows us to incorporate the notoriously difficult acyclicity constraint into the Bayesian framework. By rephrasing the posteriors $p ( \mathbf G | \mathcal D )$ and $p ( \mathbf { \dot { G } } , \mathbf { \Theta } , \vert \mathbf { \mathcal { D } } )$ in terms of $p ( \mathbf { Z } | D )$ and $p ( \mathbf { Z } , \boldsymbol { \Theta } | D )$ , respectively, it also makes Bayesian structure learning amenable to variational inference techniques that operate in continuous space and rely on the gradient of the unnormalized log posterior, also known as the score. The following result provides us with the score of both latent posteriors. Detailed derivations can be found in Appendix A.2.
120
+
121
+ Proposition 2 (Latent posterior score). Under the generative graph model defined in (5), the gradient of the log posterior density of $\mathbf { Z }$ is given by
122
+
123
+ $$
124
+ ( a ) \qquad \nabla _ { \mathbf { Z } } \log p ( \mathbf { Z } | \mathcal { D } ) = \nabla _ { \mathbf { Z } } \log p ( \mathbf { Z } ) + \frac { \nabla _ { \mathbf { Z } } \mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } \left[ p ( \mathcal { D } \mid \mathbf { G } ) \right] } { \mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } \left[ p ( \mathcal { D } \mid \mathbf { G } ) \right] }
125
+ $$
126
+
127
+ which is relevant when the marginal likelihood $p ( \mathcal { D } | \mathbf { G } )$ can be computed efficiently. In the general case, when inferring the joint posterior of $\mathbf { Z }$ and $\Theta$ , the gradients of the log posterior are given by
128
+
129
+ $$
130
+ \nabla _ { \mathbf { Z } } \log p ( \mathbf { Z } , \boldsymbol { \Theta } | \mathcal { D } ) = \nabla _ { \mathbf { Z } } \log p ( \mathbf { Z } ) + \frac { \nabla _ { \mathbf { Z } } \mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } \left[ p ( \boldsymbol { \Theta } , \mathcal { D } \mid \mathbf { G } ) \right] } { \mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } \left[ p ( \boldsymbol { \Theta } , \mathcal { D } \mid \mathbf { G } ) \right] }
131
+ $$
132
+
133
+ $$
134
+ \quad ( c ) \qquad \nabla _ { \Theta } \log p ( \mathbf { Z } , \boldsymbol { \Theta } | \mathcal { D } ) = \frac { \mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } \bigl [ \nabla _ { \boldsymbol { \Theta } } p ( \boldsymbol { \Theta } , \mathcal { D } \mid \mathbf { G } ) \bigr ] } { \mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } \bigl [ p ( \boldsymbol { \Theta } , \mathcal { D } \mid \mathbf { G } ) \bigr ] }
135
+ $$
136
+
137
+ where $p ( \Theta , \mathcal { D } | \mathbf { G } ) = p ( \Theta | \mathbf { G } ) p ( \mathcal { D } | \mathbf { G } , \Theta )$ , which is efficient to compute by construction.
138
+
139
+ The expectations have tractable Monte Carlo approximations because sampling from $p ( \mathbf G | \mathbf Z )$ in (6) is simple and parallelizable. The gradient terms of the form $\nabla _ { \mathbf { Z } } \mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } [ \cdot ]$ , which also appear inside $\nabla _ { \mathbf { Z } } \log p ( \mathbf { Z } )$ , can be estimated using two different techniques, depending on the BN model inferred.
140
+
141
+ Differentiable (marginal) likelihood Using the Gumbel-softmax trick [48, 49], we can separate the randomness from $\mathbf { Z }$ when sampling from $\bar { p } ( \mathbf G \mid \mathbf Z )$ and obtain the following estimator:
142
+
143
+ $$
144
+ \nabla _ { \mathbf { Z } } \mathbb { E } _ { p ( \mathbf { G } \mid \mathbf { Z } ) } { \big [ } p ( { \mathcal { D } } \mid \mathbf { G } ) { \big ] } \approx \mathbb { E } _ { p ( \mathbf { L } ) } { \Big [ } \nabla _ { \mathbf { G } } p ( { \mathcal { D } } \mid \mathbf { G } ) { \big | } _ { \mathbf { G } = \mathbf { G } _ { \tau } ( \mathbf { L } , \mathbf { Z } ) } \cdot \nabla _ { \mathbf { Z } } \mathbf { G } _ { \tau } ( \mathbf { L } , \mathbf { Z } ) { \Big ] }
145
+ $$
146
+
147
+ where $\mathbf L \sim \mathrm { L o g i s t i c } ( 0 , 1 ) ^ { d \times d }$ i.i.d.. The matrix-valued function ${ \bf G } _ { \tau } ( \cdot )$ is defined elementwise as
148
+
149
+ $$
150
+ \mathbf { G } _ { \tau } ( \mathbf { L } , \mathbf { Z } ) _ { i j } : = \left\{ \begin{array} { l l } { \sigma _ { \tau } \left( l _ { i j } + \alpha \mathbf { u } _ { i } ^ { \top } \mathbf { v } _ { j } \right) } & { \mathrm { i f } i \neq j } \\ { 0 } & { \mathrm { i f } i = j } \end{array} \right.
151
+ $$
152
+
153
+ The estimator applies equally to $p ( \Theta , \mathcal { D } | \mathbf { G } )$ in place of $p ( \mathcal { D } | \mathbf { G } )$ . For the estimator to be welldefined, $p ( \mathcal { D } | \bar { \mathbf { G } } )$ or $p ( \Theta , \mathcal { D } | \mathbf { G } )$ , respectively, needs to be differentiable with respect to $\mathbf { G }$ . More specifically, the gradient $\nabla _ { \mathbf G } p ( \mathcal { D } | \mathbf G )$ or $\nabla _ { \mathbf G } \dot { p } ( \mathcal D , \mathbf { \Theta } ) | \mathbf G )$ needs to be defined when $\mathbf { G }$ lies on the interior of $[ 0 , 1 ] ^ { d \times d }$ and not at its discrete endpoints. This depends on the parameterization of the BN model we want to infer. In case $p ( \mathcal { D } | \mathbf { G } )$ or $p ( \Theta , \mathcal { D } | \mathbf { G } )$ is only defined for discrete $\mathbf { G }$ , it is possible to evaluate $\nabla _ { \mathbf { G } } p ( \mathcal { D } | \mathbf { G } )$ or $\nabla _ { \mathbf G } p ( \Theta , \mathcal { D } | \mathbf G )$ using hard Gumbel-max samples of $\mathbf { G }$ (i.e., with $\tau = \infty$ ) and a straight-through gradient estimator. Since the DAG constraint $h$ is differentiable, the Gumbel-softmax trick can always be applied inside $\nabla _ { \mathbf { Z } } \log p ( \mathbf { Z } )$ . In practice, we always use $\tau = 1$ .
154
+
155
+ Non-differentiable (marginal) likelihood In general, $\nabla _ { \mathbf { G } } p ( \mathcal { D } | \mathbf { G } )$ or $\nabla _ { \mathbf G } p ( \mathcal D , \Theta | \mathbf G )$ depending on the inference task might be not available or ill-defined. In this setting, the score function estimator provides us with a way to estimate the gradient we need [50]:
156
+
157
+ $$
158
+ \nabla _ { \mathbf { Z } } \mathbb { E } _ { p \left( \mathbf { G } \mid \mathbf { Z } \right) } { \big [ } p ( { \mathcal { D } } \mid \mathbf { G } ) { \big ] } = \mathbb { E } _ { p \left( \mathbf { G } \mid \mathbf { Z } \right) } { \Big [ } { \big ( } p ( { \mathcal { D } } \mid \mathbf { G } ) - b { \big ) } \nabla _ { \mathbf { Z } } \log p ( \mathbf { G } \mid \mathbf { Z } ) { \Big ] }
159
+ $$
160
+
161
+ The estimator likewise applies for $p ( \Theta , \mathcal { D } | \mathbf { G } )$ in place of $p ( \mathcal { D } | \mathbf { G } )$ . Here, $b$ is a constant with respect to $\mathbf { G }$ that can be used for variance reduction [51], and $\nabla _ { \mathbf { Z } } \log { p ( \mathbf { G } \mid \mathbf { Z } ) }$ is trivial to compute. The derivations of both (12) and (14), alongside a more detailed discussion, can be found in Appendix $\mathrm { B }$ .
162
+
163
+ # 5 Particle Variational Inference for Structure Learning
164
+
165
+ In the previous section, we have proposed a differentiable formulation for Bayesian structure learning $( D i B S )$ that is agnostic to the form of the local BN conditionals and, more importantly, translates learning discrete graph structures into an inference problem over the continuous variable $\mathbf { Z }$ . In the following, we overcome the remaining challenge of inferring the intractable DiBS posteriors $p ( \mathbf { Z } \mid \mathcal { D } )$ and $p ( \mathbf { Z } , \boldsymbol { \Theta } | \mathcal { D } )$ by employing Stein variational gradient descent (SVGD) [19], a gradient-based and general purpose variational inference method. The resulting algorithm infers a particle approximation of the marginal or joint posterior density over BNs given observational data.
166
+
167
+ SVGD for posterior inference Since Proposition 2 provides us with the gradient of the latent posterior score functions, we can apply SVGD off-the-shelf. SVGD minimizes the KL divergence to a target distribution by iteratively transporting a set of particles using a sequence of kernel-based transformation steps. We provide a more detailed overview of SVGD in Appendix C. Following this paradigm for DiBS, we iteratively update a fixed set $\{ \mathbf { Z } ^ { ( m ) } \} _ { m = 1 } ^ { M }$ or $\{ \mathbf { Z } ^ { ( m ) } , \mathbf { \bar { \Theta } } ^ { ( m ) } \} _ { m = 1 } ^ { M }$ to approximate $p ( \mathbf { Z } \mid \mathcal { D } )$ or $p ( \mathbf { Z } , \boldsymbol { \Theta } | \mathcal { D } )$ , respectively. If the BN model we aim to infer has a properly-defined likelihood gradient with respect to $\mathbf { G }$ , we use the Gumbel-softmax estimator in (12) to approximate the posterior score. Otherwise, we resort to the score function estimator in (14). We use a simple kernel for SVGD:
168
+
169
+ $$
170
+ k \big ( ( \mathbf { Z } , \boldsymbol { \Theta } ) , ( \mathbf { Z } ^ { \prime } , \boldsymbol { \Theta } ^ { \prime } ) \big ) : = \exp \left( - \frac { 1 } { \gamma _ { z } } | | \mathbf { Z } - \mathbf { Z } ^ { \prime } | | _ { 2 } ^ { 2 } \right) + \exp \left( - \frac { 1 } { \gamma _ { \theta } } | | \boldsymbol { \Theta } - \boldsymbol { \Theta } ^ { \prime } | | _ { 2 } ^ { 2 } \right)
171
+ $$
172
+
173
+ with bandwidths $\gamma _ { z } , \gamma _ { \theta }$ . For inference of $p ( \mathbf { Z } | \mathcal { D } )$ , we leave out the second term involving $\Theta , \Theta ^ { \prime }$ . While $\mathbf { Z }$ is invariant to orthogonal transformations, more elaborate kernels that are, e.g., invariant to such transforms empirically perform worse in our experiments.
174
+
175
+ # Algorithm 1 DiBS with SVGD [19] for inference of $p ( \mathbf G | \mathcal D )$
176
+
177
+ <table><tr><td>Output: Set of discrete graph particles {G(m)}M</td><td>}M=1, kernel k,schedules for αt, βt,and stepsizes nt }m=1 approximating p(G |D)</td></tr><tr><td>1: Incorporate prior belief of p(G) into p(Z)</td><td> See Section 4.2</td></tr><tr><td>for iteration t=O to T-1 do</td><td></td></tr><tr><td>Estimate score Vz log p(Z|D) given in (9) for each Z(m)</td><td>&gt; See (12)and (14)</td></tr><tr><td>for particle m = 1 to M do</td><td></td></tr><tr><td>Z 5: ↑ +nt Φt(Z(m)</td><td> SVGD step</td></tr><tr><td>M 1</td><td></td></tr><tr><td>where 𝜙t(·) := M</td><td>[k(Z(),)Vz(c) logp(Z(k)|D)+Vz(c)k((Z(),)]</td></tr><tr><td>M</td><td></td></tr><tr><td>k=1</td><td></td></tr><tr><td>6: return{G(Z(m)}m=1</td><td></td></tr><tr><td></td><td> See (16)and (17)</td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>
178
+
179
+ Annealing $\alpha$ and $\beta$ The latent variable $\mathbf { Z }$ not only probabilistically models the graph $\mathbf { G }$ , but can also be viewed as a continuous relaxation of $\mathbf { G }$ , with $\alpha$ trading off smoothness with accuracy. As $\alpha \to \infty$ , the sigmoid $\sigma _ { \alpha } ( \cdot )$ converges to the unit step function. Hence, as $\alpha \to \infty$ in the graph model $p _ { \alpha } ( \mathbf { G } \mid \mathbf { Z } )$ in (6), the expectations in Proposition 1 simplify to:
180
+
181
+ $$
182
+ \begin{array} { r l } { \mathbb { E } _ { p ( \mathbf { G } \mid \mathcal { D } ) } \Big [ f ( \mathbf { G } ) \Big ] } & { \to \ \mathbb { E } _ { p ( \mathbf { Z } \mid \mathcal { D } ) } \Big [ f \big ( \mathbf { G } _ { \infty } ( \mathbf { Z } ) \big ) \Big ] } \\ { \mathbb { E } _ { p ( \mathbf { G } , \boldsymbol { \Theta } \mid \mathcal { D } ) } \Big [ f ( \mathbf { G } , \boldsymbol { \Theta } ) \Big ] } & { \to \ \mathbb { E } _ { p ( \mathbf { Z } , \boldsymbol { \Theta } \mid \mathcal { D } ) } \Big [ f \big ( \mathbf { G } _ { \infty } ( \mathbf { Z } ) , \boldsymbol { \Theta } \big ) \Big ] } \end{array}
183
+ $$
184
+
185
+ where ${ \bf G } _ { \infty } ( { \bf Z } )$ denotes the single limiting graph implied by $\mathbf { Z } = [ \mathbf { U } , \mathbf { V } ]$ and is defined as
186
+
187
+ $$
188
+ \mathbf { G } _ { \infty } ( \mathbf { Z } ) _ { i j } : = \left\{ { \begin{array} { l l } { 1 } & { { \mathrm { i f } } \mathbf { u } _ { i } ^ { \top } \mathbf { v } _ { j } > 0 { \mathrm { a n d } } i \neq j } \\ { 0 } & { { \mathrm { o t h e r w i s e } } } \end{array} } \right.
189
+ $$
190
+
191
+ See Appendix A.3. In this case, $p _ { \alpha } ( \mathbf { G } \mid \mathbf { Z } )$ converges to representing only a single graph. To be able to invoke this simplification, we anneal $\alpha \to \infty$ over the iterations of SVGD and, upon termination, convert the latent variables $\mathbf { Z }$ to the single discrete $\mathbf { G } _ { \infty } ( \mathbf { Z } )$ . Furthermore, we similarly let $\beta \to \infty$ in the latent prior $p _ { \beta } ( \mathbf { Z } )$ over the iterations to enforce that the latent representation of $\mathbf { G }$ only models DAGs. By Equation (16), the resulting DAGs form a consistent particle approximation of $p ( \mathbf G | \mathcal D )$ or $p ( \mathbf { G } , \boldsymbol { \Theta } | \mathcal { D } )$ , respectively. Algorithm 1 summarizes DiBS instantiated with SVGD for inference of $p ( \mathbf G | \mathcal D )$ . The general case of inferring $p ( \mathbf { G } , \boldsymbol { \Theta } | \mathcal { D } )$ is given in Algorithm 2 of Appendix D.
192
+
193
+ Single-particle approximation SVGD reduces to regular gradient ascent for the maximum a posteriori estimate when transporting only a single particle [19]. In this special case, DiBS with SVGD recovers some of the existing continuous structure learning methods: gradient ascent on a linear Gaussian likelihood solves an optimization problem similar to NOTEARS [9]. The cyclicity penalizer acts analogously. However, not only does DiBS automatically turn into a full Bayesian approach when using more particles, it is also not limited to settings such as linear Gaussian conditionals, where the adjacency matrix $\mathbf { G }$ and the parameters $\Theta$ can be modeled together by a weighted adjacency matrix.
194
+
195
+ Weighted particle mixture In high dimensional settings, it may be beneficial to move beyond a uniform weighting of the inferred particles of BN models to approximate $p ( \mathbf G | \mathcal D )$ or $p ( \mathbf { G } , \mathbf { \dot { \Theta } } | \mathbf { \mathcal { D } } )$ . We consider a particle mixture that weights each particle by its unnormalized posterior probability $p ( \mathbf G , \mathcal { D } )$ or $p ( \mathbf { G } , \boldsymbol { \Theta } , \mathcal { D } )$ , respectively, under the BN model. While we do not have a strong theoretical justification for the weighting, our motivation is that most of the particles in the empirical distribution will be unique as a consequence of the super-exponentially large space of DAGs, which may result in a crude approximation of their posterior probability mass function. In our experiments, DiBS and its instantiation with SVGD are used interchangeably, and $\mathrm { D i B S + }$ denotes the weighted particle mixture.
196
+
197
+ # 6 Evaluation on Synthetic Data
198
+
199
+ # 6.1 Experimental Setup
200
+
201
+ Synthetic data We compare DiBS to a set of related methods in marginal and joint posterior inference of synthetic linear and nonlinear Gaussian BNs. Our setup follows [9, 24, 27, 52], who consider inferring BNs with Erdos-Rényi and scale-free random structures [ ˝ 53, 54]. For each graph, here with $d \in \{ 2 0 , 5 0 \}$ nodes and $2 d$ edges in expectation, we sample a set of ground truth parameters and then generate training, held-out, and interventional data sets. In all settings, we use $N = 1 0 0$ observations for inference, emulating the use case of Bayesian structure learning where the uncertainty about the graph structure is significant.
202
+
203
+ ![](images/b37f9ce7c825188a2ff13da8521b0e678ea70d12c161d4c02914ea090380a07b.jpg)
204
+ Figure 2: Marginal posterior inference of 20-node linear Gaussian BNs using the BGe marginal likelihood. Higher scores on AUROC and lower scores on $\mathbb { E }$ -SHD, neg. MLL, neg. I-MLL are preferred. $\mathrm { D i B S + }$ performs competitively across all metrics, in particular $\mathbb { E }$ -SHD and neg. (I-)MLL.
205
+
206
+ Graph priors For Erdos-Rényi ˝ graphs, all methods use the prior $p ( \mathbf G ) \propto q ^ { \| \mathbf G \| _ { 1 } } ( 1 - q ) ^ { \binom { d } { 2 } - \| \mathbf G \| _ { 1 } }$ , capturing that each edge exists independently w.p. $q$ [53]. For scale-free graphs, we define the prior $p ( \mathbf { \bar { G } } ) \propto \mathbf { \breve { \prod } } _ { i = 1 } ^ { d } ( 1 + \lVert \mathbf { G } _ { i } ^ { \top } \rVert _ { 1 } ) ^ { - 3 }$ , analogous to their power law degree distribution $p ( \mathrm { d e g } ) \sim \mathrm { d e g } ^ { - 3 }$ [54]. Here, $\mathbf { G } _ { i } ^ { \top }$ is the $i$ -th column of the adjacency matrix. DiBS implements either prior by using the corresponding term above as an additional factor in $p ( \mathbf { Z } )$ with $\mathbf { G } : = \mathbf { G } _ { \alpha } ( \mathbf { Z } )$ (see Section 4.2).
207
+
208
+ Metrics Since neither density nor samples of the ground truth posteriors are available for BNs of $d \in \{ 2 0 , 5 0 \}$ variables, we follow the evaluation metrics used by previous work. We define the expected structural Hamming distance to the ground truth graph $\mathbf { G } ^ { \ast }$ under the inferred posterior as
209
+
210
+ $$
211
+ \operatorname { \mathbb { E } \mathrm { - } S H D } ( p , \mathbf { G } ^ { * } ) : = \sum _ { \mathbf { G } } p ( \mathbf { G } | \mathcal { D } ) \cdot \operatorname { S H D } ( \mathbf { G } , \mathbf { G } ^ { * } )
212
+ $$
213
+
214
+ where $\mathrm { S H D } ( \mathbf { G } , \mathbf { G } ^ { * } )$ counts the edge changes that separate the essential graphs representing the MECs of $\mathbf { G }$ and $\mathbf { G } ^ { \ast }$ [8, 55]. In addition, we follow Friedman and Koller [20] and Ellis and Wong [41] and compute the area under the receiver operating characteristic curve $( A U R O C )$ for pairwise edge predictions when varying the confidence threshold under the inferred marginal $p ( g _ { i j } = 1 | \mathcal { D } )$ . Finally, following Murphy [10], we also evaluate the ability to predict future observations by computing the average negative (marginal) log likelihood on 100 held-out observations Dtest:
215
+
216
+ $$
217
+ \mathrm { n e g . L L } ( p , \mathcal { D } ^ { \mathrm { t e s t } } ) : = - \sum _ { \mathbf { G } , \Theta } p ( \mathbf { G } , \Theta | \mathcal { D } ) \cdot \log p ( \mathcal { D } ^ { \mathrm { t e s t } } | \mathbf { G } , \Theta )
218
+ $$
219
+
220
+ When inferring $p ( \mathbf G | \mathcal D )$ , the corresponding neg. MLL metric instead uses $p ( \mathcal { D } ^ { \mathrm { t e s t } } | \mathbf { G } )$ . Analogously, we also compute the interventional log likelihoods I-LL and I-MLL, a relevant metric in causal inference [10, 12]. Here, an interventional data set $( \mathcal { D } ^ { \mathrm { i n t } } , \mathcal { T } )$ is instead used to compute $p ( \mathcal { D } ^ { \mathrm { i n t } } | \mathbf { G } , \Theta , \mathcal { T } )$ and $p ( \mathcal { D } ^ { \mathrm { i n t } } | \mathbf { G } , \mathcal { Z } )$ in (19), respectively. Scores are the average of 10 interventional data sets. All reported metrics in this section are aggregated for inference of 30 random synthetic BNs.
221
+
222
+ In the remainder, DiBS is always run for 3,000 iterations and with $k = d$ for inference of $d$ -variable BNs, which leaves the matrix of edge probabilities unconstrained in rank. We discard a DiBS particle in the rare case that a returned graph is cyclic. Complete details on Gaussian BNs, the evaluation metrics, hyperparameters, and all baselines can be found in Appendix E.
223
+
224
+ # 6.2 Linear Gaussian Bayesian Networks
225
+
226
+ Marginal posterior inference For linear Gaussian BNs, we first evaluate the classical setting of inferring the marginal posterior $p ( \mathbf G | \mathcal D )$ since $p ( \mathcal { D } | \mathbf { G } )$ can be computed in closed form. To this end, we employ the commonly used Bayesian Gaussian Equivalent (BGe) marginal likelihood, which scores Markov equivalent structures equally [16, 17]. The form of the BGe score requires DiBS to use the score function estimator in (14).
227
+
228
+ ![](images/4898b5662db47d5053e3fa9a5ccbe44d7c797951dce3078c59e3b8bd3bf3bec9.jpg)
229
+ Figure 3: Joint posterior inference of graphs and parameters of linear Gaussian networks with $d = 2 0$ nodes. $\mathrm { D i B S + }$ performs best across all of the metrics. ${ \mathrm { B G E S ^ { * } } }$ , the next-best alternative, yields substantially worse performance in E-SHD, i.e., in recovering the overall graph structure and MEC. Recall that higher AUROC and lower $\mathbb { E }$ -SHD, neg. LL, and neg. I-LL scores are preferable.
230
+
231
+ We compare DiBS with the nonparametric DAG bootstrap [42] using the constraint-based PC [7] and the score-based GES [6] algorithms (BPC and BGES). For MCMC, we only consider structure MCMC $( \mathbf { M C } ^ { 3 } )$ [37] as a comparison. Order MCMC or hybrid DP approaches bound the number of parents and thus often exclude the ground truth graph a priori, especially for scale-free BN structures. Burn-in and thinning for $\mathbf { M C ^ { 3 } }$ are chosen to make the wall time comparable with DiBS run on CPUs. In the remainder of the paper, each method uses 30 samples to approximate the posterior over BNs.
232
+
233
+ Figure 2 summarizes the results for 30 randomly generated BNs with $d = 2 0$ nodes. We find that $\mathrm { D i B S + }$ performs well compared to the other methods, all of which were specifically developed for the marginal inference scenario evaluated here. $\mathrm { D i B S + }$ appears to be preferable to DiBS.
234
+
235
+ Joint posterior inference When inferring the joint posterior $p ( \mathbf { G } , \boldsymbol { \Theta } | \mathcal { D } )$ , we can employ a more explicit representation of linear Gaussian BNs, where the conditional distribution parameters are standard Gaussian. Here, DiBS can leverage the Gumbel-softmax estimator in (12) because $p ( \mathbf { G } , \boldsymbol { \Theta } | \mathcal { D } )$ is well-defined when $\mathbf { G }$ lies on the interior of $[ 0 , 1 ] ^ { d \times d }$ (see Appendix E.1). To provide a comparison with DiBS in the absence of an applicable MCMC method, we propose two variants of $\mathbf { M C ^ { 3 } }$ as baselines. Metropolis-Hastings $\mathbf { M C ^ { 3 } }$ (M-MC3) jointly samples parameters and structures, and Metropolis-within-Gibbs $\mathbf { M C ^ { 3 } }$ $\mathrm { \bf { \bar { G } } { - } } \mathrm { \bf { M } } { \bf C } ^ { 3 } .$ ) alternates in proposing structure and parameters [56]. Moreover, we extend the bootstrap methods by taking the closed-form maximum likelihood estimate [57] as the posterior parameter sample for a given graph inferred using the BGe score $\mathrm { { \cdot { \bf { B } P C } ^ { * } } }$ and ${ \mathrm { B G E S } } ^ { * }$ ), an approach taken in, e.g., causal BN learning [14].
236
+
237
+ Figure 3 shows the results for $d = 2 0$ nodes, where $\mathbb { E }$ -SHD and AUROC are computed by empirically marginalizing out the parameters. We find that $\mathrm { D i B S + }$ is the only considered method that performs well across all of the metrics, often outperforming the baselines by a significant margin. As for marginal posterior inference of linear Gaussian BNs, $\mathrm { D i B S + }$ performs slightly better than DiBS.
238
+
239
+ # 6.3 Nonlinear Gaussian Bayesian Networks
240
+
241
+ We also consider joint inference of nonlinear Gaussian BNs where the mean of each local conditional Gaussian is parameterized by a 2-layer dense neural network with five hidden nodes and ReLU activation functions (see Appendix E.1). Since the marginal likelihood does not have a closed form, we are unable to use $\mathbf { B P C ^ { * } }$ and ${ \mathrm { B G E S ^ { * } } }$ as a means of comparison. Figure 4 displays the results for $d = 2 0$ variables, where a given BN model has $| \Theta | = 2 , 2 2 0$ weights and biases. Analogous to joint inference of linear Gaussian BNs, DiBS and $\mathrm { D i B S + }$ outperform the MCMC baselines across the considered metrics. To the best of our knowledge, this is the first time that such nonlinear Gaussian BN models have been inferred under the Bayesian paradigm, which opens up exciting avenues in the active learning of more sophisticated causal structures.
242
+
243
+ ![](images/a55f647b9a7cf43a5820df9205311c31547b9a1a7ead17fa584218e5a1d71834.jpg)
244
+ Figure 4: Joint posterior inference of nonlinear Gaussian BNs with $d = 2 0$ nodes. Here, the mean of the local conditional distribution of each node is parameterized by a 2-layer neural network with five hidden nodes. DiBS and $\mathrm { D i B S + }$ perform favorably across the board, particularly in the graph metrics.
245
+
246
+ Appendix F complements Sections 6.2 and 6.3 with details on computing time and efficient implementation of DiBS with SVGD, showing that GPU wall times of the above inference experiments lie on the order of seconds or only a few minutes. In addition, Appendix $\mathbf { G }$ provides results for $d = 5 0$ variables, where $\mathrm { D i B S + }$ likewise performs favorably when jointly inferring $p ( \mathbf { G } , \boldsymbol { \Theta } | \mathcal { D } )$ . For marginal posterior inference of $p ( \mathbf G | \mathcal D )$ under the BGe marginal likelihood, DiBS appears to require more Monte Carlo samples to compensate for the high variance of the score function estimator in this high-dimensional setting.
247
+
248
+ # 6.4 DiBS with SVGD: Additional Analyses and Ablation Studies
249
+
250
+ Having compared DiBS and its instantiation with SVGD to existing approaches, we finally devote Appendix $_ \mathrm { H }$ to empirically analyzing some properties of the algorithm. One of our key results is that, all other things held equal, substituting our inner product model in (6) with $p _ { \alpha } ( g _ { i j } = 1 | \mathbf { Z } ) = \sigma _ { \alpha } ( z _ { i j } )$ , where single scalars encode the edge probabilities, results in significantly worse evaluation metrics.
251
+
252
+ We additionally study the uncertainty quantification in (non)identifiable edge structures and show the effects of reducing the latent dimensionality $k$ or the number of iterations $T$ . Our findings suggest that reducing either hyperparameter still allows for competitive posterior approximations and enables trading off posterior inference quality with computational efficiency, e.g., in large-scale applications.
253
+
254
+ # 7 Application: Inferring Protein Signaling Networks From Cell Data
255
+
256
+ A widely used benchmark in structure learning is the proteomics data set by Sachs et al. [3]. The data contain $N = 7$ , 466 continuous measurements of $d = 1 1$ proteins involved in human immune system cells as well as an established causal network of their signaling interactions.
257
+
258
+ We infer both linear and nonlinear Gaussian BNs with Erdos-Rényi ˝ graph priors exactly as in Section 6. The AUROC results in Table 1 indicate that the posterior by DiBS under the BGe model provides the most calibrated edge confidence scores. Not penalizing model complexity as much, the marginal BGe posterior of DiBS $( \mathrm { D i B S + } )$ ) averages a high expected number of 39.0 (35.0) edges, compared to 12.7 (14.2) and 12.6 (14.2) for its joint posteriors over linear and nonlinear BNs, respectively. Appendix I provides further details and analyses on this matter. The $\mathbb { E }$ -SHD scores show that, among all the methods, DiBS is closest in structure to the consensus network when performing joint inference with nonlinear Gaussian BNs. This further highlights the need for nonlinear conditionals and joint inference of the graph and parameters in complex real-world settings.
259
+
260
+ Table 1: Inference of protein signaling pathways with Gaussian BNs. Metrics are the mean $\pm \thinspace \mathrm { S D }$ of 30 random restarts.
261
+
262
+ <table><tr><td>MC3</td><td>E-SHD</td><td>AUROC</td></tr><tr><td>BPC + BGES DiBS DiBS+</td><td>34.0± 0.7 25.5± 2.3 33.7 ±1.7 37.4 ± 0.5 34.7 ± 1.5</td><td>0.616± 0.027 0.566 ± 0.020 0.641 ± 0.030 0.647 ± 0.047 0.629 ± 0.045</td></tr><tr><td>8</td><td>M-MC3 G-MC³ DiBS DiBS+</td><td>37.3± 3.5 0.551 ± 0.078 30.5 ± 3.2 0.527 ± 0.067 23.4± 0.5 0.598 ± 0.052 22.9 ± 2.7 0.557 ± 0.052</td></tr><tr><td>T</td><td>M-MC3 25.2±3.0 G-MC3 35.1±3.2 DiBS 22.6 ± 0.5 DiBS+ 22.8 ±1.9</td><td>0.526± 0.084 0.540 ± 0.080 0.577 ± 0.039 0.535 ± 0.041</td></tr></table>
263
+
264
+ † Linear Gaussian BN; graph only via BGe marginal lik. § Linear Gaussian BN; graph and parameters jointly ¶Nonlinear Gaussian BN; graph and parameters jointly
265
+
266
+ # 8 Conclusion
267
+
268
+ We have presented a general, fully differentiable approach to inference of posterior distributions over BNs. Our framework is based on a continuous latent representation of DAGs, whose posterior can be equivalently inferred—without loss of generality and using existing black box inference methods. While we have used SVGD [19] for this purpose, our general approach could also be instantiated with, e.g., gradient-based sampling methods that rely on the score of the target density [58, 59]. This may improve upon the asymptotic runtime of DiBS with SVGD, which scales quadratically in the number of sampled particles. We expect that our end-to-end approach can be extended to handle missing and interventional data as well as to amortized contexts, where rich unstructured data is available.
269
+
270
+ Broader impact Our work is relevant to any scientific discipline that aims at inferring the (causal) structure of a system or reasoning about the effects of interventions. If algorithms and decisions are grounded in the structural understanding of a data-generating system and take into account the epistemic uncertainty, we expect them to be more robust and have fewer unforeseen side-effects. However, the assumptions allowing for a causal interpretation of DAGs, e.g., the absence of unmeasured confounders, are often untestable and to be taken with care [60], particularly in safety-critical and societally-sensitive applications. Hence, while potential misuse can never be ruled out, our presented method predominantly promises positive societal and scientific impact.
271
+
272
+ # Acknowledgments and Disclosure of Funding
273
+
274
+ This project received funding from the Swiss National Science Foundation under NCCR Automation under grant agreement 51NF40 180545, the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program grant agreement no. 815943, and was supported with compute resources by Oracle Cloud Services. This work was also supported by the German Federal Ministry of Education and Research (BMBF): Tübingen AI Center, FKZ: 01IS18039B, and by the Machine Learning Cluster of Excellence, EXC number 2064/1 – Project number 390727645. We thank Nicolo Ruggeri and Guillaume Wang for their valuable feedback.
275
+
276
+ # References
277
+
278
+ [1] Judea Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. 1988.
279
+ [2] Dana Pe’er, Aviv Regev, Gal Elidan, and Nir Friedman. Inferring subnetworks from perturbed expression profiles. Bioinformatics, 17:S215–S224, 2001.
280
+ [3] Karen Sachs, Omar Perez, Dana Pe’er, Douglas A Lauffenburger, and Garry P Nolan. Causal proteinsignaling networks derived from multiparameter single-cell data. Science, 308(5721):523–529, 2005.
281
+ [4] Chikako Van Koten and AR Gray. An application of bayesian network for predicting object-oriented software maintainability. Information and Software Technology, 48(1):59–67, 2006.
282
+ [5] Philippe Weber, Gabriela Medina-Oliva, Christophe Simon, and Benoît Iung. Overview on bayesian networks applications for dependability, risk analysis and maintenance areas. Engineering Applications of Artificial Intelligence, 25(4):671–682, 2012.
283
+ [6] David Maxwell Chickering. Optimal structure identification with greedy search. J. Mach. Learn. Res., 3: 507–554, March 2003.
284
+ [7] Peter Spirtes, Clark N. Glymour, and Richard Scheines. Causation, prediction, and search. Adaptive computation and machine learning. MIT Press, Cambridge, Mass, 2nd ed edition, 2000.
285
+ [8] Ioannis Tsamardinos, Laura E Brown, and Constantin F Aliferis. The max-min hill-climbing bayesian network structure learning algorithm. Machine learning, 65(1):31–78, 2006.
286
+ [9] Xun Zheng, Bryon Aragam, Pradeep K Ravikumar, and Eric P Xing. DAGs with NO TEARS: Continuous optimization for structure learning. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
287
+ [10] Kevin P Murphy. Active learning of causal bayes net structure. 2001.
288
+ [11] Simon Tong and Daphne Koller. Active learning for structure in bayesian networks. In International joint conference on artificial intelligence, volume 17, pages 863–869, 2001.
289
+ [12] Hyunghoon Cho, Bonnie Berger, and Jian Peng. Reconstructing causal biological networks through active learning. PloS one, 11(3):e0150611, 2016.
290
+ [13] Robert Osazuwa Ness, Karen Sachs, Parag Mallick, and Olga Vitek. A bayesian active learning experimental design for inferring signaling networks. In International Conference on Research in Computational Molecular Biology, pages 134–156. Springer, 2017.
291
+ [14] Raj Agrawal, Chandler Squires, Karren Yang, Karthikeyan Shanmugam, and Caroline Uhler. ABCDStrategy: Budgeted experimental design for targeted causal structure discovery. In Proceedings of Machine Learning Research, volume 89, pages 3400–3409. PMLR, 16–18 Apr 2019.
292
+ [15] Julius von Kügelgen, Paul K Rubenstein, Bernhard Schölkopf, and Adrian Weller. Optimal experimental design via bayesian optimization: active causal structure learning for gaussian process networks. arXiv preprint arXiv:1910.03962, 2019.
293
+ [16] Dan Geiger and David Heckerman. Learning gaussian networks. In Proceedings of the Tenth International Conference on Uncertainty in Artificial Intelligence, UAI’94, page 235–243, San Francisco, CA, USA, 1994.
294
+ [17] Dan Geiger and David Heckerman. Parameter priors for directed acyclic graphical models and the characterization of several probability distributions. Ann. Statist., 30(5):1412–1440, October 2002. Publisher: The Institute of Mathematical Statistics.
295
+ [18] David Heckerman, Dan Geiger, and David M. Chickering. Learning Bayesian Networks: The Combination of Knowledge and Statistical Data. Machine Learning, 20(3):197–243, September 1995.
296
+ [19] Qiang Liu and Dilin Wang. Stein variational gradient descent: A general purpose bayesian inference algorithm. In Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS’16, page 2378–2386, 2016.
297
+ [20] Nir Friedman and Daphne Koller. Being Bayesian About Network Structure. A Bayesian Approach to Structure Discovery in Bayesian Networks. Machine Learning, 50(1):95–125, January 2003.
298
+ [21] David Madigan and Adrian E Raftery. Model selection and accounting for model uncertainty in graphical models using occam’s window. Journal of the American Statistical Association, 89(428):1535–1546, 1994.
299
+ [22] David Madigan, Jonathan Gavrin, and Adrian E Raftery. Eliciting prior information to enhance the predictive performance of bayesian graphical models. Communications in Statistics-Theory and Methods, 24(9):2271–2292, 1995.
300
+ [23] R.W. Robinson. Counting labeled acyclic digraphs. New Directions in the Theory of Graphs, 1973.
301
+ [24] Yue Yu, Jie Chen, Tian Gao, and Mo Yu. DAG-GNN: DAG structure learning with graph neural networks. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 7154–7163. PMLR, 09–15 Jun 2019.
302
+ [25] Sébastien Lachapelle, Philippe Brouillard, Tristan Deleu, and Simon Lacoste-Julien. Gradient-based neural dag learning. In International Conference on Learning Representations, 2020.
303
+ [26] Ignavier Ng, Shengyu Zhu, Zhitang Chen, and Zhuangyan Fang. A graph autoencoder approach to causal structure learning. In NeurIPS 2019 Workshop “Do the right thing”: machine learning and causal inference for improved decision making, 2019.
304
+ [27] Xun Zheng, Chen Dan, Bryon Aragam, Pradeep Ravikumar, and Eric Xing. Learning sparse nonparametric dags. In International Conference on Artificial Intelligence and Statistics, pages 3414–3425. PMLR, 2020.
305
+ [28] Roxana Pamfil, Nisara Sriwattanaworachai, Shaan Desai, Philip Pilgerstorfer, Konstantinos Georgatzis, Paul Beaumont, and Bryon Aragam. Dynotears: Structure learning from time-series data. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, volume 108 of Proceedings of Machine Learning Research, pages 1595–1605. PMLR, 2020.
306
+ [29] Mengyue Yang, Furui Liu, Zhitang Chen, Xinwei Shen, Jianye Hao, and Jun Wang. Causalvae: Disentangled representation learning via neural structural causal models. arXiv preprint arXiv: 2004.08697, 2020.
307
+ [30] Muhan Zhang, Shali Jiang, Zhicheng Cui, Roman Garnett, and Yixin Chen. D-vae: A variational autoencoder for directed acyclic graphs. In Advances in Neural Information Processing Systems, volume 32, 2019.
308
+ [31] Nan Rosemary Ke, Olexa Bilaniuk, Anirudh Goyal, Stefan Bauer, Hugo Larochelle, Chris Pal, and Yoshua Bengio. Learning neural causal models from unknown interventions. arXiv preprint arXiv: 1910.01075, 2019.
309
+ [32] Ignavier Ng, Zhuangyan Fang, Shengyu Zhu, Zhitang Chen, and Jun Wang. Masked gradient-based causal structure learning. arXiv preprint arXiv:1910.08527, 2019.
310
+ [33] Philippe Brouillard, Sébastien Lachapelle, Alexandre Lacoste, Simon Lacoste-Julien, and Alexandre Drouin. Differentiable causal discovery from interventional data. arXiv preprint arXiv:2007.01754, 2020.
311
+ [34] Dennis Wei, Tian Gao, and Yue Yu. Dags with no fears: A closer look at continuous optimization for learning bayesian networks. Advances in Neural Information Processing Systems, 2020.
312
+ [35] Ignavier Ng, Sébastien Lachapelle, Nan Rosemary Ke, and Simon Lacoste-Julien. On the convergence of continuous constrained optimization for structure learning. arXiv preprint arXiv:2011.11150, 2020.
313
+ [36] David Madigan, Jeremy York, and Denis Allard. Bayesian graphical models for discrete data. International Statistical Review/Revue Internationale de Statistique, pages 215–232, 1995.
314
+ [37] Paolo Giudici and Robert Castelo. Improving markov chain monte carlo model search for data mining. Machine learning, 50(1-2):127–158, 2003.
315
+ [38] Daniel Eaton and Kevin Murphy. Bayesian structure learning using dynamic programming and MCMC. In Proceedings of the Twenty-Third Conference on Uncertainty in Artificial Intelligence (UAI), 2007.
316
+ [39] Marco Grzegorczyk and Dirk Husmeier. Improving the structure MCMC sampler for Bayesian networks by introducing a new edge reversal move. Machine Learning, 71(2):265, April 2008.
317
+ [40] Jack Kuipers and Giusi Moffa. Partition mcmc for inference on acyclic digraphs. Journal of the American Statistical Association, 112(517):282–299, 2017.
318
+ [41] Byron Ellis and Wing Hung Wong. Learning causal bayesian network structures from experimental data. Journal of the American Statistical Association, 103(482):778–789, 2008.
319
+ [42] N. Friedman, M. Goldszmidt, and A. J. Wyner. Data analysis with Bayesian networks: A bootstrap approach. In Proceedings of the Fifteenth Conference on Uncertainty in Artificial Intelligence, 1999.
320
+ [43] Mikko Koivisto and Kismat Sood. Exact bayesian structure discovery in bayesian networks. Journal of Machine Learning Research, 5(May):549–573, 2004.
321
+ [44] Mikko Koivisto. Advances in exact bayesian structure discovery in bayesian networks. In Proceedings of the Twenty-Second Conference on Uncertainty in Artificial Intelligence, page 241–248, 2006.
322
+ [45] Marina Meila and Tommi S Jaakkola. Tractable bayesian learning of tree belief networks. Statistics and Computing, (16):77–92, 2006.
323
+ [46] Denver Dash and Gregory F Cooper. Model averaging for prediction with discrete bayesian networks. Journal of Machine Learning Research, 5(Sep):1177–1203, 2004.
324
+ [47] Thomas N Kipf and Max Welling. Variational graph auto-encoders. arXiv preprint arXiv:1611.07308, 2016.
325
+ [48] Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In Proceedings International Conference on Learning Representations, 2017.
326
+ [49] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparametrization with gumbel-softmax. In Proceedings International Conference on Learning Representations 2017, April 2017.
327
+ [50] Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
328
+ [51] Shakir Mohamed, Mihaela Rosca, Michael Figurnov, and Andriy Mnih. Monte carlo gradient estimation in machine learning. Journal of Machine Learning Research, 21(132):1–62, 2020.
329
+ [52] Ignavier Ng, AmirEmad Ghassami, and Kun Zhang. On the role of sparsity and dag constraints for learning linear dags. Advances in Neural Information Processing Systems, 2020.
330
+ [53] P. Erdos and A Rényi. On random graphs. ˝ Publicationes Mathematicae, 6:290–297, 1959.
331
+ [54] Albert-László Barabási and Réka Albert. Emergence of scaling in random networks. Science, 286(5439): 509–512, 1999.
332
+ [55] Steen A Andersson, David Madigan, Michael D Perlman, et al. A characterization of markov equivalence classes for acyclic digraphs. Annals of statistics, 25(2):505–541, 1997.
333
+ [56] W Keith Hastings. Monte carlo sampling methods using markov chains and their applications. 1970.
334
+ [57] Alain Hauser and Peter Bühlmann. Jointly interventional and observational data: estimation of interventional markov equivalence classes of directed acyclic graphs. Journal of the Royal Statistical Society: Series B: Statistical Methodology, pages 291–318, 2015.
335
+ [58] Radford M Neal et al. Mcmc using hamiltonian dynamics. Handbook of Markov chain Monte Carlo, 2 (11):2, 2011.
336
+ [59] Max Welling and Yee Whye Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th International Conference on International Conference on Machine Learning, ICML’11, page 681–688, 2011.
337
+ [60] A. Philip Dawid. Beware of the DAG! In Proceedings of Workshop on Causality: Objectives and Assessment at NIPS 2008, pages 59–86, 2010.
338
+ [61] Jonas Peters and Peter Bühlmann. Identifiability of gaussian structural equation models with equal error variances. Biometrika, 101(1):219–228, 2014.
339
+ [62] Jack Kuipers, Giusi Moffa, and David Heckerman. Addendum on the scoring of Gaussian directed acyclic graphical models. Ann. Statist., 42(4):1689–1691, August 2014. Publisher: The Institute of Mathematical Statistics.
340
+ [63] Diviyan Kalainathan, Olivier Goudet, Isabelle Guyon, David Lopez-Paz, and Michèle Sebag. Structural agnostic modeling: Adversarial learning of causal graphs. arXiv preprint arXiv:1803.04929, 2018.
341
+ [64] Chris Sherlock, Paul Fearnhead, Gareth O Roberts, et al. The random walk metropolis: linking theory and practice through a case study. Statistical Science, 25(2):172–190, 2010.
342
+ [65] Dorit Dor and Michael Tarsi. A simple algorithm to construct a consistent extension of a partially oriented graph. 1992.
343
+ [66] Yangbo He, Jinzhu Jia, and Bin Yu. Counting and exploring sizes of markov equivalence classes of directed acyclic graphs. The Journal of Machine Learning Research, 16(1):2589–2609, 2015.
344
+ [67] Diviyan Kalainathan and Olivier Goudet. Causal discovery toolbox: Uncover causal relationships in python. arXiv preprint arXiv:1903.02278, 2019. URL https://github.com/FenTechSolutions/CausalDiscoveryToolbox.
345
+ [68] James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax.
346
+ [69] Yoshua Bengio, Tristan Deleu, Nasim Rahaman, Nan Rosemary Ke, Sebastien Lachapelle, Olexa Bilaniuk, Anirudh Goyal, and Christopher Pal. A meta-transfer objective for learning to disentangle causal mechanisms. In International Conference on Learning Representations, 2020.
parse/train/YqYt54gU-XV/YqYt54gU-XV_content_list.json ADDED
@@ -0,0 +1,1417 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DiBS: Differentiable Bayesian Structure Learning ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 196,
8
+ 122,
9
+ 802,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Lars Lorch ETH Zurich Zurich, Switzerland lars.lorch@inf.ethz.ch ",
17
+ "bbox": [
18
+ 250,
19
+ 202,
20
+ 441,
21
+ 256
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Jonas Rothfuss ETH Zurich Zurich, Switzerland jonas.rothfuss@inf.ethz.ch ",
28
+ "bbox": [
29
+ 522,
30
+ 200,
31
+ 748,
32
+ 257
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Bernhard Schölkopf \nMPI for Intelligent Systems \nTübingen, Germany \nbs@tuebingen.mpg.de ",
39
+ "bbox": [
40
+ 282,
41
+ 277,
42
+ 467,
43
+ 334
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Andreas Krause ETH Zurich Zurich, Switzerland krausea@ethz.ch ",
50
+ "bbox": [
51
+ 583,
52
+ 279,
53
+ 715,
54
+ 333
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Abstract ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 462,
64
+ 369,
65
+ 535,
66
+ 386
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Bayesian structure learning allows inferring Bayesian network structure from data while reasoning about the epistemic uncertainty—a key element towards enabling active causal discovery and designing interventions in real world systems. In this work, we propose a general, fully differentiable framework for Bayesian structure learning (DiBS) that operates in the continuous space of a latent probabilistic graph representation. Contrary to existing work, DiBS is agnostic to the form of the local conditional distributions and allows for joint posterior inference of both the graph structure and the conditional distribution parameters. This makes our formulation directly applicable to posterior inference of complex Bayesian network models, e.g., with nonlinear dependencies encoded by neural networks. Using DiBS, we devise an efficient, general purpose variational inference method for approximating distributions over structural models. In evaluations on simulated and real-world data, our method significantly outperforms related approaches to joint posterior inference.1 ",
73
+ "bbox": [
74
+ 233,
75
+ 401,
76
+ 766,
77
+ 594
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 Introduction ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 174,
87
+ 625,
88
+ 312,
89
+ 642
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Discovering the statistical and causal dependencies that underlie the variables of a data-generating system is of central scientific interest. Bayesian networks (BNs) [1] and structural equation models are commonly used for this purpose [2–5]. Structure learning, the task of learning a BN from observations of its variables, is well-studied, but computationally very challenging due to the combinatorially large number of candidate graphs and the constraint of graph acyclicity. ",
96
+ "bbox": [
97
+ 174,
98
+ 655,
99
+ 825,
100
+ 724
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "While structure learning methods arrive at a single plausible graph or its Markov equivalence class (MEC), e.g., [6–9], Bayesian structure learning aims to infer a full posterior distribution over BNs given the observations. A distribution over structures allows quantifying the epistemic uncertainty and the degree of confidence in any given BN model, e.g., when the amount of data is small. Most importantly, downstream tasks such as experimental design and active causal discovery rely on a posterior distribution over BNs to quantify the information gain from specific interventions and uncover the causal structure in a small number of experiments [10–15]. ",
107
+ "bbox": [
108
+ 174,
109
+ 731,
110
+ 825,
111
+ 828
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "A key challenge in Bayesian structure learning is working with a posterior over BNs—a distribution over the joint space of (discrete) directed acyclic graphs and (continuous) conditional distribution parameters. Most of the practically viable approaches to Bayesian structure learning revolve around ",
118
+ "bbox": [
119
+ 176,
120
+ 834,
121
+ 823,
122
+ 876
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Markov chain Monte Carlo (MCMC) sampling in combinatorial spaces and bootstrapping of classical score and constraint-based structure learning methods, e.g., in causal discovery [10–15]. However, these methods marginalize out the parameters and thus require a closed form for the marginal likelihood of the observations given the graph to remain tractable. This limits inference to simple and by now well-studied linear Gaussian and categorical BN models [16–18] and makes it difficult to infer more expressive BNs that, e.g., model nonlinear relationships among the variables. Due to the discrete nature of these approaches, recent advances in approximate inference and gradient-based optimization could not yet be translated into similar performance improvements in Bayesian structure learning. ",
129
+ "bbox": [
130
+ 174,
131
+ 90,
132
+ 825,
133
+ 203
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "In this work, we propose a novel, fully differentiable framework for Bayesian structure learning (DiBS) that operates in the continuous space of a latent probabilistic graph representation. Contrary to existing work, our formulation is agnostic to the distributional form of the BN and allows for inference of the joint posterior over both the conditional distribution parameters and the graph structure. This makes our approach directly applicable to more flexible BN models where neither the marginal likelihood nor the maximum likelihood parameter estimate have a closed form. We instantiate DiBS with the particle variational inference method of Liu and Wang [19] and present a general purpose method for approximate Bayesian structure learning. In our experiments on synthetic and real-world data, DiBS outperforms all alternative approaches to joint posterior inference of graphs and parameters and when modeling nonlinear interactions among the variables, often by a significant margin. This allows us to narrow down plausible causal graphs with greater precision and make better predictions under interventions—an important stepping stone towards active causal discovery. ",
140
+ "bbox": [
141
+ 174,
142
+ 208,
143
+ 825,
144
+ 375
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "2 Background ",
151
+ "text_level": 1,
152
+ "bbox": [
153
+ 174,
154
+ 391,
155
+ 308,
156
+ 409
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "Bayesian networks A Bayesian network $( \\mathbf { G } , \\mathbf { \\Theta } _ { \\mathbf { \\Theta } }$ models the joint density $p ( \\mathbf { x } )$ of a set of $d$ variables $\\mathbf { x } = x _ { 1 : d }$ using (1) a directed acyclic graph (DAG) $\\mathbf { G }$ encoding the conditional independencies of $\\mathbf { x }$ and (2) parameters $\\Theta$ defining the local conditional distributions of each variable given its parents in the DAG. When modeling $p ( \\mathbf { x } )$ using a BN, each variable is assumed to be independent of its non-descendants given its parents, thus allowing for a compact factorization of the joint $p ( \\mathbf { x } | \\mathbf { G } , \\Theta )$ into a product of local conditional distributions for each variable and its parents in $\\mathbf { G }$ . ",
163
+ "bbox": [
164
+ 173,
165
+ 420,
166
+ 826,
167
+ 503
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Bayesian inference of BNs Given independent observations $\\mathcal { D } = \\{ \\mathbf { x } ^ { ( 1 ) } , \\ldots , \\mathbf { x } ^ { ( N ) } \\}$ , we consider the task of inferring a full posterior density over Bayesian networks that model the observations. Following Friedman and Koller [20], given a prior distribution over DAGs $p ( \\mathbf G )$ and a prior over BN parameters $p ( \\Theta | \\mathbf G )$ , Bayes’ Theorem yields the joint and marginal posterior distributions ",
174
+ "bbox": [
175
+ 173,
176
+ 510,
177
+ 825,
178
+ 568
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "equation",
184
+ "img_path": "images/08ff15da9d21c0da4400c42d0f94e7824b2440c9c507d6b67c7596ffdc6e3e36.jpg",
185
+ "text": "$$\n\\begin{array} { r } { p ( \\mathbf { G } , \\boldsymbol { \\Theta } | \\mathcal { D } ) \\propto p ( \\mathbf { G } ) p ( \\boldsymbol { \\Theta } | \\mathbf { G } ) p ( \\mathcal { D } | \\mathbf { G } , \\boldsymbol { \\Theta } ) \\ , } \\\\ { p ( \\mathbf { G } | \\mathcal { D } ) \\propto p ( \\mathbf { G } ) p ( \\mathcal { D } | \\mathbf { G } ) \\qquad } \\end{array}\n$$",
186
+ "text_format": "latex",
187
+ "bbox": [
188
+ 352,
189
+ 568,
190
+ 643,
191
+ 606
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "where $\\begin{array} { r } { p ( \\mathcal { D } \\mid \\mathbf { G } ) = \\int p ( \\Theta \\mid \\mathbf { G } ) p ( \\mathcal { D } \\mid \\mathbf { G } , \\Theta ) d \\Theta } \\end{array}$ is the marginal likelihood. Thus, $p ( \\mathbf G | \\mathcal D )$ in (2) is only tractable in special conjugate cases where the integral over $\\Theta$ can be computed in closed form. The Bayesian formalism allows us to compute expectations of the form ",
198
+ "bbox": [
199
+ 174,
200
+ 606,
201
+ 826,
202
+ 648
203
+ ],
204
+ "page_idx": 1
205
+ },
206
+ {
207
+ "type": "equation",
208
+ "img_path": "images/95c45bdc86ac5c2085ba095f428772f6abb502b615ed9706a0ffcde44d1453df.jpg",
209
+ "text": "$$\n\\begin{array} { r l } { \\mathbb { E } _ { p ( \\mathbf { G } , \\boldsymbol { \\Theta } \\mid \\mathcal { D } ) } \\Big [ f ( \\mathbf { G } , \\boldsymbol { \\Theta } ) \\Big ] \\qquad \\mathrm { o r } \\qquad \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathcal { D } ) } \\Big [ f ( \\mathbf { G } ) \\Big ] } \\end{array}\n$$",
210
+ "text_format": "latex",
211
+ "bbox": [
212
+ 326,
213
+ 650,
214
+ 671,
215
+ 678
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "for any function $f$ of interest. For instance, to perform Bayesian model averaging, we would use $f ( \\mathbf { G } , \\boldsymbol { \\Theta } ) = p ( \\mathbf { x } \\mid \\mathbf { G } , \\boldsymbol { \\Theta } )$ or $f ( \\mathbf { G } ) = p ( \\mathbf { x } | \\mathbf { G } )$ , respectively [21, 22]. In active learning of causal BN structures, a commonly used $f$ is the expected decrease in entropy of $\\mathbf { G }$ after an intervention [10–12, 14, 15]. Inferring either posterior is computationally challenging because there are $\\mathcal { O } ( d ! 2 ^ { ( \\frac { d } { 2 } ) } )$ possible DAGs with $d$ nodes [23]. Thus, computing the normalization constant $p ( \\mathcal { D } )$ is generally intractable. ",
222
+ "bbox": [
223
+ 174,
224
+ 678,
225
+ 825,
226
+ 750
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Continuous characterization of acyclic graphs Orthogonal to the work on Bayesian inference, Zheng et al. [9] have recently proposed a differentiable characterization of acyclic graphs for structure learning. In this work, we adopt the formulation of $\\mathrm { Y u }$ et al. [24], who show that a graph with adjacency matrix $\\mathbf { G } \\in \\{ 0 , 1 \\} ^ { d \\times \\dot { d } }$ does not have any cycles if and only if $h ( \\mathbf G ) = 0$ , where ",
233
+ "bbox": [
234
+ 174,
235
+ 753,
236
+ 825,
237
+ 810
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "equation",
243
+ "img_path": "images/d83da23d7e561dd7f90cfd08d3fda7e9a85bb7c68bb8670d4e296014195c0062.jpg",
244
+ "text": "$$\n\\begin{array} { r } { h ( \\mathbf G ) : = \\mathrm { t r } \\left[ ( \\mathbf I + \\frac 1 d \\mathbf G ) ^ { d } \\right] - d . } \\end{array}\n$$",
245
+ "text_format": "latex",
246
+ "bbox": [
247
+ 395,
248
+ 811,
249
+ 602,
250
+ 839
251
+ ],
252
+ "page_idx": 1
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "If $h ( \\mathbf G ) > 0$ , the function can be interpreted as quantifying the cyclicity or non-DAG-ness of $\\mathbf { G }$ . Follow-up work has leveraged this insight to model nonlinear relationships [24–27], time-series data [28], in the context of generative modeling [29, 30], for causal inference [31–33], and contributed to its theoretical understanding [34, 35]. So far, a connection to Bayesian structure learning has been missing. ",
257
+ "bbox": [
258
+ 174,
259
+ 840,
260
+ 825,
261
+ 910
262
+ ],
263
+ "page_idx": 1
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "3 Related Work ",
268
+ "text_level": 1,
269
+ "bbox": [
270
+ 174,
271
+ 89,
272
+ 321,
273
+ 106
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "text",
279
+ "text": "The existing literature on Bayesian Structure Learning predominantly focuses on inferring the marginal graph posterior $p ( \\mathbf G | \\mathcal D )$ . Since this requires $p ( \\mathcal { D } | \\mathbf { G } )$ to be tractable, inference is limited to BNs with linear Gaussian or Categorical conditional distributions [16–18]. By contrast, the formulation we introduce overcomes this fundamental restriction by allowing for joint inference of the graph and the parameters, thereby facilitating the active (causal) discovery of more expressive BNs. ",
280
+ "bbox": [
281
+ 174,
282
+ 118,
283
+ 825,
284
+ 188
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "MCMC Sampling from the posterior over graphs is the most general approach to approximate Bayesian structure learning. Structure MCMC $\\mathrm { ( M C ^ { 3 } ) }$ [36, 37] performs Metropolis-Hastings in the space of DAGs by changing one edge at a time. Several works try to remedy its poor mixing behavior [38–40]. Alternatively, order MCMC draws samples in the smaller but still exponential space of node orders, which typically requires a hard limit on the maximum parent set size [20]. Attempts to correct for its unintended structural bias are themselves NP-hard to compute and/or limit the parent size [38, 41]. By performing variational inference in a continuous latent space, the method we propose circumvents such mixing issues and parent size limitations. ",
291
+ "bbox": [
292
+ 173,
293
+ 194,
294
+ 825,
295
+ 305
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "Bootstrapping The nonparametric DAG bootstrap [42] performs model averaging by bootstrapping $\\mathcal { D }$ , where each resampled data set is used to learn a single graph, e.g., using the GES or PC algorithms [6, 7]. The obtained set of DAGs approximates the posterior by weighting each unique graph by its unnormalized posterior probability. In simple cases, a closed-form maximum likelihood parameter estimate may be used to approximate the joint posterior [14], but only if $p ( \\mathcal { D } | \\mathbf { G } )$ is tractable in the first place. ",
302
+ "bbox": [
303
+ 174,
304
+ 310,
305
+ 825,
306
+ 395
307
+ ],
308
+ "page_idx": 2
309
+ },
310
+ {
311
+ "type": "text",
312
+ "text": "Exact methods A few notable exceptions use dynamic programming to achieve exact marginal inference in time $O ( d 2 ^ { d } )$ , which is only feasible for $d \\leq 2 0$ nodes [43, 44]. In special cases, e.g., for tree structures or known node orderings, exact inference can be performed more efficiently [45, 46]. ",
313
+ "bbox": [
314
+ 174,
315
+ 400,
316
+ 826,
317
+ 443
318
+ ],
319
+ "page_idx": 2
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "4 A Fully Differentiable Framework for Bayesian Structure Learning ",
324
+ "text_level": 1,
325
+ "bbox": [
326
+ 173,
327
+ 459,
328
+ 767,
329
+ 477
330
+ ],
331
+ "page_idx": 2
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "4.1 General Approach ",
336
+ "text_level": 1,
337
+ "bbox": [
338
+ 174,
339
+ 487,
340
+ 343,
341
+ 502
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "With the goal of moving beyond the restrictive conjugate setups required by most discrete sampling methods for Bayesian structure learning, we propose to transfer the posterior inference task into the latent space of a probabilistic graph representation. Our resulting framework is consistent with the original Bayesian structure learning task in (3), enforces the acyclicity of $\\mathbf { G }$ via the latent space prior, and provides the score of the continuous latent posterior, thus making general purpose inference methods applicable off-the-shelf. ",
348
+ "bbox": [
349
+ 174,
350
+ 511,
351
+ 601,
352
+ 636
353
+ ],
354
+ "page_idx": 2
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "Without loss of generality, we assume that there exists a latent variable $\\mathbf { Z }$ that models the generative process of $\\mathbf { G }$ . Specifically, the default generative model described in Section 2 is generalized into the following factorization: ",
359
+ "bbox": [
360
+ 174,
361
+ 642,
362
+ 601,
363
+ 698
364
+ ],
365
+ "page_idx": 2
366
+ },
367
+ {
368
+ "type": "image",
369
+ "img_path": "images/22f86599c4cb97550be1c25b13c5cc8a54cae0c330d332c51900408f1f6ab749.jpg",
370
+ "image_caption": [
371
+ "Figure 1: Generative model of BNs with latent variable $\\mathbf { Z }$ This formulation generalizes the standard Bayesian setup in (1) where only $\\mathbf { G }$ , $\\Theta$ , and $\\mathbf { x }$ are modeled explicitly. "
372
+ ],
373
+ "image_footnote": [],
374
+ "bbox": [
375
+ 620,
376
+ 511,
377
+ 816,
378
+ 604
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "equation",
384
+ "img_path": "images/bc35455ff27bb8a5c19467dac5a300d02f7d0913755144d347af974171fdd766.jpg",
385
+ "text": "$$\np ( \\mathbf { Z } , \\mathbf { G } , \\boldsymbol { \\Theta } , \\mathcal { D } ) = p ( \\mathbf { Z } ) p ( \\mathbf { G } \\mid \\mathbf { Z } ) p ( \\boldsymbol { \\Theta } \\mid \\mathbf { G } ) p ( \\mathcal { D } \\mid \\mathbf { G } , \\boldsymbol { \\Theta } )\n$$",
386
+ "text_format": "latex",
387
+ "bbox": [
388
+ 321,
389
+ 700,
390
+ 674,
391
+ 717
392
+ ],
393
+ "page_idx": 2
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "Figure 1 displays the corresponding graphical model. The following insight provides us with an equivalence between the expectation we ultimately want to approximate and an expectation over the posterior of the continuous variable $\\mathbf { Z }$ : ",
398
+ "bbox": [
399
+ 176,
400
+ 719,
401
+ 823,
402
+ 761
403
+ ],
404
+ "page_idx": 2
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "Proposition 1 (Latent posterior expectation). Under the generative model in (5), it holds that ",
409
+ "bbox": [
410
+ 178,
411
+ 762,
412
+ 787,
413
+ 777
414
+ ],
415
+ "page_idx": 2
416
+ },
417
+ {
418
+ "type": "equation",
419
+ "img_path": "images/11d3c166cd200bdc9de721942b4c67f1152977ef170ede024b2fca0c64946e21.jpg",
420
+ "text": "$$\n\\begin{array} { r l } & { \\mathbb { E } _ { p ( { \\mathbf G } \\mid \\mathcal { D } ) } \\Big [ f ( { \\mathbf G } ) \\Big ] \\ = \\ \\mathbb { E } _ { p ( { \\mathbf G } \\mid \\mathcal { D } ) } \\Bigg [ \\frac { \\mathbb { E } _ { p ( { \\mathbf G } \\mid { \\mathbf Z } ) } \\big [ f ( { \\mathbf G } ) p ( \\mathcal { D } \\mid { \\mathbf G } ) \\big ] } { \\mathbb { E } _ { p ( { \\mathbf G } \\mid { \\mathbf Z } ) } \\big [ p ( \\mathcal { D } \\mid { \\mathbf G } ) \\big ] } \\Bigg ] \\ , a n d } \\\\ & { \\mathbb { E } _ { p ( { \\mathbf G } , { \\boldsymbol \\Theta } \\mid \\mathcal { D } ) } \\Big [ f ( { \\mathbf G } , { \\boldsymbol \\Theta } ) \\Big ] \\ = \\ \\mathbb { E } _ { p ( { \\mathbf Z } , { \\boldsymbol \\Theta } \\mid \\mathcal { D } ) } \\Bigg [ \\frac { \\mathbb { E } _ { p ( { \\mathbf G } \\mid { \\mathbf Z } ) } \\big [ f ( { \\mathbf G } , { \\boldsymbol \\Theta } ) p ( { \\boldsymbol \\Theta } \\mid { \\mathbf G } ) p ( \\mathcal { D } \\mid { \\mathbf G } , { \\boldsymbol \\Theta } ) \\big ] } { \\mathbb { E } _ { p ( { \\mathbf G } \\mid { \\mathbf Z } ) } \\big [ p ( { \\boldsymbol \\Theta } \\mid { \\mathbf G } ) p ( \\mathcal { D } \\mid { \\mathbf G } , { \\boldsymbol \\Theta } ) \\big ] } \\Bigg ] \\ . } \\end{array}\n$$",
421
+ "text_format": "latex",
422
+ "bbox": [
423
+ 222,
424
+ 784,
425
+ 805,
426
+ 877
427
+ ],
428
+ "page_idx": 2
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "A proof is provided in Appendix A.1. Rather than approximating $p ( \\mathbf G | \\mathcal D )$ or $p ( \\mathbf { G } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ , our goal will be to infer $p ( \\mathbf { Z } | \\bar { \\mathcal { D } } )$ or $p ( \\mathbf { Z } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ instead, which by Proposition 1 allows us to compute ",
433
+ "bbox": [
434
+ 174,
435
+ 882,
436
+ 823,
437
+ 912
438
+ ],
439
+ "page_idx": 2
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "expectations of the form in (3). In the following, we first discuss how to define the two factors $p ( \\mathbf { \\bar { G } } | \\mathbf { Z } )$ and $p ( \\mathbf { Z } )$ in a way that models only directed acyclic graphs. Then, we provide the details necessary to perform black box inference of the posteriors of the continuous latent variable $\\mathbf { Z }$ . ",
444
+ "bbox": [
445
+ 173,
446
+ 90,
447
+ 825,
448
+ 133
449
+ ],
450
+ "page_idx": 3
451
+ },
452
+ {
453
+ "type": "text",
454
+ "text": "4.2 Representing DAGs in a Continuous Latent Space ",
455
+ "text_level": 1,
456
+ "bbox": [
457
+ 173,
458
+ 147,
459
+ 560,
460
+ 162
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "Generative model of directed graphs We define the latent variable $\\mathbf { Z }$ as consisting of two embedding matrices U $\\boldsymbol { \\mathrm { I } } , \\boldsymbol { \\mathbf { V } } \\in \\mathbb { R } ^ { k \\times \\smile }$ , i.e., $\\mathbf { Z } = [ \\mathbf { U } , \\mathbf { V } ]$ . Building on Kipf and Welling [47], we propose to use a bilinear generative model for the adjacency matrix $\\mathbf { G } \\in \\{ 0 , 1 \\} ^ { d \\times d }$ of directed graphs using the inner product between the latent variables in $\\mathbf { Z }$ : ",
467
+ "bbox": [
468
+ 173,
469
+ 171,
470
+ 825,
471
+ 229
472
+ ],
473
+ "page_idx": 3
474
+ },
475
+ {
476
+ "type": "equation",
477
+ "img_path": "images/79b79b44535e6d838d5d9295af3768337c21e2bc7d6e2c3b4784c9518555710d.jpg",
478
+ "text": "$$\np _ { \\alpha } ( \\mathbf { G } \\mid \\mathbf { Z } ) = \\prod _ { i = 1 } ^ { d } \\prod _ { j \\neq i } ^ { d } p _ { \\alpha } ( g _ { i j } \\mid \\mathbf { u } _ { i } , \\mathbf { v } _ { j } ) \\quad { \\mathrm { w i t h } } \\quad p _ { \\alpha } ( g _ { i j } = 1 \\mid \\mathbf { u } _ { i } , \\mathbf { v } _ { j } ) = \\sigma _ { \\alpha } ( \\mathbf { u } _ { i } ^ { \\top } \\mathbf { v } _ { j } )\n$$",
479
+ "text_format": "latex",
480
+ "bbox": [
481
+ 236,
482
+ 232,
483
+ 748,
484
+ 277
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "where $\\sigma _ { \\alpha } ( x ) = 1 / ( 1 + \\exp ( - \\alpha x ) )$ denotes the sigmoid function with inverse temperature $\\alpha$ . We denote the corresponding matrix of edge probabilities in $\\mathbf { G }$ given $\\mathbf { Z }$ by $\\mathbf { G } _ { \\alpha } ( \\mathbf { Z } ) \\in [ 0 , 1 ] ^ { d \\times d }$ with ",
491
+ "bbox": [
492
+ 174,
493
+ 280,
494
+ 823,
495
+ 311
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "equation",
501
+ "img_path": "images/981ba968c30b1d9c4d9723ab40427fe9aba392f02a750fffd1f3d01cf079ea73.jpg",
502
+ "text": "$$\n\\mathbf { G } _ { \\alpha } ( \\mathbf { Z } ) _ { i j } : = p _ { \\alpha } ( g _ { i j } = 1 | \\mathbf { u } _ { i } , \\mathbf { v } _ { j } ) .\n$$",
503
+ "text_format": "latex",
504
+ "bbox": [
505
+ 385,
506
+ 314,
507
+ 611,
508
+ 332
509
+ ],
510
+ "page_idx": 3
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "Since we model acyclic graphs, which do not contain self-loops, we set $p _ { \\alpha } ( g _ { i i } = 1 | \\mathbf { Z } ) : = 0$ . The latent dimensionality $k$ trades off the complexity of the variable interactions with tractability during inference. For $k \\geq d$ , the matrix of edge probabilities ${ \\bf G } _ { \\alpha } ( { \\bf Z } )$ is not constrained in rank, and the generative model in (6) can represent any adjacency matrix without self-loops. That said, the size of the latent representation $\\mathbf { Z }$ only grows $O ( d \\cdot k )$ and, in principle, $k$ can be chosen independently of $d$ . Note that the formulation in (6) models directed graphs since $\\sigma _ { \\alpha } ( \\mathbf { u } _ { i } ^ { \\top } \\mathbf { v } _ { j } ) \\neq \\sigma _ { \\alpha } ( \\mathbf { u } _ { j } ^ { \\top } \\mathbf { v } _ { i } )$ . We can even interpret $\\mathbf { u } _ { i }$ and $\\mathbf { v } _ { i }$ as node embeddings that may encode more information than mere edge probabilities, e.g., for graph neural networks. The fact that $p _ { \\alpha } ( \\mathbf { G } \\mid \\mathbf { Z } )$ is invariant to orthogonal transformations of $\\mathbf { U }$ and $\\mathbf { V }$ is not an issue in practice. ",
515
+ "bbox": [
516
+ 173,
517
+ 334,
518
+ 825,
519
+ 462
520
+ ],
521
+ "page_idx": 3
522
+ },
523
+ {
524
+ "type": "text",
525
+ "text": "Acyclicity via the latent prior distribution A major constraint in learning BNs is the acyclicity of $\\mathbf { G }$ . With a latent graph model $p ( \\mathbf G | \\mathbf Z )$ in place, we design the prior $p ( \\mathbf { Z } )$ to act as a soft constraint enforcing that only DAGs are modeled. Specifically, we define the prior of $\\mathbf { Z }$ as the product of independent Gaussians with a Gibbs distribution that penalizes the expected cyclicity of $\\mathbf { G }$ given $\\mathbf { Z }$ : ",
526
+ "bbox": [
527
+ 173,
528
+ 467,
529
+ 825,
530
+ 522
531
+ ],
532
+ "page_idx": 3
533
+ },
534
+ {
535
+ "type": "equation",
536
+ "img_path": "images/f7b9bf29779288f12e6c6cef9d3dc5738ed5377bb94fdef61d853d445b55717f.jpg",
537
+ "text": "$$\np _ { \\beta } ( \\mathbf { Z } ) \\propto \\exp \\left( - \\beta \\operatorname { \\mathbb { E } } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } \\Bigl [ h ( \\mathbf { G } ) \\Bigr ] \\right) \\prod _ { i j } \\mathcal { N } ( z _ { i j } ; 0 , \\sigma _ { z } ^ { 2 } )\n$$",
538
+ "text_format": "latex",
539
+ "bbox": [
540
+ 313,
541
+ 525,
542
+ 684,
543
+ 561
544
+ ],
545
+ "page_idx": 3
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "Here, $h$ is the DAG constraint function given in (4) and $\\beta$ is an inverse temperature parameter controlling how strongly the acyclicity is enforced. As $\\beta \\to \\infty$ , the support of $p _ { \\beta } ( \\mathbf { Z } )$ reduces to all $\\mathbf { Z }$ that only model valid DAGs. The Gaussian component ensures that the norm of $\\mathbf { Z }$ is well-behaved. Traditional graph priors of the form $p ( \\mathbf { G } ) \\propto f ( \\bar { \\mathbf { G } } )$ that induce, e.g., sparsity of $\\mathbf { G }$ , can be flexibly incorporated into $p _ { \\beta } ( \\mathbf { Z } )$ by means of an additional factor involving $f ( \\mathbf { G } _ { \\alpha } ( \\mathbf { Z } ) )$ or $\\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } [ f ( \\mathbf { G } ) ]$ . Unless highlighting a specific point, we omit writing the hyperparameters $\\alpha$ and $\\beta$ to simplify notation. ",
550
+ "bbox": [
551
+ 173,
552
+ 564,
553
+ 826,
554
+ 650
555
+ ],
556
+ "page_idx": 3
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "4.3 Estimators for Gradient-Based Bayesian Inference ",
561
+ "text_level": 1,
562
+ "bbox": [
563
+ 173,
564
+ 662,
565
+ 563,
566
+ 678
567
+ ],
568
+ "page_idx": 3
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "The extended generative model in (5) not only allows us to incorporate the notoriously difficult acyclicity constraint into the Bayesian framework. By rephrasing the posteriors $p ( \\mathbf G | \\mathcal D )$ and $p ( \\mathbf { \\dot { G } } , \\mathbf { \\Theta } , \\vert \\mathbf { \\mathcal { D } } )$ in terms of $p ( \\mathbf { Z } | D )$ and $p ( \\mathbf { Z } , \\boldsymbol { \\Theta } | D )$ , respectively, it also makes Bayesian structure learning amenable to variational inference techniques that operate in continuous space and rely on the gradient of the unnormalized log posterior, also known as the score. The following result provides us with the score of both latent posteriors. Detailed derivations can be found in Appendix A.2. ",
573
+ "bbox": [
574
+ 173,
575
+ 685,
576
+ 825,
577
+ 770
578
+ ],
579
+ "page_idx": 3
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "Proposition 2 (Latent posterior score). Under the generative graph model defined in (5), the gradient of the log posterior density of $\\mathbf { Z }$ is given by ",
584
+ "bbox": [
585
+ 174,
586
+ 773,
587
+ 825,
588
+ 801
589
+ ],
590
+ "page_idx": 3
591
+ },
592
+ {
593
+ "type": "equation",
594
+ "img_path": "images/62a803f30a7008f87479dfafe65f308a567a33acdf5d60a76a6f2ba4aab0c583.jpg",
595
+ "text": "$$\n( a ) \\qquad \\nabla _ { \\mathbf { Z } } \\log p ( \\mathbf { Z } | \\mathcal { D } ) = \\nabla _ { \\mathbf { Z } } \\log p ( \\mathbf { Z } ) + \\frac { \\nabla _ { \\mathbf { Z } } \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } \\left[ p ( \\mathcal { D } \\mid \\mathbf { G } ) \\right] } { \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } \\left[ p ( \\mathcal { D } \\mid \\mathbf { G } ) \\right] }\n$$",
596
+ "text_format": "latex",
597
+ "bbox": [
598
+ 276,
599
+ 804,
600
+ 722,
601
+ 843
602
+ ],
603
+ "page_idx": 3
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "which is relevant when the marginal likelihood $p ( \\mathcal { D } | \\mathbf { G } )$ can be computed efficiently. In the general case, when inferring the joint posterior of $\\mathbf { Z }$ and $\\Theta$ , the gradients of the log posterior are given by ",
608
+ "bbox": [
609
+ 173,
610
+ 845,
611
+ 828,
612
+ 876
613
+ ],
614
+ "page_idx": 3
615
+ },
616
+ {
617
+ "type": "equation",
618
+ "img_path": "images/d83f9a7ae17a1047411b7616f6f5d028b18dae9ef2cf7b6037c321ed23ea1c9c.jpg",
619
+ "text": "$$\n\\nabla _ { \\mathbf { Z } } \\log p ( \\mathbf { Z } , \\boldsymbol { \\Theta } | \\mathcal { D } ) = \\nabla _ { \\mathbf { Z } } \\log p ( \\mathbf { Z } ) + \\frac { \\nabla _ { \\mathbf { Z } } \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } \\left[ p ( \\boldsymbol { \\Theta } , \\mathcal { D } \\mid \\mathbf { G } ) \\right] } { \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } \\left[ p ( \\boldsymbol { \\Theta } , \\mathcal { D } \\mid \\mathbf { G } ) \\right] }\n$$",
620
+ "text_format": "latex",
621
+ "bbox": [
622
+ 295,
623
+ 877,
624
+ 743,
625
+ 916
626
+ ],
627
+ "page_idx": 3
628
+ },
629
+ {
630
+ "type": "equation",
631
+ "img_path": "images/509fb317a3dce080e994a6b4b36bccf7f2f4e4bb596eed94cd82983b1891f4a2.jpg",
632
+ "text": "$$\n\\quad ( c ) \\qquad \\nabla _ { \\Theta } \\log p ( \\mathbf { Z } , \\boldsymbol { \\Theta } | \\mathcal { D } ) = \\frac { \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } \\bigl [ \\nabla _ { \\boldsymbol { \\Theta } } p ( \\boldsymbol { \\Theta } , \\mathcal { D } \\mid \\mathbf { G } ) \\bigr ] } { \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } \\bigl [ p ( \\boldsymbol { \\Theta } , \\mathcal { D } \\mid \\mathbf { G } ) \\bigr ] }\n$$",
633
+ "text_format": "latex",
634
+ "bbox": [
635
+ 250,
636
+ 87,
637
+ 642,
638
+ 126
639
+ ],
640
+ "page_idx": 4
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "where $p ( \\Theta , \\mathcal { D } | \\mathbf { G } ) = p ( \\Theta | \\mathbf { G } ) p ( \\mathcal { D } | \\mathbf { G } , \\Theta )$ , which is efficient to compute by construction. ",
645
+ "bbox": [
646
+ 171,
647
+ 128,
648
+ 764,
649
+ 145
650
+ ],
651
+ "page_idx": 4
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "The expectations have tractable Monte Carlo approximations because sampling from $p ( \\mathbf G | \\mathbf Z )$ in (6) is simple and parallelizable. The gradient terms of the form $\\nabla _ { \\mathbf { Z } } \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } [ \\cdot ]$ , which also appear inside $\\nabla _ { \\mathbf { Z } } \\log p ( \\mathbf { Z } )$ , can be estimated using two different techniques, depending on the BN model inferred. ",
656
+ "bbox": [
657
+ 173,
658
+ 152,
659
+ 826,
660
+ 198
661
+ ],
662
+ "page_idx": 4
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "Differentiable (marginal) likelihood Using the Gumbel-softmax trick [48, 49], we can separate the randomness from $\\mathbf { Z }$ when sampling from $\\bar { p } ( \\mathbf G \\mid \\mathbf Z )$ and obtain the following estimator: ",
667
+ "bbox": [
668
+ 169,
669
+ 202,
670
+ 823,
671
+ 232
672
+ ],
673
+ "page_idx": 4
674
+ },
675
+ {
676
+ "type": "equation",
677
+ "img_path": "images/b1d0b67e7b28f11f17d5fbe1f28caab5b6afb2f23792be4cf643d4f3a99ce74c.jpg",
678
+ "text": "$$\n\\nabla _ { \\mathbf { Z } } \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathbf { Z } ) } { \\big [ } p ( { \\mathcal { D } } \\mid \\mathbf { G } ) { \\big ] } \\approx \\mathbb { E } _ { p ( \\mathbf { L } ) } { \\Big [ } \\nabla _ { \\mathbf { G } } p ( { \\mathcal { D } } \\mid \\mathbf { G } ) { \\big | } _ { \\mathbf { G } = \\mathbf { G } _ { \\tau } ( \\mathbf { L } , \\mathbf { Z } ) } \\cdot \\nabla _ { \\mathbf { Z } } \\mathbf { G } _ { \\tau } ( \\mathbf { L } , \\mathbf { Z } ) { \\Big ] }\n$$",
679
+ "text_format": "latex",
680
+ "bbox": [
681
+ 248,
682
+ 236,
683
+ 750,
684
+ 262
685
+ ],
686
+ "page_idx": 4
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "where $\\mathbf L \\sim \\mathrm { L o g i s t i c } ( 0 , 1 ) ^ { d \\times d }$ i.i.d.. The matrix-valued function ${ \\bf G } _ { \\tau } ( \\cdot )$ is defined elementwise as ",
691
+ "bbox": [
692
+ 178,
693
+ 267,
694
+ 805,
695
+ 284
696
+ ],
697
+ "page_idx": 4
698
+ },
699
+ {
700
+ "type": "equation",
701
+ "img_path": "images/98f9dfc0f2e04dedaa9995d211167344efb3574c8e6c362b71cfcb9ac91c7361.jpg",
702
+ "text": "$$\n\\mathbf { G } _ { \\tau } ( \\mathbf { L } , \\mathbf { Z } ) _ { i j } : = \\left\\{ \\begin{array} { l l } { \\sigma _ { \\tau } \\left( l _ { i j } + \\alpha \\mathbf { u } _ { i } ^ { \\top } \\mathbf { v } _ { j } \\right) } & { \\mathrm { i f } i \\neq j } \\\\ { 0 } & { \\mathrm { i f } i = j } \\end{array} \\right.\n$$",
703
+ "text_format": "latex",
704
+ "bbox": [
705
+ 334,
706
+ 286,
707
+ 648,
708
+ 323
709
+ ],
710
+ "page_idx": 4
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "The estimator applies equally to $p ( \\Theta , \\mathcal { D } | \\mathbf { G } )$ in place of $p ( \\mathcal { D } | \\mathbf { G } )$ . For the estimator to be welldefined, $p ( \\mathcal { D } | \\bar { \\mathbf { G } } )$ or $p ( \\Theta , \\mathcal { D } | \\mathbf { G } )$ , respectively, needs to be differentiable with respect to $\\mathbf { G }$ . More specifically, the gradient $\\nabla _ { \\mathbf G } p ( \\mathcal { D } | \\mathbf G )$ or $\\nabla _ { \\mathbf G } \\dot { p } ( \\mathcal D , \\mathbf { \\Theta } ) | \\mathbf G )$ needs to be defined when $\\mathbf { G }$ lies on the interior of $[ 0 , 1 ] ^ { d \\times d }$ and not at its discrete endpoints. This depends on the parameterization of the BN model we want to infer. In case $p ( \\mathcal { D } | \\mathbf { G } )$ or $p ( \\Theta , \\mathcal { D } | \\mathbf { G } )$ is only defined for discrete $\\mathbf { G }$ , it is possible to evaluate $\\nabla _ { \\mathbf { G } } p ( \\mathcal { D } | \\mathbf { G } )$ or $\\nabla _ { \\mathbf G } p ( \\Theta , \\mathcal { D } | \\mathbf G )$ using hard Gumbel-max samples of $\\mathbf { G }$ (i.e., with $\\tau = \\infty$ ) and a straight-through gradient estimator. Since the DAG constraint $h$ is differentiable, the Gumbel-softmax trick can always be applied inside $\\nabla _ { \\mathbf { Z } } \\log p ( \\mathbf { Z } )$ . In practice, we always use $\\tau = 1$ . ",
715
+ "bbox": [
716
+ 173,
717
+ 327,
718
+ 825,
719
+ 440
720
+ ],
721
+ "page_idx": 4
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "Non-differentiable (marginal) likelihood In general, $\\nabla _ { \\mathbf { G } } p ( \\mathcal { D } | \\mathbf { G } )$ or $\\nabla _ { \\mathbf G } p ( \\mathcal D , \\Theta | \\mathbf G )$ depending on the inference task might be not available or ill-defined. In this setting, the score function estimator provides us with a way to estimate the gradient we need [50]: ",
726
+ "bbox": [
727
+ 173,
728
+ 445,
729
+ 825,
730
+ 488
731
+ ],
732
+ "page_idx": 4
733
+ },
734
+ {
735
+ "type": "equation",
736
+ "img_path": "images/e95f29b4d62f2bbd0f11c11f46e8aeb3ff1722cbbfe7be64745c99f87653a237.jpg",
737
+ "text": "$$\n\\nabla _ { \\mathbf { Z } } \\mathbb { E } _ { p \\left( \\mathbf { G } \\mid \\mathbf { Z } \\right) } { \\big [ } p ( { \\mathcal { D } } \\mid \\mathbf { G } ) { \\big ] } = \\mathbb { E } _ { p \\left( \\mathbf { G } \\mid \\mathbf { Z } \\right) } { \\Big [ } { \\big ( } p ( { \\mathcal { D } } \\mid \\mathbf { G } ) - b { \\big ) } \\nabla _ { \\mathbf { Z } } \\log p ( \\mathbf { G } \\mid \\mathbf { Z } ) { \\Big ] }\n$$",
738
+ "text_format": "latex",
739
+ "bbox": [
740
+ 266,
741
+ 491,
742
+ 730,
743
+ 518
744
+ ],
745
+ "page_idx": 4
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "The estimator likewise applies for $p ( \\Theta , \\mathcal { D } | \\mathbf { G } )$ in place of $p ( \\mathcal { D } | \\mathbf { G } )$ . Here, $b$ is a constant with respect to $\\mathbf { G }$ that can be used for variance reduction [51], and $\\nabla _ { \\mathbf { Z } } \\log { p ( \\mathbf { G } \\mid \\mathbf { Z } ) }$ is trivial to compute. The derivations of both (12) and (14), alongside a more detailed discussion, can be found in Appendix $\\mathrm { B }$ . ",
750
+ "bbox": [
751
+ 174,
752
+ 522,
753
+ 826,
754
+ 565
755
+ ],
756
+ "page_idx": 4
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "5 Particle Variational Inference for Structure Learning ",
761
+ "text_level": 1,
762
+ "bbox": [
763
+ 174,
764
+ 582,
765
+ 650,
766
+ 599
767
+ ],
768
+ "page_idx": 4
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "In the previous section, we have proposed a differentiable formulation for Bayesian structure learning $( D i B S )$ that is agnostic to the form of the local BN conditionals and, more importantly, translates learning discrete graph structures into an inference problem over the continuous variable $\\mathbf { Z }$ . In the following, we overcome the remaining challenge of inferring the intractable DiBS posteriors $p ( \\mathbf { Z } \\mid \\mathcal { D } )$ and $p ( \\mathbf { Z } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ by employing Stein variational gradient descent (SVGD) [19], a gradient-based and general purpose variational inference method. The resulting algorithm infers a particle approximation of the marginal or joint posterior density over BNs given observational data. ",
773
+ "bbox": [
774
+ 173,
775
+ 611,
776
+ 825,
777
+ 709
778
+ ],
779
+ "page_idx": 4
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "SVGD for posterior inference Since Proposition 2 provides us with the gradient of the latent posterior score functions, we can apply SVGD off-the-shelf. SVGD minimizes the KL divergence to a target distribution by iteratively transporting a set of particles using a sequence of kernel-based transformation steps. We provide a more detailed overview of SVGD in Appendix C. Following this paradigm for DiBS, we iteratively update a fixed set $\\{ \\mathbf { Z } ^ { ( m ) } \\} _ { m = 1 } ^ { M }$ or $\\{ \\mathbf { Z } ^ { ( m ) } , \\mathbf { \\bar { \\Theta } } ^ { ( m ) } \\} _ { m = 1 } ^ { M }$ to approximate $p ( \\mathbf { Z } \\mid \\mathcal { D } )$ or $p ( \\mathbf { Z } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ , respectively. If the BN model we aim to infer has a properly-defined likelihood gradient with respect to $\\mathbf { G }$ , we use the Gumbel-softmax estimator in (12) to approximate the posterior score. Otherwise, we resort to the score function estimator in (14). We use a simple kernel for SVGD: ",
784
+ "bbox": [
785
+ 173,
786
+ 714,
787
+ 826,
788
+ 828
789
+ ],
790
+ "page_idx": 4
791
+ },
792
+ {
793
+ "type": "equation",
794
+ "img_path": "images/419c0f596e05ab527f24ae1f79a121f2fc7f3d874cf7648478060828b2efd37f.jpg",
795
+ "text": "$$\nk \\big ( ( \\mathbf { Z } , \\boldsymbol { \\Theta } ) , ( \\mathbf { Z } ^ { \\prime } , \\boldsymbol { \\Theta } ^ { \\prime } ) \\big ) : = \\exp \\left( - \\frac { 1 } { \\gamma _ { z } } | | \\mathbf { Z } - \\mathbf { Z } ^ { \\prime } | | _ { 2 } ^ { 2 } \\right) + \\exp \\left( - \\frac { 1 } { \\gamma _ { \\theta } } | | \\boldsymbol { \\Theta } - \\boldsymbol { \\Theta } ^ { \\prime } | | _ { 2 } ^ { 2 } \\right)\n$$",
796
+ "text_format": "latex",
797
+ "bbox": [
798
+ 250,
799
+ 830,
800
+ 746,
801
+ 866
802
+ ],
803
+ "page_idx": 4
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "with bandwidths $\\gamma _ { z } , \\gamma _ { \\theta }$ . For inference of $p ( \\mathbf { Z } | \\mathcal { D } )$ , we leave out the second term involving $\\Theta , \\Theta ^ { \\prime }$ . While $\\mathbf { Z }$ is invariant to orthogonal transformations, more elaborate kernels that are, e.g., invariant to such transforms empirically perform worse in our experiments. ",
808
+ "bbox": [
809
+ 173,
810
+ 868,
811
+ 825,
812
+ 911
813
+ ],
814
+ "page_idx": 4
815
+ },
816
+ {
817
+ "type": "text",
818
+ "text": "Algorithm 1 DiBS with SVGD [19] for inference of $p ( \\mathbf G | \\mathcal D )$ ",
819
+ "text_level": 1,
820
+ "bbox": [
821
+ 173,
822
+ 90,
823
+ 581,
824
+ 107
825
+ ],
826
+ "page_idx": 5
827
+ },
828
+ {
829
+ "type": "table",
830
+ "img_path": "images/54ccbb04ff8b34a1e6e044ed8799d2f42c47a10cb68423c39a08bb15b52d5cd2.jpg",
831
+ "table_caption": [],
832
+ "table_footnote": [],
833
+ "table_body": "<table><tr><td>Output: Set of discrete graph particles {G(m)}M</td><td>}M=1, kernel k,schedules for αt, βt,and stepsizes nt }m=1 approximating p(G |D)</td></tr><tr><td>1: Incorporate prior belief of p(G) into p(Z)</td><td> See Section 4.2</td></tr><tr><td>for iteration t=O to T-1 do</td><td></td></tr><tr><td>Estimate score Vz log p(Z|D) given in (9) for each Z(m)</td><td>&gt; See (12)and (14)</td></tr><tr><td>for particle m = 1 to M do</td><td></td></tr><tr><td>Z 5: ↑ +nt Φt(Z(m)</td><td> SVGD step</td></tr><tr><td>M 1</td><td></td></tr><tr><td>where 𝜙t(·) := M</td><td>[k(Z(),)Vz(c) logp(Z(k)|D)+Vz(c)k((Z(),)]</td></tr><tr><td>M</td><td></td></tr><tr><td>k=1</td><td></td></tr><tr><td>6: return{G(Z(m)}m=1</td><td></td></tr><tr><td></td><td> See (16)and (17)</td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>",
834
+ "bbox": [
835
+ 176,
836
+ 109,
837
+ 826,
838
+ 266
839
+ ],
840
+ "page_idx": 5
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "Annealing $\\alpha$ and $\\beta$ The latent variable $\\mathbf { Z }$ not only probabilistically models the graph $\\mathbf { G }$ , but can also be viewed as a continuous relaxation of $\\mathbf { G }$ , with $\\alpha$ trading off smoothness with accuracy. As $\\alpha \\to \\infty$ , the sigmoid $\\sigma _ { \\alpha } ( \\cdot )$ converges to the unit step function. Hence, as $\\alpha \\to \\infty$ in the graph model $p _ { \\alpha } ( \\mathbf { G } \\mid \\mathbf { Z } )$ in (6), the expectations in Proposition 1 simplify to: ",
845
+ "bbox": [
846
+ 174,
847
+ 291,
848
+ 825,
849
+ 348
850
+ ],
851
+ "page_idx": 5
852
+ },
853
+ {
854
+ "type": "equation",
855
+ "img_path": "images/7e829c250d14c1851d94496833c047a0e98c6d6e2fff00609177970c24cbd0b3.jpg",
856
+ "text": "$$\n\\begin{array} { r l } { \\mathbb { E } _ { p ( \\mathbf { G } \\mid \\mathcal { D } ) } \\Big [ f ( \\mathbf { G } ) \\Big ] } & { \\to \\ \\mathbb { E } _ { p ( \\mathbf { Z } \\mid \\mathcal { D } ) } \\Big [ f \\big ( \\mathbf { G } _ { \\infty } ( \\mathbf { Z } ) \\big ) \\Big ] } \\\\ { \\mathbb { E } _ { p ( \\mathbf { G } , \\boldsymbol { \\Theta } \\mid \\mathcal { D } ) } \\Big [ f ( \\mathbf { G } , \\boldsymbol { \\Theta } ) \\Big ] } & { \\to \\ \\mathbb { E } _ { p ( \\mathbf { Z } , \\boldsymbol { \\Theta } \\mid \\mathcal { D } ) } \\Big [ f \\big ( \\mathbf { G } _ { \\infty } ( \\mathbf { Z } ) , \\boldsymbol { \\Theta } \\big ) \\Big ] } \\end{array}\n$$",
857
+ "text_format": "latex",
858
+ "bbox": [
859
+ 312,
860
+ 353,
861
+ 686,
862
+ 411
863
+ ],
864
+ "page_idx": 5
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "where ${ \\bf G } _ { \\infty } ( { \\bf Z } )$ denotes the single limiting graph implied by $\\mathbf { Z } = [ \\mathbf { U } , \\mathbf { V } ]$ and is defined as ",
869
+ "bbox": [
870
+ 169,
871
+ 414,
872
+ 758,
873
+ 430
874
+ ],
875
+ "page_idx": 5
876
+ },
877
+ {
878
+ "type": "equation",
879
+ "img_path": "images/5ed579855532445db69de80b436a1a4c7b88d2824d7b89a8e9085fe00d2859e5.jpg",
880
+ "text": "$$\n\\mathbf { G } _ { \\infty } ( \\mathbf { Z } ) _ { i j } : = \\left\\{ { \\begin{array} { l l } { 1 } & { { \\mathrm { i f } } \\mathbf { u } _ { i } ^ { \\top } \\mathbf { v } _ { j } > 0 { \\mathrm { a n d } } i \\neq j } \\\\ { 0 } & { { \\mathrm { o t h e r w i s e } } } \\end{array} } \\right.\n$$",
881
+ "text_format": "latex",
882
+ "bbox": [
883
+ 349,
884
+ 435,
885
+ 630,
886
+ 472
887
+ ],
888
+ "page_idx": 5
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "See Appendix A.3. In this case, $p _ { \\alpha } ( \\mathbf { G } \\mid \\mathbf { Z } )$ converges to representing only a single graph. To be able to invoke this simplification, we anneal $\\alpha \\to \\infty$ over the iterations of SVGD and, upon termination, convert the latent variables $\\mathbf { Z }$ to the single discrete $\\mathbf { G } _ { \\infty } ( \\mathbf { Z } )$ . Furthermore, we similarly let $\\beta \\to \\infty$ in the latent prior $p _ { \\beta } ( \\mathbf { Z } )$ over the iterations to enforce that the latent representation of $\\mathbf { G }$ only models DAGs. By Equation (16), the resulting DAGs form a consistent particle approximation of $p ( \\mathbf G | \\mathcal D )$ or $p ( \\mathbf { G } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ , respectively. Algorithm 1 summarizes DiBS instantiated with SVGD for inference of $p ( \\mathbf G | \\mathcal D )$ . The general case of inferring $p ( \\mathbf { G } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ is given in Algorithm 2 of Appendix D. ",
893
+ "bbox": [
894
+ 173,
895
+ 477,
896
+ 825,
897
+ 577
898
+ ],
899
+ "page_idx": 5
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "Single-particle approximation SVGD reduces to regular gradient ascent for the maximum a posteriori estimate when transporting only a single particle [19]. In this special case, DiBS with SVGD recovers some of the existing continuous structure learning methods: gradient ascent on a linear Gaussian likelihood solves an optimization problem similar to NOTEARS [9]. The cyclicity penalizer acts analogously. However, not only does DiBS automatically turn into a full Bayesian approach when using more particles, it is also not limited to settings such as linear Gaussian conditionals, where the adjacency matrix $\\mathbf { G }$ and the parameters $\\Theta$ can be modeled together by a weighted adjacency matrix. ",
904
+ "bbox": [
905
+ 173,
906
+ 582,
907
+ 825,
908
+ 679
909
+ ],
910
+ "page_idx": 5
911
+ },
912
+ {
913
+ "type": "text",
914
+ "text": "Weighted particle mixture In high dimensional settings, it may be beneficial to move beyond a uniform weighting of the inferred particles of BN models to approximate $p ( \\mathbf G | \\mathcal D )$ or $p ( \\mathbf { G } , \\mathbf { \\dot { \\Theta } } | \\mathbf { \\mathcal { D } } )$ . We consider a particle mixture that weights each particle by its unnormalized posterior probability $p ( \\mathbf G , \\mathcal { D } )$ or $p ( \\mathbf { G } , \\boldsymbol { \\Theta } , \\mathcal { D } )$ , respectively, under the BN model. While we do not have a strong theoretical justification for the weighting, our motivation is that most of the particles in the empirical distribution will be unique as a consequence of the super-exponentially large space of DAGs, which may result in a crude approximation of their posterior probability mass function. In our experiments, DiBS and its instantiation with SVGD are used interchangeably, and $\\mathrm { D i B S + }$ denotes the weighted particle mixture. ",
915
+ "bbox": [
916
+ 173,
917
+ 685,
918
+ 826,
919
+ 796
920
+ ],
921
+ "page_idx": 5
922
+ },
923
+ {
924
+ "type": "text",
925
+ "text": "6 Evaluation on Synthetic Data ",
926
+ "text_level": 1,
927
+ "bbox": [
928
+ 176,
929
+ 814,
930
+ 449,
931
+ 832
932
+ ],
933
+ "page_idx": 5
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "6.1 Experimental Setup ",
938
+ "text_level": 1,
939
+ "bbox": [
940
+ 174,
941
+ 843,
942
+ 352,
943
+ 859
944
+ ],
945
+ "page_idx": 5
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "Synthetic data We compare DiBS to a set of related methods in marginal and joint posterior inference of synthetic linear and nonlinear Gaussian BNs. Our setup follows [9, 24, 27, 52], who consider inferring BNs with Erdos-Rényi and scale-free random structures [ ˝ 53, 54]. For each graph, here with $d \\in \\{ 2 0 , 5 0 \\}$ nodes and $2 d$ edges in expectation, we sample a set of ground truth parameters and then generate training, held-out, and interventional data sets. In all settings, we use $N = 1 0 0$ observations for inference, emulating the use case of Bayesian structure learning where the uncertainty about the graph structure is significant. ",
950
+ "bbox": [
951
+ 174,
952
+ 869,
953
+ 825,
954
+ 911
955
+ ],
956
+ "page_idx": 5
957
+ },
958
+ {
959
+ "type": "image",
960
+ "img_path": "images/b37f9ce7c825188a2ff13da8521b0e678ea70d12c161d4c02914ea090380a07b.jpg",
961
+ "image_caption": [
962
+ "Figure 2: Marginal posterior inference of 20-node linear Gaussian BNs using the BGe marginal likelihood. Higher scores on AUROC and lower scores on $\\mathbb { E }$ -SHD, neg. MLL, neg. I-MLL are preferred. $\\mathrm { D i B S + }$ performs competitively across all metrics, in particular $\\mathbb { E }$ -SHD and neg. (I-)MLL. "
963
+ ],
964
+ "image_footnote": [],
965
+ "bbox": [
966
+ 147,
967
+ 69,
968
+ 826,
969
+ 268
970
+ ],
971
+ "page_idx": 6
972
+ },
973
+ {
974
+ "type": "text",
975
+ "text": "",
976
+ "bbox": [
977
+ 174,
978
+ 339,
979
+ 825,
980
+ 396
981
+ ],
982
+ "page_idx": 6
983
+ },
984
+ {
985
+ "type": "text",
986
+ "text": "Graph priors For Erdos-Rényi ˝ graphs, all methods use the prior $p ( \\mathbf G ) \\propto q ^ { \\| \\mathbf G \\| _ { 1 } } ( 1 - q ) ^ { \\binom { d } { 2 } - \\| \\mathbf G \\| _ { 1 } }$ , capturing that each edge exists independently w.p. $q$ [53]. For scale-free graphs, we define the prior $p ( \\mathbf { \\bar { G } } ) \\propto \\mathbf { \\breve { \\prod } } _ { i = 1 } ^ { d } ( 1 + \\lVert \\mathbf { G } _ { i } ^ { \\top } \\rVert _ { 1 } ) ^ { - 3 }$ , analogous to their power law degree distribution $p ( \\mathrm { d e g } ) \\sim \\mathrm { d e g } ^ { - 3 }$ [54]. Here, $\\mathbf { G } _ { i } ^ { \\top }$ is the $i$ -th column of the adjacency matrix. DiBS implements either prior by using the corresponding term above as an additional factor in $p ( \\mathbf { Z } )$ with $\\mathbf { G } : = \\mathbf { G } _ { \\alpha } ( \\mathbf { Z } )$ (see Section 4.2). ",
987
+ "bbox": [
988
+ 173,
989
+ 404,
990
+ 826,
991
+ 478
992
+ ],
993
+ "page_idx": 6
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "Metrics Since neither density nor samples of the ground truth posteriors are available for BNs of $d \\in \\{ 2 0 , 5 0 \\}$ variables, we follow the evaluation metrics used by previous work. We define the expected structural Hamming distance to the ground truth graph $\\mathbf { G } ^ { \\ast }$ under the inferred posterior as ",
998
+ "bbox": [
999
+ 173,
1000
+ 484,
1001
+ 825,
1002
+ 526
1003
+ ],
1004
+ "page_idx": 6
1005
+ },
1006
+ {
1007
+ "type": "equation",
1008
+ "img_path": "images/8dfde3679e300f5d13c9d74a8cd1612a7de62386092d6c5a1148fd0a33bffd56.jpg",
1009
+ "text": "$$\n\\operatorname { \\mathbb { E } \\mathrm { - } S H D } ( p , \\mathbf { G } ^ { * } ) : = \\sum _ { \\mathbf { G } } p ( \\mathbf { G } | \\mathcal { D } ) \\cdot \\operatorname { S H D } ( \\mathbf { G } , \\mathbf { G } ^ { * } )\n$$",
1010
+ "text_format": "latex",
1011
+ "bbox": [
1012
+ 339,
1013
+ 530,
1014
+ 656,
1015
+ 564
1016
+ ],
1017
+ "page_idx": 6
1018
+ },
1019
+ {
1020
+ "type": "text",
1021
+ "text": "where $\\mathrm { S H D } ( \\mathbf { G } , \\mathbf { G } ^ { * } )$ counts the edge changes that separate the essential graphs representing the MECs of $\\mathbf { G }$ and $\\mathbf { G } ^ { \\ast }$ [8, 55]. In addition, we follow Friedman and Koller [20] and Ellis and Wong [41] and compute the area under the receiver operating characteristic curve $( A U R O C )$ for pairwise edge predictions when varying the confidence threshold under the inferred marginal $p ( g _ { i j } = 1 | \\mathcal { D } )$ . Finally, following Murphy [10], we also evaluate the ability to predict future observations by computing the average negative (marginal) log likelihood on 100 held-out observations Dtest: ",
1022
+ "bbox": [
1023
+ 173,
1024
+ 569,
1025
+ 825,
1026
+ 654
1027
+ ],
1028
+ "page_idx": 6
1029
+ },
1030
+ {
1031
+ "type": "equation",
1032
+ "img_path": "images/0f971092ab8223075e63c121721bb1d25d8fd8733b0a3e98422b672c5d51de14.jpg",
1033
+ "text": "$$\n\\mathrm { n e g . L L } ( p , \\mathcal { D } ^ { \\mathrm { t e s t } } ) : = - \\sum _ { \\mathbf { G } , \\Theta } p ( \\mathbf { G } , \\Theta | \\mathcal { D } ) \\cdot \\log p ( \\mathcal { D } ^ { \\mathrm { t e s t } } | \\mathbf { G } , \\Theta )\n$$",
1034
+ "text_format": "latex",
1035
+ "bbox": [
1036
+ 299,
1037
+ 659,
1038
+ 697,
1039
+ 694
1040
+ ],
1041
+ "page_idx": 6
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "When inferring $p ( \\mathbf G | \\mathcal D )$ , the corresponding neg. MLL metric instead uses $p ( \\mathcal { D } ^ { \\mathrm { t e s t } } | \\mathbf { G } )$ . Analogously, we also compute the interventional log likelihoods I-LL and I-MLL, a relevant metric in causal inference [10, 12]. Here, an interventional data set $( \\mathcal { D } ^ { \\mathrm { i n t } } , \\mathcal { T } )$ is instead used to compute $p ( \\mathcal { D } ^ { \\mathrm { i n t } } | \\mathbf { G } , \\Theta , \\mathcal { T } )$ and $p ( \\mathcal { D } ^ { \\mathrm { i n t } } | \\mathbf { G } , \\mathcal { Z } )$ in (19), respectively. Scores are the average of 10 interventional data sets. All reported metrics in this section are aggregated for inference of 30 random synthetic BNs. ",
1046
+ "bbox": [
1047
+ 173,
1048
+ 698,
1049
+ 825,
1050
+ 768
1051
+ ],
1052
+ "page_idx": 6
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "In the remainder, DiBS is always run for 3,000 iterations and with $k = d$ for inference of $d$ -variable BNs, which leaves the matrix of edge probabilities unconstrained in rank. We discard a DiBS particle in the rare case that a returned graph is cyclic. Complete details on Gaussian BNs, the evaluation metrics, hyperparameters, and all baselines can be found in Appendix E. ",
1057
+ "bbox": [
1058
+ 173,
1059
+ 773,
1060
+ 825,
1061
+ 830
1062
+ ],
1063
+ "page_idx": 6
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "6.2 Linear Gaussian Bayesian Networks ",
1068
+ "text_level": 1,
1069
+ "bbox": [
1070
+ 176,
1071
+ 844,
1072
+ 465,
1073
+ 859
1074
+ ],
1075
+ "page_idx": 6
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "Marginal posterior inference For linear Gaussian BNs, we first evaluate the classical setting of inferring the marginal posterior $p ( \\mathbf G | \\mathcal D )$ since $p ( \\mathcal { D } | \\mathbf { G } )$ can be computed in closed form. To this end, we employ the commonly used Bayesian Gaussian Equivalent (BGe) marginal likelihood, which scores Markov equivalent structures equally [16, 17]. The form of the BGe score requires DiBS to use the score function estimator in (14). ",
1080
+ "bbox": [
1081
+ 174,
1082
+ 869,
1083
+ 825,
1084
+ 911
1085
+ ],
1086
+ "page_idx": 6
1087
+ },
1088
+ {
1089
+ "type": "image",
1090
+ "img_path": "images/4898b5662db47d5053e3fa9a5ccbe44d7c797951dce3078c59e3b8bd3bf3bec9.jpg",
1091
+ "image_caption": [
1092
+ "Figure 3: Joint posterior inference of graphs and parameters of linear Gaussian networks with $d = 2 0$ nodes. $\\mathrm { D i B S + }$ performs best across all of the metrics. ${ \\mathrm { B G E S ^ { * } } }$ , the next-best alternative, yields substantially worse performance in E-SHD, i.e., in recovering the overall graph structure and MEC. Recall that higher AUROC and lower $\\mathbb { E }$ -SHD, neg. LL, and neg. I-LL scores are preferable. "
1093
+ ],
1094
+ "image_footnote": [],
1095
+ "bbox": [
1096
+ 147,
1097
+ 69,
1098
+ 825,
1099
+ 268
1100
+ ],
1101
+ "page_idx": 7
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "",
1106
+ "bbox": [
1107
+ 174,
1108
+ 362,
1109
+ 823,
1110
+ 391
1111
+ ],
1112
+ "page_idx": 7
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "We compare DiBS with the nonparametric DAG bootstrap [42] using the constraint-based PC [7] and the score-based GES [6] algorithms (BPC and BGES). For MCMC, we only consider structure MCMC $( \\mathbf { M C } ^ { 3 } )$ [37] as a comparison. Order MCMC or hybrid DP approaches bound the number of parents and thus often exclude the ground truth graph a priori, especially for scale-free BN structures. Burn-in and thinning for $\\mathbf { M C ^ { 3 } }$ are chosen to make the wall time comparable with DiBS run on CPUs. In the remainder of the paper, each method uses 30 samples to approximate the posterior over BNs. ",
1117
+ "bbox": [
1118
+ 174,
1119
+ 397,
1120
+ 825,
1121
+ 481
1122
+ ],
1123
+ "page_idx": 7
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "Figure 2 summarizes the results for 30 randomly generated BNs with $d = 2 0$ nodes. We find that $\\mathrm { D i B S + }$ performs well compared to the other methods, all of which were specifically developed for the marginal inference scenario evaluated here. $\\mathrm { D i B S + }$ appears to be preferable to DiBS. ",
1128
+ "bbox": [
1129
+ 174,
1130
+ 486,
1131
+ 825,
1132
+ 529
1133
+ ],
1134
+ "page_idx": 7
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "Joint posterior inference When inferring the joint posterior $p ( \\mathbf { G } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ , we can employ a more explicit representation of linear Gaussian BNs, where the conditional distribution parameters are standard Gaussian. Here, DiBS can leverage the Gumbel-softmax estimator in (12) because $p ( \\mathbf { G } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ is well-defined when $\\mathbf { G }$ lies on the interior of $[ 0 , 1 ] ^ { d \\times d }$ (see Appendix E.1). To provide a comparison with DiBS in the absence of an applicable MCMC method, we propose two variants of $\\mathbf { M C ^ { 3 } }$ as baselines. Metropolis-Hastings $\\mathbf { M C ^ { 3 } }$ (M-MC3) jointly samples parameters and structures, and Metropolis-within-Gibbs $\\mathbf { M C ^ { 3 } }$ $\\mathrm { \\bf { \\bar { G } } { - } } \\mathrm { \\bf { M } } { \\bf C } ^ { 3 } .$ ) alternates in proposing structure and parameters [56]. Moreover, we extend the bootstrap methods by taking the closed-form maximum likelihood estimate [57] as the posterior parameter sample for a given graph inferred using the BGe score $\\mathrm { { \\cdot { \\bf { B } P C } ^ { * } } }$ and ${ \\mathrm { B G E S } } ^ { * }$ ), an approach taken in, e.g., causal BN learning [14]. ",
1139
+ "bbox": [
1140
+ 173,
1141
+ 535,
1142
+ 825,
1143
+ 674
1144
+ ],
1145
+ "page_idx": 7
1146
+ },
1147
+ {
1148
+ "type": "text",
1149
+ "text": "Figure 3 shows the results for $d = 2 0$ nodes, where $\\mathbb { E }$ -SHD and AUROC are computed by empirically marginalizing out the parameters. We find that $\\mathrm { D i B S + }$ is the only considered method that performs well across all of the metrics, often outperforming the baselines by a significant margin. As for marginal posterior inference of linear Gaussian BNs, $\\mathrm { D i B S + }$ performs slightly better than DiBS. ",
1150
+ "bbox": [
1151
+ 174,
1152
+ 679,
1153
+ 825,
1154
+ 736
1155
+ ],
1156
+ "page_idx": 7
1157
+ },
1158
+ {
1159
+ "type": "text",
1160
+ "text": "6.3 Nonlinear Gaussian Bayesian Networks ",
1161
+ "text_level": 1,
1162
+ "bbox": [
1163
+ 174,
1164
+ 758,
1165
+ 488,
1166
+ 773
1167
+ ],
1168
+ "page_idx": 7
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "We also consider joint inference of nonlinear Gaussian BNs where the mean of each local conditional Gaussian is parameterized by a 2-layer dense neural network with five hidden nodes and ReLU activation functions (see Appendix E.1). Since the marginal likelihood does not have a closed form, we are unable to use $\\mathbf { B P C ^ { * } }$ and ${ \\mathrm { B G E S ^ { * } } }$ as a means of comparison. Figure 4 displays the results for $d = 2 0$ variables, where a given BN model has $| \\Theta | = 2 , 2 2 0$ weights and biases. Analogous to joint inference of linear Gaussian BNs, DiBS and $\\mathrm { D i B S + }$ outperform the MCMC baselines across the considered metrics. To the best of our knowledge, this is the first time that such nonlinear Gaussian BN models have been inferred under the Bayesian paradigm, which opens up exciting avenues in the active learning of more sophisticated causal structures. ",
1173
+ "bbox": [
1174
+ 174,
1175
+ 786,
1176
+ 825,
1177
+ 911
1178
+ ],
1179
+ "page_idx": 7
1180
+ },
1181
+ {
1182
+ "type": "image",
1183
+ "img_path": "images/a55f647b9a7cf43a5820df9205311c31547b9a1a7ead17fa584218e5a1d71834.jpg",
1184
+ "image_caption": [
1185
+ "Figure 4: Joint posterior inference of nonlinear Gaussian BNs with $d = 2 0$ nodes. Here, the mean of the local conditional distribution of each node is parameterized by a 2-layer neural network with five hidden nodes. DiBS and $\\mathrm { D i B S + }$ perform favorably across the board, particularly in the graph metrics. "
1186
+ ],
1187
+ "image_footnote": [],
1188
+ "bbox": [
1189
+ 147,
1190
+ 69,
1191
+ 828,
1192
+ 266
1193
+ ],
1194
+ "page_idx": 8
1195
+ },
1196
+ {
1197
+ "type": "text",
1198
+ "text": "Appendix F complements Sections 6.2 and 6.3 with details on computing time and efficient implementation of DiBS with SVGD, showing that GPU wall times of the above inference experiments lie on the order of seconds or only a few minutes. In addition, Appendix $\\mathbf { G }$ provides results for $d = 5 0$ variables, where $\\mathrm { D i B S + }$ likewise performs favorably when jointly inferring $p ( \\mathbf { G } , \\boldsymbol { \\Theta } | \\mathcal { D } )$ . For marginal posterior inference of $p ( \\mathbf G | \\mathcal D )$ under the BGe marginal likelihood, DiBS appears to require more Monte Carlo samples to compensate for the high variance of the score function estimator in this high-dimensional setting. ",
1199
+ "bbox": [
1200
+ 173,
1201
+ 324,
1202
+ 825,
1203
+ 422
1204
+ ],
1205
+ "page_idx": 8
1206
+ },
1207
+ {
1208
+ "type": "text",
1209
+ "text": "6.4 DiBS with SVGD: Additional Analyses and Ablation Studies ",
1210
+ "text_level": 1,
1211
+ "bbox": [
1212
+ 173,
1213
+ 438,
1214
+ 632,
1215
+ 453
1216
+ ],
1217
+ "page_idx": 8
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Having compared DiBS and its instantiation with SVGD to existing approaches, we finally devote Appendix $_ \\mathrm { H }$ to empirically analyzing some properties of the algorithm. One of our key results is that, all other things held equal, substituting our inner product model in (6) with $p _ { \\alpha } ( g _ { i j } = 1 | \\mathbf { Z } ) = \\sigma _ { \\alpha } ( z _ { i j } )$ , where single scalars encode the edge probabilities, results in significantly worse evaluation metrics. ",
1222
+ "bbox": [
1223
+ 174,
1224
+ 462,
1225
+ 826,
1226
+ 518
1227
+ ],
1228
+ "page_idx": 8
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "We additionally study the uncertainty quantification in (non)identifiable edge structures and show the effects of reducing the latent dimensionality $k$ or the number of iterations $T$ . Our findings suggest that reducing either hyperparameter still allows for competitive posterior approximations and enables trading off posterior inference quality with computational efficiency, e.g., in large-scale applications. ",
1233
+ "bbox": [
1234
+ 173,
1235
+ 523,
1236
+ 825,
1237
+ 580
1238
+ ],
1239
+ "page_idx": 8
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "7 Application: Inferring Protein Signaling Networks From Cell Data ",
1244
+ "text_level": 1,
1245
+ "bbox": [
1246
+ 171,
1247
+ 597,
1248
+ 761,
1249
+ 614
1250
+ ],
1251
+ "page_idx": 8
1252
+ },
1253
+ {
1254
+ "type": "text",
1255
+ "text": "A widely used benchmark in structure learning is the proteomics data set by Sachs et al. [3]. The data contain $N = 7$ , 466 continuous measurements of $d = 1 1$ proteins involved in human immune system cells as well as an established causal network of their signaling interactions. ",
1256
+ "bbox": [
1257
+ 174,
1258
+ 627,
1259
+ 544,
1260
+ 696
1261
+ ],
1262
+ "page_idx": 8
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "We infer both linear and nonlinear Gaussian BNs with Erdos-Rényi ˝ graph priors exactly as in Section 6. The AUROC results in Table 1 indicate that the posterior by DiBS under the BGe model provides the most calibrated edge confidence scores. Not penalizing model complexity as much, the marginal BGe posterior of DiBS $( \\mathrm { D i B S + } )$ ) averages a high expected number of 39.0 (35.0) edges, compared to 12.7 (14.2) and 12.6 (14.2) for its joint posteriors over linear and nonlinear BNs, respectively. Appendix I provides further details and analyses on this matter. The $\\mathbb { E }$ -SHD scores show that, among all the methods, DiBS is closest in structure to the consensus network when performing joint inference with nonlinear Gaussian BNs. This further highlights the need for nonlinear conditionals and joint inference of the graph and parameters in complex real-world settings. ",
1267
+ "bbox": [
1268
+ 174,
1269
+ 703,
1270
+ 544,
1271
+ 896
1272
+ ],
1273
+ "page_idx": 8
1274
+ },
1275
+ {
1276
+ "type": "table",
1277
+ "img_path": "images/213ac3ce06eb3ff6dfae5b6cbd76397c5814dbd266540a2bc5a0acc113a35736.jpg",
1278
+ "table_caption": [
1279
+ "Table 1: Inference of protein signaling pathways with Gaussian BNs. Metrics are the mean $\\pm \\thinspace \\mathrm { S D }$ of 30 random restarts. "
1280
+ ],
1281
+ "table_footnote": [
1282
+ "† Linear Gaussian BN; graph only via BGe marginal lik. § Linear Gaussian BN; graph and parameters jointly ¶Nonlinear Gaussian BN; graph and parameters jointly "
1283
+ ],
1284
+ "table_body": "<table><tr><td>MC3</td><td>E-SHD</td><td>AUROC</td></tr><tr><td>BPC + BGES DiBS DiBS+</td><td>34.0± 0.7 25.5± 2.3 33.7 ±1.7 37.4 ± 0.5 34.7 ± 1.5</td><td>0.616± 0.027 0.566 ± 0.020 0.641 ± 0.030 0.647 ± 0.047 0.629 ± 0.045</td></tr><tr><td>8</td><td>M-MC3 G-MC³ DiBS DiBS+</td><td>37.3± 3.5 0.551 ± 0.078 30.5 ± 3.2 0.527 ± 0.067 23.4± 0.5 0.598 ± 0.052 22.9 ± 2.7 0.557 ± 0.052</td></tr><tr><td>T</td><td>M-MC3 25.2±3.0 G-MC3 35.1±3.2 DiBS 22.6 ± 0.5 DiBS+ 22.8 ±1.9</td><td>0.526± 0.084 0.540 ± 0.080 0.577 ± 0.039 0.535 ± 0.041</td></tr></table>",
1285
+ "bbox": [
1286
+ 555,
1287
+ 670,
1288
+ 826,
1289
+ 854
1290
+ ],
1291
+ "page_idx": 8
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "text": "",
1296
+ "bbox": [
1297
+ 171,
1298
+ 896,
1299
+ 689,
1300
+ 910
1301
+ ],
1302
+ "page_idx": 8
1303
+ },
1304
+ {
1305
+ "type": "text",
1306
+ "text": "8 Conclusion ",
1307
+ "text_level": 1,
1308
+ "bbox": [
1309
+ 174,
1310
+ 89,
1311
+ 299,
1312
+ 106
1313
+ ],
1314
+ "page_idx": 9
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "We have presented a general, fully differentiable approach to inference of posterior distributions over BNs. Our framework is based on a continuous latent representation of DAGs, whose posterior can be equivalently inferred—without loss of generality and using existing black box inference methods. While we have used SVGD [19] for this purpose, our general approach could also be instantiated with, e.g., gradient-based sampling methods that rely on the score of the target density [58, 59]. This may improve upon the asymptotic runtime of DiBS with SVGD, which scales quadratically in the number of sampled particles. We expect that our end-to-end approach can be extended to handle missing and interventional data as well as to amortized contexts, where rich unstructured data is available. ",
1319
+ "bbox": [
1320
+ 173,
1321
+ 119,
1322
+ 825,
1323
+ 231
1324
+ ],
1325
+ "page_idx": 9
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Broader impact Our work is relevant to any scientific discipline that aims at inferring the (causal) structure of a system or reasoning about the effects of interventions. If algorithms and decisions are grounded in the structural understanding of a data-generating system and take into account the epistemic uncertainty, we expect them to be more robust and have fewer unforeseen side-effects. However, the assumptions allowing for a causal interpretation of DAGs, e.g., the absence of unmeasured confounders, are often untestable and to be taken with care [60], particularly in safety-critical and societally-sensitive applications. Hence, while potential misuse can never be ruled out, our presented method predominantly promises positive societal and scientific impact. ",
1330
+ "bbox": [
1331
+ 174,
1332
+ 237,
1333
+ 825,
1334
+ 348
1335
+ ],
1336
+ "page_idx": 9
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Acknowledgments and Disclosure of Funding ",
1341
+ "text_level": 1,
1342
+ "bbox": [
1343
+ 174,
1344
+ 367,
1345
+ 553,
1346
+ 386
1347
+ ],
1348
+ "page_idx": 9
1349
+ },
1350
+ {
1351
+ "type": "text",
1352
+ "text": "This project received funding from the Swiss National Science Foundation under NCCR Automation under grant agreement 51NF40 180545, the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program grant agreement no. 815943, and was supported with compute resources by Oracle Cloud Services. This work was also supported by the German Federal Ministry of Education and Research (BMBF): Tübingen AI Center, FKZ: 01IS18039B, and by the Machine Learning Cluster of Excellence, EXC number 2064/1 – Project number 390727645. We thank Nicolo Ruggeri and Guillaume Wang for their valuable feedback. ",
1353
+ "bbox": [
1354
+ 174,
1355
+ 400,
1356
+ 825,
1357
+ 497
1358
+ ],
1359
+ "page_idx": 9
1360
+ },
1361
+ {
1362
+ "type": "text",
1363
+ "text": "References ",
1364
+ "text_level": 1,
1365
+ "bbox": [
1366
+ 174,
1367
+ 517,
1368
+ 266,
1369
+ 534
1370
+ ],
1371
+ "page_idx": 9
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "[1] Judea Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. 1988. \n[2] Dana Pe’er, Aviv Regev, Gal Elidan, and Nir Friedman. Inferring subnetworks from perturbed expression profiles. Bioinformatics, 17:S215–S224, 2001. \n[3] Karen Sachs, Omar Perez, Dana Pe’er, Douglas A Lauffenburger, and Garry P Nolan. Causal proteinsignaling networks derived from multiparameter single-cell data. Science, 308(5721):523–529, 2005. \n[4] Chikako Van Koten and AR Gray. An application of bayesian network for predicting object-oriented software maintainability. Information and Software Technology, 48(1):59–67, 2006. \n[5] Philippe Weber, Gabriela Medina-Oliva, Christophe Simon, and Benoît Iung. Overview on bayesian networks applications for dependability, risk analysis and maintenance areas. Engineering Applications of Artificial Intelligence, 25(4):671–682, 2012. \n[6] David Maxwell Chickering. Optimal structure identification with greedy search. J. Mach. Learn. Res., 3: 507–554, March 2003. \n[7] Peter Spirtes, Clark N. Glymour, and Richard Scheines. Causation, prediction, and search. Adaptive computation and machine learning. MIT Press, Cambridge, Mass, 2nd ed edition, 2000. \n[8] Ioannis Tsamardinos, Laura E Brown, and Constantin F Aliferis. The max-min hill-climbing bayesian network structure learning algorithm. Machine learning, 65(1):31–78, 2006. \n[9] Xun Zheng, Bryon Aragam, Pradeep K Ravikumar, and Eric P Xing. DAGs with NO TEARS: Continuous optimization for structure learning. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. \n[10] Kevin P Murphy. Active learning of causal bayes net structure. 2001. \n[11] Simon Tong and Daphne Koller. Active learning for structure in bayesian networks. In International joint conference on artificial intelligence, volume 17, pages 863–869, 2001. \n[12] Hyunghoon Cho, Bonnie Berger, and Jian Peng. Reconstructing causal biological networks through active learning. PloS one, 11(3):e0150611, 2016. \n[13] Robert Osazuwa Ness, Karen Sachs, Parag Mallick, and Olga Vitek. A bayesian active learning experimental design for inferring signaling networks. In International Conference on Research in Computational Molecular Biology, pages 134–156. Springer, 2017. \n[14] Raj Agrawal, Chandler Squires, Karren Yang, Karthikeyan Shanmugam, and Caroline Uhler. ABCDStrategy: Budgeted experimental design for targeted causal structure discovery. In Proceedings of Machine Learning Research, volume 89, pages 3400–3409. PMLR, 16–18 Apr 2019. \n[15] Julius von Kügelgen, Paul K Rubenstein, Bernhard Schölkopf, and Adrian Weller. Optimal experimental design via bayesian optimization: active causal structure learning for gaussian process networks. arXiv preprint arXiv:1910.03962, 2019. \n[16] Dan Geiger and David Heckerman. Learning gaussian networks. In Proceedings of the Tenth International Conference on Uncertainty in Artificial Intelligence, UAI’94, page 235–243, San Francisco, CA, USA, 1994. \n[17] Dan Geiger and David Heckerman. Parameter priors for directed acyclic graphical models and the characterization of several probability distributions. Ann. Statist., 30(5):1412–1440, October 2002. Publisher: The Institute of Mathematical Statistics. \n[18] David Heckerman, Dan Geiger, and David M. Chickering. Learning Bayesian Networks: The Combination of Knowledge and Statistical Data. Machine Learning, 20(3):197–243, September 1995. \n[19] Qiang Liu and Dilin Wang. Stein variational gradient descent: A general purpose bayesian inference algorithm. In Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS’16, page 2378–2386, 2016. \n[20] Nir Friedman and Daphne Koller. Being Bayesian About Network Structure. A Bayesian Approach to Structure Discovery in Bayesian Networks. Machine Learning, 50(1):95–125, January 2003. \n[21] David Madigan and Adrian E Raftery. Model selection and accounting for model uncertainty in graphical models using occam’s window. Journal of the American Statistical Association, 89(428):1535–1546, 1994. \n[22] David Madigan, Jonathan Gavrin, and Adrian E Raftery. Eliciting prior information to enhance the predictive performance of bayesian graphical models. Communications in Statistics-Theory and Methods, 24(9):2271–2292, 1995. \n[23] R.W. Robinson. Counting labeled acyclic digraphs. New Directions in the Theory of Graphs, 1973. \n[24] Yue Yu, Jie Chen, Tian Gao, and Mo Yu. DAG-GNN: DAG structure learning with graph neural networks. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 7154–7163. PMLR, 09–15 Jun 2019. \n[25] Sébastien Lachapelle, Philippe Brouillard, Tristan Deleu, and Simon Lacoste-Julien. Gradient-based neural dag learning. In International Conference on Learning Representations, 2020. \n[26] Ignavier Ng, Shengyu Zhu, Zhitang Chen, and Zhuangyan Fang. A graph autoencoder approach to causal structure learning. In NeurIPS 2019 Workshop “Do the right thing”: machine learning and causal inference for improved decision making, 2019. \n[27] Xun Zheng, Chen Dan, Bryon Aragam, Pradeep Ravikumar, and Eric Xing. Learning sparse nonparametric dags. In International Conference on Artificial Intelligence and Statistics, pages 3414–3425. PMLR, 2020. \n[28] Roxana Pamfil, Nisara Sriwattanaworachai, Shaan Desai, Philip Pilgerstorfer, Konstantinos Georgatzis, Paul Beaumont, and Bryon Aragam. Dynotears: Structure learning from time-series data. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, volume 108 of Proceedings of Machine Learning Research, pages 1595–1605. PMLR, 2020. \n[29] Mengyue Yang, Furui Liu, Zhitang Chen, Xinwei Shen, Jianye Hao, and Jun Wang. Causalvae: Disentangled representation learning via neural structural causal models. arXiv preprint arXiv: 2004.08697, 2020. \n[30] Muhan Zhang, Shali Jiang, Zhicheng Cui, Roman Garnett, and Yixin Chen. D-vae: A variational autoencoder for directed acyclic graphs. In Advances in Neural Information Processing Systems, volume 32, 2019. \n[31] Nan Rosemary Ke, Olexa Bilaniuk, Anirudh Goyal, Stefan Bauer, Hugo Larochelle, Chris Pal, and Yoshua Bengio. Learning neural causal models from unknown interventions. arXiv preprint arXiv: 1910.01075, 2019. \n[32] Ignavier Ng, Zhuangyan Fang, Shengyu Zhu, Zhitang Chen, and Jun Wang. Masked gradient-based causal structure learning. arXiv preprint arXiv:1910.08527, 2019. \n[33] Philippe Brouillard, Sébastien Lachapelle, Alexandre Lacoste, Simon Lacoste-Julien, and Alexandre Drouin. Differentiable causal discovery from interventional data. arXiv preprint arXiv:2007.01754, 2020. \n[34] Dennis Wei, Tian Gao, and Yue Yu. Dags with no fears: A closer look at continuous optimization for learning bayesian networks. Advances in Neural Information Processing Systems, 2020. \n[35] Ignavier Ng, Sébastien Lachapelle, Nan Rosemary Ke, and Simon Lacoste-Julien. On the convergence of continuous constrained optimization for structure learning. arXiv preprint arXiv:2011.11150, 2020. \n[36] David Madigan, Jeremy York, and Denis Allard. Bayesian graphical models for discrete data. International Statistical Review/Revue Internationale de Statistique, pages 215–232, 1995. \n[37] Paolo Giudici and Robert Castelo. Improving markov chain monte carlo model search for data mining. Machine learning, 50(1-2):127–158, 2003. \n[38] Daniel Eaton and Kevin Murphy. Bayesian structure learning using dynamic programming and MCMC. In Proceedings of the Twenty-Third Conference on Uncertainty in Artificial Intelligence (UAI), 2007. \n[39] Marco Grzegorczyk and Dirk Husmeier. Improving the structure MCMC sampler for Bayesian networks by introducing a new edge reversal move. Machine Learning, 71(2):265, April 2008. \n[40] Jack Kuipers and Giusi Moffa. Partition mcmc for inference on acyclic digraphs. Journal of the American Statistical Association, 112(517):282–299, 2017. \n[41] Byron Ellis and Wing Hung Wong. Learning causal bayesian network structures from experimental data. Journal of the American Statistical Association, 103(482):778–789, 2008. \n[42] N. Friedman, M. Goldszmidt, and A. J. Wyner. Data analysis with Bayesian networks: A bootstrap approach. In Proceedings of the Fifteenth Conference on Uncertainty in Artificial Intelligence, 1999. \n[43] Mikko Koivisto and Kismat Sood. Exact bayesian structure discovery in bayesian networks. Journal of Machine Learning Research, 5(May):549–573, 2004. \n[44] Mikko Koivisto. Advances in exact bayesian structure discovery in bayesian networks. In Proceedings of the Twenty-Second Conference on Uncertainty in Artificial Intelligence, page 241–248, 2006. \n[45] Marina Meila and Tommi S Jaakkola. Tractable bayesian learning of tree belief networks. Statistics and Computing, (16):77–92, 2006. \n[46] Denver Dash and Gregory F Cooper. Model averaging for prediction with discrete bayesian networks. Journal of Machine Learning Research, 5(Sep):1177–1203, 2004. \n[47] Thomas N Kipf and Max Welling. Variational graph auto-encoders. arXiv preprint arXiv:1611.07308, 2016. \n[48] Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In Proceedings International Conference on Learning Representations, 2017. \n[49] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparametrization with gumbel-softmax. In Proceedings International Conference on Learning Representations 2017, April 2017. \n[50] Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. \n[51] Shakir Mohamed, Mihaela Rosca, Michael Figurnov, and Andriy Mnih. Monte carlo gradient estimation in machine learning. Journal of Machine Learning Research, 21(132):1–62, 2020. \n[52] Ignavier Ng, AmirEmad Ghassami, and Kun Zhang. On the role of sparsity and dag constraints for learning linear dags. Advances in Neural Information Processing Systems, 2020. \n[53] P. Erdos and A Rényi. On random graphs. ˝ Publicationes Mathematicae, 6:290–297, 1959. \n[54] Albert-László Barabási and Réka Albert. Emergence of scaling in random networks. Science, 286(5439): 509–512, 1999. \n[55] Steen A Andersson, David Madigan, Michael D Perlman, et al. A characterization of markov equivalence classes for acyclic digraphs. Annals of statistics, 25(2):505–541, 1997. \n[56] W Keith Hastings. Monte carlo sampling methods using markov chains and their applications. 1970. \n[57] Alain Hauser and Peter Bühlmann. Jointly interventional and observational data: estimation of interventional markov equivalence classes of directed acyclic graphs. Journal of the Royal Statistical Society: Series B: Statistical Methodology, pages 291–318, 2015. \n[58] Radford M Neal et al. Mcmc using hamiltonian dynamics. Handbook of Markov chain Monte Carlo, 2 (11):2, 2011. \n[59] Max Welling and Yee Whye Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th International Conference on International Conference on Machine Learning, ICML’11, page 681–688, 2011. \n[60] A. Philip Dawid. Beware of the DAG! In Proceedings of Workshop on Causality: Objectives and Assessment at NIPS 2008, pages 59–86, 2010. \n[61] Jonas Peters and Peter Bühlmann. Identifiability of gaussian structural equation models with equal error variances. Biometrika, 101(1):219–228, 2014. \n[62] Jack Kuipers, Giusi Moffa, and David Heckerman. Addendum on the scoring of Gaussian directed acyclic graphical models. Ann. Statist., 42(4):1689–1691, August 2014. Publisher: The Institute of Mathematical Statistics. \n[63] Diviyan Kalainathan, Olivier Goudet, Isabelle Guyon, David Lopez-Paz, and Michèle Sebag. Structural agnostic modeling: Adversarial learning of causal graphs. arXiv preprint arXiv:1803.04929, 2018. \n[64] Chris Sherlock, Paul Fearnhead, Gareth O Roberts, et al. The random walk metropolis: linking theory and practice through a case study. Statistical Science, 25(2):172–190, 2010. \n[65] Dorit Dor and Michael Tarsi. A simple algorithm to construct a consistent extension of a partially oriented graph. 1992. \n[66] Yangbo He, Jinzhu Jia, and Bin Yu. Counting and exploring sizes of markov equivalence classes of directed acyclic graphs. The Journal of Machine Learning Research, 16(1):2589–2609, 2015. \n[67] Diviyan Kalainathan and Olivier Goudet. Causal discovery toolbox: Uncover causal relationships in python. arXiv preprint arXiv:1903.02278, 2019. URL https://github.com/FenTechSolutions/CausalDiscoveryToolbox. \n[68] James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax. \n[69] Yoshua Bengio, Tristan Deleu, Nasim Rahaman, Nan Rosemary Ke, Sebastien Lachapelle, Olexa Bilaniuk, Anirudh Goyal, and Christopher Pal. A meta-transfer objective for learning to disentangle causal mechanisms. In International Conference on Learning Representations, 2020. ",
1376
+ "bbox": [
1377
+ 178,
1378
+ 540,
1379
+ 826,
1380
+ 911
1381
+ ],
1382
+ "page_idx": 9
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "",
1387
+ "bbox": [
1388
+ 171,
1389
+ 56,
1390
+ 828,
1391
+ 916
1392
+ ],
1393
+ "page_idx": 10
1394
+ },
1395
+ {
1396
+ "type": "text",
1397
+ "text": "",
1398
+ "bbox": [
1399
+ 171,
1400
+ 74,
1401
+ 828,
1402
+ 919
1403
+ ],
1404
+ "page_idx": 11
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "",
1409
+ "bbox": [
1410
+ 171,
1411
+ 92,
1412
+ 828,
1413
+ 381
1414
+ ],
1415
+ "page_idx": 12
1416
+ }
1417
+ ]
parse/train/YqYt54gU-XV/YqYt54gU-XV_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/YqYt54gU-XV/YqYt54gU-XV_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/mjyMGFL8N2/mjyMGFL8N2.md ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Provable Guarantees for Self-Supervised Deep Learning with Spectral Contrastive Loss
2
+
3
+ Jeff Z. HaoChen Stanford University jhaochen@stanford.edu
4
+
5
+ Colin Wei Stanford University colinwei@stanford.edu
6
+
7
+ Adrien Gaidon Toyota Research Institute adrien.gaidon@tri.global
8
+
9
+ Tengyu Ma Stanford University tengyuma@stanford.edu
10
+
11
+ # Abstract
12
+
13
+ Recent works in self-supervised learning have advanced the state-of-the-art by relying on the contrastive learning paradigm, which learns representations by pushing positive pairs, or similar examples from the same class, closer together while keeping negative pairs far apart. Despite the empirical successes, theoretical foundations are limited – prior analyses assume conditional independence of the positive pairs given the same class label, but recent empirical applications use heavily correlated positive pairs (i.e., data augmentations of the same image). Our work analyzes contrastive learning without assuming conditional independence of positive pairs using a novel concept of the augmentation graph on data. Edges in this graph connect augmentations of the same datapoint, and ground-truth classes naturally form connected sub-graphs. We propose a loss that performs spectral decomposition on the population augmentation graph and can be succinctly written as a contrastive learning objective on neural net representations. Minimizing this objective leads to features with provable accuracy guarantees under linear probe evaluation. By standard generalization bounds, these accuracy guarantees also hold when minimizing the training contrastive loss. Empirically, the features learned by our objective can match or outperform several strong baselines on benchmark vision datasets. In all, this work provides the first provable analysis for contrastive learning where guarantees for linear probe evaluation can apply to realistic empirical settings.
14
+
15
+ # 1 Introduction
16
+
17
+ Recent empirical breakthroughs have demonstrated the effectiveness of self-supervised learning, which trains representations on unlabeled data with surrogate losses and self-defined supervision signals [4, 6, 10, 14, 23, 24, 35, 38, 41, 42, 50–52]. Self-supervision signals in computer vision are often defined by using data augmentation to produce multiple views of the same image. For example, the recent contrastive learning objectives [3, 12, 13, 15, 22] encourage closer representations for augmentations (views) of the same natural data than for randomly sampled pairs of data.
18
+
19
+ Despite the empirical successes, there is a limited theoretical understanding of why self-supervised losses learn representations that can be adapted to downstream tasks, for example, using linear heads. Recent mathematical analyses by Arora et al. [3], Lee et al. $\pmb { \pmb { 2 8 } }$ , Tosh et al. [44, 45] provide guarantees under the assumption that two views are somewhat independent conditioned on the label. However, the pair of augmented examples used in practical algorithms usually exhibit a strong correlation, even conditioned on the label. For instance, two augmentations of the same dog image share much more similarity than augmentations of two different random dog images. Thus the existing theory does not explain the practical success of self-supervised learning.
20
+
21
+ ![](images/f434201d93f07155cf28976251d153e6a6f7063eef9ee06516e041eb7ce19570.jpg)
22
+ Figure 1: Left: demonstration of the population augmentation graph. Two augmented data are connected if they are views of the same natural data. Augmentations of data from different classes in the downstream tasks are assumed to be nearly disconnected, whereas there are more connections within the same class. We allow the existence of disconnected sub-graphs within a class corresponding to potential sub-classes. Right: decomposition of the learned representations. The representations (rows in the RHS) learned by minimizing the population spectral contrastive loss can be decomposed as the LHS. The scalar $s _ { x _ { i } }$ is positive for every augmented data $x _ { i }$ . Columns of the matrix labeled “eigenvectors” are the top eigenvectors of the normalized adjacency matrix of the augmentation graph defined in Section ${ \bar { 3 . } } 1 .$ The operator $\odot$ multiplies row-wise each $s _ { x _ { i } }$ with the $x _ { i }$ -th row of the eigenvector matrix. When classes (or sub-classes) are exactly disconnected in the augmentation graph, the eigenvectors are sparse and align with the sub-class structure. The invertible $Q$ matrix does not affect the performance of the rows under the linear probe.
23
+
24
+ This paper presents a theoretical framework for self-supervised learning without requiring conditional independence. We design a principled, practical loss function for learning neural net representations that resembles state-of-the-art contrastive learning methods. We prove that, under a simple and realistic data assumption, linear classification using representations learned on a polynomial number of unlabeled data samples can recover the ground-truth labels of the data with high accuracy.
25
+
26
+ The fundamental data property that we leverage is a notion of continuity of the population data within the same class. Though a random pair of examples from the same class can be far apart, the pair is often connected by (many) sequences of examples, where consecutive examples in the sequences are close neighbors within the same class. This property is more salient when the neighborhood of an example includes many different types of augmentations. Prior work $\mathbb { H }$ empirically demonstrates this type of connectivity property and uses it in the analysis of pseudolabeling algorithms.
27
+
28
+ More formally, we define the population augmentation graph, whose vertices are all the augmented data in the population distribution, which can be an exponentially large or infinite set. Two vertices are connected with an edge if they are augmentations of the same natural example. Our main assumption is that for some proper $m \in { \mathcal { Z } } ^ { + }$ , the sparsest $m$ -partition (Definition 3.4) is large. This intuitively states that we can’t split the augmentation graph into too many disconnected sub-graphs by only removing a sparse set of edges. This assumption can be seen as a graph-theoretic version of the continuity assumption on population data. We also assume that there are very few edges across different ground-truth classes (Assumption $\textcircled { 3 . 5 }$ . Figure $\bigtriangledown$ (left) illustrates a realistic scenario where dog and cat are the ground-truth categories, between which edges are very rare. Each breed forms a sub-graph that has sufficient inner connectivity and thus cannot be further partitioned.
29
+
30
+ Our assumption fundamentally does not require conditional independence and can allow disconnected sub-graphs within a class. The classes in the downstream task can be also somewhat flexible as long as they are disconnected in the augmentation graph. For example, when the augmentation graph consists of $m$ disconnected sub-graphs corresponding to fine-grained classes, our assumptions allow the downstream task to have any $r \leq m$ coarse-grained classes containing these fine-grained classes as a sub-partition. Prior work $\boxed { \boxplus 9 }$ on pseudolabeling algorithms essentially requires an exact alignment between sub-graphs and downstream classes (i.e., $r = m$ ). They face this limitation because their analysis requires fitting discrete pseudolabels on the unlabeled data. We avoid this difficulty because we consider directly learning continuous representations on the unlabeled data.
31
+
32
+ We apply spectral decomposition—a classical approach for graph partitioning, also known as spectral clustering $\textcircled { 1 3 7 } , \textcircled { 3 9 } \textcircled { 1 }$ in machine learning—to the adjacency matrix defined on the population augmentation graph. We form a matrix where the top- $k$ eigenvectors are the columns and interpret each row of the matrix as the representation (in $\mathbb { R } ^ { k }$ ) of an example. Somewhat surprisingly, we show that this feature extractor can be also recovered (up to some linear transformation) by minimizing the following population objective which is similar to the standard contrastive loss (Section $\textcircled { 3 . 2 }$
33
+
34
+ $$
35
+ \mathcal { L } ( f ) = - 2 \cdot \mathbb { E } _ { x , x ^ { + } } \left[ f ( x ) ^ { \top } f ( x ^ { + } ) \right] + \mathbb { E } _ { x , x ^ { \prime } } \big [ \left( f ( x ) ^ { \top } f ( x ^ { \prime } ) \right) ^ { 2 } \big ] ,
36
+ $$
37
+
38
+ where $( x , x ^ { + } )$ is a pair of augmentations of the same data, $( x , x ^ { \prime } )$ is a pair of independently random augmented data, and $f$ is a parameterized function from augmented data to $\mathbb { R } ^ { k }$ . Figure $\boxed { 1 }$ (right) illustrates the relationship between the eigenvector matrix and the learned representations. We call this loss the population spectral contrastive loss.
39
+
40
+ We analyze the linear classification performance of the representations learned by minimizing the population spectral contrastive loss. Our main result (Theorem $\textcircled { 3 . 7 }$ shows that when the representation dimension exceeds the maximum number of disconnected sub-graphs, linear classification with learned representations is guaranteed to have a small error. Our theorem reveals a trend that a larger representation dimension is needed when there are a larger number of disconnected sub-graphs. Our analysis relies on novel techniques tailored to linear probe performance, which have not been studied in the spectral graph theory community to the best of our knowledge.
41
+
42
+ The spectral contrastive loss also works on empirical data. Since our approach optimizes parametric loss functions, guarantees involving the population loss can be converted to finite sample results using off-the-shelf generalization bounds. The sample complexity is polynomial in the Rademacher complexity of the model family and other relevant parameters (Theorem 4.1 and Theorem $\boxed { 4 . 2 }$ .
43
+
44
+ In summary, our main theoretical contributions are: 1) we propose a simple contrastive loss motivated by spectral decomposition of the population data graph, 2) under simple and realistic assumptions, we provide downstream classification guarantees for the representation learned by minimizing this loss on population data, and 3) our analysis is easily applicable to deep networks with polynomial unlabeled samples via off-the-shelf generalization bounds.
45
+
46
+ In addition, we implement and test the proposed spectral contrastive loss on standard vision benchmark datasets. We demonstrate that the features learned by our algorithm can match or outperform several strong baselines [12, 14, 15, 21] when evaluated using a linear probe.
47
+
48
+ # 2 Additional related works
49
+
50
+ Empirical works on self-supervised learning. Self-supervised learning algorithms have been shown to successfully learn representations that benefit downstream tasks [4, 6, 10, 12, 13, 15, 22– 24, 35, 38, 41, 42, 50–52]. Many recent self-supervised learning algorithms learn features with siamese networks $\textcircled { 8 } \textcircled { 1 8 }$ , where two neural networks of shared weights are applied to pairs of augmented data. Introducing asymmetry to siamese networks either with a momentum encoder like BYOL [21] or by stopping gradient propagation for one branch of the siamese network like SimSiam [14] has been shown to effectively avoid collapsing. Contrastive methods [12, 15, 22] minimize the InfoNCE loss $\pmb { \Vert 3 8 } \Vert$ , where two views of the same data are attracted while views from different data are repulsed.
51
+
52
+ Theoretical works on self-supervised learning. In addition to works [3, 28, 44, 45] discussed in the introduction, several other works [5, 43, 47, 48] also theoretically study self-supervised learning. The work Tsai et al. $\boxed { \boxplus 7 }$ prove that self-supervised learning methods can extract task-relevant information and discard task-irrelevant information, but lacks guarantees for solving downstream tasks efficiently with simple (e.g., linear) models. Tian et al. $\bar { \bigtriangledown } 4 3 \|$ study why non-contrastive selfsupervised learning methods can avoid feature collapse. Cai et al. $\pmb { \mathbb { Q } } \|$ analyze domain adaptation algorithms for subpopulation shift with a similar expansion condition as $| \dot { \overline { { { \vert 4 9 \vert } } } }$ while also allowing disconnected parts within each class, but require access to ground-truth labels during training. In contrast, our algorithm doesn’t need labels during pre-training.
53
+
54
+ # 3 Spectral contrastive learning on population data
55
+
56
+ In this section, we introduce our theoretical framework, the spectral contrastive loss, and the main analysis of the performance of the representations learned on population data.
57
+
58
+ We use $\overline { { \mathcal { X } } }$ to denote the set of all natural data (raw inputs without augmentation). We assume that each ${ \bar { x } } \in { \overline { { \mathcal { X } } } }$ belongs to one of $r$ classes, and let $y : \overline { { \mathcal { X } } } [ r ]$ denote the ground-truth (deterministic) labeling function. Let $\mathcal { P } _ { \overline { { \mathcal { X } } } }$ be the population distribution over $\overline { { \mathcal { X } } }$ from which we draw training data and test our final performance. For the ease of exposition, we assume $\overline { { \mathcal { X } } }$ to be a finite but exponentially large set (e.g., all real vectors in $\mathbb { R } ^ { d }$ with bounded precision).1
59
+
60
+ We next formulate data augmentations. Given a natural data sample ${ \bar { x } } \in { \overline { { \mathcal { X } } } }$ , we use $\boldsymbol { \mathcal { A } } ( \cdot | \boldsymbol { \bar { x } } )$ to denote the distribution of its augmentations. For instance, when $\bar { x }$ represents an image, $\boldsymbol { \mathcal { A } } ( \cdot | \boldsymbol { \bar { x } } )$ can be the distribution of common augmentations $\mathbb { \left[ 1 2 \right] }$ that includes Gaussian blur, color distortion and random cropping. We use $\mathcal { X }$ to denote the set of all augmented data, which is the union of supports of all $\boldsymbol { \mathcal { A } } ( \cdot | \boldsymbol { \bar { x } } )$ for $\bar { x } \in \overline { { \mathcal { X } } }$ . As with $\overline { { \mathcal { X } } }$ , we also assume that $\mathcal { X }$ is a finite but exponentially large set, and denote $N = | { \mathcal { X } } |$ .
61
+
62
+ We will learn an embedding function $f : \mathcal { X } \to \mathbb { R } ^ { k }$ , and then evaluate its quality by the minimum error achieved with a linear probe. Concretely, a linear classifier has weights $B \in \mathbb { R } ^ { \bar { k } \times r }$ and predicts $\begin{array} { r } { g _ { f , B } ( x ) = \arg \operatorname* { m a x } _ { i \in [ r ] } ( f ( \dot { x } ) ^ { \top } B ) _ { i } } \end{array}$ for an augmented data $x$ (arg max breaks tie arbitrarily). Then, given a natural data sample $\bar { x }$ , we ensemble the predictions on augmented data and predict:
63
+
64
+ $$
65
+ \bar { g } _ { f , B } ( \bar { x } ) : = \underset { i \in [ r ] } { \arg \operatorname* { m a x } } \ \underset { x \sim \mathcal { A } ( \cdot | \bar { x } ) } { \operatorname* { P r } } \left[ g _ { f , B } ( x ) = i \right] .
66
+ $$
67
+
68
+ Define the linear probe error as the error of the best possible linear classifier on the representations:
69
+
70
+ $$
71
+ \mathcal { E } ( f ) : = \operatorname* { m i n } _ { B \in \mathbb { R } ^ { k \times r } } \operatorname* { P r } _ { \bar { x } \sim \mathcal { P } _ { \overline { { \mathcal { X } } } } } [ y ( \bar { x } ) \neq \bar { g } _ { f , B } ( \bar { x } ) ]
72
+ $$
73
+
74
+ # 3.1 Augmentation graph and spectral decomposition
75
+
76
+ Our approach is based on the central concept of population augmentation graph, denoted by $G ( \mathcal { X } , w )$ , where the vertex set is all augmentation data $\mathcal { X }$ and $w$ denotes the edge weights defined below. For any two augmented data $x , x ^ { \prime } \in { \mathcal { X } }$ , define the weight $w _ { x x ^ { \prime } }$ as the marginal probability of generating the pair $x$ and $x ^ { \prime }$ from a random natural data $\hat { x } \sim \mathcal { P } _ { \overline { { x } } }$ :
77
+
78
+ $$
79
+ w _ { x x ^ { \prime } } : = \mathbb { E } _ { \bar { x } \sim \mathcal { P } _ { \overline { { \mathcal { X } } } } } \left[ A ( x | \bar { x } ) A ( x ^ { \prime } | \bar { x } ) \right]
80
+ $$
81
+
82
+ Therefore, the weights sum to 1 because the total probability mass is 1: $\begin{array} { r } { \sum _ { x , x ^ { \prime } \in \mathcal { X } } w _ { x x ^ { \prime } } = 1 } \end{array}$ The relative magnitude intuitively captures the closeness between $x$ and $x ^ { \prime }$ with respect to the augmentation transformation. For most of the unrelated $x$ and $x ^ { \prime }$ , the value $w _ { x x ^ { \prime } }$ will be significantly smaller than the average value. For example, when $x$ and $x ^ { \prime }$ are random croppings of a cat and a dog respectively, $w _ { x x ^ { \prime } }$ will be essentially zero because no natural data can be augmented into both $x$ and $x ^ { \prime }$ . On the other hand, when $x$ and $x ^ { \prime }$ are very close in $\ell _ { 2 }$ -distance or very close in $\ell _ { 2 }$ -distance up to color distortion, $w _ { x x ^ { \prime } }$ is nonzero because they may be augmentations of the same image with Gaussian blur and color distortion. We say that $x$ and $x ^ { \prime }$ are connected with an edge if $w _ { x x ^ { \prime } } > 0$ . See Figure 1 (left) for more illustrations.
83
+
84
+ Given the structure of the population augmentation graph, we apply spectral decomposition to the population graph to construct principled embeddings. The eigenvalue problems are closely related to graph partitioning as shown in spectral graph theory $\mathbb { \ m }$ for both worst-case graphs [11, 25, 29, 33] and random graphs $\textcircled { 1 1 } , \textcircled { 3 0 } , \textcircled { 3 4 } \textcircled { 3 0 }$ . In machine learning, spectral clustering $\pm \pm \pm \pm$ is a classical algorithm that learns embeddings by eigendecomposition on an empirical distance graph and invoking $k$ -means on the embeddings.
85
+
86
+ We will apply eigendecomposition to the population augmentation graph (and then later use linear probe for classification). Let $\begin{array} { r } { w _ { x } = \sum _ { x ^ { \prime } \in \mathcal { X } } \bar { w } _ { x x ^ { \prime } } } \end{array}$ be the total weights associated to $x$ , which is often viewed as an analog of the degree of $x$ in weighted graph. A central object in spectral graph theory is the so-called normalized adjacency matrix:
87
+
88
+ $$
89
+ \overline { { A } } : = D ^ { - 1 / 2 } A D ^ { - 1 / 2 }
90
+ $$
91
+
92
+ where $A \in \mathbb { R } ^ { N \times N }$ is adjacency matrix with entires $A _ { x x ^ { \prime } } = w _ { x x ^ { \prime } }$ and $D \in \mathbb { R } ^ { N \times N }$ is a diagonal matrix with $D _ { x x } = w _ { x }$ . 2
93
+
94
+ Standard spectral graph theory approaches produce vertex embeddings as follows. Let $\gamma _ { 1 } , \gamma _ { 2 } , \cdots , \gamma _ { k }$ be the $k$ largest eigenvalues of $\overline { { A } }$ , and $v _ { 1 } , v _ { 2 } , \cdots , v _ { k }$ be the corresponding unit-norm eigenvectors. Let $F ^ { \star } = [ \breve { v } _ { 1 } , v _ { 2 } , \cdots , v _ { k } ] \in \mathbb { R } ^ { N \times k }$ be the matrix that collects these eigenvectors in columns, and we refer to it as the eigenvector matrix. Let $u _ { x } ^ { \ast } \in \mathbb { R } ^ { k }$ be the $x$ -th row of the matrix $F ^ { \star }$ . It turns out that $u _ { x } ^ { * }$ ’s can serve as desirable embeddings of $x$ ’s because they exhibit clustering structure in Euclidean space that resembles the clustering structure of the graph $G ( \mathcal { X } , w )$ .
95
+
96
+ # 3.2 From spectral decomposition to spectral contrastive learning
97
+
98
+ The embeddings $u _ { x } ^ { * }$ obtained by eigendecomposition are nonparametric—a $k$ -dimensional parameter is needed for every $x$ —and therefore cannot be learned with a realistic amount of data. The embedding matrix $F ^ { \star }$ cannot be even stored efficiently. Therefore, we will instead parameterize the rows of the eigenvector matrix $F ^ { \star }$ as a neural net function, and assume embeddings $u _ { x } ^ { * }$ can be represented by $f ( x )$ for some $f \in { \mathcal { F } }$ , where $\mathcal { F }$ is the hypothesis class containing neural networks. As we’ll show in Section $\textcircled { 4 }$ this allows us to leverage the extrapolation power of neural networks and learn the representation on a finite dataset.
99
+
100
+ Next, we design a proper loss function for the feature extractor $f$ , such that minimizing this loss could recover $F ^ { \star }$ up to some linear transformation. As we will show in Section $\mathbb { H } ,$ the resulting population loss function on $f$ also admits an unbiased estimator with finite training samples. Let $F$ be an embedding matrix with $u _ { x }$ on the $x$ -th row, we will first design a loss function of $F$ that can be decomposed into parts about individual rows of $F$ .
101
+
102
+ We employ the following matrix factorization based formulation for eigenvectors. Consider the objective
103
+
104
+ $$
105
+ \operatorname* { m i n } _ { \boldsymbol { F } \in \mathbb { R } ^ { N \times k } } \mathcal { L } _ { \operatorname* { m f } } ( \boldsymbol { F } ) : = \big \| \overline { { \boldsymbol { A } } } - \boldsymbol { F } \boldsymbol { F } ^ { \top } \big \| _ { F } ^ { 2 } .
106
+ $$
107
+
108
+ By the classical theory on low-rank approximation (Eckart–Young–Mirsky theorem $\mathbb { I m }$ ), any minimizer $\widehat F$ of ${ \mathcal { L } } _ { \mathrm { m f } } ( F )$ contains scaling of the largest eigenvectors of $\overline { { A } }$ up to a right transformation— for some orthonormal matrix $R \in \mathbb { R } ^ { k \times k }$ , we have $\widehat { F } = F ^ { \star } \cdot \mathrm { d i a g } ( [ \sqrt { \gamma _ { 1 } } , \dots , \sqrt { \gamma _ { k } } ] ) Q$ . Fortunately, multiplying the embedding matrix by any matrix on the right and any diagonal matrix on the left does not change its linear probe performance, which is formalized by the following lemma.
109
+
110
+ Lemma 3.1. Consider an embedding matrix $\boldsymbol { F } \in \mathbb { R } ^ { N \times k }$ and a linear classifier $\boldsymbol { B } \in \mathbb { R } ^ { k \times r }$ . Let $D \in \mathbb { R } ^ { N \times N }$ be a diagonal matrix with positive diagonal entries and $Q \in \mathbb { R } ^ { \tilde { k } \times k }$ be an invertible matrix. Then, for any embedding matrix $\widetilde { F } = D \cdot F \cdot Q$ , the linear classifier ${ \tilde { B } } = Q ^ { - 1 } B$ on $\widetilde { F }$ has the same prediction as $B$ on $F$ . As a consequence, we have
111
+
112
+ $$
113
+ \mathcal { E } ( F ) = \mathcal { E } ( \widetilde F ) .
114
+ $$
115
+
116
+ where $\mathcal { E } ( F )$ denotes the linear probe performance when the rows of $F$ are used as embeddings.
117
+
118
+ The proof can be found in Section C.1.
119
+
120
+ The main benefit of objective ${ \mathcal { L } } _ { \mathrm { m f } } ( F )$ is that it’s based on the rows of $F$ . Recall that vectors $u _ { x }$ are the rows of $F$ . Each entry of $F F ^ { \top }$ is of the form $u _ { x } ^ { \top } x _ { x ^ { \prime } }$ , and thus ${ \mathcal { L } } _ { \mathrm { m f } } ( F )$ can be decomposed into a sum of $N ^ { 2 }$ terms involving terms $u _ { x } ^ { \top } u _ { x ^ { \prime } }$ . Interestingly, if we reparameterize each row $u _ { x }$ by $w _ { x } ^ { 1 / 2 } f ( x )$ , we obtain a very similar loss function for $f$ that resembles the contrastive learning loss used in practice $\mathbb { \lVert \rVert }$ as shown below in Lemma $\boxed { 3 . 2 }$ See Figure $\perp$ (right) for an illustration of the relationship between the eigenvector matrix and the representations learned by minimizing this loss.
121
+
122
+ We formally define the positive and negative pairs to introduce the loss. Let $\hat { x } \sim \mathcal { P } _ { \overline { { x } } }$ be a random natural data and draw $x \sim \mathcal { A } ( \cdot | \bar { x } )$ and $x ^ { + } \sim \mathcal { A } ( \cdot | \bar { x } )$ independently to form a positive pair $( x , x ^ { + } )$ . Draw $\hat { x } ^ { \prime } \sim \mathcal { P } _ { \overline { { x } } }$ and $x ^ { \prime } \sim \mathcal { A } ( \cdot | \bar { x } ^ { \prime } )$ independently with ${ \bar { x } } , x , x ^ { + }$ . We call $( x , x ^ { \prime } )$ a negative pair.3
123
+
124
+ Lemma 3.2 (Spectral contrastive loss). Recall that $u _ { x }$ is the $x$ -th row of $F$ . Let $u _ { x } = w _ { x } ^ { 1 / 2 } f ( x ) j$ w1/2 x f (x) for some function $f$ . Then, the loss function ${ \mathcal { L } } _ { \mathrm { m f } } ( F )$ is equivalent to the following loss function for $f$ , called spectral contrastive loss, up to a additive constant:
125
+
126
+ $$
127
+ \begin{array} { r l } & { \mathcal { L } _ { \operatorname { m f } } ( F ) = \mathcal { L } ( f ) + \mathrm { c o n s t } } \\ & { \mathrm { w h e r e } \mathcal { L } ( f ) \triangleq - 2 \cdot \mathbb { E } _ { x , x ^ { + } } \big [ f ( x ) ^ { \top } f ( x ^ { + } ) \big ] + \mathbb { E } _ { x , x ^ { \prime } } \left[ \big ( f ( x ) ^ { \top } f ( x ^ { \prime } ) \big ) ^ { 2 } \right] } \end{array}
128
+ $$
129
+
130
+ The proof can be found in Section C.1.
131
+
132
+ We note that spectral contrastive loss is similar to many popular contrastive losses [12, 38, 40, 50]. For instance, the contrastive loss in SimCLR $\mathbb { \lVert 1 2 \rVert }$ can be rewritten as (with simple algebraic manipulation)
133
+
134
+ $$
135
+ - f ( x ) ^ { \top } f ( x ^ { + } ) + \log \left( \exp \left( f ( x ) ^ { \top } f ( x ^ { + } ) \right) + \sum _ { i = 1 } ^ { n } \exp \left( f ( x ) ^ { \top } f ( x _ { i } ) \right) \right) .
136
+ $$
137
+
138
+ Here $x$ and $x ^ { + }$ are a positive pair and $x _ { 1 } , \cdots , x _ { n }$ are augmentations of other data. Spectral contrastive loss can be seen as removing $f ( x ) ^ { \top } f ( x ^ { + } )$ from the second term, and replacing the log sum of exponential terms with the average of the squares of $f ( x ) ^ { \top } f ( x _ { i } )$ . We will show in Section $\overline { { 6 } }$ that our loss has a similar empirical performance as SimCLR without requiring a large batch size.
139
+
140
+ # 3.3 Theoretical guarantees for spectral contrastive loss on population data
141
+
142
+ In this section, we introduce the main assumptions on the data and state our main theoretical guarantee for spectral contrastive learning on population data.
143
+
144
+ To formalize the idea that $G$ cannot be partitioned into too many disconnected sub-graphs, we introduce the notions of Dirichlet conductance and sparsest $m$ -partition, which are standard in spectral graph theory. Dirichlet conductance represents the fraction of edges from $S$ to its complement:
145
+
146
+ Definition 3.3 (Dirichlet conductance). For a graph $G = ( \mathcal { X } , w )$ and a subset $S \subseteq { \mathcal { X } }$ , we define the Dirichlet conductance of $S$ as
147
+
148
+ $$
149
+ \phi _ { G } ( S ) : = \frac { \sum _ { x \in S , x ^ { \prime } \notin S } w _ { x x ^ { \prime } } } { \sum _ { x \in S } w _ { x } } .
150
+ $$
151
+
152
+ We note that when $S$ is a singleton, there is $\phi _ { G } ( S ) = 1$ due to the definition of $w _ { x }$ . We introduce the sparsest $m$ -partition to represent the number of edges between $m$ disjoint subsets.
153
+
154
+ Definition 3.4 (Sparsest $m$ -partition). Let $G = ( \mathcal { X } , w )$ be the augmentation graph. For an integer $m \in [ 2 , | \mathcal { X } | ]$ , we define the sparsest $m$ -partition as
155
+
156
+ $$
157
+ \rho _ { m } : = \operatorname* { m i n } _ { S _ { 1 } , \cdots , S _ { m } } \operatorname* { m a x } \{ \phi _ { G } ( S _ { 1 } ) , \ldots , \phi _ { G } ( S _ { m } ) \}
158
+ $$
159
+
160
+ where $S _ { 1 } , \cdots , S _ { m }$ are non-empty sets that form a partition of $\mathcal { X }$
161
+
162
+ When $r$ is the number of underlying classes, we might expect $\rho _ { r } \approx 0$ since the augmentations from different classes almost compose a disjoint $r$ -way partition of $\mathcal { X }$ . However, for $m > r$ , we can expect $\rho _ { m }$ to be much larger. For instance, in the extreme case when $m = | { \mathcal { X } } | = N$ , every set $S _ { i }$ is a singleton, which implies that $\rho _ { N } = 1$ .
163
+
164
+ Next, we formalize the assumption that very few edges cross different ground-truth classes. It turns out that it suffices to assume that the labels are recoverable from the augmentations (which is also equivalent to that two examples in different classes can rarely be augmented into the same point).
165
+
166
+ Assumption 3.5 (Labels are recoverable from augmentations). Let $\hat { x } \sim \mathcal { P } _ { \overline { { x } } }$ and $y ( \bar { x } )$ be its label. Let the augmentation $x \sim \mathcal { A } ( \cdot | \bar { x } )$ . We assume that there exists a classifier $g$ that can predict $y ( \bar { x } )$ given x with error at most $\alpha$ . That is, $g ( x ) = y ( \bar { x } )$ with probability at least $1 - \alpha$ .
167
+
168
+ We also introduce the following assumption which states that some universal minimizer of the population spectral contrastive loss can be realized by the hypothesis class.
169
+
170
+ Assumption 3.6 (Realizability). Let $\mathcal { F }$ be a hypothesis class containing functions from $\mathcal { X }$ to $\mathbb { R } ^ { k }$ . We assume that at least one of the global minima of $\mathcal { L } ( f )$ belongs to $\mathcal { F }$ .
171
+
172
+ Our main theorem bound from above the linear probe error of the features learned by minimizing the population spectral contrastive loss.
173
+
174
+ Theorem 3.7. Assume the representation dimension $k \geq 2 r$ and Assumption $\boxed { 3 . 5 }$ holds for $\alpha > 0$ . Let $\mathcal { F }$ be a hypothesis class that satisfies Assumption $\boxed { 3 . 6 }$ and let $f _ { \mathrm { p o p } } ^ { * } \in \mathcal { F }$ be a minimizer of $\mathcal { L } ( f )$ . Then, we have
175
+
176
+ $$
177
+ \begin{array} { r } { \mathcal { E } ( f _ { \mathrm { p o p } } ^ { * } ) \leq \widetilde { O } \left( \alpha / \rho _ { \lfloor k / 2 \rfloor } ^ { 2 } \right) . } \end{array}
178
+ $$
179
+
180
+ Here we use ${ \widetilde { O } } ( \cdot )$ to hide universal constant factors and logarithmic factor in $k$ . We note that $\alpha = 0$ when augmentations from different classes are perfectly disconnected in the augmentation graph, in which case the above theorem guarantees the exact recovery of the ground truth. Generally, we expect $\alpha$ to be an extremely small constant independent of $k$ , whereas $\rho _ { \lfloor k / 2 \rfloor }$ increases with $k$ and can be much larger than $\alpha$ when $k$ is reasonably large. For instance, when there are $t$ sub-graphs that have sufficient inner connections, we expect $\rho _ { t + 1 }$ to be on the order of a constant because any $t + 1$ partition needs to break one sub-graph into two pieces and incur a large conductance. We characterize the $\rho _ { k }$ ’s growth on more concrete distributions in the next subsection.
181
+
182
+ Previous works on graph partitioning [2, 29, 31] often analyze the so-called rounding algorithms that conduct clustering based on the representations of unlabeled data and do not analyze the performance of linear probe (which has access to labeled data). These results provide guarantees on the approximation ratio—the ratio between the conductance of the obtained partition to the best partition—which may depend on graph size $\left[ \left[ 2 \right] \right]$ that can be exponentially large in our setting. The approximation ratio guarantee does not lead to a guarantee on the representations’ performance on downstream tasks. Our guarantees are on the linear probe accuracy on the downstream tasks and independent of the graph size. We rely on the formulation of the downstream task’s labeling function (Assumption $3 . 5 )$ as well as a novel analysis technique that characterizes the linear structure of the representations. In Section $\mathbf { C } ,$ we provide the proof of Theorem $\boxed { 3 . 7 }$ as well as its more generalized version where $k / 2$ is relaxed to be any constant fraction of $k$ .
183
+
184
+ # 3.4 Provable instantiation of Theorem $\pmb { \bigtriangledown } . \pmb { \bigtriangledown } .$ to mixture of manifold data
185
+
186
+ In this section, we exemplify Theorem $3 . 7$ on an example where the natural data distribution is a mixture of manifolds, and the augmentation transformation is adding Gaussian noise.
187
+
188
+ Example 3.8 (Mixture of manifolds). Suppose $\mathcal { P } _ { \overline { { \mathcal { X } } } }$ is mixture of $r \leq d$ distributions $P _ { 1 } , \cdots , P _ { r }$ , where each $P _ { i }$ is generated by some $\kappa$ X -bi-Lipschitz4 generator $Q : \mathbb { R } ^ { d ^ { \prime } } \mathbb { R } ^ { d }$ on some latent variable $z \in \mathbb { R } ^ { d ^ { \prime } }$ with $d ^ { \prime } \leq d$ which as a mixture of Gaussian distribution:
189
+
190
+ $$
191
+ x \sim P _ { i } \Longleftrightarrow x = Q ( z ) , z \sim { \mathcal N } ( \mu _ { i } , \frac { 1 } { d ^ { \prime } } \cdot I _ { d ^ { \prime } \times d ^ { \prime } } ) .
192
+ $$
193
+
194
+ Let the data augmentation of a natural data sample $\bar { x }$ is $\bar { x } + \xi$ where $\begin{array} { r } { \xi \sim \mathcal { N } ( 0 , \frac { \sigma ^ { 2 } } { d } \cdot I _ { d \times d } ) } \end{array}$ is isotropic Gaussian noise with $\begin{array} { r } { 0 < \sigma \lesssim \frac { 1 } { \sqrt { d } } } \end{array}$ . We also assume $\begin{array} { r } { \operatorname* { m i n } _ { i \neq j } \| \mu _ { i } - \mu _ { j } \| _ { 2 } \gtrsim \frac { \kappa \cdot \sqrt { \log d } } { \sqrt { d ^ { \prime } } } } \end{array}$ .
195
+
196
+ Let the ground-truth label be the most likely mixture index $i$ that generates $x$ : $y ( x ) : = \arg \operatorname* { m a x } _ { i } P _ { i } ( x )$ . We note that the intra-class distance in the latent space is on the scale of $\Omega ( 1 )$ , which can be much larger than the distance between class means which is assumed to be $\gtrsim \frac { \kappa \cdot \sqrt { \log d } } { \sqrt { d ^ { \prime } } }$ . Therefore, distancebased clustering algorithms do not apply. We apply Theorem $3 . 7$ and get the following theorem:
197
+
198
+ Theorem 3.9. When $\rho _ { \lfloor k / 2 \rfloor } \gtrsim \frac { \sigma } { \kappa \sqrt { d } }$ . As a consequence, the error bound is $k \geq 2 r + 2$ , Example 3.8 satisfies Assumption 3.5 with $\begin{array} { r } { { \mathcal { E } } ( f _ { \mathrm { p o p } } ^ { * } ) \leq { \tilde { O } } \left( \frac { \kappa ^ { 2 } } { \sigma ^ { 2 } \cdot \mathrm { p o l y } \left( d \right) } \right) } \end{array}$ $\alpha \leq { \frac { 1 } { \mathrm { p o l y } ( d ) } }$ . , and has
199
+
200
+ The theorem above guarantees small error even when $\sigma$ is polynomially small. In this case, the augmentation noise has a much smaller scale than the data (which is at least on the order of $1 / \kappa \mathrm { \lrcorner }$ ). This suggests that contrastive learning can non-trivially leverage the structure of the underlying data and learn good representations with relatively weak augmentation. The proof can be found in Section D.
201
+
202
+ # 4 Finite-sample generalization bounds
203
+
204
+ In Section $\textcircled { 3 } ,$ we provide guarantees for spectral contrastive learning on population data. In this section, we show that these guarantees can be naturally extended to the finite-sample regime with standard concentration bounds. In particular, given a training dataset $\{ \bar { x } _ { 1 } , \bar { x } _ { 2 } , \cdot \cdot \cdot , \bar { x } _ { n } \}$ with $\bar { x } _ { i } \sim \mathcal { P } _ { \overline { { x } } }$ , we learn a feature extractor by minimizing the following empirical spectral contrastive loss:
205
+
206
+ $$
207
+ \widehat { \mathcal { L } } _ { n } ( f ) : = - \frac { 2 } { n } \sum _ { i = 1 } ^ { n } \mathbb { E } _ { \underset { x ^ { + } \sim A ( x ^ { + } \mid \bar { x } _ { i } ) } { x ^ { \sim A ( \cdot \mid \bar { x } _ { i } ) } } } \left[ f ( x ) ^ { \top } f ( x ^ { + } ) \right] + \frac { 1 } { n ( n - 1 ) } \sum _ { i \neq j } \mathbb { E } _ { \underset { x ^ { \prime } \sim A ( \cdot \mid \bar { x } _ { j } ) } { x ^ { \sim A ( \cdot \mid \bar { x } _ { i } ) } } } \left[ \left( f ( x ) ^ { \top } f ( x ^ { \prime } ) \right) ^ { 2 } \right] .
208
+ $$
209
+
210
+ It is worth noting that ${ \widehat { \mathcal { L } } } _ { n } ( f )$ is an unbiased estimator of the population spectral contrastive loss $\mathcal { L } ( f )$ . (See Claim $\mathbf { E . } 2$ for a proof.) Therefore, we can derive generalization bounds via off-the-shelf concentration inequalities. Let $\mathcal { F }$ be a hypothesis class containing feature extractors from $\mathcal { X }$ to $\mathbb { R } ^ { k }$ . We extend Rademacher complexity to function classes with highdimensional outputs and define the Rademacher complexity of $\mathcal { F }$ on $n$ data as $\widehat { \mathcal { R } } _ { n } ( \mathcal { F } ) \overset { \cdot } { : = }$ $\begin{array} { r } { \operatorname* { m a x } _ { x _ { 1 } , \cdots , x _ { n } \in \mathcal { X } } \bar { \mathbb { E } } _ { \sigma } \left[ \operatorname* { s u p } _ { f \in \mathcal { F } , i \in [ k ] } \frac { 1 } { n } \left( \sum _ { j = 1 } ^ { n } \sigma _ { j } f _ { i } ( x _ { j } ) \right) \right] , } \end{array}$ ,
211
+
212
+ where $\sigma$ is a uniform random vector in $\{ - 1 , 1 \} ^ { n }$ and $f _ { i } ( z )$ is the $i$ -th dimension of $f ( z )$ .
213
+
214
+ Recall that $f _ { \mathrm { p o p } } ^ { * } \in \mathcal { F }$ is a minimizer of $\mathcal { L } ( f )$ . The following theorem with proofs in Section bounds the population loss of a feature extractor trained with finite data:
215
+
216
+ Theorem 4.1. For some $\kappa > 0$ , assume $\| f ( x ) \| _ { \infty } \leq \kappa$ for all $f \in { \mathcal { F } }$ and $x \in \mathcal { X }$ . Let $f _ { \mathrm { p o p } } ^ { * } \in \mathcal { F }$ be $a$ minimizer of the population loss $\mathcal { L } ( f )$ . Given a random dataset of size $n$ , let $\hat { f } _ { \mathrm { e m p } } \in \mathcal { F }$ be a minimizer of empirical loss ${ \widehat { \mathcal { L } } } _ { n } ( f )$ . Then, with probability at least $1 - \delta$ over the randomness of data, we have
217
+
218
+ $$
219
+ \mathcal { L } ( \hat { f } _ { \mathrm { e m p } } ) \leq \mathcal { L } ( f _ { \mathrm { p o p } } ^ { * } ) + c _ { 1 } \cdot \widehat { \mathcal { R } } _ { n / 2 } ( \mathcal { F } ) + c _ { 2 } \cdot \left( \sqrt { \frac { \log 2 / \delta } { n } } + \delta \right) ,
220
+ $$
221
+
222
+ where constants $c _ { 1 } \lesssim k ^ { 2 } \kappa ^ { 2 } + k \kappa$ and $c _ { 2 } \lesssim k \kappa ^ { 2 } + k ^ { 2 } \kappa ^ { 4 }$ .
223
+
224
+ We can apply Theorem $\boxed { 4 . 1 }$ to any hypothesis class $\mathcal { F }$ of interest (e.g., deep neural networks) and plug in off-the-shelf Rademacher complexity bounds. For instance, in Section $\boxed { \ E . 2 }$ we give a corollary of Theorem $\boxed { 4 . 1 }$ when $\mathcal { F }$ contains deep neural networks with ReLU activation.
225
+
226
+ The theorem above shows that we can achieve near-optimal population loss by minimizing empirical loss up to some small excess loss. The following theorem characterizes how the error propagates to the linear probe performance mildly under some spectral gap conditions.
227
+
228
+ Theorem 4.2. Assume representation dimension $k \geq 4 r + 2$ , Assumption $\boxed { 3 . 5 }$ holds for $\alpha > 0$ and Assumption $\boxed { 3 . 6 }$ holds. Recall $\gamma _ { i }$ be the $i$ -th largest eigenvalue of the normalized adjacency matrix. Then, for any $\epsilon < \gamma _ { k } ^ { 2 }$ and $\hat { f } _ { \mathrm { e m p } } \in \mathcal { F }$ such that $\mathcal { L } ( \hat { f } _ { \mathrm { e m p } } ) < \mathcal { L } ( f _ { \mathrm { p o p } } ^ { * } ) + \epsilon ,$ , we have:
229
+
230
+ $$
231
+ \mathcal { E } ( \hat { f } _ { \mathrm { e m p } } ) \lesssim \frac { \alpha } { \rho _ { \lfloor k / 2 \rfloor } ^ { 2 } } \cdot \log k + \frac { k \epsilon } { \Delta _ { \gamma } ^ { 2 } } ,
232
+ $$
233
+
234
+ where $\Delta _ { \gamma } : = \gamma _ { \left\lfloor 3 k / 4 \right\rfloor } - \gamma _ { k }$ is the eigenvalue gap between the $\lfloor 3 k / 4 \rfloor$ -th and the $k$ -th eigenvalue.
235
+
236
+ This theorem shows that the error on the downstream task only grows linearly with the error $\epsilon$ during pretraining. We can relax Assumption $\boxed { 3 . 6 }$ to approximate realizability in the sense that $\mathcal { F }$ contains some sub-optimal feature extractor under the population spectral loss and pay an additional error term in the linear probe error bound. The proof of Theorem $\mathsf { \bar { 4 } } . 2$ can be found in Section E.3.
237
+
238
+ # 5 Guarantee for learning linear probe with labeled data
239
+
240
+ In this section, we provide theoretical guarantees for learning a linear probe with labeled data. Theorem $3 . 7$ guarantees the existence of a linear probe that achieves a small downstream classification error. However, a priori it is unclear how large the margin of the linear classifier can be, so it is hard to apply margin theory to provide generalization bounds for 0-1 loss. We could in principle control the margin of the linear head, but using capped quadratic loss turns out to suffice and mathematically more convenient. We learn a linear head with the following capped quadratic loss: given a tuple $( z , y ( { \bar { x } } ) )$ where $z \in \mathbb { R } ^ { k }$ is a representation of augmented data $x \sim \mathcal { A } ( \cdot | \bar { x } )$ and $y ( \bar { x } ) \in [ r ]$ is the label of $\bar { x }$ , for a linear probe $B \in \mathbb { R } ^ { k \times r }$ we define loss $\begin{array} { r } { \ell ( ( z , y ( \bar { x } ) ) , B ) : = \sum _ { i = 1 } ^ { r } \operatorname* { m i n } \big \{ \left( B ^ { \top } z - \vec { y } ( \bar { x } ) \right) _ { i } ^ { 2 } , 1 \big \} } \end{array}$ , where $\vec { y } ( \bar { x } )$ is the one-hot embedding of $y ( \bar { x } )$ as a $r$ -dimensional vector (1 on the $y ( \bar { x } )$ -th dimension, 0 on other dimensions). This is a standard modification of quadratic loss in statistical learning theory that ensures the boundedness of the loss for the ease of analysis $\pmb { \mathbb { B } } 6 \|$ .
241
+
242
+ The following Theorem $5 . 1$ provides a generalization guarantee for the linear classifier that minimizes capped quadratic loss on a labeled dataset. The key challenge of the proof is showing the existence of a small-norm linear head $B$ that gives small population quadratic loss, which is not obvious from Theorem $3 . 7$ where only small 0-1 error is guaranteed. Recall $\gamma _ { i }$ is the $i$ -th largest eigenvalue of the the normalized adjacency matrix. Given a labeled dataset $\{ ( \bar { x } _ { i } , y ( \bar { x } _ { i } ) ) \} _ { i = 1 } ^ { n }$ where $\bar { x } _ { i } \sim \mathcal { P } _ { \overline { { X } } }$ and $y ( \bar { x } _ { i } )$ is its label, we sample $x _ { i } \sim \mathcal { A } ( \cdot | \bar { x } _ { i } )$ for $i \in [ n ]$ .
243
+
244
+ Theorem 5.1. In the setting of Theorem $\boxed { 3 . 7 }$ assume $\gamma _ { k } \geq C _ { \lambda }$ for some $C _ { \lambda } > 0$ . Learn a linear probe $\begin{array} { r } { \widehat { B } \in \arg \operatorname* { m i n } _ { \| B \| _ { F } \leq 1 / C _ { \lambda } } \sum _ { i = 1 } ^ { n } \ell ( ( f _ { \mathrm { p o p } } ^ { \ast } ( x _ { i } ) , y ( \bar { x } _ { i } ) ) , B ) } \end{array}$ by minimizing the capped quadratic loss subject to a norm constraint. Then, with probability at least $1 - \delta$ over random data, we have
245
+
246
+ $$
247
+ \operatorname* { P r } _ { \bar { x } \sim \mathcal { P } _ { \overline { { x } } } } \left( \bar { g } _ { f _ { \mathrm { p o p } } ^ { * } , \widehat { B } } ( \bar { x } ) \neq y ( \bar { x } ) \right) \lesssim \frac { \alpha } { \rho _ { \lfloor k / 2 \rfloor } ^ { 2 } } \cdot \log k + \frac { r } { C _ { \lambda } } \cdot \sqrt { \frac { k } { n } } + \sqrt { \frac { \log 1 / \delta } { n } } .
248
+ $$
249
+
250
+ Here the first term is the population error from Theorem $\underline { { \overline { { 3 . 7 } } } }$ The last two terms are the generalization gap from standard concentration inequalities for linear classification and are small when the number of labeled data $n$ is polynomial in the feature dimension $k$ . We note that this result reveals a tradeoff when choosing the feature dimension $k$ : when $n$ is fixed, a larger $k$ decreases the population contrastive loss while increases the generalization gap for downstream linear classification. The proof of Theorem 5.1 is in Section F.
251
+
252
+ # 6 Experiments
253
+
254
+ We test spectral contrastive learning on benchmark vision datasets. We minimize the empirical spectral contrastive loss with an encoder network $f$ and sample fresh augmentation in each iteration. The pseudo-code for the algorithm and more implementation details can be found in Section A.
255
+
256
+ Encoder / feature extractor. The encoder $f$ contains three components: a backbone network, a projection MLP and a projection function. The backbone network is a standard ResNet architecture. The projection MLP is a fully connected network with BN applied to each layer, and ReLU activation applied to each except for the last layer. The projection function takes a vector and projects it to a sphere ball with radius $\sqrt { \mu }$ , where $\mu > 0$ is a hyperparameter that we tune in experiments. We find that using a projection MLP and a projection function improves the performance.
257
+
258
+ Linear evaluation protocol. Given the pre-trained encoder network, we follow the standard linear evaluation protocol $\mathbf { \widehat { \mathbb { W } } }$ and train a supervised linear classifier on frozen representations, which are from the ResNet’s global average pooling layer.
259
+
260
+ Results. We report the accuracy on CIFAR-10/100 [26] and Tiny-ImageNet $\mathbb { \left| \overline { { 2 7 } } \right| }$ in Table 1. Our empirical results show that spectral contrastive learning achieves better performance than two popular baseline algorithms SimCLR $\pmb { \mathbb { L } 2 }$ and SimSiam $\textcircled { 1 4 } ]$ . In Table 2 we report results on ImageNet $\boxed { 1 8 }$ dataset, and show that our algorithm achieves similar performance as other state-of-the-art methods. We note that our algorithm is much more principled than previous methods and doesn’t rely on large batch sizes (SimCLR $\mathbb { I I Z }$ ), momentum encoders (BYOL [21] and MoCo $\pm \mathbb { Z } 2 \mathbb { I } .$ ) or additional tricks such as stop-gradient (SimSiam [14]).
261
+
262
+ # 7 Conclusion
263
+
264
+ In this paper, we present a novel theoretical framework of self-supervised learning and provide provable guarantees for the learned representations on downstream linear classification. We hope our study can facilitate future theoretical analyses of self-supervised learning and inspire new practical algorithms. For instance, one interesting future direction is to test the topology of the augmentation graph on empirical data distributions and design algorithms using tools from graph theory.
265
+
266
+ Table 1: Top-1 accuracy under linear evaluation protocal.
267
+
268
+ <table><tr><td>Datasets</td><td colspan="3">CIFAR-10</td><td colspan="3">CIFAR-100</td><td colspan="3">Tiny-ImageNet</td></tr><tr><td>Epochs</td><td>200</td><td>400</td><td>800</td><td>200</td><td>400</td><td>800</td><td>200</td><td>400</td><td>800</td></tr><tr><td>SimCLR (repro.)</td><td>83.73</td><td>87.72</td><td>90.60</td><td>54.74</td><td>61.05</td><td>63.88</td><td>43.30</td><td>46.46</td><td>48.12</td></tr><tr><td>SimSiam (repro.)</td><td>87.54</td><td>90.31</td><td>91.40</td><td>61.56</td><td>64.96</td><td>65.87</td><td>34.82</td><td>39.46</td><td>46.76</td></tr><tr><td>Ours</td><td>88.66</td><td>90.17</td><td>92.07</td><td>62.45</td><td>65.82</td><td>66.18</td><td>41.30</td><td>45.36</td><td>49.86</td></tr></table>
269
+
270
+ <table><tr><td></td><td>SimCLR</td><td>BYOL</td><td>MoCo v2</td><td>SimSiam</td><td>Ours</td></tr><tr><td>acc. (%)</td><td>66.5</td><td>66.5</td><td>67.4</td><td>68.1</td><td>66.97</td></tr></table>
271
+
272
+ Table 2: ImageNet linear evaluation accuracy with 100-epoch pre-training. All results but ours are reported from [14]. We use batch size 384 during pre-training.
273
+
274
+ # Acknowledgements
275
+
276
+ We thank Margalit Glasgow, Ananya Kumar, Jason D. Lee, Sang Michael Xie, and Guodong Zhang for helpful discussions. CW acknowledges support from an NSF Graduate Research Fellowship. TM acknowledges support of Google Faculty Award and NSF IIS 2045685. We also acknowledge the support of HAI and the Google Cloud. Toyota Research Institute ("TRI") provided funds to assist the authors with their research but this article solely reflects the opinions and conclusions of its authors and not TRI or any other Toyota entity.
277
+
278
+ # References
279
+
280
+ [1] E. Abbe. Community detection and stochastic block models: recent developments, 2017.
281
+ [2] S. Arora, S. Rao, and U. Vazirani. Expander flows, geometric embeddings and graph partitioning. Journal of the ACM (JACM), 56(2):1–37, 2009.
282
+ [3] S. Arora, H. Khandeparkar, M. Khodak, O. Plevrakis, and N. Saunshi. A theoretical analysis of contrastive unsupervised representation learning. arXiv preprint arXiv:1902.09229, 2019.
283
+ [4] P. Bachman, R. D. Hjelm, and W. Buchwalter. Learning representations by maximizing mutual information across views. arXiv preprint arXiv:1906.00910, 2019.
284
+ [5] Y. Bansal, G. Kaplun, and B. Barak. For self-supervised learning, rationality implies generalization, provably. arXiv preprint arXiv:2010.08508, 2020.
285
+ [6] A. Bardes, J. Ponce, and Y. LeCun. Vicreg: Variance-invariance-covariance regularization for self-supervised learning. arXiv preprint arXiv:2105.04906, 2021.
286
+ [7] S. G. Bobkov et al. An isoperimetric inequality on the discrete cube, and an elementary proof of the isoperimetric inequality in gauss space. The Annals of Probability, 25(1):206–214, 1997.
287
+ [8] J. Bromley, I. Guyon, Y. LeCun, E. Säckinger, and R. Shah. Signature verification using a" siamese" time delay neural network. Advances in neural information processing systems, 6: 737–744, 1993.
288
+ [9] T. Cai, R. Gao, J. D. Lee, and Q. Lei. A theory of label propagation for subpopulation shift. arXiv preprint arXiv:2102.11203, 2021.
289
+ [10] M. Caron, I. Misra, J. Mairal, P. Goyal, P. Bojanowski, and A. Joulin. Unsupervised learning of visual features by contrasting cluster assignments. arXiv preprint arXiv:2006.09882, 2020.
290
+ [11] J. Cheeger. A lower bound for the smallest eigenvalue of the laplacian. In Proceedings of the Princeton conference in honor of Professor S. Bochner, pages 195–199, 1969.
291
+ [12] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pages 1597–1607. PMLR, 2020.
292
+ [13] T. Chen, S. Kornblith, K. Swersky, M. Norouzi, and G. Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020.
293
+ [14] X. Chen and K. He. Exploring simple siamese representation learning. arXiv preprint arXiv:2011.10566, 2020.
294
+ [15] X. Chen, H. Fan, R. Girshick, and K. He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020.
295
+ [16] C.-Y. Chuang, J. Robinson, L. Yen-Chen, A. Torralba, and S. Jegelka. Debiased contrastive learning. arXiv preprint arXiv:2007.00224, 2020.
296
+ [17] F. R. Chung and F. C. Graham. Spectral graph theory. Number 92. American Mathematical Soc., 1997.
297
+ [18] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009.
298
+ [19] C. Eckart and G. Young. The approximation of one matrix by another of lower rank. Psychometrika, 1(3):211–218, 1936.
299
+ [20] N. Golowich, A. Rakhlin, and O. Shamir. Size-independent sample complexity of neural networks. In Conference On Learning Theory, pages 297–299. PMLR, 2018.
300
+ [21] J.-B. Grill, F. Strub, F. Altché, C. Tallec, P. H. Richemond, E. Buchatskaya, C. Doersch, B. A. Pires, Z. D. Guo, M. G. Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020.
301
+ [22] K. He, H. Fan, Y. Wu, S. Xie, and R. Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9729–9738, 2020.
302
+ [23] O. Henaff. Data-efficient image recognition with contrastive predictive coding. In International Conference on Machine Learning, pages 4182–4192. PMLR, 2020.
303
+ [24] R. D. Hjelm, A. Fedorov, S. Lavoie-Marchildon, K. Grewal, P. Bachman, A. Trischler, and Y. Bengio. Learning deep representations by mutual information estimation and maximization. In International Conference on Learning Representations, 2018.
304
+ [25] R. Kannan, S. Vempala, and A. Vetta. On clusterings: Good, bad and spectral. Journal of the ACM (JACM), 51(3):497–515, 2004.
305
+ [26] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. 2009.
306
+ [27] Y. Le and X. Yang. Tiny imagenet visual recognition challenge. CS 231N, 7:7, 2015.
307
+ [28] J. D. Lee, Q. Lei, N. Saunshi, and J. Zhuo. Predicting what you already know helps: Provable self-supervised learning. arXiv preprint arXiv:2008.01064, 2020.
308
+ [29] J. R. Lee, S. O. Gharan, and L. Trevisan. Multiway spectral partitioning and higher-order cheeger inequalities. Journal of the ACM (JACM), 61(6):1–30, 2014.
309
+ [30] J. Lei, A. Rinaldo, et al. Consistency of spectral clustering in stochastic block models. Annals of Statistics, 43(1):215–237, 2015.
310
+ [31] T. Leighton and S. Rao. Multicommodity max-flow min-cut theorems and their use in designing approximation algorithms. Journal of the ACM (JACM), 46(6):787–832, 1999.
311
+ [32] A. Louis and K. Makarychev. Approximation algorithm for sparsest k-partitioning. In Proceedings of the twenty-fifth annual ACM-SIAM symposium on Discrete algorithms, pages 1244–1255. SIAM, 2014.
312
+ [33] A. Louis, P. Raghavendra, P. Tetali, and S. Vempala. Algorithmic extensions of cheeger’s inequality to higher eigenvalues and partitions. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 315–326. Springer, 2011.
313
+ [34] F. McSherry. Spectral partitioning of random graphs. In Proceedings 42nd IEEE Symposium on Foundations of Computer Science, pages 529–537. IEEE, 2001.
314
+ [35] I. Misra and L. v. d. Maaten. Self-supervised learning of pretext-invariant representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6707–6717, 2020.
315
+ [36] M. Mohri, A. Rostamizadeh, and A. Talwalkar. Foundations of machine learning. MIT press, 2018.
316
+ [37] A. Ng, M. Jordan, and Y. Weiss. On spectral clustering: Analysis and an algorithm. Advances in neural information processing systems, 14:849–856, 2001.
317
+ [38] A. v. d. Oord, Y. Li, and O. Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
318
+ [39] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on pattern analysis and machine intelligence, 22(8):888–905, 2000.
319
+ [40] K. Sohn. Improved deep metric learning with multi-class n-pair loss objective. In Proceedings of the 30th International Conference on Neural Information Processing Systems, pages 1857–1865, 2016.
320
+ [41] Y. Tian, D. Krishnan, and P. Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019.
321
+ [42] Y. Tian, C. Sun, B. Poole, D. Krishnan, C. Schmid, and P. Isola. What makes for good views for contrastive learning. arXiv preprint arXiv:2005.10243, 2020.
322
+ [43] Y. Tian, L. Yu, X. Chen, and S. Ganguli. Understanding self-supervised learning with dual deep networks. arXiv preprint arXiv:2010.00578, 2020.
323
+ [44] C. Tosh, A. Krishnamurthy, and D. Hsu. Contrastive estimation reveals topic posterior information to linear models. arXiv:2003.02234, 2020.
324
+ [45] C. Tosh, A. Krishnamurthy, and D. Hsu. Contrastive learning, multi-view redundancy, and linear models. In Algorithmic Learning Theory, pages 1179–1206. PMLR, 2021.
325
+ [46] T. W. Tsai, C. Li, and J. Zhu. Mice: Mixture of contrastive experts for unsupervised image clustering. arXiv preprint arXiv:2105.01899, 2021.
326
+ [47] Y.-H. H. Tsai, Y. Wu, R. Salakhutdinov, and L.-P. Morency. Self-supervised learning from a multi-view perspective. arXiv preprint arXiv:2006.05576, 2020.
327
+ [48] T. Wang and P. Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In International Conference on Machine Learning, pages 9929–9939. PMLR, 2020.
328
+ [49] C. Wei, K. Shen, Y. Chen, and T. Ma. Theoretical analysis of self-training with deep networks on unlabeled data. arXiv preprint arXiv:2010.03622, 2020.
329
+ [50] Z. Wu, Y. Xiong, S. X. Yu, and D. Lin. Unsupervised feature learning via non-parametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3733–3742, 2018.
330
+ [51] M. Ye, X. Zhang, P. C. Yuen, and S.-F. Chang. Unsupervised embedding learning via invariant and spreading instance feature. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6210–6219, 2019.
331
+ [52] J. Zbontar, L. Jing, I. Misra, Y. LeCun, and S. Deny. Barlow twins: Self-supervised learning via redundancy reduction. arXiv preprint arXiv:2103.03230, 2021.
parse/train/mjyMGFL8N2/mjyMGFL8N2_content_list.json ADDED
@@ -0,0 +1,1449 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Provable Guarantees for Self-Supervised Deep Learning with Spectral Contrastive Loss ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 220,
8
+ 122,
9
+ 779,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Jeff Z. HaoChen Stanford University jhaochen@stanford.edu ",
17
+ "bbox": [
18
+ 267,
19
+ 226,
20
+ 449,
21
+ 267
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Colin Wei Stanford University colinwei@stanford.edu ",
28
+ "bbox": [
29
+ 549,
30
+ 226,
31
+ 732,
32
+ 267
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Adrien Gaidon Toyota Research Institute adrien.gaidon@tri.global ",
39
+ "bbox": [
40
+ 258,
41
+ 289,
42
+ 465,
43
+ 332
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Tengyu Ma Stanford University tengyuma@stanford.edu ",
50
+ "bbox": [
51
+ 557,
52
+ 289,
53
+ 740,
54
+ 330
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Abstract ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 462,
64
+ 367,
65
+ 535,
66
+ 383
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Recent works in self-supervised learning have advanced the state-of-the-art by relying on the contrastive learning paradigm, which learns representations by pushing positive pairs, or similar examples from the same class, closer together while keeping negative pairs far apart. Despite the empirical successes, theoretical foundations are limited – prior analyses assume conditional independence of the positive pairs given the same class label, but recent empirical applications use heavily correlated positive pairs (i.e., data augmentations of the same image). Our work analyzes contrastive learning without assuming conditional independence of positive pairs using a novel concept of the augmentation graph on data. Edges in this graph connect augmentations of the same datapoint, and ground-truth classes naturally form connected sub-graphs. We propose a loss that performs spectral decomposition on the population augmentation graph and can be succinctly written as a contrastive learning objective on neural net representations. Minimizing this objective leads to features with provable accuracy guarantees under linear probe evaluation. By standard generalization bounds, these accuracy guarantees also hold when minimizing the training contrastive loss. Empirically, the features learned by our objective can match or outperform several strong baselines on benchmark vision datasets. In all, this work provides the first provable analysis for contrastive learning where guarantees for linear probe evaluation can apply to realistic empirical settings. ",
73
+ "bbox": [
74
+ 233,
75
+ 397,
76
+ 764,
77
+ 674
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 Introduction ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 174,
87
+ 698,
88
+ 310,
89
+ 715
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Recent empirical breakthroughs have demonstrated the effectiveness of self-supervised learning, which trains representations on unlabeled data with surrogate losses and self-defined supervision signals [4, 6, 10, 14, 23, 24, 35, 38, 41, 42, 50–52]. Self-supervision signals in computer vision are often defined by using data augmentation to produce multiple views of the same image. For example, the recent contrastive learning objectives [3, 12, 13, 15, 22] encourage closer representations for augmentations (views) of the same natural data than for randomly sampled pairs of data. ",
96
+ "bbox": [
97
+ 174,
98
+ 729,
99
+ 825,
100
+ 813
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Despite the empirical successes, there is a limited theoretical understanding of why self-supervised losses learn representations that can be adapted to downstream tasks, for example, using linear heads. Recent mathematical analyses by Arora et al. [3], Lee et al. $\\pmb { \\pmb { 2 8 } }$ , Tosh et al. [44, 45] provide guarantees under the assumption that two views are somewhat independent conditioned on the label. However, the pair of augmented examples used in practical algorithms usually exhibit a strong correlation, even conditioned on the label. For instance, two augmentations of the same dog image share much more similarity than augmentations of two different random dog images. Thus the existing theory does not explain the practical success of self-supervised learning. ",
107
+ "bbox": [
108
+ 174,
109
+ 819,
110
+ 825,
111
+ 901
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/f434201d93f07155cf28976251d153e6a6f7063eef9ee06516e041eb7ce19570.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Left: demonstration of the population augmentation graph. Two augmented data are connected if they are views of the same natural data. Augmentations of data from different classes in the downstream tasks are assumed to be nearly disconnected, whereas there are more connections within the same class. We allow the existence of disconnected sub-graphs within a class corresponding to potential sub-classes. Right: decomposition of the learned representations. The representations (rows in the RHS) learned by minimizing the population spectral contrastive loss can be decomposed as the LHS. The scalar $s _ { x _ { i } }$ is positive for every augmented data $x _ { i }$ . Columns of the matrix labeled “eigenvectors” are the top eigenvectors of the normalized adjacency matrix of the augmentation graph defined in Section ${ \\bar { 3 . } } 1 .$ The operator $\\odot$ multiplies row-wise each $s _ { x _ { i } }$ with the $x _ { i }$ -th row of the eigenvector matrix. When classes (or sub-classes) are exactly disconnected in the augmentation graph, the eigenvectors are sparse and align with the sub-class structure. The invertible $Q$ matrix does not affect the performance of the rows under the linear probe. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 184,
124
+ 89,
125
+ 820,
126
+ 217
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "",
133
+ "bbox": [
134
+ 173,
135
+ 443,
136
+ 821,
137
+ 470
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "This paper presents a theoretical framework for self-supervised learning without requiring conditional independence. We design a principled, practical loss function for learning neural net representations that resembles state-of-the-art contrastive learning methods. We prove that, under a simple and realistic data assumption, linear classification using representations learned on a polynomial number of unlabeled data samples can recover the ground-truth labels of the data with high accuracy. ",
144
+ "bbox": [
145
+ 174,
146
+ 477,
147
+ 823,
148
+ 546
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "The fundamental data property that we leverage is a notion of continuity of the population data within the same class. Though a random pair of examples from the same class can be far apart, the pair is often connected by (many) sequences of examples, where consecutive examples in the sequences are close neighbors within the same class. This property is more salient when the neighborhood of an example includes many different types of augmentations. Prior work $\\mathbb { H }$ empirically demonstrates this type of connectivity property and uses it in the analysis of pseudolabeling algorithms. ",
155
+ "bbox": [
156
+ 174,
157
+ 553,
158
+ 825,
159
+ 636
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "More formally, we define the population augmentation graph, whose vertices are all the augmented data in the population distribution, which can be an exponentially large or infinite set. Two vertices are connected with an edge if they are augmentations of the same natural example. Our main assumption is that for some proper $m \\in { \\mathcal { Z } } ^ { + }$ , the sparsest $m$ -partition (Definition 3.4) is large. This intuitively states that we can’t split the augmentation graph into too many disconnected sub-graphs by only removing a sparse set of edges. This assumption can be seen as a graph-theoretic version of the continuity assumption on population data. We also assume that there are very few edges across different ground-truth classes (Assumption $\\textcircled { 3 . 5 }$ . Figure $\\bigtriangledown$ (left) illustrates a realistic scenario where dog and cat are the ground-truth categories, between which edges are very rare. Each breed forms a sub-graph that has sufficient inner connectivity and thus cannot be further partitioned. ",
166
+ "bbox": [
167
+ 174,
168
+ 642,
169
+ 825,
170
+ 780
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "Our assumption fundamentally does not require conditional independence and can allow disconnected sub-graphs within a class. The classes in the downstream task can be also somewhat flexible as long as they are disconnected in the augmentation graph. For example, when the augmentation graph consists of $m$ disconnected sub-graphs corresponding to fine-grained classes, our assumptions allow the downstream task to have any $r \\leq m$ coarse-grained classes containing these fine-grained classes as a sub-partition. Prior work $\\boxed { \\boxplus 9 }$ on pseudolabeling algorithms essentially requires an exact alignment between sub-graphs and downstream classes (i.e., $r = m$ ). They face this limitation because their analysis requires fitting discrete pseudolabels on the unlabeled data. We avoid this difficulty because we consider directly learning continuous representations on the unlabeled data. ",
177
+ "bbox": [
178
+ 174,
179
+ 786,
180
+ 825,
181
+ 911
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "We apply spectral decomposition—a classical approach for graph partitioning, also known as spectral clustering $\\textcircled { 1 3 7 } , \\textcircled { 3 9 } \\textcircled { 1 }$ in machine learning—to the adjacency matrix defined on the population augmentation graph. We form a matrix where the top- $k$ eigenvectors are the columns and interpret each row of the matrix as the representation (in $\\mathbb { R } ^ { k }$ ) of an example. Somewhat surprisingly, we show that this feature extractor can be also recovered (up to some linear transformation) by minimizing the following population objective which is similar to the standard contrastive loss (Section $\\textcircled { 3 . 2 }$ ",
188
+ "bbox": [
189
+ 173,
190
+ 90,
191
+ 825,
192
+ 175
193
+ ],
194
+ "page_idx": 2
195
+ },
196
+ {
197
+ "type": "equation",
198
+ "img_path": "images/cf953238db22d363070e1216f07df9a76d273dd019c2da1494b86585bac99ee5.jpg",
199
+ "text": "$$\n\\mathcal { L } ( f ) = - 2 \\cdot \\mathbb { E } _ { x , x ^ { + } } \\left[ f ( x ) ^ { \\top } f ( x ^ { + } ) \\right] + \\mathbb { E } _ { x , x ^ { \\prime } } \\big [ \\left( f ( x ) ^ { \\top } f ( x ^ { \\prime } ) \\right) ^ { 2 } \\big ] ,\n$$",
200
+ "text_format": "latex",
201
+ "bbox": [
202
+ 292,
203
+ 198,
204
+ 702,
205
+ 220
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "where $( x , x ^ { + } )$ is a pair of augmentations of the same data, $( x , x ^ { \\prime } )$ is a pair of independently random augmented data, and $f$ is a parameterized function from augmented data to $\\mathbb { R } ^ { k }$ . Figure $\\boxed { 1 }$ (right) illustrates the relationship between the eigenvector matrix and the learned representations. We call this loss the population spectral contrastive loss. ",
212
+ "bbox": [
213
+ 174,
214
+ 242,
215
+ 825,
216
+ 300
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "We analyze the linear classification performance of the representations learned by minimizing the population spectral contrastive loss. Our main result (Theorem $\\textcircled { 3 . 7 }$ shows that when the representation dimension exceeds the maximum number of disconnected sub-graphs, linear classification with learned representations is guaranteed to have a small error. Our theorem reveals a trend that a larger representation dimension is needed when there are a larger number of disconnected sub-graphs. Our analysis relies on novel techniques tailored to linear probe performance, which have not been studied in the spectral graph theory community to the best of our knowledge. ",
223
+ "bbox": [
224
+ 173,
225
+ 306,
226
+ 825,
227
+ 405
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "The spectral contrastive loss also works on empirical data. Since our approach optimizes parametric loss functions, guarantees involving the population loss can be converted to finite sample results using off-the-shelf generalization bounds. The sample complexity is polynomial in the Rademacher complexity of the model family and other relevant parameters (Theorem 4.1 and Theorem $\\boxed { 4 . 2 }$ . ",
234
+ "bbox": [
235
+ 174,
236
+ 410,
237
+ 825,
238
+ 467
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "In summary, our main theoretical contributions are: 1) we propose a simple contrastive loss motivated by spectral decomposition of the population data graph, 2) under simple and realistic assumptions, we provide downstream classification guarantees for the representation learned by minimizing this loss on population data, and 3) our analysis is easily applicable to deep networks with polynomial unlabeled samples via off-the-shelf generalization bounds. ",
245
+ "bbox": [
246
+ 174,
247
+ 472,
248
+ 825,
249
+ 541
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "In addition, we implement and test the proposed spectral contrastive loss on standard vision benchmark datasets. We demonstrate that the features learned by our algorithm can match or outperform several strong baselines [12, 14, 15, 21] when evaluated using a linear probe. ",
256
+ "bbox": [
257
+ 174,
258
+ 547,
259
+ 825,
260
+ 590
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "2 Additional related works ",
267
+ "text_level": 1,
268
+ "bbox": [
269
+ 176,
270
+ 627,
271
+ 413,
272
+ 645
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "Empirical works on self-supervised learning. Self-supervised learning algorithms have been shown to successfully learn representations that benefit downstream tasks [4, 6, 10, 12, 13, 15, 22– 24, 35, 38, 41, 42, 50–52]. Many recent self-supervised learning algorithms learn features with siamese networks $\\textcircled { 8 } \\textcircled { 1 8 }$ , where two neural networks of shared weights are applied to pairs of augmented data. Introducing asymmetry to siamese networks either with a momentum encoder like BYOL [21] or by stopping gradient propagation for one branch of the siamese network like SimSiam [14] has been shown to effectively avoid collapsing. Contrastive methods [12, 15, 22] minimize the InfoNCE loss $\\pmb { \\Vert 3 8 } \\Vert$ , where two views of the same data are attracted while views from different data are repulsed. ",
279
+ "bbox": [
280
+ 173,
281
+ 669,
282
+ 826,
283
+ 780
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "Theoretical works on self-supervised learning. In addition to works [3, 28, 44, 45] discussed in the introduction, several other works [5, 43, 47, 48] also theoretically study self-supervised learning. The work Tsai et al. $\\boxed { \\boxplus 7 }$ prove that self-supervised learning methods can extract task-relevant information and discard task-irrelevant information, but lacks guarantees for solving downstream tasks efficiently with simple (e.g., linear) models. Tian et al. $\\bar { \\bigtriangledown } 4 3 \\|$ study why non-contrastive selfsupervised learning methods can avoid feature collapse. Cai et al. $\\pmb { \\mathbb { Q } } \\|$ analyze domain adaptation algorithms for subpopulation shift with a similar expansion condition as $| \\dot { \\overline { { { \\vert 4 9 \\vert } } } }$ while also allowing disconnected parts within each class, but require access to ground-truth labels during training. In contrast, our algorithm doesn’t need labels during pre-training. ",
290
+ "bbox": [
291
+ 173,
292
+ 786,
293
+ 826,
294
+ 911
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "3 Spectral contrastive learning on population data ",
301
+ "text_level": 1,
302
+ "bbox": [
303
+ 173,
304
+ 89,
305
+ 607,
306
+ 107
307
+ ],
308
+ "page_idx": 3
309
+ },
310
+ {
311
+ "type": "text",
312
+ "text": "In this section, we introduce our theoretical framework, the spectral contrastive loss, and the main analysis of the performance of the representations learned on population data. ",
313
+ "bbox": [
314
+ 173,
315
+ 119,
316
+ 823,
317
+ 148
318
+ ],
319
+ "page_idx": 3
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "We use $\\overline { { \\mathcal { X } } }$ to denote the set of all natural data (raw inputs without augmentation). We assume that each ${ \\bar { x } } \\in { \\overline { { \\mathcal { X } } } }$ belongs to one of $r$ classes, and let $y : \\overline { { \\mathcal { X } } } [ r ]$ denote the ground-truth (deterministic) labeling function. Let $\\mathcal { P } _ { \\overline { { \\mathcal { X } } } }$ be the population distribution over $\\overline { { \\mathcal { X } } }$ from which we draw training data and test our final performance. For the ease of exposition, we assume $\\overline { { \\mathcal { X } } }$ to be a finite but exponentially large set (e.g., all real vectors in $\\mathbb { R } ^ { d }$ with bounded precision).1 ",
324
+ "bbox": [
325
+ 173,
326
+ 155,
327
+ 825,
328
+ 232
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "We next formulate data augmentations. Given a natural data sample ${ \\bar { x } } \\in { \\overline { { \\mathcal { X } } } }$ , we use $\\boldsymbol { \\mathcal { A } } ( \\cdot | \\boldsymbol { \\bar { x } } )$ to denote the distribution of its augmentations. For instance, when $\\bar { x }$ represents an image, $\\boldsymbol { \\mathcal { A } } ( \\cdot | \\boldsymbol { \\bar { x } } )$ can be the distribution of common augmentations $\\mathbb { \\left[ 1 2 \\right] }$ that includes Gaussian blur, color distortion and random cropping. We use $\\mathcal { X }$ to denote the set of all augmented data, which is the union of supports of all $\\boldsymbol { \\mathcal { A } } ( \\cdot | \\boldsymbol { \\bar { x } } )$ for $\\bar { x } \\in \\overline { { \\mathcal { X } } }$ . As with $\\overline { { \\mathcal { X } } }$ , we also assume that $\\mathcal { X }$ is a finite but exponentially large set, and denote $N = | { \\mathcal { X } } |$ . ",
335
+ "bbox": [
336
+ 173,
337
+ 237,
338
+ 825,
339
+ 324
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "We will learn an embedding function $f : \\mathcal { X } \\to \\mathbb { R } ^ { k }$ , and then evaluate its quality by the minimum error achieved with a linear probe. Concretely, a linear classifier has weights $B \\in \\mathbb { R } ^ { \\bar { k } \\times r }$ and predicts $\\begin{array} { r } { g _ { f , B } ( x ) = \\arg \\operatorname* { m a x } _ { i \\in [ r ] } ( f ( \\dot { x } ) ^ { \\top } B ) _ { i } } \\end{array}$ for an augmented data $x$ (arg max breaks tie arbitrarily). Then, given a natural data sample $\\bar { x }$ , we ensemble the predictions on augmented data and predict: ",
346
+ "bbox": [
347
+ 173,
348
+ 329,
349
+ 825,
350
+ 387
351
+ ],
352
+ "page_idx": 3
353
+ },
354
+ {
355
+ "type": "equation",
356
+ "img_path": "images/f95b8cdd784c30300af06b6cc4fcc894ce502b18e537d7842f94738a3376ffd4.jpg",
357
+ "text": "$$\n\\bar { g } _ { f , B } ( \\bar { x } ) : = \\underset { i \\in [ r ] } { \\arg \\operatorname* { m a x } } \\ \\underset { x \\sim \\mathcal { A } ( \\cdot | \\bar { x } ) } { \\operatorname* { P r } } \\left[ g _ { f , B } ( x ) = i \\right] .\n$$",
358
+ "text_format": "latex",
359
+ "bbox": [
360
+ 352,
361
+ 390,
362
+ 643,
363
+ 419
364
+ ],
365
+ "page_idx": 3
366
+ },
367
+ {
368
+ "type": "text",
369
+ "text": "Define the linear probe error as the error of the best possible linear classifier on the representations: ",
370
+ "bbox": [
371
+ 174,
372
+ 421,
373
+ 821,
374
+ 436
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "equation",
380
+ "img_path": "images/513f20ff3963a286539d6cc0ded94c5f6290db60caf5d46f85484f21c129640e.jpg",
381
+ "text": "$$\n\\mathcal { E } ( f ) : = \\operatorname* { m i n } _ { B \\in \\mathbb { R } ^ { k \\times r } } \\operatorname* { P r } _ { \\bar { x } \\sim \\mathcal { P } _ { \\overline { { \\mathcal { X } } } } } [ y ( \\bar { x } ) \\neq \\bar { g } _ { f , B } ( \\bar { x } ) ]\n$$",
382
+ "text_format": "latex",
383
+ "bbox": [
384
+ 367,
385
+ 439,
386
+ 632,
387
+ 464
388
+ ],
389
+ "page_idx": 3
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "3.1 Augmentation graph and spectral decomposition ",
394
+ "text_level": 1,
395
+ "bbox": [
396
+ 174,
397
+ 479,
398
+ 552,
399
+ 494
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "Our approach is based on the central concept of population augmentation graph, denoted by $G ( \\mathcal { X } , w )$ , where the vertex set is all augmentation data $\\mathcal { X }$ and $w$ denotes the edge weights defined below. For any two augmented data $x , x ^ { \\prime } \\in { \\mathcal { X } }$ , define the weight $w _ { x x ^ { \\prime } }$ as the marginal probability of generating the pair $x$ and $x ^ { \\prime }$ from a random natural data $\\hat { x } \\sim \\mathcal { P } _ { \\overline { { x } } }$ : ",
406
+ "bbox": [
407
+ 173,
408
+ 505,
409
+ 825,
410
+ 561
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "equation",
416
+ "img_path": "images/37375123877a24cc2898c7fd5bd0dd7e53664bb9174c341e6304f63986a4dd21.jpg",
417
+ "text": "$$\nw _ { x x ^ { \\prime } } : = \\mathbb { E } _ { \\bar { x } \\sim \\mathcal { P } _ { \\overline { { \\mathcal { X } } } } } \\left[ A ( x | \\bar { x } ) A ( x ^ { \\prime } | \\bar { x } ) \\right]\n$$",
418
+ "text_format": "latex",
419
+ "bbox": [
420
+ 387,
421
+ 565,
422
+ 612,
423
+ 584
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "Therefore, the weights sum to 1 because the total probability mass is 1: $\\begin{array} { r } { \\sum _ { x , x ^ { \\prime } \\in \\mathcal { X } } w _ { x x ^ { \\prime } } = 1 } \\end{array}$ The relative magnitude intuitively captures the closeness between $x$ and $x ^ { \\prime }$ with respect to the augmentation transformation. For most of the unrelated $x$ and $x ^ { \\prime }$ , the value $w _ { x x ^ { \\prime } }$ will be significantly smaller than the average value. For example, when $x$ and $x ^ { \\prime }$ are random croppings of a cat and a dog respectively, $w _ { x x ^ { \\prime } }$ will be essentially zero because no natural data can be augmented into both $x$ and $x ^ { \\prime }$ . On the other hand, when $x$ and $x ^ { \\prime }$ are very close in $\\ell _ { 2 }$ -distance or very close in $\\ell _ { 2 }$ -distance up to color distortion, $w _ { x x ^ { \\prime } }$ is nonzero because they may be augmentations of the same image with Gaussian blur and color distortion. We say that $x$ and $x ^ { \\prime }$ are connected with an edge if $w _ { x x ^ { \\prime } } > 0$ . See Figure 1 (left) for more illustrations. ",
430
+ "bbox": [
431
+ 173,
432
+ 587,
433
+ 825,
434
+ 715
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "Given the structure of the population augmentation graph, we apply spectral decomposition to the population graph to construct principled embeddings. The eigenvalue problems are closely related to graph partitioning as shown in spectral graph theory $\\mathbb { \\ m }$ for both worst-case graphs [11, 25, 29, 33] and random graphs $\\textcircled { 1 1 } , \\textcircled { 3 0 } , \\textcircled { 3 4 } \\textcircled { 3 0 }$ . In machine learning, spectral clustering $\\pm \\pm \\pm \\pm$ is a classical algorithm that learns embeddings by eigendecomposition on an empirical distance graph and invoking $k$ -means on the embeddings. ",
441
+ "bbox": [
442
+ 173,
443
+ 720,
444
+ 825,
445
+ 804
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "We will apply eigendecomposition to the population augmentation graph (and then later use linear probe for classification). Let $\\begin{array} { r } { w _ { x } = \\sum _ { x ^ { \\prime } \\in \\mathcal { X } } \\bar { w } _ { x x ^ { \\prime } } } \\end{array}$ be the total weights associated to $x$ , which is often viewed as an analog of the degree of $x$ in weighted graph. A central object in spectral graph theory is the so-called normalized adjacency matrix: ",
452
+ "bbox": [
453
+ 174,
454
+ 810,
455
+ 825,
456
+ 866
457
+ ],
458
+ "page_idx": 3
459
+ },
460
+ {
461
+ "type": "equation",
462
+ "img_path": "images/ad0fce1ca8d572e75548ffc802c2215f3be7a73766f443d986eee3ab2116b382.jpg",
463
+ "text": "$$\n\\overline { { A } } : = D ^ { - 1 / 2 } A D ^ { - 1 / 2 }\n$$",
464
+ "text_format": "latex",
465
+ "bbox": [
466
+ 426,
467
+ 869,
468
+ 571,
469
+ 886
470
+ ],
471
+ "page_idx": 3
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "where $A \\in \\mathbb { R } ^ { N \\times N }$ is adjacency matrix with entires $A _ { x x ^ { \\prime } } = w _ { x x ^ { \\prime } }$ and $D \\in \\mathbb { R } ^ { N \\times N }$ is a diagonal matrix with $D _ { x x } = w _ { x }$ . 2 ",
476
+ "bbox": [
477
+ 171,
478
+ 89,
479
+ 823,
480
+ 121
481
+ ],
482
+ "page_idx": 4
483
+ },
484
+ {
485
+ "type": "text",
486
+ "text": "Standard spectral graph theory approaches produce vertex embeddings as follows. Let $\\gamma _ { 1 } , \\gamma _ { 2 } , \\cdots , \\gamma _ { k }$ be the $k$ largest eigenvalues of $\\overline { { A } }$ , and $v _ { 1 } , v _ { 2 } , \\cdots , v _ { k }$ be the corresponding unit-norm eigenvectors. Let $F ^ { \\star } = [ \\breve { v } _ { 1 } , v _ { 2 } , \\cdots , v _ { k } ] \\in \\mathbb { R } ^ { N \\times k }$ be the matrix that collects these eigenvectors in columns, and we refer to it as the eigenvector matrix. Let $u _ { x } ^ { \\ast } \\in \\mathbb { R } ^ { k }$ be the $x$ -th row of the matrix $F ^ { \\star }$ . It turns out that $u _ { x } ^ { * }$ ’s can serve as desirable embeddings of $x$ ’s because they exhibit clustering structure in Euclidean space that resembles the clustering structure of the graph $G ( \\mathcal { X } , w )$ . ",
487
+ "bbox": [
488
+ 173,
489
+ 126,
490
+ 825,
491
+ 213
492
+ ],
493
+ "page_idx": 4
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "3.2 From spectral decomposition to spectral contrastive learning ",
498
+ "text_level": 1,
499
+ "bbox": [
500
+ 174,
501
+ 228,
502
+ 635,
503
+ 244
504
+ ],
505
+ "page_idx": 4
506
+ },
507
+ {
508
+ "type": "text",
509
+ "text": "The embeddings $u _ { x } ^ { * }$ obtained by eigendecomposition are nonparametric—a $k$ -dimensional parameter is needed for every $x$ —and therefore cannot be learned with a realistic amount of data. The embedding matrix $F ^ { \\star }$ cannot be even stored efficiently. Therefore, we will instead parameterize the rows of the eigenvector matrix $F ^ { \\star }$ as a neural net function, and assume embeddings $u _ { x } ^ { * }$ can be represented by $f ( x )$ for some $f \\in { \\mathcal { F } }$ , where $\\mathcal { F }$ is the hypothesis class containing neural networks. As we’ll show in Section $\\textcircled { 4 }$ this allows us to leverage the extrapolation power of neural networks and learn the representation on a finite dataset. ",
510
+ "bbox": [
511
+ 173,
512
+ 253,
513
+ 825,
514
+ 352
515
+ ],
516
+ "page_idx": 4
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "Next, we design a proper loss function for the feature extractor $f$ , such that minimizing this loss could recover $F ^ { \\star }$ up to some linear transformation. As we will show in Section $\\mathbb { H } ,$ the resulting population loss function on $f$ also admits an unbiased estimator with finite training samples. Let $F$ be an embedding matrix with $u _ { x }$ on the $x$ -th row, we will first design a loss function of $F$ that can be decomposed into parts about individual rows of $F$ . ",
521
+ "bbox": [
522
+ 173,
523
+ 357,
524
+ 825,
525
+ 428
526
+ ],
527
+ "page_idx": 4
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "We employ the following matrix factorization based formulation for eigenvectors. Consider the objective ",
532
+ "bbox": [
533
+ 173,
534
+ 433,
535
+ 823,
536
+ 462
537
+ ],
538
+ "page_idx": 4
539
+ },
540
+ {
541
+ "type": "equation",
542
+ "img_path": "images/342c2e924c97713333642fd3a8d91d438efeeb560d5e0bc4c8ab7acc5808123f.jpg",
543
+ "text": "$$\n\\operatorname* { m i n } _ { \\boldsymbol { F } \\in \\mathbb { R } ^ { N \\times k } } \\mathcal { L } _ { \\operatorname* { m f } } ( \\boldsymbol { F } ) : = \\big \\| \\overline { { \\boldsymbol { A } } } - \\boldsymbol { F } \\boldsymbol { F } ^ { \\top } \\big \\| _ { F } ^ { 2 } .\n$$",
544
+ "text_format": "latex",
545
+ "bbox": [
546
+ 379,
547
+ 469,
548
+ 620,
549
+ 497
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "By the classical theory on low-rank approximation (Eckart–Young–Mirsky theorem $\\mathbb { I m }$ ), any minimizer $\\widehat F$ of ${ \\mathcal { L } } _ { \\mathrm { m f } } ( F )$ contains scaling of the largest eigenvectors of $\\overline { { A } }$ up to a right transformation— for some orthonormal matrix $R \\in \\mathbb { R } ^ { k \\times k }$ , we have $\\widehat { F } = F ^ { \\star } \\cdot \\mathrm { d i a g } ( [ \\sqrt { \\gamma _ { 1 } } , \\dots , \\sqrt { \\gamma _ { k } } ] ) Q$ . Fortunately, multiplying the embedding matrix by any matrix on the right and any diagonal matrix on the left does not change its linear probe performance, which is formalized by the following lemma. ",
556
+ "bbox": [
557
+ 173,
558
+ 511,
559
+ 826,
560
+ 588
561
+ ],
562
+ "page_idx": 4
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "Lemma 3.1. Consider an embedding matrix $\\boldsymbol { F } \\in \\mathbb { R } ^ { N \\times k }$ and a linear classifier $\\boldsymbol { B } \\in \\mathbb { R } ^ { k \\times r }$ . Let $D \\in \\mathbb { R } ^ { N \\times N }$ be a diagonal matrix with positive diagonal entries and $Q \\in \\mathbb { R } ^ { \\tilde { k } \\times k }$ be an invertible matrix. Then, for any embedding matrix $\\widetilde { F } = D \\cdot F \\cdot Q$ , the linear classifier ${ \\tilde { B } } = Q ^ { - 1 } B$ on $\\widetilde { F }$ has the same prediction as $B$ on $F$ . As a consequence, we have ",
567
+ "bbox": [
568
+ 173,
569
+ 590,
570
+ 825,
571
+ 650
572
+ ],
573
+ "page_idx": 4
574
+ },
575
+ {
576
+ "type": "equation",
577
+ "img_path": "images/4ff52b25b37a53076650d6d99fe7e25050acb7e131996351248d90ec3de218fd.jpg",
578
+ "text": "$$\n\\mathcal { E } ( F ) = \\mathcal { E } ( \\widetilde F ) .\n$$",
579
+ "text_format": "latex",
580
+ "bbox": [
581
+ 449,
582
+ 657,
583
+ 549,
584
+ 678
585
+ ],
586
+ "page_idx": 4
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "where $\\mathcal { E } ( F )$ denotes the linear probe performance when the rows of $F$ are used as embeddings. ",
591
+ "bbox": [
592
+ 168,
593
+ 684,
594
+ 797,
595
+ 699
596
+ ],
597
+ "page_idx": 4
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "The proof can be found in Section C.1. ",
602
+ "bbox": [
603
+ 174,
604
+ 710,
605
+ 429,
606
+ 727
607
+ ],
608
+ "page_idx": 4
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "The main benefit of objective ${ \\mathcal { L } } _ { \\mathrm { m f } } ( F )$ is that it’s based on the rows of $F$ . Recall that vectors $u _ { x }$ are the rows of $F$ . Each entry of $F F ^ { \\top }$ is of the form $u _ { x } ^ { \\top } x _ { x ^ { \\prime } }$ , and thus ${ \\mathcal { L } } _ { \\mathrm { m f } } ( F )$ can be decomposed into a sum of $N ^ { 2 }$ terms involving terms $u _ { x } ^ { \\top } u _ { x ^ { \\prime } }$ . Interestingly, if we reparameterize each row $u _ { x }$ by $w _ { x } ^ { 1 / 2 } f ( x )$ , we obtain a very similar loss function for $f$ that resembles the contrastive learning loss used in practice $\\mathbb { \\lVert \\rVert }$ as shown below in Lemma $\\boxed { 3 . 2 }$ See Figure $\\perp$ (right) for an illustration of the relationship between the eigenvector matrix and the representations learned by minimizing this loss. ",
613
+ "bbox": [
614
+ 173,
615
+ 731,
616
+ 825,
617
+ 821
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "We formally define the positive and negative pairs to introduce the loss. Let $\\hat { x } \\sim \\mathcal { P } _ { \\overline { { x } } }$ be a random natural data and draw $x \\sim \\mathcal { A } ( \\cdot | \\bar { x } )$ and $x ^ { + } \\sim \\mathcal { A } ( \\cdot | \\bar { x } )$ independently to form a positive pair $( x , x ^ { + } )$ . Draw $\\hat { x } ^ { \\prime } \\sim \\mathcal { P } _ { \\overline { { x } } }$ and $x ^ { \\prime } \\sim \\mathcal { A } ( \\cdot | \\bar { x } ^ { \\prime } )$ independently with ${ \\bar { x } } , x , x ^ { + }$ . We call $( x , x ^ { \\prime } )$ a negative pair.3 ",
624
+ "bbox": [
625
+ 174,
626
+ 827,
627
+ 826,
628
+ 872
629
+ ],
630
+ "page_idx": 4
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "Lemma 3.2 (Spectral contrastive loss). Recall that $u _ { x }$ is the $x$ -th row of $F$ . Let $u _ { x } = w _ { x } ^ { 1 / 2 } f ( x ) j$ w1/2 x f (x) for some function $f$ . Then, the loss function ${ \\mathcal { L } } _ { \\mathrm { m f } } ( F )$ is equivalent to the following loss function for $f$ , called spectral contrastive loss, up to a additive constant: ",
635
+ "bbox": [
636
+ 174,
637
+ 90,
638
+ 825,
639
+ 135
640
+ ],
641
+ "page_idx": 5
642
+ },
643
+ {
644
+ "type": "equation",
645
+ "img_path": "images/fc1537a0f56f817372cbc401eab45a34a0d4c2ebb29f210233b6c12d3faedd18.jpg",
646
+ "text": "$$\n\\begin{array} { r l } & { \\mathcal { L } _ { \\operatorname { m f } } ( F ) = \\mathcal { L } ( f ) + \\mathrm { c o n s t } } \\\\ & { \\mathrm { w h e r e } \\mathcal { L } ( f ) \\triangleq - 2 \\cdot \\mathbb { E } _ { x , x ^ { + } } \\big [ f ( x ) ^ { \\top } f ( x ^ { + } ) \\big ] + \\mathbb { E } _ { x , x ^ { \\prime } } \\left[ \\big ( f ( x ) ^ { \\top } f ( x ^ { \\prime } ) \\big ) ^ { 2 } \\right] } \\end{array}\n$$",
647
+ "text_format": "latex",
648
+ "bbox": [
649
+ 267,
650
+ 137,
651
+ 727,
652
+ 185
653
+ ],
654
+ "page_idx": 5
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "The proof can be found in Section C.1. ",
659
+ "bbox": [
660
+ 174,
661
+ 195,
662
+ 429,
663
+ 210
664
+ ],
665
+ "page_idx": 5
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "We note that spectral contrastive loss is similar to many popular contrastive losses [12, 38, 40, 50]. For instance, the contrastive loss in SimCLR $\\mathbb { \\lVert 1 2 \\rVert }$ can be rewritten as (with simple algebraic manipulation) ",
670
+ "bbox": [
671
+ 171,
672
+ 215,
673
+ 825,
674
+ 244
675
+ ],
676
+ "page_idx": 5
677
+ },
678
+ {
679
+ "type": "equation",
680
+ "img_path": "images/a7cfac081ad8be2bde7a54036479295e188bf8c97853382fc44cb94185e102b0.jpg",
681
+ "text": "$$\n- f ( x ) ^ { \\top } f ( x ^ { + } ) + \\log \\left( \\exp \\left( f ( x ) ^ { \\top } f ( x ^ { + } ) \\right) + \\sum _ { i = 1 } ^ { n } \\exp \\left( f ( x ) ^ { \\top } f ( x _ { i } ) \\right) \\right) .\n$$",
682
+ "text_format": "latex",
683
+ "bbox": [
684
+ 258,
685
+ 250,
686
+ 736,
687
+ 291
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "Here $x$ and $x ^ { + }$ are a positive pair and $x _ { 1 } , \\cdots , x _ { n }$ are augmentations of other data. Spectral contrastive loss can be seen as removing $f ( x ) ^ { \\top } f ( x ^ { + } )$ from the second term, and replacing the log sum of exponential terms with the average of the squares of $f ( x ) ^ { \\top } f ( x _ { i } )$ . We will show in Section $\\overline { { 6 } }$ that our loss has a similar empirical performance as SimCLR without requiring a large batch size. ",
694
+ "bbox": [
695
+ 173,
696
+ 297,
697
+ 826,
698
+ 356
699
+ ],
700
+ "page_idx": 5
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "3.3 Theoretical guarantees for spectral contrastive loss on population data ",
705
+ "text_level": 1,
706
+ "bbox": [
707
+ 174,
708
+ 369,
709
+ 702,
710
+ 386
711
+ ],
712
+ "page_idx": 5
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "In this section, we introduce the main assumptions on the data and state our main theoretical guarantee for spectral contrastive learning on population data. ",
717
+ "bbox": [
718
+ 173,
719
+ 395,
720
+ 820,
721
+ 424
722
+ ],
723
+ "page_idx": 5
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "To formalize the idea that $G$ cannot be partitioned into too many disconnected sub-graphs, we introduce the notions of Dirichlet conductance and sparsest $m$ -partition, which are standard in spectral graph theory. Dirichlet conductance represents the fraction of edges from $S$ to its complement: ",
728
+ "bbox": [
729
+ 173,
730
+ 429,
731
+ 825,
732
+ 486
733
+ ],
734
+ "page_idx": 5
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "Definition 3.3 (Dirichlet conductance). For a graph $G = ( \\mathcal { X } , w )$ and a subset $S \\subseteq { \\mathcal { X } }$ , we define the Dirichlet conductance of $S$ as ",
739
+ "bbox": [
740
+ 173,
741
+ 488,
742
+ 823,
743
+ 518
744
+ ],
745
+ "page_idx": 5
746
+ },
747
+ {
748
+ "type": "equation",
749
+ "img_path": "images/de9d48b930f27d631b29b8d20d14d88108f85a544017cfc8d35abffd9ba80ffe.jpg",
750
+ "text": "$$\n\\phi _ { G } ( S ) : = \\frac { \\sum _ { x \\in S , x ^ { \\prime } \\notin S } w _ { x x ^ { \\prime } } } { \\sum _ { x \\in S } w _ { x } } .\n$$",
751
+ "text_format": "latex",
752
+ "bbox": [
753
+ 401,
754
+ 521,
755
+ 594,
756
+ 560
757
+ ],
758
+ "page_idx": 5
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "We note that when $S$ is a singleton, there is $\\phi _ { G } ( S ) = 1$ due to the definition of $w _ { x }$ . We introduce the sparsest $m$ -partition to represent the number of edges between $m$ disjoint subsets. ",
763
+ "bbox": [
764
+ 173,
765
+ 570,
766
+ 821,
767
+ 601
768
+ ],
769
+ "page_idx": 5
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "Definition 3.4 (Sparsest $m$ -partition). Let $G = ( \\mathcal { X } , w )$ be the augmentation graph. For an integer $m \\in [ 2 , | \\mathcal { X } | ]$ , we define the sparsest $m$ -partition as ",
774
+ "bbox": [
775
+ 173,
776
+ 603,
777
+ 821,
778
+ 632
779
+ ],
780
+ "page_idx": 5
781
+ },
782
+ {
783
+ "type": "equation",
784
+ "img_path": "images/5528ff04009c8c42ebf2ca796c38285cc89d2372ef8bbdd222d908761c6dbd60.jpg",
785
+ "text": "$$\n\\rho _ { m } : = \\operatorname* { m i n } _ { S _ { 1 } , \\cdots , S _ { m } } \\operatorname* { m a x } \\{ \\phi _ { G } ( S _ { 1 } ) , \\ldots , \\phi _ { G } ( S _ { m } ) \\}\n$$",
786
+ "text_format": "latex",
787
+ "bbox": [
788
+ 349,
789
+ 636,
790
+ 648,
791
+ 661
792
+ ],
793
+ "page_idx": 5
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "where $S _ { 1 } , \\cdots , S _ { m }$ are non-empty sets that form a partition of $\\mathcal { X }$ ",
798
+ "bbox": [
799
+ 173,
800
+ 666,
801
+ 599,
802
+ 681
803
+ ],
804
+ "page_idx": 5
805
+ },
806
+ {
807
+ "type": "text",
808
+ "text": "When $r$ is the number of underlying classes, we might expect $\\rho _ { r } \\approx 0$ since the augmentations from different classes almost compose a disjoint $r$ -way partition of $\\mathcal { X }$ . However, for $m > r$ , we can expect $\\rho _ { m }$ to be much larger. For instance, in the extreme case when $m = | { \\mathcal { X } } | = N$ , every set $S _ { i }$ is a singleton, which implies that $\\rho _ { N } = 1$ . ",
809
+ "bbox": [
810
+ 173,
811
+ 690,
812
+ 825,
813
+ 747
814
+ ],
815
+ "page_idx": 5
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "Next, we formalize the assumption that very few edges cross different ground-truth classes. It turns out that it suffices to assume that the labels are recoverable from the augmentations (which is also equivalent to that two examples in different classes can rarely be augmented into the same point). ",
820
+ "bbox": [
821
+ 173,
822
+ 752,
823
+ 823,
824
+ 795
825
+ ],
826
+ "page_idx": 5
827
+ },
828
+ {
829
+ "type": "text",
830
+ "text": "Assumption 3.5 (Labels are recoverable from augmentations). Let $\\hat { x } \\sim \\mathcal { P } _ { \\overline { { x } } }$ and $y ( \\bar { x } )$ be its label. Let the augmentation $x \\sim \\mathcal { A } ( \\cdot | \\bar { x } )$ . We assume that there exists a classifier $g$ that can predict $y ( \\bar { x } )$ given x with error at most $\\alpha$ . That is, $g ( x ) = y ( \\bar { x } )$ with probability at least $1 - \\alpha$ . ",
831
+ "bbox": [
832
+ 173,
833
+ 797,
834
+ 825,
835
+ 842
836
+ ],
837
+ "page_idx": 5
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "We also introduce the following assumption which states that some universal minimizer of the population spectral contrastive loss can be realized by the hypothesis class. ",
842
+ "bbox": [
843
+ 171,
844
+ 851,
845
+ 823,
846
+ 880
847
+ ],
848
+ "page_idx": 5
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "Assumption 3.6 (Realizability). Let $\\mathcal { F }$ be a hypothesis class containing functions from $\\mathcal { X }$ to $\\mathbb { R } ^ { k }$ . We assume that at least one of the global minima of $\\mathcal { L } ( f )$ belongs to $\\mathcal { F }$ . ",
853
+ "bbox": [
854
+ 173,
855
+ 882,
856
+ 821,
857
+ 912
858
+ ],
859
+ "page_idx": 5
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "Our main theorem bound from above the linear probe error of the features learned by minimizing the population spectral contrastive loss. ",
864
+ "bbox": [
865
+ 173,
866
+ 90,
867
+ 823,
868
+ 119
869
+ ],
870
+ "page_idx": 6
871
+ },
872
+ {
873
+ "type": "text",
874
+ "text": "Theorem 3.7. Assume the representation dimension $k \\geq 2 r$ and Assumption $\\boxed { 3 . 5 }$ holds for $\\alpha > 0$ . Let $\\mathcal { F }$ be a hypothesis class that satisfies Assumption $\\boxed { 3 . 6 }$ and let $f _ { \\mathrm { p o p } } ^ { * } \\in \\mathcal { F }$ be a minimizer of $\\mathcal { L } ( f )$ . Then, we have ",
875
+ "bbox": [
876
+ 173,
877
+ 125,
878
+ 826,
879
+ 166
880
+ ],
881
+ "page_idx": 6
882
+ },
883
+ {
884
+ "type": "equation",
885
+ "img_path": "images/26eec9b42e74553ee42d5ef4a5595eacae1ea27b1c9917709f7c56f96dc63ff3.jpg",
886
+ "text": "$$\n\\begin{array} { r } { \\mathcal { E } ( f _ { \\mathrm { p o p } } ^ { * } ) \\leq \\widetilde { O } \\left( \\alpha / \\rho _ { \\lfloor k / 2 \\rfloor } ^ { 2 } \\right) . } \\end{array}\n$$",
887
+ "text_format": "latex",
888
+ "bbox": [
889
+ 410,
890
+ 172,
891
+ 588,
892
+ 200
893
+ ],
894
+ "page_idx": 6
895
+ },
896
+ {
897
+ "type": "text",
898
+ "text": "Here we use ${ \\widetilde { O } } ( \\cdot )$ to hide universal constant factors and logarithmic factor in $k$ . We note that $\\alpha = 0$ when augmentations from different classes are perfectly disconnected in the augmentation graph, in which case the above theorem guarantees the exact recovery of the ground truth. Generally, we expect $\\alpha$ to be an extremely small constant independent of $k$ , whereas $\\rho _ { \\lfloor k / 2 \\rfloor }$ increases with $k$ and can be much larger than $\\alpha$ when $k$ is reasonably large. For instance, when there are $t$ sub-graphs that have sufficient inner connections, we expect $\\rho _ { t + 1 }$ to be on the order of a constant because any $t + 1$ partition needs to break one sub-graph into two pieces and incur a large conductance. We characterize the $\\rho _ { k }$ ’s growth on more concrete distributions in the next subsection. ",
899
+ "bbox": [
900
+ 173,
901
+ 215,
902
+ 826,
903
+ 329
904
+ ],
905
+ "page_idx": 6
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "Previous works on graph partitioning [2, 29, 31] often analyze the so-called rounding algorithms that conduct clustering based on the representations of unlabeled data and do not analyze the performance of linear probe (which has access to labeled data). These results provide guarantees on the approximation ratio—the ratio between the conductance of the obtained partition to the best partition—which may depend on graph size $\\left[ \\left[ 2 \\right] \\right]$ that can be exponentially large in our setting. The approximation ratio guarantee does not lead to a guarantee on the representations’ performance on downstream tasks. Our guarantees are on the linear probe accuracy on the downstream tasks and independent of the graph size. We rely on the formulation of the downstream task’s labeling function (Assumption $3 . 5 )$ as well as a novel analysis technique that characterizes the linear structure of the representations. In Section $\\mathbf { C } ,$ we provide the proof of Theorem $\\boxed { 3 . 7 }$ as well as its more generalized version where $k / 2$ is relaxed to be any constant fraction of $k$ . ",
910
+ "bbox": [
911
+ 173,
912
+ 333,
913
+ 825,
914
+ 488
915
+ ],
916
+ "page_idx": 6
917
+ },
918
+ {
919
+ "type": "text",
920
+ "text": "3.4 Provable instantiation of Theorem $\\pmb { \\bigtriangledown } . \\pmb { \\bigtriangledown } .$ to mixture of manifold data ",
921
+ "text_level": 1,
922
+ "bbox": [
923
+ 176,
924
+ 503,
925
+ 671,
926
+ 520
927
+ ],
928
+ "page_idx": 6
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "In this section, we exemplify Theorem $3 . 7$ on an example where the natural data distribution is a mixture of manifolds, and the augmentation transformation is adding Gaussian noise. ",
933
+ "bbox": [
934
+ 171,
935
+ 530,
936
+ 823,
937
+ 559
938
+ ],
939
+ "page_idx": 6
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "Example 3.8 (Mixture of manifolds). Suppose $\\mathcal { P } _ { \\overline { { \\mathcal { X } } } }$ is mixture of $r \\leq d$ distributions $P _ { 1 } , \\cdots , P _ { r }$ , where each $P _ { i }$ is generated by some $\\kappa$ X -bi-Lipschitz4 generator $Q : \\mathbb { R } ^ { d ^ { \\prime } } \\mathbb { R } ^ { d }$ on some latent variable $z \\in \\mathbb { R } ^ { d ^ { \\prime } }$ with $d ^ { \\prime } \\leq d$ which as a mixture of Gaussian distribution: ",
944
+ "bbox": [
945
+ 174,
946
+ 564,
947
+ 825,
948
+ 612
949
+ ],
950
+ "page_idx": 6
951
+ },
952
+ {
953
+ "type": "equation",
954
+ "img_path": "images/89eaf46d2eb01c5a7558dd6e32cf6528cc9a308c4fa9c579500ecbb8ef18931f.jpg",
955
+ "text": "$$\nx \\sim P _ { i } \\Longleftrightarrow x = Q ( z ) , z \\sim { \\mathcal N } ( \\mu _ { i } , \\frac { 1 } { d ^ { \\prime } } \\cdot I _ { d ^ { \\prime } \\times d ^ { \\prime } } ) .\n$$",
956
+ "text_format": "latex",
957
+ "bbox": [
958
+ 334,
959
+ 618,
960
+ 661,
961
+ 648
962
+ ],
963
+ "page_idx": 6
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "Let the data augmentation of a natural data sample $\\bar { x }$ is $\\bar { x } + \\xi$ where $\\begin{array} { r } { \\xi \\sim \\mathcal { N } ( 0 , \\frac { \\sigma ^ { 2 } } { d } \\cdot I _ { d \\times d } ) } \\end{array}$ is isotropic Gaussian noise with $\\begin{array} { r } { 0 < \\sigma \\lesssim \\frac { 1 } { \\sqrt { d } } } \\end{array}$ . We also assume $\\begin{array} { r } { \\operatorname* { m i n } _ { i \\neq j } \\| \\mu _ { i } - \\mu _ { j } \\| _ { 2 } \\gtrsim \\frac { \\kappa \\cdot \\sqrt { \\log d } } { \\sqrt { d ^ { \\prime } } } } \\end{array}$ . ",
968
+ "bbox": [
969
+ 173,
970
+ 657,
971
+ 825,
972
+ 698
973
+ ],
974
+ "page_idx": 6
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "Let the ground-truth label be the most likely mixture index $i$ that generates $x$ : $y ( x ) : = \\arg \\operatorname* { m a x } _ { i } P _ { i } ( x )$ . We note that the intra-class distance in the latent space is on the scale of $\\Omega ( 1 )$ , which can be much larger than the distance between class means which is assumed to be $\\gtrsim \\frac { \\kappa \\cdot \\sqrt { \\log d } } { \\sqrt { d ^ { \\prime } } }$ . Therefore, distancebased clustering algorithms do not apply. We apply Theorem $3 . 7$ and get the following theorem: ",
979
+ "bbox": [
980
+ 173,
981
+ 708,
982
+ 826,
983
+ 772
984
+ ],
985
+ "page_idx": 6
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "Theorem 3.9. When $\\rho _ { \\lfloor k / 2 \\rfloor } \\gtrsim \\frac { \\sigma } { \\kappa \\sqrt { d } }$ . As a consequence, the error bound is $k \\geq 2 r + 2$ , Example 3.8 satisfies Assumption 3.5 with $\\begin{array} { r } { { \\mathcal { E } } ( f _ { \\mathrm { p o p } } ^ { * } ) \\leq { \\tilde { O } } \\left( \\frac { \\kappa ^ { 2 } } { \\sigma ^ { 2 } \\cdot \\mathrm { p o l y } \\left( d \\right) } \\right) } \\end{array}$ $\\alpha \\leq { \\frac { 1 } { \\mathrm { p o l y } ( d ) } }$ . , and has ",
990
+ "bbox": [
991
+ 173,
992
+ 773,
993
+ 820,
994
+ 819
995
+ ],
996
+ "page_idx": 6
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "The theorem above guarantees small error even when $\\sigma$ is polynomially small. In this case, the augmentation noise has a much smaller scale than the data (which is at least on the order of $1 / \\kappa \\mathrm { \\lrcorner }$ ). This suggests that contrastive learning can non-trivially leverage the structure of the underlying data and learn good representations with relatively weak augmentation. The proof can be found in Section D. ",
1001
+ "bbox": [
1002
+ 174,
1003
+ 829,
1004
+ 825,
1005
+ 886
1006
+ ],
1007
+ "page_idx": 6
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "4 Finite-sample generalization bounds ",
1012
+ "text_level": 1,
1013
+ "bbox": [
1014
+ 173,
1015
+ 89,
1016
+ 509,
1017
+ 107
1018
+ ],
1019
+ "page_idx": 7
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "In Section $\\textcircled { 3 } ,$ we provide guarantees for spectral contrastive learning on population data. In this section, we show that these guarantees can be naturally extended to the finite-sample regime with standard concentration bounds. In particular, given a training dataset $\\{ \\bar { x } _ { 1 } , \\bar { x } _ { 2 } , \\cdot \\cdot \\cdot , \\bar { x } _ { n } \\}$ with $\\bar { x } _ { i } \\sim \\mathcal { P } _ { \\overline { { x } } }$ , we learn a feature extractor by minimizing the following empirical spectral contrastive loss: ",
1024
+ "bbox": [
1025
+ 174,
1026
+ 119,
1027
+ 826,
1028
+ 178
1029
+ ],
1030
+ "page_idx": 7
1031
+ },
1032
+ {
1033
+ "type": "equation",
1034
+ "img_path": "images/209321e17c2ea19d35d3fae803e77eb6bbb8a1be0a15379d3eb918a314303aa8.jpg",
1035
+ "text": "$$\n\\widehat { \\mathcal { L } } _ { n } ( f ) : = - \\frac { 2 } { n } \\sum _ { i = 1 } ^ { n } \\mathbb { E } _ { \\underset { x ^ { + } \\sim A ( x ^ { + } \\mid \\bar { x } _ { i } ) } { x ^ { \\sim A ( \\cdot \\mid \\bar { x } _ { i } ) } } } \\left[ f ( x ) ^ { \\top } f ( x ^ { + } ) \\right] + \\frac { 1 } { n ( n - 1 ) } \\sum _ { i \\neq j } \\mathbb { E } _ { \\underset { x ^ { \\prime } \\sim A ( \\cdot \\mid \\bar { x } _ { j } ) } { x ^ { \\sim A ( \\cdot \\mid \\bar { x } _ { i } ) } } } \\left[ \\left( f ( x ) ^ { \\top } f ( x ^ { \\prime } ) \\right) ^ { 2 } \\right] .\n$$",
1036
+ "text_format": "latex",
1037
+ "bbox": [
1038
+ 189,
1039
+ 183,
1040
+ 808,
1041
+ 224
1042
+ ],
1043
+ "page_idx": 7
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "It is worth noting that ${ \\widehat { \\mathcal { L } } } _ { n } ( f )$ is an unbiased estimator of the population spectral contrastive loss $\\mathcal { L } ( f )$ . (See Claim $\\mathbf { E . } 2$ for a proof.) Therefore, we can derive generalization bounds via off-the-shelf concentration inequalities. Let $\\mathcal { F }$ be a hypothesis class containing feature extractors from $\\mathcal { X }$ to $\\mathbb { R } ^ { k }$ . We extend Rademacher complexity to function classes with highdimensional outputs and define the Rademacher complexity of $\\mathcal { F }$ on $n$ data as $\\widehat { \\mathcal { R } } _ { n } ( \\mathcal { F } ) \\overset { \\cdot } { : = }$ $\\begin{array} { r } { \\operatorname* { m a x } _ { x _ { 1 } , \\cdots , x _ { n } \\in \\mathcal { X } } \\bar { \\mathbb { E } } _ { \\sigma } \\left[ \\operatorname* { s u p } _ { f \\in \\mathcal { F } , i \\in [ k ] } \\frac { 1 } { n } \\left( \\sum _ { j = 1 } ^ { n } \\sigma _ { j } f _ { i } ( x _ { j } ) \\right) \\right] , } \\end{array}$ , ",
1048
+ "bbox": [
1049
+ 173,
1050
+ 231,
1051
+ 826,
1052
+ 332
1053
+ ],
1054
+ "page_idx": 7
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "where $\\sigma$ is a uniform random vector in $\\{ - 1 , 1 \\} ^ { n }$ and $f _ { i } ( z )$ is the $i$ -th dimension of $f ( z )$ . ",
1059
+ "bbox": [
1060
+ 171,
1061
+ 335,
1062
+ 754,
1063
+ 352
1064
+ ],
1065
+ "page_idx": 7
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Recall that $f _ { \\mathrm { p o p } } ^ { * } \\in \\mathcal { F }$ is a minimizer of $\\mathcal { L } ( f )$ . The following theorem with proofs in Section bounds the population loss of a feature extractor trained with finite data: ",
1070
+ "bbox": [
1071
+ 174,
1072
+ 356,
1073
+ 803,
1074
+ 386
1075
+ ],
1076
+ "page_idx": 7
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Theorem 4.1. For some $\\kappa > 0$ , assume $\\| f ( x ) \\| _ { \\infty } \\leq \\kappa$ for all $f \\in { \\mathcal { F } }$ and $x \\in \\mathcal { X }$ . Let $f _ { \\mathrm { p o p } } ^ { * } \\in \\mathcal { F }$ be $a$ minimizer of the population loss $\\mathcal { L } ( f )$ . Given a random dataset of size $n$ , let $\\hat { f } _ { \\mathrm { e m p } } \\in \\mathcal { F }$ be a minimizer of empirical loss ${ \\widehat { \\mathcal { L } } } _ { n } ( f )$ . Then, with probability at least $1 - \\delta$ over the randomness of data, we have ",
1081
+ "bbox": [
1082
+ 174,
1083
+ 388,
1084
+ 826,
1085
+ 440
1086
+ ],
1087
+ "page_idx": 7
1088
+ },
1089
+ {
1090
+ "type": "equation",
1091
+ "img_path": "images/724a9c66c7de7631478d1986cbe16ba67e543e4c5f31768e8351fa8c3198f531.jpg",
1092
+ "text": "$$\n\\mathcal { L } ( \\hat { f } _ { \\mathrm { e m p } } ) \\leq \\mathcal { L } ( f _ { \\mathrm { p o p } } ^ { * } ) + c _ { 1 } \\cdot \\widehat { \\mathcal { R } } _ { n / 2 } ( \\mathcal { F } ) + c _ { 2 } \\cdot \\left( \\sqrt { \\frac { \\log 2 / \\delta } { n } } + \\delta \\right) ,\n$$",
1093
+ "text_format": "latex",
1094
+ "bbox": [
1095
+ 292,
1096
+ 445,
1097
+ 702,
1098
+ 488
1099
+ ],
1100
+ "page_idx": 7
1101
+ },
1102
+ {
1103
+ "type": "text",
1104
+ "text": "where constants $c _ { 1 } \\lesssim k ^ { 2 } \\kappa ^ { 2 } + k \\kappa$ and $c _ { 2 } \\lesssim k \\kappa ^ { 2 } + k ^ { 2 } \\kappa ^ { 4 }$ . ",
1105
+ "bbox": [
1106
+ 174,
1107
+ 493,
1108
+ 544,
1109
+ 511
1110
+ ],
1111
+ "page_idx": 7
1112
+ },
1113
+ {
1114
+ "type": "text",
1115
+ "text": "We can apply Theorem $\\boxed { 4 . 1 }$ to any hypothesis class $\\mathcal { F }$ of interest (e.g., deep neural networks) and plug in off-the-shelf Rademacher complexity bounds. For instance, in Section $\\boxed { \\ E . 2 }$ we give a corollary of Theorem $\\boxed { 4 . 1 }$ when $\\mathcal { F }$ contains deep neural networks with ReLU activation. ",
1116
+ "bbox": [
1117
+ 173,
1118
+ 520,
1119
+ 825,
1120
+ 563
1121
+ ],
1122
+ "page_idx": 7
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "The theorem above shows that we can achieve near-optimal population loss by minimizing empirical loss up to some small excess loss. The following theorem characterizes how the error propagates to the linear probe performance mildly under some spectral gap conditions. ",
1127
+ "bbox": [
1128
+ 173,
1129
+ 568,
1130
+ 825,
1131
+ 611
1132
+ ],
1133
+ "page_idx": 7
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "Theorem 4.2. Assume representation dimension $k \\geq 4 r + 2$ , Assumption $\\boxed { 3 . 5 }$ holds for $\\alpha > 0$ and Assumption $\\boxed { 3 . 6 }$ holds. Recall $\\gamma _ { i }$ be the $i$ -th largest eigenvalue of the normalized adjacency matrix. Then, for any $\\epsilon < \\gamma _ { k } ^ { 2 }$ and $\\hat { f } _ { \\mathrm { e m p } } \\in \\mathcal { F }$ such that $\\mathcal { L } ( \\hat { f } _ { \\mathrm { e m p } } ) < \\mathcal { L } ( f _ { \\mathrm { p o p } } ^ { * } ) + \\epsilon ,$ , we have: ",
1138
+ "bbox": [
1139
+ 173,
1140
+ 614,
1141
+ 825,
1142
+ 661
1143
+ ],
1144
+ "page_idx": 7
1145
+ },
1146
+ {
1147
+ "type": "equation",
1148
+ "img_path": "images/5abac4758ae0f95c906b27c63a8405997c0a105dff718266a2c9450ff18e2be1.jpg",
1149
+ "text": "$$\n\\mathcal { E } ( \\hat { f } _ { \\mathrm { e m p } } ) \\lesssim \\frac { \\alpha } { \\rho _ { \\lfloor k / 2 \\rfloor } ^ { 2 } } \\cdot \\log k + \\frac { k \\epsilon } { \\Delta _ { \\gamma } ^ { 2 } } ,\n$$",
1150
+ "text_format": "latex",
1151
+ "bbox": [
1152
+ 390,
1153
+ 667,
1154
+ 606,
1155
+ 704
1156
+ ],
1157
+ "page_idx": 7
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "where $\\Delta _ { \\gamma } : = \\gamma _ { \\left\\lfloor 3 k / 4 \\right\\rfloor } - \\gamma _ { k }$ is the eigenvalue gap between the $\\lfloor 3 k / 4 \\rfloor$ -th and the $k$ -th eigenvalue. ",
1162
+ "bbox": [
1163
+ 171,
1164
+ 709,
1165
+ 805,
1166
+ 726
1167
+ ],
1168
+ "page_idx": 7
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "This theorem shows that the error on the downstream task only grows linearly with the error $\\epsilon$ during pretraining. We can relax Assumption $\\boxed { 3 . 6 }$ to approximate realizability in the sense that $\\mathcal { F }$ contains some sub-optimal feature extractor under the population spectral loss and pay an additional error term in the linear probe error bound. The proof of Theorem $\\mathsf { \\bar { 4 } } . 2$ can be found in Section E.3. ",
1173
+ "bbox": [
1174
+ 173,
1175
+ 734,
1176
+ 826,
1177
+ 792
1178
+ ],
1179
+ "page_idx": 7
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "5 Guarantee for learning linear probe with labeled data ",
1184
+ "text_level": 1,
1185
+ "bbox": [
1186
+ 173,
1187
+ 810,
1188
+ 653,
1189
+ 829
1190
+ ],
1191
+ "page_idx": 7
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "In this section, we provide theoretical guarantees for learning a linear probe with labeled data. Theorem $3 . 7$ guarantees the existence of a linear probe that achieves a small downstream classification error. However, a priori it is unclear how large the margin of the linear classifier can be, so it is hard to apply margin theory to provide generalization bounds for 0-1 loss. We could in principle control the margin of the linear head, but using capped quadratic loss turns out to suffice and mathematically more convenient. We learn a linear head with the following capped quadratic loss: given a tuple $( z , y ( { \\bar { x } } ) )$ where $z \\in \\mathbb { R } ^ { k }$ is a representation of augmented data $x \\sim \\mathcal { A } ( \\cdot | \\bar { x } )$ and $y ( \\bar { x } ) \\in [ r ]$ is the label of $\\bar { x }$ , for a linear probe $B \\in \\mathbb { R } ^ { k \\times r }$ we define loss $\\begin{array} { r } { \\ell ( ( z , y ( \\bar { x } ) ) , B ) : = \\sum _ { i = 1 } ^ { r } \\operatorname* { m i n } \\big \\{ \\left( B ^ { \\top } z - \\vec { y } ( \\bar { x } ) \\right) _ { i } ^ { 2 } , 1 \\big \\} } \\end{array}$ , where $\\vec { y } ( \\bar { x } )$ is the one-hot embedding of $y ( \\bar { x } )$ as a $r$ -dimensional vector (1 on the $y ( \\bar { x } )$ -th dimension, 0 on other dimensions). This is a standard modification of quadratic loss in statistical learning theory that ensures the boundedness of the loss for the ease of analysis $\\pmb { \\mathbb { B } } 6 \\|$ . ",
1196
+ "bbox": [
1197
+ 174,
1198
+ 842,
1199
+ 825,
1200
+ 912
1201
+ ],
1202
+ "page_idx": 7
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "",
1207
+ "bbox": [
1208
+ 173,
1209
+ 90,
1210
+ 826,
1211
+ 183
1212
+ ],
1213
+ "page_idx": 8
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "The following Theorem $5 . 1$ provides a generalization guarantee for the linear classifier that minimizes capped quadratic loss on a labeled dataset. The key challenge of the proof is showing the existence of a small-norm linear head $B$ that gives small population quadratic loss, which is not obvious from Theorem $3 . 7$ where only small 0-1 error is guaranteed. Recall $\\gamma _ { i }$ is the $i$ -th largest eigenvalue of the the normalized adjacency matrix. Given a labeled dataset $\\{ ( \\bar { x } _ { i } , y ( \\bar { x } _ { i } ) ) \\} _ { i = 1 } ^ { n }$ where $\\bar { x } _ { i } \\sim \\mathcal { P } _ { \\overline { { X } } }$ and $y ( \\bar { x } _ { i } )$ is its label, we sample $x _ { i } \\sim \\mathcal { A } ( \\cdot | \\bar { x } _ { i } )$ for $i \\in [ n ]$ . ",
1218
+ "bbox": [
1219
+ 173,
1220
+ 188,
1221
+ 825,
1222
+ 272
1223
+ ],
1224
+ "page_idx": 8
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "Theorem 5.1. In the setting of Theorem $\\boxed { 3 . 7 }$ assume $\\gamma _ { k } \\geq C _ { \\lambda }$ for some $C _ { \\lambda } > 0$ . Learn a linear probe $\\begin{array} { r } { \\widehat { B } \\in \\arg \\operatorname* { m i n } _ { \\| B \\| _ { F } \\leq 1 / C _ { \\lambda } } \\sum _ { i = 1 } ^ { n } \\ell ( ( f _ { \\mathrm { p o p } } ^ { \\ast } ( x _ { i } ) , y ( \\bar { x } _ { i } ) ) , B ) } \\end{array}$ by minimizing the capped quadratic loss subject to a norm constraint. Then, with probability at least $1 - \\delta$ over random data, we have ",
1229
+ "bbox": [
1230
+ 173,
1231
+ 276,
1232
+ 825,
1233
+ 324
1234
+ ],
1235
+ "page_idx": 8
1236
+ },
1237
+ {
1238
+ "type": "equation",
1239
+ "img_path": "images/ce4fcd8f6c27436bba98c59ba98467f774d8dcd3ca5c6fe819444927038d9507.jpg",
1240
+ "text": "$$\n\\operatorname* { P r } _ { \\bar { x } \\sim \\mathcal { P } _ { \\overline { { x } } } } \\left( \\bar { g } _ { f _ { \\mathrm { p o p } } ^ { * } , \\widehat { B } } ( \\bar { x } ) \\neq y ( \\bar { x } ) \\right) \\lesssim \\frac { \\alpha } { \\rho _ { \\lfloor k / 2 \\rfloor } ^ { 2 } } \\cdot \\log k + \\frac { r } { C _ { \\lambda } } \\cdot \\sqrt { \\frac { k } { n } } + \\sqrt { \\frac { \\log 1 / \\delta } { n } } .\n$$",
1241
+ "text_format": "latex",
1242
+ "bbox": [
1243
+ 263,
1244
+ 333,
1245
+ 733,
1246
+ 375
1247
+ ],
1248
+ "page_idx": 8
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "Here the first term is the population error from Theorem $\\underline { { \\overline { { 3 . 7 } } } }$ The last two terms are the generalization gap from standard concentration inequalities for linear classification and are small when the number of labeled data $n$ is polynomial in the feature dimension $k$ . We note that this result reveals a tradeoff when choosing the feature dimension $k$ : when $n$ is fixed, a larger $k$ decreases the population contrastive loss while increases the generalization gap for downstream linear classification. The proof of Theorem 5.1 is in Section F. ",
1253
+ "bbox": [
1254
+ 173,
1255
+ 386,
1256
+ 826,
1257
+ 472
1258
+ ],
1259
+ "page_idx": 8
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "6 Experiments ",
1264
+ "text_level": 1,
1265
+ "bbox": [
1266
+ 174,
1267
+ 488,
1268
+ 312,
1269
+ 505
1270
+ ],
1271
+ "page_idx": 8
1272
+ },
1273
+ {
1274
+ "type": "text",
1275
+ "text": "We test spectral contrastive learning on benchmark vision datasets. We minimize the empirical spectral contrastive loss with an encoder network $f$ and sample fresh augmentation in each iteration. The pseudo-code for the algorithm and more implementation details can be found in Section A. ",
1276
+ "bbox": [
1277
+ 176,
1278
+ 515,
1279
+ 820,
1280
+ 556
1281
+ ],
1282
+ "page_idx": 8
1283
+ },
1284
+ {
1285
+ "type": "text",
1286
+ "text": "Encoder / feature extractor. The encoder $f$ contains three components: a backbone network, a projection MLP and a projection function. The backbone network is a standard ResNet architecture. The projection MLP is a fully connected network with BN applied to each layer, and ReLU activation applied to each except for the last layer. The projection function takes a vector and projects it to a sphere ball with radius $\\sqrt { \\mu }$ , where $\\mu > 0$ is a hyperparameter that we tune in experiments. We find that using a projection MLP and a projection function improves the performance. ",
1287
+ "bbox": [
1288
+ 173,
1289
+ 563,
1290
+ 825,
1291
+ 647
1292
+ ],
1293
+ "page_idx": 8
1294
+ },
1295
+ {
1296
+ "type": "text",
1297
+ "text": "Linear evaluation protocol. Given the pre-trained encoder network, we follow the standard linear evaluation protocol $\\mathbf { \\widehat { \\mathbb { W } } }$ and train a supervised linear classifier on frozen representations, which are from the ResNet’s global average pooling layer. ",
1298
+ "bbox": [
1299
+ 174,
1300
+ 652,
1301
+ 821,
1302
+ 695
1303
+ ],
1304
+ "page_idx": 8
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "text": "Results. We report the accuracy on CIFAR-10/100 [26] and Tiny-ImageNet $\\mathbb { \\left| \\overline { { 2 7 } } \\right| }$ in Table 1. Our empirical results show that spectral contrastive learning achieves better performance than two popular baseline algorithms SimCLR $\\pmb { \\mathbb { L } 2 }$ and SimSiam $\\textcircled { 1 4 } ]$ . In Table 2 we report results on ImageNet $\\boxed { 1 8 }$ dataset, and show that our algorithm achieves similar performance as other state-of-the-art methods. We note that our algorithm is much more principled than previous methods and doesn’t rely on large batch sizes (SimCLR $\\mathbb { I I Z }$ ), momentum encoders (BYOL [21] and MoCo $\\pm \\mathbb { Z } 2 \\mathbb { I } .$ ) or additional tricks such as stop-gradient (SimSiam [14]). ",
1309
+ "bbox": [
1310
+ 173,
1311
+ 700,
1312
+ 825,
1313
+ 799
1314
+ ],
1315
+ "page_idx": 8
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "text": "7 Conclusion ",
1320
+ "text_level": 1,
1321
+ "bbox": [
1322
+ 174,
1323
+ 814,
1324
+ 299,
1325
+ 832
1326
+ ],
1327
+ "page_idx": 8
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "In this paper, we present a novel theoretical framework of self-supervised learning and provide provable guarantees for the learned representations on downstream linear classification. We hope our study can facilitate future theoretical analyses of self-supervised learning and inspire new practical algorithms. For instance, one interesting future direction is to test the topology of the augmentation graph on empirical data distributions and design algorithms using tools from graph theory. ",
1332
+ "bbox": [
1333
+ 174,
1334
+ 842,
1335
+ 825,
1336
+ 911
1337
+ ],
1338
+ "page_idx": 8
1339
+ },
1340
+ {
1341
+ "type": "table",
1342
+ "img_path": "images/c1750b5c1b5e671b28c58ce0f0f9166a8abefba1326ff76ba9e487593a89a788.jpg",
1343
+ "table_caption": [
1344
+ "Table 1: Top-1 accuracy under linear evaluation protocal. "
1345
+ ],
1346
+ "table_footnote": [],
1347
+ "table_body": "<table><tr><td>Datasets</td><td colspan=\"3\">CIFAR-10</td><td colspan=\"3\">CIFAR-100</td><td colspan=\"3\">Tiny-ImageNet</td></tr><tr><td>Epochs</td><td>200</td><td>400</td><td>800</td><td>200</td><td>400</td><td>800</td><td>200</td><td>400</td><td>800</td></tr><tr><td>SimCLR (repro.)</td><td>83.73</td><td>87.72</td><td>90.60</td><td>54.74</td><td>61.05</td><td>63.88</td><td>43.30</td><td>46.46</td><td>48.12</td></tr><tr><td>SimSiam (repro.)</td><td>87.54</td><td>90.31</td><td>91.40</td><td>61.56</td><td>64.96</td><td>65.87</td><td>34.82</td><td>39.46</td><td>46.76</td></tr><tr><td>Ours</td><td>88.66</td><td>90.17</td><td>92.07</td><td>62.45</td><td>65.82</td><td>66.18</td><td>41.30</td><td>45.36</td><td>49.86</td></tr></table>",
1348
+ "bbox": [
1349
+ 176,
1350
+ 88,
1351
+ 821,
1352
+ 194
1353
+ ],
1354
+ "page_idx": 9
1355
+ },
1356
+ {
1357
+ "type": "table",
1358
+ "img_path": "images/7ca6f8aa4ffb0d364346e4efe6cc2fc9f379b8950438ae3fd42f14f458a2e3de.jpg",
1359
+ "table_caption": [],
1360
+ "table_footnote": [],
1361
+ "table_body": "<table><tr><td></td><td>SimCLR</td><td>BYOL</td><td>MoCo v2</td><td>SimSiam</td><td>Ours</td></tr><tr><td>acc. (%)</td><td>66.5</td><td>66.5</td><td>67.4</td><td>68.1</td><td>66.97</td></tr></table>",
1362
+ "bbox": [
1363
+ 294,
1364
+ 228,
1365
+ 697,
1366
+ 261
1367
+ ],
1368
+ "page_idx": 9
1369
+ },
1370
+ {
1371
+ "type": "text",
1372
+ "text": "Table 2: ImageNet linear evaluation accuracy with 100-epoch pre-training. All results but ours are reported from [14]. We use batch size 384 during pre-training. ",
1373
+ "bbox": [
1374
+ 173,
1375
+ 263,
1376
+ 823,
1377
+ 294
1378
+ ],
1379
+ "page_idx": 9
1380
+ },
1381
+ {
1382
+ "type": "text",
1383
+ "text": "Acknowledgements ",
1384
+ "text_level": 1,
1385
+ "bbox": [
1386
+ 174,
1387
+ 310,
1388
+ 338,
1389
+ 328
1390
+ ],
1391
+ "page_idx": 9
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "We thank Margalit Glasgow, Ananya Kumar, Jason D. Lee, Sang Michael Xie, and Guodong Zhang for helpful discussions. CW acknowledges support from an NSF Graduate Research Fellowship. TM acknowledges support of Google Faculty Award and NSF IIS 2045685. We also acknowledge the support of HAI and the Google Cloud. Toyota Research Institute (\"TRI\") provided funds to assist the authors with their research but this article solely reflects the opinions and conclusions of its authors and not TRI or any other Toyota entity. ",
1396
+ "bbox": [
1397
+ 173,
1398
+ 340,
1399
+ 825,
1400
+ 424
1401
+ ],
1402
+ "page_idx": 9
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "References ",
1407
+ "text_level": 1,
1408
+ "bbox": [
1409
+ 174,
1410
+ 444,
1411
+ 266,
1412
+ 460
1413
+ ],
1414
+ "page_idx": 9
1415
+ },
1416
+ {
1417
+ "type": "text",
1418
+ "text": "[1] E. Abbe. Community detection and stochastic block models: recent developments, 2017. \n[2] S. Arora, S. Rao, and U. Vazirani. Expander flows, geometric embeddings and graph partitioning. Journal of the ACM (JACM), 56(2):1–37, 2009. \n[3] S. Arora, H. Khandeparkar, M. Khodak, O. Plevrakis, and N. Saunshi. A theoretical analysis of contrastive unsupervised representation learning. arXiv preprint arXiv:1902.09229, 2019. \n[4] P. Bachman, R. D. Hjelm, and W. Buchwalter. Learning representations by maximizing mutual information across views. arXiv preprint arXiv:1906.00910, 2019. \n[5] Y. Bansal, G. Kaplun, and B. Barak. For self-supervised learning, rationality implies generalization, provably. arXiv preprint arXiv:2010.08508, 2020. \n[6] A. Bardes, J. Ponce, and Y. LeCun. Vicreg: Variance-invariance-covariance regularization for self-supervised learning. arXiv preprint arXiv:2105.04906, 2021. \n[7] S. G. Bobkov et al. An isoperimetric inequality on the discrete cube, and an elementary proof of the isoperimetric inequality in gauss space. The Annals of Probability, 25(1):206–214, 1997. \n[8] J. Bromley, I. Guyon, Y. LeCun, E. Säckinger, and R. Shah. Signature verification using a\" siamese\" time delay neural network. Advances in neural information processing systems, 6: 737–744, 1993. \n[9] T. Cai, R. Gao, J. D. Lee, and Q. Lei. A theory of label propagation for subpopulation shift. arXiv preprint arXiv:2102.11203, 2021. \n[10] M. Caron, I. Misra, J. Mairal, P. Goyal, P. Bojanowski, and A. Joulin. Unsupervised learning of visual features by contrasting cluster assignments. arXiv preprint arXiv:2006.09882, 2020. \n[11] J. Cheeger. A lower bound for the smallest eigenvalue of the laplacian. In Proceedings of the Princeton conference in honor of Professor S. Bochner, pages 195–199, 1969. \n[12] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pages 1597–1607. PMLR, 2020. \n[13] T. Chen, S. Kornblith, K. Swersky, M. Norouzi, and G. Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020. \n[14] X. Chen and K. He. Exploring simple siamese representation learning. arXiv preprint arXiv:2011.10566, 2020. \n[15] X. Chen, H. Fan, R. Girshick, and K. He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020. \n[16] C.-Y. Chuang, J. Robinson, L. Yen-Chen, A. Torralba, and S. Jegelka. Debiased contrastive learning. arXiv preprint arXiv:2007.00224, 2020. \n[17] F. R. Chung and F. C. Graham. Spectral graph theory. Number 92. American Mathematical Soc., 1997. \n[18] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. \n[19] C. Eckart and G. Young. The approximation of one matrix by another of lower rank. Psychometrika, 1(3):211–218, 1936. \n[20] N. Golowich, A. Rakhlin, and O. Shamir. Size-independent sample complexity of neural networks. In Conference On Learning Theory, pages 297–299. PMLR, 2018. \n[21] J.-B. Grill, F. Strub, F. Altché, C. Tallec, P. H. Richemond, E. Buchatskaya, C. Doersch, B. A. Pires, Z. D. Guo, M. G. Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020. \n[22] K. He, H. Fan, Y. Wu, S. Xie, and R. Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9729–9738, 2020. \n[23] O. Henaff. Data-efficient image recognition with contrastive predictive coding. In International Conference on Machine Learning, pages 4182–4192. PMLR, 2020. \n[24] R. D. Hjelm, A. Fedorov, S. Lavoie-Marchildon, K. Grewal, P. Bachman, A. Trischler, and Y. Bengio. Learning deep representations by mutual information estimation and maximization. In International Conference on Learning Representations, 2018. \n[25] R. Kannan, S. Vempala, and A. Vetta. On clusterings: Good, bad and spectral. Journal of the ACM (JACM), 51(3):497–515, 2004. \n[26] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. 2009. \n[27] Y. Le and X. Yang. Tiny imagenet visual recognition challenge. CS 231N, 7:7, 2015. \n[28] J. D. Lee, Q. Lei, N. Saunshi, and J. Zhuo. Predicting what you already know helps: Provable self-supervised learning. arXiv preprint arXiv:2008.01064, 2020. \n[29] J. R. Lee, S. O. Gharan, and L. Trevisan. Multiway spectral partitioning and higher-order cheeger inequalities. Journal of the ACM (JACM), 61(6):1–30, 2014. \n[30] J. Lei, A. Rinaldo, et al. Consistency of spectral clustering in stochastic block models. Annals of Statistics, 43(1):215–237, 2015. \n[31] T. Leighton and S. Rao. Multicommodity max-flow min-cut theorems and their use in designing approximation algorithms. Journal of the ACM (JACM), 46(6):787–832, 1999. \n[32] A. Louis and K. Makarychev. Approximation algorithm for sparsest k-partitioning. In Proceedings of the twenty-fifth annual ACM-SIAM symposium on Discrete algorithms, pages 1244–1255. SIAM, 2014. \n[33] A. Louis, P. Raghavendra, P. Tetali, and S. Vempala. Algorithmic extensions of cheeger’s inequality to higher eigenvalues and partitions. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 315–326. Springer, 2011. \n[34] F. McSherry. Spectral partitioning of random graphs. In Proceedings 42nd IEEE Symposium on Foundations of Computer Science, pages 529–537. IEEE, 2001. \n[35] I. Misra and L. v. d. Maaten. Self-supervised learning of pretext-invariant representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6707–6717, 2020. \n[36] M. Mohri, A. Rostamizadeh, and A. Talwalkar. Foundations of machine learning. MIT press, 2018. \n[37] A. Ng, M. Jordan, and Y. Weiss. On spectral clustering: Analysis and an algorithm. Advances in neural information processing systems, 14:849–856, 2001. \n[38] A. v. d. Oord, Y. Li, and O. Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. \n[39] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on pattern analysis and machine intelligence, 22(8):888–905, 2000. \n[40] K. Sohn. Improved deep metric learning with multi-class n-pair loss objective. In Proceedings of the 30th International Conference on Neural Information Processing Systems, pages 1857–1865, 2016. \n[41] Y. Tian, D. Krishnan, and P. Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019. \n[42] Y. Tian, C. Sun, B. Poole, D. Krishnan, C. Schmid, and P. Isola. What makes for good views for contrastive learning. arXiv preprint arXiv:2005.10243, 2020. \n[43] Y. Tian, L. Yu, X. Chen, and S. Ganguli. Understanding self-supervised learning with dual deep networks. arXiv preprint arXiv:2010.00578, 2020. \n[44] C. Tosh, A. Krishnamurthy, and D. Hsu. Contrastive estimation reveals topic posterior information to linear models. arXiv:2003.02234, 2020. \n[45] C. Tosh, A. Krishnamurthy, and D. Hsu. Contrastive learning, multi-view redundancy, and linear models. In Algorithmic Learning Theory, pages 1179–1206. PMLR, 2021. \n[46] T. W. Tsai, C. Li, and J. Zhu. Mice: Mixture of contrastive experts for unsupervised image clustering. arXiv preprint arXiv:2105.01899, 2021. \n[47] Y.-H. H. Tsai, Y. Wu, R. Salakhutdinov, and L.-P. Morency. Self-supervised learning from a multi-view perspective. arXiv preprint arXiv:2006.05576, 2020. \n[48] T. Wang and P. Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In International Conference on Machine Learning, pages 9929–9939. PMLR, 2020. \n[49] C. Wei, K. Shen, Y. Chen, and T. Ma. Theoretical analysis of self-training with deep networks on unlabeled data. arXiv preprint arXiv:2010.03622, 2020. \n[50] Z. Wu, Y. Xiong, S. X. Yu, and D. Lin. Unsupervised feature learning via non-parametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3733–3742, 2018. \n[51] M. Ye, X. Zhang, P. C. Yuen, and S.-F. Chang. Unsupervised embedding learning via invariant and spreading instance feature. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6210–6219, 2019. \n[52] J. Zbontar, L. Jing, I. Misra, Y. LeCun, and S. Deny. Barlow twins: Self-supervised learning via redundancy reduction. arXiv preprint arXiv:2103.03230, 2021. ",
1419
+ "bbox": [
1420
+ 173,
1421
+ 465,
1422
+ 828,
1423
+ 911
1424
+ ],
1425
+ "page_idx": 9
1426
+ },
1427
+ {
1428
+ "type": "text",
1429
+ "text": "",
1430
+ "bbox": [
1431
+ 171,
1432
+ 89,
1433
+ 828,
1434
+ 919
1435
+ ],
1436
+ "page_idx": 10
1437
+ },
1438
+ {
1439
+ "type": "text",
1440
+ "text": "",
1441
+ "bbox": [
1442
+ 171,
1443
+ 42,
1444
+ 828,
1445
+ 909
1446
+ ],
1447
+ "page_idx": 11
1448
+ }
1449
+ ]
parse/train/mjyMGFL8N2/mjyMGFL8N2_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/mjyMGFL8N2/mjyMGFL8N2_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/yNzF41lHYV/yNzF41lHYV.md ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Believe What You See: Implicit Constraint Approach for Offline Multi-Agent Reinforcement Learning
2
+
3
+ Yiqin Yang1†, Xiaoteng $\mathbf { M } \mathbf { a } ^ { 1 }$ †‡, Chenghao $\mathbf { L i } ^ { 1 }$ , Zewu Zheng1, Qiyuan Zhang2, Gao Huang1, Jun $\mathbf { Y a n g ^ { 1 } } \mathbf { \dot { z } }$ ‡, Qianchuan Zhao1 1Tsinghua University, 2Harbin Institute of Technology
4
+ {yangyiqi19, ma-xt17, lich18} $@$ mails.tsinghua.edu.cn, zzheng $1 7 @ 1 2 6 . \mathrm { c o m }$ ,
5
+ zhangqiyuan19@hit.edu.cn, {gaohuang, yangjun603, zhaoqc} $@$ tsinghua.edu.cn
6
+
7
+ # Abstract
8
+
9
+ Learning from datasets without interaction with environments (Offline Learning) is an essential step to apply Reinforcement Learning (RL) algorithms in real-world scenarios. However, compared with the single-agent counterpart, offline multiagent RL introduces more agents with the larger state and action space, which is more challenging but attracts little attention. We demonstrate current offline RL algorithms are ineffective in multi-agent systems due to the accumulated extrapolation error. In this paper, we propose a novel offline RL algorithm, named Implicit Constraint $Q$ -learning (ICQ), which effectively alleviates the extrapolation error by only trusting the state-action pairs given in the dataset for value estimation. Moreover, we extend ICQ to multi-agent tasks by decomposing the joint-policy under the implicit constraint. Experimental results demonstrate that the extrapolation error is successfully controlled within a reasonable range and insensitive to the number of agents. We further show that ICQ achieves the state-of-the-art performance in the challenging multi-agent offline tasks (StarCraft II). Our code is public online at https://github.com/YiqinYang/ICQ.
10
+
11
+ # 1 Introduction
12
+
13
+ Recently, reinforcement learning (RL), an active learning process, has achieved massive success in various domains ranging from strategy games [59] to recommendation systems [8]. However, applying RL to real-world scenarios poses practical challenges: interaction with the real world, such as autonomous driving, is usually expensive or risky. To solve these issues, offline RL is an excellent choice to deal with practical problems [3, 24, 35, 42, 15, 28, 4, 23, 54, 12], aiming at learning from a fixed dataset without interaction with environments.
14
+
15
+ The greatest obstacle of offline RL is the distribution shift issue [16], which leads to extrapolation error, a phenomenon in which unseen state-action pairs are erroneously estimated. Unlike the online setting, the inaccurate estimated values of unseen pairs cannot be corrected by interacting with the environment. Therefore, most off-policy RL algorithms fail in the offline tasks due to intractable overgeneralization. Modern offline methods (e.g., Batch-Constrained deep Q-learning (BCQ) [16]) aim to enforce the learned policy to be close to the behavior policy or suppress the $Q$ -value directly. These methods have achieved massive success in challenging single-agent offline tasks like D4RL [14].
16
+
17
+ However, many decision processes in real-world scenarios belong to multi-agent systems, such as intelligent transportation systems [2], sensor networks [37], and power grids [7]. Compared with the single-agent counterpart, the multi-agent system has a much larger action space, which grows exponentially with the increasing of the agent number. When coming into the offline scenario, the unseen state-action pairs will grow exponentially as the number of agents increases, accumulating the extrapolation error quickly. The current offline algorithms are unsuccessful in multi-agent tasks even though they adopt the modern value-decomposition structure [26, 48, 25]. As shown in Figure 2, our results indicate that BCQ, a state-of-the-art offline algorithm, has divergent $Q$ -estimates in a simple multi-agent MDP environment (e.g., BCQ (4 agents)). The extrapolation error for value estimation is accumulated quickly as the number of agents increases, significantly impairing the performance.
18
+
19
+ ![](images/7716ccfb75fd41bc16411ad2c37c22936088f18375ddf239a44f321a70f199e4.jpg)
20
+ Figure 1: The comparison between ICQ and BCQ for the target $Q$ -value estimation. The spots denote states, and the connections between spots indicate actions. The red solid-lines denote seen pairs, and the gray dotted-lines are unseen pairs. (a) BCQ estimates $Q$ -value in a defined similar action set (orange) while unseen pairs still exist in the set with low probability. (b) ICQ only adopts seen pairs (orange) in the training set for $Q$ -value estimation.
21
+
22
+ Based on these analyses, we propose the Implicit Constraint Q-learning (ICQ) algorithm, which effectively alleviates the extrapolation error as no unseen pairs are involved in estimating $Q$ -value. Motivated by an implicit constraint optimization problem, ICQ adopts a SARSA-like approach [49] to evaluate $Q$ -values and then converts the policy learning into a supervised regression problem. By decomposing the joint-policy under the implicit constraint, we extend ICQ to the multi-agent tasks successfully. To the best of our knowledge, our work is the first study analyzing and addressing the extrapolation error in multi-agent reinforcement learning.
23
+
24
+ We evaluate our algorithm on the challenging multi-agent offline tasks based on StarCraft II [40], where a large number of agents cooperatively complete a task. Experimental results show that ICQ can control the extrapolation error within a reasonable range under any number of agents and learn from complex multi-agent datasets. Further, we evaluate the single-agent version of ICQ in D4RL, a standard single-agent offline benchmark. The results demonstrate the generality of ICQ for a wide range of task scenarios, from single-agent to multi-agent, from discrete to continuous control.
25
+
26
+ # 2 Background
27
+
28
+ Notation. The fully cooperative multi-agent tasks are usually modeled as the Dec-POMDP [31] consisting of the tuple $G \overset { \cdot } { = } \langle S , A , P , r , \Omega , \overset { \cdot } { O } , n , \gamma \rangle$ . Let $s \in S$ denote the true state of the environment. At each time step $t \in \mathbb { Z } ^ { + }$ , each agent $i \in N \equiv \left\{ 1 , \ldots , n \right\}$ chooses an action $a ^ { i } \in A$ , forming a joint action $\pmb { a } \in \mathbf { A } \equiv A ^ { n }$ . Let $P ( s ^ { \prime } \mid s , \pmb { a } ) : S \times \mathbf { A } \times S [ 0 , 1 ]$ denote the state transition function. All agents share the same reward function $r ( s , \pmb { a } ) : S \times \mathbf { A } \mathbb { R }$ .
29
+
30
+ We consider a partially observable scenario in which each agent draws individual observations $o ^ { i } \in \Omega$ according to the observation function $O ( s , a ) : \bar { S ^ { } } \times { \bf A } \Omega$ . Each agent has an action-observation history ${ \boldsymbol { \tau } } ^ { i } \in \mathbf { T } \equiv ( \Omega \times \mathbf { A } ) ^ { t }$ , on which it conditions a stochastic policy $\pi ^ { i } ( a ^ { i } \mid \tau ^ { i } )$ parameterized by $\theta _ { i } : \mathbf { T } \times \mathbf { A } [ 0 , 1 ]$ ]. The joint action-value function is defined as et $\begin{array} { r } { Q ^ { \pi } ( \tau , \boldsymbol { a } ) \triangleq \mathbb { E } _ { s _ { 0 : \infty } , \boldsymbol { a } _ { 0 : \infty } } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } \mid s _ { 0 } = s , \boldsymbol { a } _ { 0 } = \boldsymbol { a } , \pi \right] } \end{array}$ , where ich con $\pi$ is the joint-policy with param-ns trajectories of the behavior $\theta = \langle \theta _ { 1 } , \ldots , \theta _ { n } \rangle$ $\boldsymbol { B }$
31
+ policy $\pmb { \mu }$ .
32
+
33
+ We adopt the centralized training and decentralized execution (CTDE) paradigm [43]. During training, the algorithm has access to the true state $s$ and every agent’s action-observation history $\tau _ { i }$ as well as the freedom to share all information between agents. However, during execution, each agent has access only to its action-observation history.
34
+
35
+ Batch-constrained deep Q-learning (BCQ) is a state-of-the-art offline RL method, which aims to avoid selecting an unfamiliar action at the next state during a value update. Specifically, BCQ optimizes $\pi$ by introducing perturbation model $\xi ( \tau , a , \Phi )$ and generative model $G \bar { ( } \tau ; \varphi )$ as follows
36
+
37
+ $$
38
+ \pi ( \tau ) = \underset { a ^ { [ i ] } + \xi ( \tau , a ^ { [ i ] } , \Phi ) } { \mathrm { a r g } \mathrm { m a x } } Q ^ { \pi } ( \tau , a ^ { [ i ] } + \xi ( \tau , a ^ { [ i ] } , \Phi ) ; \phi ) , \mathrm { s . t . } \{ a ^ { [ i ] } \sim G ( \tau ; \varphi ) \} _ { i = 1 } ^ { m } ,
39
+ $$
40
+
41
+ where $\pi$ selects the highest valued action from a collection of $m$ actions sampled from the generative model $G ( \tau ; \varphi )$ , which aims to produce only previously seen actions. The perturbation model $\xi ( \tau , a ^ { [ i ] } , \Phi )$ is adopted to adjust action $a ^ { [ i ] }$ in the range $[ - \Phi , \Phi ]$ to increase the diversity of actions.
42
+
43
+ # 3 Analysis of Accumulated Extrapolation Error in Multi-Agent RL
44
+
45
+ In this section, we theoretically analyze the extrapolation error propagation in offline RL, which lays the basis for Section 4. The extrapolation error mainly attributes the out-of-distribution (OOD) actions in the evaluation of $Q ^ { \pi }$ [16, 21]. To quantify the effect of OOD actions, we define the state-action pairs within the dataset as seen pairs. Otherwise, we name them as unseen pairs. We demonstrate that the extrapolation error propagation from the unseen pairs to the seen pairs is related to the size of the action space, which grows exponentially with the increasing number of agents. We further design a toy example to illustrate the inefficiency of current offline methods in multi-agent tasks.
46
+
47
+ # 3.1 Extrapolation Error Propagation in Offline RL
48
+
49
+ Following the analysis in BCQ [16], we define the tabular estimation error\* as $\epsilon _ { \mathrm { M D P } } ( \tau , a ) \ \triangleq$ $Q _ { M } ^ { \pi } ( \tau , a ) \bar { ~ } - Q _ { B } ^ { \pi } ( \tau , a )$ (here we abuse $\tau$ to denote the state for analytical clarity), where the $M$ denotes the true MDP and $\boldsymbol { B }$ denotes a new MDP computed from the batch by $P _ { B } ( \tau ^ { \prime } \mid \tau , a ) =$ $\begin{array} { r } { \mathcal { N } ( \tau , a , \tau ^ { \prime } ) / \sum _ { \tilde { \tau } } \mathcal { N } ( \tau , a , \tilde { \tau } ) } \end{array}$ . BCQ [16] has shown that $\epsilon _ { \mathrm { M D P } } ( \tau , a )$ has a Bellman-like form with the extrapolation error $\boldsymbol { \epsilon } _ { \mathrm { E X T } } ( \tau , a )$ as the "reward function":
50
+
51
+ $$
52
+ \begin{array} { l } { { \epsilon _ { \mathrm { M D P } } ( \tau , a ) \triangleq \epsilon _ { \mathrm { E X T } } ( \tau , a ) + \displaystyle \sum _ { \tau ^ { \prime } } P _ { M } ( \tau ^ { \prime } \mid \tau , a ) \gamma \displaystyle \sum _ { a ^ { \prime } } \pi ( a ^ { \prime } \mid s ^ { \prime } ) \epsilon _ { \mathrm { M D P } } ( \tau ^ { \prime } , a ^ { \prime } ) , } } \\ { { \epsilon _ { \mathrm { E X P } } ( \tau , a ) = \displaystyle \sum _ { \tau ^ { \prime } } \left( P _ { M } ( \tau ^ { \prime } \mid \tau , a ) - P _ { B } ( \tau ^ { \prime } \mid \tau , a ) \right) \left( r ( \tau , a , \tau ^ { \prime } ) + \gamma \displaystyle \sum _ { a ^ { \prime } } \pi ( a ^ { \prime } \mid \tau ^ { \prime } ) Q _ { B } ^ { \pi } ( \tau ^ { \prime } , a ^ { \prime } ) \right) . } } \end{array}
53
+ $$
54
+
55
+ For the seen state-action pairs, $\epsilon _ { \mathrm { E X T } } ( \tau , a ) = 0$ since $P _ { M } ( \tau ^ { \prime } \mid \tau , a ) - P _ { B } ( \tau ^ { \prime } \mid \tau , a ) = 0$ in the deterministic environment. In contrast, the $\boldsymbol { \epsilon } _ { \mathrm { E X T } } ( \tau , a )$ of unseen pairs is uncontrollable and depends entirely on the initial values in tabular setting or the network generalization in DRL.
56
+
57
+ To further analyze how the extrapolation error in the unseen pairs impacts the estimation of actions in the dataset, we partition $\mathbf { \epsilon \epsilon _ { \mathbf { M D P } } }$ and EXT as $\epsilon _ { \mathrm { M D P } } = [ \epsilon _ { \mathrm { s } } , \epsilon _ { \mathrm { u } } ] ^ { \mathbf { T } }$ and $\epsilon _ { \mathbf { E X T } } = [ \mathbf { 0 } , \epsilon _ { \mathbf { b } } ] ^ { \mathrm { T } }$ respectively according to seen and unseen state-action pairs. Let denote the transition matrix of the state-action pairs as $\bar { P } _ { M } ^ { \pi } ( \tau ^ { \prime } , a ^ { \prime } \mid \tau , a ) = P _ { M } ( \tau ^ { \prime } \mid \tau , a ) \pi ( a ^ { \prime } \mid \tau ^ { \prime } )$ . We decompose the transition matrix as $P _ { M } ^ { \pi } = \left[ P _ { \mathrm { s , s } } ^ { \pi } , P _ { \mathrm { s , u } } ^ { \pi } ; P _ { \mathrm { u , s } } ^ { \pi } , P _ { \mathrm { u , u } } ^ { \pi } \right]$ according to state-action pairs’ property (e.g., $P _ { \mathrm { s , u } } ^ { \pi } ( \tau _ { \mathrm { u } } ^ { \prime } , a _ { \mathrm { u } } ^ { \prime } \mid \tau _ { \mathrm { s } } , a _ { \mathrm { s } } ) =$ $P _ { M } ( \tau _ { \mathrm { u } } ^ { \prime } \mid \tau _ { \mathrm { s } } , a _ { \mathrm { s } } ) \pi ( a _ { \mathrm { u } } ^ { \prime } \mid \tau _ { \mathrm { u } } ^ { \prime } )$ denotes the transition probability from seen to unseen pairs). Then the extrapolation error propagation can be described by the following linear system:
58
+
59
+ $$
60
+ \left[ \epsilon _ { \mathrm { s } } \right] = \gamma \left[ P _ { \mathrm { s , s } } ^ { \pi } \quad P _ { \mathrm { s , u } } ^ { \pi } \right] \left[ \epsilon _ { \mathrm { s } } \right] + \left[ \mathbf { 0 } _ { \mathbf { \tau } } \right] .
61
+ $$
62
+
63
+ Based on the above definitions, we have the following conclusion.
64
+
65
+ Theorem 1. Given a deterministic MDP, the propagation of $\mathbf { \epsilon _ { \mathbf { b } } }$ to $\epsilon _ { \mathrm { s } }$ is proportional to $\| P _ { \mathrm { s , u } } ^ { \pi } \| _ { \infty }$ :
66
+
67
+ $$
68
+ \left\| \epsilon _ { \mathbf { s } } \right\| _ { \infty } \leq \frac { \gamma \left\| P _ { \mathbf { s } , \mathbf { u } } ^ { \pi } \right\| _ { \infty } } { ( 1 - \gamma ) \left( 1 - \gamma \left\| P _ { \mathbf { s } , \mathbf { s } } ^ { \pi } \right\| _ { \infty } \right) } \left\| \epsilon _ { \mathbf { b } } \right\| _ { \infty } .
69
+ $$
70
+
71
+ ![](images/f72c9cc8ba536b89d48b9f8e506a9be8cdd1a3d91e2c2fb99239142b1deede46.jpg)
72
+ Figure 2: (a) An MMDP where $Q$ -estimates of BCQ will diverge as the number of agents increases. (b) The learning curve of the joint action-value function while running several agents in the given MMDP. The true values are similar in this task with different agent numbers, calculated by averaging the Monte-Carlo estimation under different agents. The $Q$ -estimates of BCQ (4 agents) diverge while our algorithm (ICQ) has accurate $Q$ -estimates. Please refer to Appendix C.2 for the complete results.
73
+
74
+ The above theorem indicates the effect of extrapolation error on seen state-action pairs is directly proportional to $\| \mathcal { P } _ { \mathrm { s , u } } ^ { \pi } \| _ { \infty }$ . In the practice, $\| P _ { \mathrm { s , u } } ^ { \pi } \| _ { \infty }$ is related to the size of action space and the dataset. If the action space is enormous, such as a multi-agent task with a number of agents, we need a larger amount of data to reduce $\| \mathcal { P } _ { \mathrm { s , u } } ^ { \pi } \| _ { \infty }$ . However, the dataset size in offline learning tasks is generally limited. Moreover, when using the networks to approximate the value function, $\mathbf { \epsilon _ { \mathbf { b } } }$ does not remain constant as for the seen $Q _ { B } \big ( \tau _ { \mathrm { u } } , a _ { \mathrm { u } } \big )$ could be arbitrary during training,hese reasons, we have to enforce the $P _ { \mathrm { s , u } } ^ { \pi } 0$ he b $Q$ -values extreme large evenvoiding using OOD actions. For example, BCQ utilizes an auxiliary generative model to constrain the target actions within a familiar action set (see Section 2 for a detailed description). However, the error propagation heavily depends on the accuracy of the generative model and is intolerable with the agent number increasing. We will demonstrate this effect in the following toy example.
75
+
76
+ # 3.2 Toy Example
77
+
78
+ We design a toy two states Multi-Agent Markov Decision Process (MMDP) to illustrate the accumulated extrapolation error in multi-agent tasks (see Figure 2a). All agents start at state $\tau _ { 2 }$ and explore rewards for 100 environment steps by taking actions $a _ { [ 1 ] } = 0$ or $a _ { [ 2 ] } = 1$ . The optimal policy is that all agents select $a _ { [ 1 ] }$ . The MMDP task has sparse rewards. The reward is 1 when following the optimal policy, otherwise, the reward is 0. The state $\tau _ { 2 }$ will transfer to $\tau _ { 1 }$ if the joint policy satisfies $\textstyle { \bar { \sum _ { i = 1 } ^ { n } a _ { i } } } \leq { \frac { n } { 2 } }$ at $\tau _ { 2 }$ , while the state $\tau _ { 1 }$ will never return to $\tau _ { 2 }$ .
79
+
80
+ We run BCQ and our method ICQ on a limited dataset, which only contain 32 trajectories generated by QMIX. Obviously, the number of unseen state-action pairs exponentially grows as the number of agents increases. We control the amount of valuable trajectories $\mathit { r } = 1 \mathit { \Theta }$ ) in different datasets equal for fair comparisons. The multi-agent version of BCQ shares the same value-decomposition structure as ICQ (see Appendix D.2).
81
+
82
+ As shown in Figure 2b, the joint action-value function learned by BCQ gradually diverges as the number of agents increases while ICQ maintains a reasonable $Q$ -value. The experimental result is consistent with Theorem 1, and we provide an additional analysis for the toy example in Appendix B.2. In summary, we show theoretically and empirically that the extrapolation error is accumulated quickly as the number of agents increases and makes the $Q$ -estimates easier to diverge.
83
+
84
+ # 4 Implicit Constraint Approach for Offline Multi-Agent RL
85
+
86
+ In this section, we give an effective method to solve the accumulated extrapolation error in offline Multi-Agent RL based on the analysis of Section 3. From the implementation perspective, we find that a practical approach towards offline RL is to estimate target $Q$ -value without sampled actions from the policy in training. We propose Implicit Constraint Q-learning (ICQ), which only trusts the seen state-action pairs in datasets for value estimation. Further, we extend ICQ to multi-agent tasks with a value decomposition framework and utilize a $\lambda$ -return method to balance the variance and bias.
87
+
88
+ # 4.1 The Implicit Constraint Q-learning (ICQ) Approach
89
+
90
+ Based on the analysis of Section 3, we find that the extrapolation error can be effectively alleviated by enforcing the actions within the dataset when calculating the target values, which is the most significant difference between offline and off-policy RL. For a formal comparison of off-policy and offline algorithms, we first introduce the standard Bellman operator $\mathcal { T } ^ { \pi }$ as follows:
91
+
92
+ $$
93
+ ( { \cal T } ^ { \pi } Q ) ( \tau , a ) \triangleq Q ( \tau , a ) + \mathbb { E } _ { \tau ^ { \prime } } [ r + \gamma \mathbb { E } _ { a ^ { \prime } \sim } \ [ Q ( \tau ^ { \prime } , a ^ { \prime } ) ] - Q ( \tau , a ) ] .
94
+ $$
95
+
96
+ Many off-policy evaluation methods, such as the Tree Backup [10] and Expected SARSA [41], are designed based on this operator. However, when coming into the offline setting, the standard Bellman operator suffers from the OOD issue as the actions sampled from current policy $\pi$ are adopted for target $Q$ -value estimation. A natural way to avoid the OOD issue is adopting the importance sampling measure [30]:
97
+
98
+ $$
99
+ ( { \cal T } ^ { \pi } Q ) ( \tau , a ) = Q ( \tau , a ) + { \mathbb E } _ { \tau ^ { \prime } } [ r + \gamma { \mathbb E } _ { a ^ { \prime } \sim } \ [ \rho ( \tau ^ { \prime } , a ^ { \prime } ) Q ( \tau ^ { \prime } , a ^ { \prime } ) ] - Q ( \tau , a ) ] ,
100
+ $$
101
+
102
+ where ρ(τ 0, a0) , π(a0|τ 0)µ(a0|τ 0) denotes the importance sampling weight. If we can calculate $\rho ( \tau ^ { \prime } , a ^ { \prime } )$ with action $a ^ { \prime }$ sampled from $\mu$ rather than $\pi$ , the unseen pairs will be avoided for target $Q$ -value estimation. In this case, the extrapolation error is theoretically avoided since $P _ { \mathrm { s , u } } ^ { \pi } 0$ . The estimated $Q$ -value based on the above operation would be stable even in complex tasks with enormous action space. However, in most real-world scenarios, it is hard to obtain the exact behavior policy to calculate $\rho ( \tau ^ { \prime } , a ^ { \prime } )$ , e.g., using expert demonstrations. Fortunately, we find that the solution of following implicit constraint optimization problem is efficient to compute the desired importance sampling weight.
103
+
104
+ # 4.1.1 Implicit Constraint Q-learning
105
+
106
+ In offline tasks, the policies similar to the behavior policy are preferred while maximizing the accumulated reward $Q ^ { \pi } ( \tau , a )$ , i.e., $D _ { \mathrm { K L } } ( \pi \parallel \mu ) [ \tau ] \le \dot { \epsilon }$ . The policy optimization with the behavior regularized constraint can be described in the following problem:
107
+
108
+ $$
109
+ \pi _ { k + 1 } = \arg \operatorname* { m a x } _ { \pi } \mathbb { E } _ { a \sim \pi ( \cdot \vert \tau ) } [ Q ^ { \pi _ { k } } ( \tau , a ) ] , \quad \mathrm { s . t . } \quad D _ { \mathrm { K L } } ( \pi \mid \mu ) [ \tau ] \leq \epsilon .
110
+ $$
111
+
112
+ This problem has well studied in many previous works [36, 1, 58]. Note that the objective is a linear function of the decision variables $\pi$ and all constraints are convex functions. Thus we can obtain the optimal policy $\pi ^ { * }$ related to $\mu$ through the KKT condition [9], for which the proof is in Appendix B.4:
113
+
114
+ $$
115
+ \pi _ { k + 1 } ^ { * } ( a \mid \tau ) = \frac { 1 } { Z ( \tau ) } \mu ( a \mid \tau ) \exp \left( \frac { Q ^ { \pi _ { k } } ( \tau , a ) } { \alpha } \right) ,
116
+ $$
117
+
118
+ where $\alpha > 0$ is the Lagrangian coefficient and $\begin{array} { r } { Z ( \tau ) \ = \ \sum _ { \tilde { a } } \mu ( \tilde { a } \ | \ \tau ) \exp { \left( \frac { 1 } { \alpha } Q ^ { \pi _ { k } } ( \tau , \tilde { a } ) \right) } } \end{array}$ is the normalizing partition function. Next, we calculate the ratio between $\pi$ and $\mu$ by relocating $\mu$ to the left-hand side:
119
+
120
+ $$
121
+ \rho ( \tau , a ) = \frac { \pi _ { k + 1 } ^ { * } ( a \mid \tau ) } { \mu ( a \mid \tau ) } = \frac { 1 } { Z ( \tau ) } \exp \left( \frac { Q ^ { \pi _ { k } } ( \tau , a ) } { \alpha } \right) .
122
+ $$
123
+
124
+ Motivated on Equation 9, we define the Implicit Constraint Q-learning operator as
125
+
126
+ $$
127
+ \mathcal { T } _ { \mathrm { I C Q } } Q ( \tau , a ) = r + \gamma \mathbb { E } _ { a ^ { \prime } \sim \mu } \left[ \frac { 1 } { Z ( \tau ^ { \prime } ) } \exp \left( \frac { Q \left( \tau ^ { \prime } , a ^ { \prime } \right) } { \alpha } \right) Q \left( \tau ^ { \prime } , a ^ { \prime } \right) \right] .
128
+ $$
129
+
130
+ Thus we obtain a SARAR-like algorithm which not uses any unseen pairs.
131
+
132
+ Comparison with previous methods. While BCQ learns an action generator to filter unseen pairs in $Q$ -value estimation, it cannot work in enormous action space due to the error of the generator (see Figure 1). Instead, in the value update of ICQ, we do not use the sampled actions to compute the target values, thus we alleviate extrapolation error effectively. There are some previous works, such as AWAC [29] and AWR [35], addressing the offline problem with similar constrained problem in Equation 7. However, these methods only impose the constraint on the policy loss and adopt the standard Bellman operator to evaluate $Q$ -function, which involves the unseen actions or converges to the value of behavior policy $\mu$ . Differently, we re-weight the target $Q ( \tau ^ { \prime } , a ^ { \prime } )$ with the importance sampling weight derived from the optimization problem, which makes the estimated value closer to the optimal value function.
133
+
134
+ # 4.1.2 Theoretical Analysis
135
+
136
+ The ICQ operator in Equation 10 results in a SARSA-like algorithm, which be re-written as:
137
+
138
+ $$
139
+ { \mathcal T } _ { \mathrm { I C Q } } Q ( \tau , a ) = r + \gamma \sum _ { a ^ { \prime } \in \mathcal { B } } \left[ \frac { 1 } { Z ( \tau ^ { \prime } ) } \mu ( a ^ { \prime } \mid \tau ^ { \prime } ) \exp \left( \frac { 1 } { \alpha } Q \left( \tau ^ { \prime } , a ^ { \prime } \right) \right) Q \left( \tau ^ { \prime } , a ^ { \prime } \right) \right] .
140
+ $$
141
+
142
+ This update rule can be viewed as a regularized softmax operator [46, 34] in the offline setting. When $\alpha \to \infty$ , $\mathcal { T } _ { \mathrm { I C Q } }$ approaches $\mathcal { T } ^ { \mu }$ . When $\alpha 0$ , $\mathcal { T } _ { \mathrm { I C Q } }$ becomes the batch-constrained Bellman optimal operator $\tau _ { \mathrm { B C Q } }$ [16], which constrains the possible actions with respect to the batch:
143
+
144
+ $$
145
+ \mathcal { T } _ { \mathrm { B C Q } } Q ( \tau , a ) = r + \gamma \operatorname* { m a x } _ { a ^ { \prime } \in \mathcal { B } } Q ( \tau ^ { \prime } , a ^ { \prime } ) .
146
+ $$
147
+
148
+ $\tau _ { \mathrm { B C Q } }$ has been shown to converge to the optimal action-value function $Q ^ { * }$ of the batch, which means $\begin{array} { r } { \operatorname* { l i m } _ { k \to \infty } \mathcal { T } _ { \mathrm { B C Q } } ^ { k } Q _ { 0 } = Q ^ { * } } \end{array}$ for arbitrary $Q _ { 0 }$ . Based on this result, we show that iteratively applying $\mathcal { T } _ { \mathrm { I C Q } }$ will result in a $Q$ -function not far away from $Q ^ { * }$ :
149
+
150
+ Theorem 2. Let ${ \mathcal { T } } _ { \mathrm { I C Q } } ^ { k } Q _ { 0 }$ denote that the operator $\mathcal { T } _ { \mathrm { I C Q } }$ are iteratively applied over an initial stateaction value function $Q _ { 0 }$ for $k$ times. Then, we have $\forall ( \tau , a )$ , $\begin{array} { r } { \operatorname* { l i m } \operatorname* { s u p } _ { k \to \infty } \mathcal { T } _ { \mathrm { I C Q } } ^ { k } Q _ { 0 } ( \tau , a ) \leq Q ^ { * } ( \tau , a ) , } \end{array}$
151
+
152
+ $$
153
+ \operatorname* { l i m i n f } _ { k \to \infty } \ : T _ { \mathrm { I C Q } } ^ { k } Q _ { 0 } ( \tau , a ) \geq Q ^ { * } ( \tau , a ) - \frac { \gamma ( | A | - 1 ) } { ( 1 - \gamma ) } \operatorname* { m a x } \left\{ \frac { 1 } { ( \frac { 1 } { \alpha } + 1 ) C + 1 } , \frac { 2 Q _ { \operatorname* { m a x } } } { 1 + C \exp ( \frac { 1 } { \alpha } ) } \right\} ,
154
+ $$
155
+
156
+ where |A| is the action space, |Aτ | is the action space for state τ , C , inf τ ∈S inf 2≤i≤|Aτ | µ(a[1] |τ )µ(a[i]|τ ) and $\mu ( a _ { [ 1 ] } \mid \tau )$ denotes the probability of choosing the expert action according to behavioral policy $\mu$ . Moreover, the upper bound of $\mathcal { T } _ { \mathrm { B C Q } } ^ { k } Q _ { 0 } - \mathcal { T } _ { \mathrm { I C Q } } ^ { k } Q _ { 0 }$ decays exponentially fast in terms of $\alpha$ .
157
+
158
+ While $\mathcal { T } _ { \mathrm { I C Q } }$ is not a contraction [5] (similar with the softmax operator), the $Q$ -values are still within a reasonable range. Further, $\mathcal { T } _ { \mathrm { I C Q } }$ converges to $\tau _ { \mathrm { B C Q } }$ with an exponential rate in terms of $\alpha$ . Our result also quantifies the difficulty in offline RL problems. Based on the definition of $\mu ( a _ { [ i ] } | \tau )$ , $C$ shows the proportion of the expert experience in the dataset. A larger $C$ corresponds to more expert experience, which induces a smaller distance between $\mathcal { T } _ { \mathrm { I C Q } } ^ { k } Q _ { 0 } ( \tau , \mathbf { \bar { a } } )$ and $Q ^ { * } ( \tau , a )$ . In contrast, with a small $C$ , the expert experience is few and the conservatism in learning is necessary.
159
+
160
+ # 4.1.3 Algorithm
161
+
162
+ Based on the derived operator $\mathcal { T } _ { \mathrm { I C Q } }$ in Equation 9, we can learn $Q ( \tau , a ; \phi )$ by minimizing
163
+
164
+ $$
165
+ \mathcal { I } _ { Q } ( \phi ) = \mathbb { E } _ { \tau , a , \tau ^ { \prime } , a ^ { \prime } \sim B } \left[ r + \gamma \frac { 1 } { Z ( \tau ^ { \prime } ) } \exp \left( \frac { Q \left( \tau ^ { \prime } , a ^ { \prime } ; \phi ^ { \prime } \right) } { \alpha } \right) Q \left( \tau ^ { \prime } , a ^ { \prime } ; \phi ^ { \prime } \right) - Q \left( \tau , a ; \phi \right) \right] ^ { 2 } ,
166
+ $$
167
+
168
+ where the $Q$ -network and the target $Q$ -network are parameterized by $\phi$ and $\phi ^ { \prime }$ respectively.
169
+
170
+ As for the policy training, we project the non-parametric optimal policy $\pi _ { k + 1 } ^ { * }$ in Equation 8 into the parameterized policy space $\theta$ by minimizing the following KL distance, which is implemented on the data distribution of the batch:
171
+
172
+ $$
173
+ \begin{array} { r l } & { \mathcal { I } _ { \pi } ( \theta ) = \mathbb { E } _ { \tau \sim \mathcal { B } } \left[ D _ { \mathrm { K L } } \left( \pi _ { k + 1 } ^ { * } \| \pi _ { \theta } \right) [ \tau ] \right] = \mathbb { E } _ { \tau \sim \mathcal { B } } \left[ - \displaystyle \sum _ { a } \pi _ { k + 1 } ^ { * } ( a \mid \tau ) \log \frac { \pi _ { \theta } ( a \mid \tau ) } { \pi _ { k + 1 } ^ { * } ( a \mid \tau ) } \right] } \\ & { \quad \stackrel { ( a ) } { = } \mathbb { E } _ { \tau \sim \mathcal { B } } \left[ \displaystyle \sum _ { a } \frac { \pi _ { k + 1 } ^ { * } ( a \mid \tau ) } { \mu ( a \mid \tau ) } \mu ( a \mid \tau ) \left( - \log \pi _ { \theta } ( a \mid \tau ) \right) \right] } \\ & { \quad \stackrel { ( b ) } { = } \mathbb { E } _ { \tau , a \sim \mathcal { B } } \left[ - \displaystyle \frac { 1 } { Z ( \tau ) } \log ( \pi ( a \mid \tau ; \theta ) ) \exp \left( \frac { Q ( \tau , a ) } { \alpha } \right) \right] , } \end{array}
174
+ $$
175
+
176
+ where $( a )$ ignores $\begin{array} { r } { \mathbb { E } _ { \tau \sim B } \left[ \sum _ { a } \pi _ { k + 1 } ^ { * } ( a \mathbin { \left| \begin{array} { l } { \tau } \end{array} \right) } \log \pi _ { k + 1 } ^ { * } ( a \mathbin { \left| \begin{array} { l } { \tau } \end{array} \right) } \right] } \end{array}$ that is not related to $\theta$ , and $( b )$ applies the importance sampling weight derived in Equation 9 under forward $\mathrm { K L }$ constraint. Note that tuning the $\alpha$ parameter in Equation 15 between 0 and $\infty$ interpolates between $Q$ -learning and behavioral cloning. See Appendix A for the complete workflow of the ICQ algorithm. We provide two implementation options to compute the normalizing partition function $Z ( \tau )$ , which is discussed in detail in Appendix D.1.
177
+
178
+ # 4.2 Extending ICQ to Multi-Agent Tasks
179
+
180
+ In the previous section, we propose an implicit constraint $Q$ -learning framework by re-weighting target $Q$ -value $Q ( \tau ^ { \prime } , a ^ { \prime } )$ in the critic loss, which is efficient to alleviate the extrapolation error. We next extend ICQ to multi-agent tasks. For notational clarity, we name the Multi- Agent version of ICQ as ICQ-MA.
181
+
182
+ # 4.2.1 Decomposed Multi-Agent Joint-Policy under Implicit Constraint
183
+
184
+ Under the CTDE framework, we have to train individual policies for decentralized execution. Besides, it is also challenging to compute $\mathbb { E } _ { \pmb { \mu } } [ \rho ( \pmb { \tau } ^ { \prime } , \pmb { a } ^ { \prime } ) Q ^ { \pi } ( \pmb { \tau } ^ { \prime } , \pmb { a } ^ { \prime } ) ]$ in multi-agent policy evaluation as its computational complexity is ${ \cal O } ( | A | ^ { n } )$ . To address the above issues, we first define the joint-policy as $\pi ( \textbf { \em a } | \textbf { \em \tau } ) \triangleq \Pi _ { i \in N } \pi ^ { i } ( a ^ { i } \ | \textbf { \ } \tau ^ { i } )$ , and then introduce a mild value-decomposition assumption:
185
+
186
+ $$
187
+ Q ^ { \pi } ( \tau , a ) = \sum _ { i } w ^ { i } ( \tau ) Q ^ { i } ( \tau ^ { i } , a ^ { i } ) + b ( \tau ) ,
188
+ $$
189
+
190
+ ![](images/0a758c174ca7a421b7a33c14531785c83d7804f6456015f21aabc39130e1040a.jpg)
191
+ Figure 3: Mixer Network.
192
+
193
+ where $w ^ { i } ( \tau ) \geq 0$ and $b ( \tau )$ are generated by the Mixer Network whose inputs are global observation-action history (see
194
+
195
+ Figure 3). Based on the above assumptions, we propose the decomposed multi-agent joint-policy under implicit constraint in the following theorem:
196
+
197
+ Theorem 3. Assuming the joint action-value function is linearly decomposed, we can decompose the multi-agent joint-policy under implicit constraint as follows
198
+
199
+ $$
200
+ \pi = \underset { \pi ^ { 1 } , \ldots , \pi ^ { n } } { \arg \operatorname* { m a x } } \sum _ { i } \mathbb { E } _ { \tau ^ { i } , a ^ { i } \sim \mathcal { B } } \left[ \frac { 1 } { Z ^ { i } ( \tau ^ { i } ) } \log ( \pi ^ { i } ( a ^ { i } \mid \tau ^ { i } ) ) \exp \left( \frac { w ^ { i } ( \tau ) Q ^ { i } ( \tau ^ { i } , a ^ { i } ) } { \alpha } \right) \right] ,
201
+ $$
202
+
203
+ where $\begin{array} { r } { Z ^ { i } ( \tau ^ { i } ) = \sum _ { \tilde { a } ^ { i } } \mu ^ { i } ( \tilde { a } ^ { i } \mid \tau ^ { i } ) \exp \left( \frac { 1 } { \alpha } w ^ { i } ( \tau ) Q ^ { i } ( \tau ^ { i } , \tilde { a } ^ { i } ) \right) } \end{array}$ is the normalizing partition function.
204
+
205
+ The decomposed multi-agent joint-policy has a concise form. We can train individual policies $\pi ^ { i }$ by minimizing
206
+
207
+ $$
208
+ \mathcal { I } _ { \pi } ( \theta ) = \sum _ { i } \mathbb { E } _ { \tau ^ { i } , a ^ { i } \sim \mathcal { B } } \left[ - \frac { 1 } { Z ^ { i } ( \tau ^ { i } ) } \log ( \pi ^ { i } ( a ^ { i } \mid \tau ^ { i } ; \theta _ { i } ) ) \exp \left( \frac { w ^ { i } ( \tau ) Q ^ { i } ( \tau ^ { i } , a ^ { i } ) } { \alpha } \right) \right] .
209
+ $$
210
+
211
+ Besides, $w ^ { i } ( \tau )$ achieves the trade-off between the roles of agents. If some agents have important roles, the value of corresponding $w ^ { i } ( \tau )$ is relatively large. Also, if $w ^ { i } ( \pmb { \tau } ) 0$ , $\pi ^ { i }$ is approximately considered as the behavior cloning policy. As for the policy evaluation, we train $Q ( \tau , a ; \phi , \psi )$ by minimizing
212
+
213
+ $$
214
+ \mathcal { I } _ { Q } ( \phi , \psi ) = \mathbb { E } _ { B } \left[ \sum _ { t \geq 0 } ( \gamma \lambda ) ^ { t } \left( r _ { t } + \gamma \frac { 1 } { Z ( \tau _ { t + 1 } ) } \exp \left( \frac { Q ( \tau _ { t + 1 } , a _ { t + 1 } ) } { \alpha } \right) Q ( \tau _ { t + 1 } , a _ { t + 1 } ) - Q ( \tau _ { t } , a _ { t } ) \right) \right] ^ { 2 }
215
+ $$
216
+
217
+ # 4.2.2 Multi-Agent Value Estimation with $\lambda$ -return
218
+
219
+ As the offline dataset contains complete behavior trajectories, it is natural to accelerate the convergence of ICQ with the $n$ -step method. Here we adopt $Q ( \lambda )$ [27] to improve the estimation of ICQ, which weights the future temporal difference signal with a decay sequence $\lambda ^ { t }$ . Further, the constraint in Equation 7 implicitly meets the convergence condition of $\bar { Q ( \lambda ) }$ . Therefore, we extend the ICQ operator in Equation 10 to $n$ -step estimation, which is similar to $\overset { \triangledown } { Q } ( \lambda )$ :
220
+
221
+ $$
222
+ ( \mathcal { T } _ { \mathrm { I C Q } } ^ { \lambda } Q ) ( \tau , a ) \triangleq Q ( \tau , a ) + \mathbb { E } _ { \mu } \left[ \sum _ { \mathfrak { t } \geq 0 } ( \gamma \lambda ) ^ { \mathfrak { t } } \left( r _ { t } + \gamma \rho ( \tau _ { t + 1 } , a _ { t + 1 } ) Q ( \tau _ { t + 1 } , a _ { t + 1 } ) - Q ( \tau _ { t } , a _ { t } ) \right) \right] ,
223
+ $$
224
+
225
+ where $\begin{array} { r } { \rho ( \tau _ { t } , a _ { t } ) = \frac { 1 } { Z ( \tau _ { t } ) } \exp ( \frac { 1 } { \alpha } Q ( \tau _ { t } , a _ { t } ) ) } \end{array}$ and hyper-parameter $0 \leq \lambda \leq 1$ provides the balance between bias and variance.
226
+
227
+ ![](images/e0c70428efc90c9363319c61d5f7af4757908917bf510852b20eb780b52a2c47.jpg)
228
+ Figure 4: Performance comparison in offline StarCraft II tasks.
229
+
230
+ Table 1: Performance of ICQ with five offline RL baselines on the single-agent offline tasks with the normalized score metric proposed by D4RL benchmark [14], averaged over three random seeds with standard deviation. Scores roughly range from 0 to 100, where 0 corresponds to a random policy performance and 100 indicates an expert. The results for BC, BCQ, CQL, AWR and BRAC-p are taken from [14, 22].
231
+
232
+ <table><tr><td>Dataset type</td><td>Environment</td><td>ICQ (ours)</td><td>BC</td><td>BCQ</td><td>CQL</td><td>AWR</td><td>BRAC-p</td></tr><tr><td>fixed</td><td>antmaze-umaze</td><td>85.0 ±2.7</td><td>65.0</td><td>78.9</td><td>74.0</td><td>56.0</td><td>50.0</td></tr><tr><td>play</td><td>antmaze-medium</td><td>80.0 ±1.3</td><td>0.0</td><td>0.0</td><td>61.2</td><td>0.0</td><td>0.0</td></tr><tr><td>play</td><td>antmaze-large</td><td>51.0 ± 4.8</td><td>0.0</td><td>6.7</td><td>15.8</td><td>0.0</td><td>0.0</td></tr><tr><td>diverse</td><td>antmaze-umaze</td><td>65.0±3.3</td><td>55.0</td><td>55.0</td><td>84.0</td><td>70.3</td><td>40.0</td></tr><tr><td>diverse</td><td>antmaze-medium</td><td>65.0 ± 3.9</td><td>0.0</td><td>0.0</td><td>53.7</td><td>0.0</td><td>0.0</td></tr><tr><td>diverse</td><td>antmaze-large</td><td>44.0 ±4.2</td><td>0.0</td><td>2.2</td><td>14.9</td><td>0.0</td><td>0.0</td></tr><tr><td>expert</td><td>adroit-door</td><td>103.9 ± 3.6</td><td>101.2</td><td>99.0</td><td>1</td><td>102.9</td><td>-0.3</td></tr><tr><td>expert</td><td>adroit-relocate</td><td>109.5 ± 11.1</td><td>101.3</td><td>41.6</td><td></td><td>91.5</td><td>-0.3</td></tr><tr><td>expert</td><td>adroit-pen</td><td>123.8 ± 22.1</td><td>85.1</td><td>114.9</td><td>=</td><td>111.0</td><td>-3.5</td></tr><tr><td>expert</td><td>adroit-hammer</td><td>128.3 ± 2.5</td><td>125.6</td><td>107.2</td><td>-</td><td>39.0</td><td>0.3</td></tr><tr><td>human</td><td>adroit-door</td><td>6.4±2.4</td><td>0.5</td><td>-0.0</td><td>9.1</td><td>0.4</td><td>-0.3</td></tr><tr><td>human</td><td>adroit-relocate</td><td>1.5 ± 0.7</td><td>-0.0</td><td>-0.1</td><td>0.35</td><td>-0.0</td><td>-0.3</td></tr><tr><td>human</td><td>adroit-pen</td><td>91.3 ± 10.3</td><td>34.4</td><td>68.9</td><td>55.8</td><td>12.3</td><td>8.1</td></tr><tr><td>human</td><td>adroit-hammer</td><td>2.0±0.9</td><td>1.5</td><td>0.5</td><td>2.1</td><td>1.2</td><td>0.3</td></tr><tr><td>medium</td><td>walker2d</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td> medium</td><td></td><td>71.8±10.7 55.6±5.7</td><td>66.6</td><td>53.1</td><td>79.2</td><td>17.4</td><td>77.5</td></tr><tr><td>medium</td><td>hopper</td><td></td><td>49.0</td><td>54.5</td><td>58.0</td><td>35.9</td><td>32.7</td></tr><tr><td></td><td>halfcheetah</td><td>42.5±1.3</td><td>36.1</td><td>40.7</td><td>44.4</td><td>37.4</td><td>43.8</td></tr><tr><td>med-expert</td><td>walker2d</td><td>98.9 ± 5.2</td><td>66.8</td><td>57.5</td><td>98.7</td><td>53.8</td><td>76.9</td></tr><tr><td>med-expert</td><td>hopper</td><td>109.0±13.6</td><td>111.9</td><td>110.9</td><td>111.0</td><td>27.1</td><td>1.9</td></tr><tr><td>med-expert</td><td>halfcheetah</td><td>110.3 ±1.1</td><td>35.8</td><td>64.7</td><td>104.8</td><td>52.7</td><td>44.2</td></tr></table>
233
+
234
+ # 5 Related Work
235
+
236
+ As ICQ-MA seems to be the first work addressing the accumulated extrapolation error issue in offline MARL, we briefly review the prior single-agent offline RL works here, which can be divided into three categories: dynamic programming, model-based, and safe policy improvement methods.
237
+
238
+ Dynamic Programming. Policy constraint methods in dynamic programming [20, 3, 58, 51, 17] are most closely related to our work. They attempt to enforce $\pi$ to be close to $\mu$ under KL-divergence, Wasserstein distance [53], or MMD [47], and then only use actions sampled from $\pi$ in dynamic programming. For example, BCQ [16] constrains the mismatch between the state-action visitation of the policy and the state-action pairs contained in the batch by using a state-conditioned generative model to produce only previously seen actions. AWR [35] and ABM [42] attempt to estimate the value function of the behavior policy via Monte-Carlo or $\mathrm { T D } ( \lambda )$ . Unlike these methods, our algorithm, ICQ, estimates the $Q$ -function of the current policy using actions sampled from $\mu$ , enabling much more efficient learning. Another series of methods [52, 32, 33] aim to estimate uncertainty to determine the trustworthiness of a $Q$ -value prediction. However, the high-fidelity requirements for uncertainty estimates limit the performance of algorithms.
239
+
240
+ ![](images/f06a9d9eae53c0b5d3ae91f5ac0fa7cec098dfee9b4700a98025da92dd51f4ad.jpg)
241
+ Figure 5: Module ablation study on MMM map.
242
+
243
+ Model-based and Safe Policy Improvement. Model-based methods [18, 50, 13, 56, 19] attempt to learn the model from offline data, with minimal modification to the algorithm. Nevertheless, modeling MDPs with very high-dimensional image observations and long horizons is a major open problem, which leads to limited algorithm performance [24]. Besides, safe policy improvement methods [23, 44, 6, 11] require a separately estimated model to $\mu$ to deal with unseen actions. However, accurately estimating $\mu$ is especially hard if the data come from multiple sources [29].
244
+
245
+ # 6 Experiments
246
+
247
+ In this section, we evaluate ICQ-MA and ICQ on multi-agent (StarCraft II) and single-agent (D4RL) offline benchmarks and compare them with state-of-the-art methods. Then, we conduct ablation studies on ICQ-MA. We aim to better understand each component’s effect and further analyze the main driver for the performance improvement.
248
+
249
+ # 6.1 Multi-Agent Offline Tasks on StarCraft II
250
+
251
+ We first construct the multi-agent offline datasets based on ten maps in StarCraft II (see Table 2 in Appendix E). The datasets are made by collecting DOP [55] training data. All maps share the same reward function, and each map includes 3000 trajectories. We are interested in non-expert data or multi-source data. Therefore, we artificially divide behavior policies into three levels based on the average episode return (see Table 3 in Appendix E). Then, we evenly mix data of three levels.
252
+
253
+ We compare our method against QMIX [39], multi-agent version of BCQ (BCQ-MA), CQL (CQLMA), and behavior cloning (BC-MA). To maintain consistency, BCQ-MA, CQL-MA, and BC-MA share the same linear value decomposition structure with ICQ-MA. Details for baseline implementations are in Appendix D.2. Each algorithm runs with five seeds, where the performance is evaluated ten times every 50 episodes. Details for hyper-parameters are in Appendix E.1.
254
+
255
+ We investigate ICQ-MA’s performance compared to common baselines in different scenarios. Results in Figure 4 show that ICQ-MA significantly outperforms all baselines and achieves state-of-the-art performance in all maps. QMIX, BCQ-MA, and CQL-MA have poor performances due to the accumulated extrapolation error. Interestingly, since BC does not depend on the policy evaluation, it is not subject to extrapolation error. Thus BC-MA has a sound performance as StarCraft II is near deterministic. We implement BCQ and CQL according to their official code\*.
256
+
257
+ # 6.2 Single-Agent Offline Tasks on D4RL
258
+
259
+ To compare with current offline methods, we evaluate ICQ in the single offline tasks (e.g., D4RL), including gym domains, Adroit tasks [38] and AntMaze. Specifically, adroit tasks require controlling a 24-DoF robotic hand to imitate human behavior. AntMaze requires composing parts of sub-optimal trajectories to form more optimal policies for reaching goals on a MuJoco Ant robot. Experimental result in Table 1 shows that ICQ achieves the state-of-the-art performance in many tasks compared with the current offline methods.
260
+
261
+ # 6.3 Ablation Study
262
+
263
+ We conduct ablation studies of ICQ-MA in the MMM map of StarCraft II to study the effect of different modules, value estimation, important hyper-parameters, and data quality.
264
+
265
+ Module and Value Estimation Analysis. From Figure 5, we find that if we adopt other $Q$ -value estimation methods in implicit constraint policies (e.g., $Q ( \lambda )$ [27] or Tree Backup), the corresponding algorithms (ICQ-MA $( Q ( \lambda ) )$ or ICQ-MA (Tree Backup)) have poor performances and incorrect estimated values. Suppose we train ICQ-MA without decomposed implicit constraint module (e.g., ICQ-MA (w/o decom)). In that case, the algorithm’s performance is poor, although the estimated value is smaller than the true value, confirming the necessity of decomposed policy. Besides, the performance of one-step estimation (ICQ-MA (one step)) indicates $n$ -step estimation is not the critical factor for improving ICQ-MA, while one-step estimation will introduce more bias.
266
+
267
+ The Parameter $\alpha$ . The Lagrangian coefficient $\alpha$ of implicit constraint operator directly affects the intensity of constraint, which is a critical parameter for the performance. A smaller $\alpha$ leads to a relaxing constraint and tends to maximize reward. If $\alpha 0$ , ICQ-MA is simplified to $Q$ - learning [57] while $\alpha \to \infty$ results in that ICQ-MA is equivalent to behavior cloning. Indeed, there is an intermediate value that performs best that can best provide the trade-off as in Appendix C.4.
268
+
269
+ Data Quality. It is also worth studying the performance of ICQ-MA and BC-MA with varying data quality. Specifically, we make the datasets from behavior policies of different levels (e.g., Good, Medium, and Poor). As shown in Figure 9 in Appendix C.4, ICQ-MA is not sensitive to the data quality, while the performance of BC-MA drops drastically with the data quality deteriorates. Results confirm that ICQ-MA is robust to the data quality while BC-MA strongly relies on the data quality.
270
+
271
+ Computational Complexity. With the same training steps in SMAC, BCQ-MA consumes $70 \%$ time of ICQ-MA. Although ICQ-MA takes a little long time compared with BCQ-MA, it achieves excellent performance in benchmarks. The computing infrastructure for running experiments is a server with an AMD EPYC 7702 64-Core Processor CPU.
272
+
273
+ # 7 Conclusion
274
+
275
+ In this work, we demonstrate a critical problem in multi-agent off-policy reinforcement learning with finite data, where it introduces accumulated extrapolation error in the number of agents. We empirically show the current offline algorithms are ineffective in the multi-agent offline setting. Therefore, we propose the Implicit Constraint Q-learning (ICQ) method, which effectively alleviates extrapolation error by only trusting the state-action pairs in datasets. To the best of our knowledge, the multi-agent version of ICQ is the first multi-agent offline algorithm capable of learning from complex multi-agent datasets. Due to the importance of offline tasks and multi-agent systems, we sincerely hope our algorithms can be a solid foothold for applying RL to practical applications.
276
+
277
+ # Acknowledgments and Disclosure of Funding
278
+
279
+ This work was funded by the National Natural Science Foundation of China (ID:U1813216), National Key Research and Development Project of China under Grant 2017YFC0704100 and Grant 2016YFB0901900, in part by the National Natural Science Foundation of China under Grant 61425027, the 111 International Collaboration Program of China under Grant BP2018006, and BNRist Program (BNR2019TD01009) and the National Innovation Center of High Speed Train R&D project (CX/KJ-2020-0006).
280
+
281
+ We sincerely appreciate reviewers, whose valuable comments have benefited our paper significantly!
282
+
283
+ # References
284
+
285
+ [1] Abbas Abdolmaleki, Jost Tobias Springenberg, Yuval Tassa, Remi Munos, Nicolas Heess, and Martin Riedmiller. Maximum a posteriori policy optimisation. In International Conference on Learning Representations, 2018.
286
+ [2] Jeffrey L Adler and Victor J Blue. A cooperative multi-agent transportation management and route guidance system. Transportation Research Part C: Emerging Technologies, 10(5-6):433– 454, 2002.
287
+ [3] Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning, pages 104–114. PMLR, 2020.
288
+ [4] Anurag Ajay, Aviral Kumar, Pulkit Agrawal, Sergey Levine, and Ofir Nachum. OPAL: Offline primitive discovery for accelerating offline reinforcement learning. In International Conference on Learning Representations, 2020.
289
+ [5] Kavosh Asadi and Michael L Littman. An alternative softmax operator for reinforcement learning. In International Conference on Machine Learning, pages 243–252. PMLR, 2017.
290
+ [6] Felix Berkenkamp, Matteo Turchetta, Angela P Schoellig, and Andreas Krause. Safe modelbased reinforcement learning with stability guarantees. arXiv preprint arXiv:1705.08551, 2017.
291
+ [7] Duncan S Callaway and Ian A Hiskens. Achieving controllability of electric loads. Proceedings of the IEEE, 99(1):184–199, 2010.
292
+ [8] Yuanjiang Cao, Xiaocong Chen, Lina Yao, Xianzhi Wang, and Wei Emma Zhang. Adversarial attacks and detection on reinforcement learning-based interactive recommender systems. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 1669–1672, 2020.
293
+ [9] Axel Dreves, Francisco Facchinei, Christian Kanzow, and Simone Sagratella. On the solution of the KKT conditions of generalized nash equilibrium problems. SIAM Journal on Optimization, 21(3):1082–1108, 2011.
294
+ [10] Damien Ernst, Pierre Geurts, and Louis Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6:503–556, 2005.
295
+ [11] Benjamin Eysenbach, Shixiang Gu, Julian Ibarz, and Sergey Levine. Leave no trace: Learning to reset for safe and autonomous reinforcement learning. arXiv preprint arXiv:1711.06782, 2017.
296
+ [12] Rasool Fakoor, Pratik Chaudhari, and Alexander J Smola. P3O: Policy-on policy-off policy optimization. In Uncertainty in Artificial Intelligence, pages 1017–1027. PMLR, 2020.
297
+ [13] Mehrdad Farajtabar, Yinlam Chow, and Mohammad Ghavamzadeh. More robust doubly robust off-policy evaluation. In International Conference on Machine Learning, pages 1447–1456. PMLR, 2018.
298
+ [14] Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4RL: Datasets for deep data-driven reinforcement learning. arXiv preprint arXiv:2004.07219, 2020.
299
+ [15] Scott Fujimoto, Edoardo Conti, Mohammad Ghavamzadeh, and Joelle Pineau. Benchmarking batch deep reinforcement learning algorithms. arXiv preprint arXiv:1910.01708, 2019.
300
+ [16] Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In International Conference on Machine Learning, pages 2052–2062. PMLR, 2019.
301
+ [17] Natasha Jaques, Asma Ghandeharioun, Judy Hanwen Shen, Craig Ferguson, Agata Lapedriza, Noah Jones, Shixiang Gu, and Rosalind Picard. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog. arXiv preprint arXiv:1907.00456, 2019.
302
+ [18] Nan Jiang and Lihong Li. Doubly robust off-policy value evaluation for reinforcement learning. In International Conference on Machine Learning, pages 652–661. PMLR, 2016.
303
+ [19] Gregory Kahn, Adam Villaflor, Pieter Abbeel, and Sergey Levine. Composable actionconditioned predictors: Flexible off-policy learning for robot navigation. In Conference on Robot Learning, pages 806–816. PMLR, 2018.
304
+ [20] Dmitry Kalashnikov, Alex Irpan, Peter Pastor, Julian Ibarz, Alexander Herzog, Eric Jang, Deirdre Quillen, Ethan Holly, Mrinal Kalakrishnan, Vincent Vanhoucke, et al. Scalable deep reinforcement learning for vision-based robotic manipulation. In Conference on Robot Learning, pages 651–673. PMLR, 2018.
305
+ [21] Aviral Kumar, Justin Fu, Matthew Soh, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. In Advances in Neural Information Processing Systems, pages 11784–11794, 2019.
306
+ [22] Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning. arXiv preprint arXiv:2006.04779, 2020.
307
+ [23] Romain Laroche, Paul Trichelair, and Remi Tachet Des Combes. Safe policy improvement with baseline bootstrapping. In International Conference on Machine Learning, pages 3652–3661. PMLR, 2019.
308
+ [24] Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
309
+ [25] Chenghao Li, Chengjie Wu, Tonghan Wang, Jun Yang, Qianchuan Zhao, and Chongjie Zhang. Celebrating diversity in shared multi-agent reinforcement learning. arXiv preprint arXiv:2106.02195, 2021.
310
+ [26] Xiaoteng Ma, Yiqin Yang, Chenghao Li, Yiwen Lu, Qianchuan Zhao, and Jun Yang. Modeling the interaction between agents in cooperative multi-agent reinforcement learning. In Proceedings of the 20th International Conference on Autonomous Agents and MultiAgent Systems, pages 853–861, 2021.
311
+ [27] Rémi Munos. $\mathrm { Q } ( \lambda )$ with off-policy corrections. In Algorithmic Learning Theory: International Conference, ALT 2016, Bari, Italy, October 19-21, 2016, Proceedings, volume 9925, page 305. Springer, 2016.
312
+ [28] Ofir Nachum, Yinlam Chow, Bo Dai, and Lihong Li. DualDICE: Behavior-agnostic estimation of discounted stationary distribution corrections. Advances in Neural Information Processing Systems, 32:2318–2328, 2019.
313
+ [29] Ashvin Nair, Murtaza Dalal, Abhishek Gupta, and Sergey Levine. Accelerating online reinforcement learning with offline datasets. arXiv preprint arXiv:2006.09359, 2020.
314
+ [30] Radford M Neal. Annealed importance sampling. Statistics and computing, 11(2):125–139, 2001.
315
+ [31] Frans A Oliehoek, Christopher Amato, et al. A concise introduction to decentralized POMDPs, volume 1. Springer, 2016.
316
+ [32] Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 8626–8638, 2018.
317
+ [33] Brendan O’Donoghue, Ian Osband, Remi Munos, and Volodymyr Mnih. The uncertainty bellman equation and exploration. In International Conference on Machine Learning, pages 3836–3845, 2018.
318
+ [34] Ling Pan, Qingpeng Cai, and Longbo Huang. Softmax deep double deterministic policy gradients. In Advances in Neural Information Processing Systems, volume 33, pages 11767– 11777, 2020.
319
+ [35] Xue Bin Peng, Aviral Kumar, Grace Zhang, and Sergey Levine. Advantage-weighted regression: Simple and scalable off-policy reinforcement learning. arXiv preprint arXiv:1910.00177, 2019.
320
+ [36] Jan Peters, Katharina Mulling, and Yasemin Altun. Relative entropy policy search. In AAAI Conference on Artificial Intelligence, volume 24, 2010.
321
+ [37] Michael Rabbat and Robert Nowak. Distributed optimization in sensor networks. In Proceedings of the 3rd international symposium on Information processing in sensor networks, pages 20–27, 2004.
322
+ [38] Aravind Rajeswaran, Vikash Kumar, Abhishek Gupta, Giulia Vezzani, John Schulman, Emanuel Todorov, and Sergey Levine. Learning complex dexterous manipulation with deep reinforcement learning and demonstrations. arXiv preprint arXiv:1709.10087, 2017.
323
+
324
+ [39] Tabish Rashid, Mikayel Samvelyan, Christian Schroeder, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. QMIX: Monotonic value function factorisation for deep multi-agent reinforcement learning. In International Conference on Machine Learning, pages 4295–4304, 2018.
325
+
326
+ [40] Mikayel Samvelyan, Tabish Rashid, Christian Schroeder de Witt, Gregory Farquhar, Nantas Nardelli, Tim GJ Rudner, Chia-Man Hung, Philip HS Torr, Jakob Foerster, and Shimon Whiteson. The StarCraft multi-agent challenge. In International Conference on Autonomous Agents and Multiagent Systems, pages 2186–2188, 2019.
327
+
328
+ [41] Juan C Santamaria, Richard S Sutton, and Ashwin Ram. Experiments with reinforcement learning in problems with continuous state and action spaces. Adaptive behavior, 6(2):163–217, 1997.
329
+
330
+ [42] Noah Siegel, Jost Tobias Springenberg, Felix Berkenkamp, Abbas Abdolmaleki, Michael Neunert, Thomas Lampe, Roland Hafner, Nicolas Heess, and Martin Riedmiller. Keep doing what worked: Behavior modelling priors for offline reinforcement learning. In International Conference on Learning Representations, 2019.
331
+
332
+ [43] Kyunghwan Son, Daewoo Kim, Wan Ju Kang, David Earl Hostallero, and Yung Yi. QTRAN: Learning to factorize with transformation for cooperative multi-agent reinforcement learning. In International Conference on Machine Learning, pages 5887–5896, 2019.
333
+
334
+ [44] Aaron Sonabend-W, Junwei Lu, Leo A Celi, Tianxi Cai, and Peter Szolovits. Expertsupervised reinforcement learning for offline policy learning and evaluation. arXiv preprint arXiv:2006.13189, 2020.
335
+
336
+ [45] H Francis Song, Abbas Abdolmaleki, Jost Tobias Springenberg, Aidan Clark, Hubert Soyer, Jack W Rae, Seb Noury, Arun Ahuja, Siqi Liu, Dhruva Tirumala, et al. V-mpo: On-policy maximum a posteriori policy optimization for discrete and continuous control. In International Conference on Learning Representations, 2019.
337
+
338
+ [46] Zhao Song, Ron Parr, and Lawrence Carin. Revisiting the softmax bellman operator: New benefits and new perspective. In International Conference on Machine Learning, pages 5916– 5925. PMLR, 2019.
339
+
340
+ [47] Bharath K Sriperumbudur, Kenji Fukumizu, Arthur Gretton, Bernhard Schölkopf, Gert RG Lanckriet, et al. On the empirical estimation of integral probability metrics. Electronic Journal of Statistics, 6:1550–1599, 2012.
341
+
342
+ [48] Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi, Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z Leibo, Karl Tuyls, et al. Valuedecomposition networks for cooperative multi-agent learning based on team reward. In International Conference on Autonomous Agents and MultiAgent Systems, pages 2085–2087, 2018.
343
+
344
+ [49] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT press, 2018.
345
+
346
+ [50] Philip Thomas and Emma Brunskill. Data-efficient off-policy policy evaluation for reinforcement learning. In International Conference on Machine Learning, pages 2139–2148. PMLR, 2016.
347
+
348
+ [51] Emanuel Todorov. Linearly-solvable markov decision problems. In Advances in neural information processing systems, pages 1369–1376, 2007.
349
+
350
+ [52] Ahmed Touati, Harsh Satija, Joshua Romoff, Joelle Pineau, and Pascal Vincent. Randomized value functions via multiplicative normalizing flows. In Uncertainty in Artificial Intelligence, pages 422–432. PMLR, 2020.
351
+
352
+ [53] SS Vallender. Calculation of the wasserstein distance between probability distributions on the line. Theory of Probability & Its Applications, 18(4):784–786, 1974.
353
+
354
+ [54] Quan Vuong, Yiming Zhang, and Keith W Ross. Supervised policy update for deep reinforcement learning. In International Conference on Learning Representations, 2018.
355
+
356
+ [55] Yihan Wang, Beining Han, Tonghan Wang, Heng Dong, and Chongjie Zhang. Off-policy multi-agent decomposed policy gradients. arXiv preprint arXiv:2007.12322, 2020.
357
+
358
+ [56] Yu-Xiang Wang, Alekh Agarwal, and Miroslav Dudık. Optimal and adaptive off-policy evaluation in contextual bandits. In International Conference on Machine Learning, pages 3589–3597. PMLR, 2017.
359
+ [57] Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992.
360
+ [58] Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. arXiv preprint arXiv:1911.11361, 2019.
361
+ [59] Deheng Ye, Zhao Liu, Mingfei Sun, Bei Shi, Peilin Zhao, Hao Wu, Hongsheng Yu, Shaojie Yang, Xipeng Wu, Qingwei Guo, et al. Mastering complex control in MOBA games with deep reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 6672–6679, 2020.
parse/train/yNzF41lHYV/yNzF41lHYV_content_list.json ADDED
@@ -0,0 +1,1619 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Believe What You See: Implicit Constraint Approach for Offline Multi-Agent Reinforcement Learning ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 179,
8
+ 122,
9
+ 820,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Yiqin Yang1†, Xiaoteng $\\mathbf { M } \\mathbf { a } ^ { 1 }$ †‡, Chenghao $\\mathbf { L i } ^ { 1 }$ , Zewu Zheng1, Qiyuan Zhang2, Gao Huang1, Jun $\\mathbf { Y a n g ^ { 1 } } \\mathbf { \\dot { z } }$ ‡, Qianchuan Zhao1 1Tsinghua University, 2Harbin Institute of Technology \n{yangyiqi19, ma-xt17, lich18} $@$ mails.tsinghua.edu.cn, zzheng $1 7 @ 1 2 6 . \\mathrm { c o m }$ , \nzhangqiyuan19@hit.edu.cn, {gaohuang, yangjun603, zhaoqc} $@$ tsinghua.edu.cn ",
17
+ "bbox": [
18
+ 236,
19
+ 224,
20
+ 763,
21
+ 297
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 332,
32
+ 535,
33
+ 349
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Learning from datasets without interaction with environments (Offline Learning) is an essential step to apply Reinforcement Learning (RL) algorithms in real-world scenarios. However, compared with the single-agent counterpart, offline multiagent RL introduces more agents with the larger state and action space, which is more challenging but attracts little attention. We demonstrate current offline RL algorithms are ineffective in multi-agent systems due to the accumulated extrapolation error. In this paper, we propose a novel offline RL algorithm, named Implicit Constraint $Q$ -learning (ICQ), which effectively alleviates the extrapolation error by only trusting the state-action pairs given in the dataset for value estimation. Moreover, we extend ICQ to multi-agent tasks by decomposing the joint-policy under the implicit constraint. Experimental results demonstrate that the extrapolation error is successfully controlled within a reasonable range and insensitive to the number of agents. We further show that ICQ achieves the state-of-the-art performance in the challenging multi-agent offline tasks (StarCraft II). Our code is public online at https://github.com/YiqinYang/ICQ. ",
40
+ "bbox": [
41
+ 233,
42
+ 364,
43
+ 766,
44
+ 571
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 174,
54
+ 597,
55
+ 310,
56
+ 613
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Recently, reinforcement learning (RL), an active learning process, has achieved massive success in various domains ranging from strategy games [59] to recommendation systems [8]. However, applying RL to real-world scenarios poses practical challenges: interaction with the real world, such as autonomous driving, is usually expensive or risky. To solve these issues, offline RL is an excellent choice to deal with practical problems [3, 24, 35, 42, 15, 28, 4, 23, 54, 12], aiming at learning from a fixed dataset without interaction with environments. ",
63
+ "bbox": [
64
+ 174,
65
+ 628,
66
+ 825,
67
+ 712
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The greatest obstacle of offline RL is the distribution shift issue [16], which leads to extrapolation error, a phenomenon in which unseen state-action pairs are erroneously estimated. Unlike the online setting, the inaccurate estimated values of unseen pairs cannot be corrected by interacting with the environment. Therefore, most off-policy RL algorithms fail in the offline tasks due to intractable overgeneralization. Modern offline methods (e.g., Batch-Constrained deep Q-learning (BCQ) [16]) aim to enforce the learned policy to be close to the behavior policy or suppress the $Q$ -value directly. These methods have achieved massive success in challenging single-agent offline tasks like D4RL [14]. ",
74
+ "bbox": [
75
+ 174,
76
+ 717,
77
+ 825,
78
+ 815
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "However, many decision processes in real-world scenarios belong to multi-agent systems, such as intelligent transportation systems [2], sensor networks [37], and power grids [7]. Compared with the single-agent counterpart, the multi-agent system has a much larger action space, which grows exponentially with the increasing of the agent number. When coming into the offline scenario, the unseen state-action pairs will grow exponentially as the number of agents increases, accumulating the extrapolation error quickly. The current offline algorithms are unsuccessful in multi-agent tasks even though they adopt the modern value-decomposition structure [26, 48, 25]. As shown in Figure 2, our results indicate that BCQ, a state-of-the-art offline algorithm, has divergent $Q$ -estimates in a simple multi-agent MDP environment (e.g., BCQ (4 agents)). The extrapolation error for value estimation is accumulated quickly as the number of agents increases, significantly impairing the performance. ",
85
+ "bbox": [
86
+ 176,
87
+ 820,
88
+ 825,
89
+ 863
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/7716ccfb75fd41bc16411ad2c37c22936088f18375ddf239a44f321a70f199e4.jpg",
96
+ "image_caption": [
97
+ "Figure 1: The comparison between ICQ and BCQ for the target $Q$ -value estimation. The spots denote states, and the connections between spots indicate actions. The red solid-lines denote seen pairs, and the gray dotted-lines are unseen pairs. (a) BCQ estimates $Q$ -value in a defined similar action set (orange) while unseen pairs still exist in the set with low probability. (b) ICQ only adopts seen pairs (orange) in the training set for $Q$ -value estimation. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 176,
102
+ 93,
103
+ 823,
104
+ 233
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 174,
113
+ 345,
114
+ 825,
115
+ 444
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Based on these analyses, we propose the Implicit Constraint Q-learning (ICQ) algorithm, which effectively alleviates the extrapolation error as no unseen pairs are involved in estimating $Q$ -value. Motivated by an implicit constraint optimization problem, ICQ adopts a SARSA-like approach [49] to evaluate $Q$ -values and then converts the policy learning into a supervised regression problem. By decomposing the joint-policy under the implicit constraint, we extend ICQ to the multi-agent tasks successfully. To the best of our knowledge, our work is the first study analyzing and addressing the extrapolation error in multi-agent reinforcement learning. ",
122
+ "bbox": [
123
+ 173,
124
+ 449,
125
+ 825,
126
+ 547
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "We evaluate our algorithm on the challenging multi-agent offline tasks based on StarCraft II [40], where a large number of agents cooperatively complete a task. Experimental results show that ICQ can control the extrapolation error within a reasonable range under any number of agents and learn from complex multi-agent datasets. Further, we evaluate the single-agent version of ICQ in D4RL, a standard single-agent offline benchmark. The results demonstrate the generality of ICQ for a wide range of task scenarios, from single-agent to multi-agent, from discrete to continuous control. ",
133
+ "bbox": [
134
+ 174,
135
+ 553,
136
+ 825,
137
+ 637
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 Background ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 174,
147
+ 665,
148
+ 308,
149
+ 681
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "Notation. The fully cooperative multi-agent tasks are usually modeled as the Dec-POMDP [31] consisting of the tuple $G \\overset { \\cdot } { = } \\langle S , A , P , r , \\Omega , \\overset { \\cdot } { O } , n , \\gamma \\rangle$ . Let $s \\in S$ denote the true state of the environment. At each time step $t \\in \\mathbb { Z } ^ { + }$ , each agent $i \\in N \\equiv \\left\\{ 1 , \\ldots , n \\right\\}$ chooses an action $a ^ { i } \\in A$ , forming a joint action $\\pmb { a } \\in \\mathbf { A } \\equiv A ^ { n }$ . Let $P ( s ^ { \\prime } \\mid s , \\pmb { a } ) : S \\times \\mathbf { A } \\times S [ 0 , 1 ]$ denote the state transition function. All agents share the same reward function $r ( s , \\pmb { a } ) : S \\times \\mathbf { A } \\mathbb { R }$ . ",
156
+ "bbox": [
157
+ 173,
158
+ 702,
159
+ 825,
160
+ 771
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "We consider a partially observable scenario in which each agent draws individual observations $o ^ { i } \\in \\Omega$ according to the observation function $O ( s , a ) : \\bar { S ^ { } } \\times { \\bf A } \\Omega$ . Each agent has an action-observation history ${ \\boldsymbol { \\tau } } ^ { i } \\in \\mathbf { T } \\equiv ( \\Omega \\times \\mathbf { A } ) ^ { t }$ , on which it conditions a stochastic policy $\\pi ^ { i } ( a ^ { i } \\mid \\tau ^ { i } )$ parameterized by $\\theta _ { i } : \\mathbf { T } \\times \\mathbf { A } [ 0 , 1 ]$ ]. The joint action-value function is defined as et $\\begin{array} { r } { Q ^ { \\pi } ( \\tau , \\boldsymbol { a } ) \\triangleq \\mathbb { E } _ { s _ { 0 : \\infty } , \\boldsymbol { a } _ { 0 : \\infty } } \\left[ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } r _ { t } \\mid s _ { 0 } = s , \\boldsymbol { a } _ { 0 } = \\boldsymbol { a } , \\pi \\right] } \\end{array}$ , where ich con $\\pi$ is the joint-policy with param-ns trajectories of the behavior $\\theta = \\langle \\theta _ { 1 } , \\ldots , \\theta _ { n } \\rangle$ $\\boldsymbol { B }$ \npolicy $\\pmb { \\mu }$ . ",
167
+ "bbox": [
168
+ 173,
169
+ 777,
170
+ 825,
171
+ 877
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "We adopt the centralized training and decentralized execution (CTDE) paradigm [43]. During training, the algorithm has access to the true state $s$ and every agent’s action-observation history $\\tau _ { i }$ as well as the freedom to share all information between agents. However, during execution, each agent has access only to its action-observation history. ",
178
+ "bbox": [
179
+ 174,
180
+ 882,
181
+ 821,
182
+ 911
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "",
189
+ "bbox": [
190
+ 169,
191
+ 90,
192
+ 823,
193
+ 119
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Batch-constrained deep Q-learning (BCQ) is a state-of-the-art offline RL method, which aims to avoid selecting an unfamiliar action at the next state during a value update. Specifically, BCQ optimizes $\\pi$ by introducing perturbation model $\\xi ( \\tau , a , \\Phi )$ and generative model $G \\bar { ( } \\tau ; \\varphi )$ as follows ",
200
+ "bbox": [
201
+ 173,
202
+ 126,
203
+ 825,
204
+ 169
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "equation",
210
+ "img_path": "images/7b9d1f9ed76ae78ae13403944f0f9bf00521f555e39f6d72bd1f8eee179432d4.jpg",
211
+ "text": "$$\n\\pi ( \\tau ) = \\underset { a ^ { [ i ] } + \\xi ( \\tau , a ^ { [ i ] } , \\Phi ) } { \\mathrm { a r g } \\mathrm { m a x } } Q ^ { \\pi } ( \\tau , a ^ { [ i ] } + \\xi ( \\tau , a ^ { [ i ] } , \\Phi ) ; \\phi ) , \\mathrm { s . t . } \\{ a ^ { [ i ] } \\sim G ( \\tau ; \\varphi ) \\} _ { i = 1 } ^ { m } ,\n$$",
212
+ "text_format": "latex",
213
+ "bbox": [
214
+ 225,
215
+ 172,
216
+ 754,
217
+ 205
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "where $\\pi$ selects the highest valued action from a collection of $m$ actions sampled from the generative model $G ( \\tau ; \\varphi )$ , which aims to produce only previously seen actions. The perturbation model $\\xi ( \\tau , a ^ { [ i ] } , \\Phi )$ is adopted to adjust action $a ^ { [ i ] }$ in the range $[ - \\Phi , \\Phi ]$ to increase the diversity of actions. ",
224
+ "bbox": [
225
+ 173,
226
+ 209,
227
+ 825,
228
+ 255
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "3 Analysis of Accumulated Extrapolation Error in Multi-Agent RL ",
235
+ "text_level": 1,
236
+ "bbox": [
237
+ 171,
238
+ 272,
239
+ 748,
240
+ 291
241
+ ],
242
+ "page_idx": 2
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "In this section, we theoretically analyze the extrapolation error propagation in offline RL, which lays the basis for Section 4. The extrapolation error mainly attributes the out-of-distribution (OOD) actions in the evaluation of $Q ^ { \\pi }$ [16, 21]. To quantify the effect of OOD actions, we define the state-action pairs within the dataset as seen pairs. Otherwise, we name them as unseen pairs. We demonstrate that the extrapolation error propagation from the unseen pairs to the seen pairs is related to the size of the action space, which grows exponentially with the increasing number of agents. We further design a toy example to illustrate the inefficiency of current offline methods in multi-agent tasks. ",
247
+ "bbox": [
248
+ 173,
249
+ 303,
250
+ 826,
251
+ 402
252
+ ],
253
+ "page_idx": 2
254
+ },
255
+ {
256
+ "type": "text",
257
+ "text": "3.1 Extrapolation Error Propagation in Offline RL ",
258
+ "text_level": 1,
259
+ "bbox": [
260
+ 173,
261
+ 416,
262
+ 540,
263
+ 433
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "Following the analysis in BCQ [16], we define the tabular estimation error\\* as $\\epsilon _ { \\mathrm { M D P } } ( \\tau , a ) \\ \\triangleq$ $Q _ { M } ^ { \\pi } ( \\tau , a ) \\bar { ~ } - Q _ { B } ^ { \\pi } ( \\tau , a )$ (here we abuse $\\tau$ to denote the state for analytical clarity), where the $M$ denotes the true MDP and $\\boldsymbol { B }$ denotes a new MDP computed from the batch by $P _ { B } ( \\tau ^ { \\prime } \\mid \\tau , a ) =$ $\\begin{array} { r } { \\mathcal { N } ( \\tau , a , \\tau ^ { \\prime } ) / \\sum _ { \\tilde { \\tau } } \\mathcal { N } ( \\tau , a , \\tilde { \\tau } ) } \\end{array}$ . BCQ [16] has shown that $\\epsilon _ { \\mathrm { M D P } } ( \\tau , a )$ has a Bellman-like form with the extrapolation error $\\boldsymbol { \\epsilon } _ { \\mathrm { E X T } } ( \\tau , a )$ as the \"reward function\": ",
270
+ "bbox": [
271
+ 173,
272
+ 444,
273
+ 825,
274
+ 515
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "equation",
280
+ "img_path": "images/f08796daf1e5d440a047ad4a00387bc0c3cfd03e17720e28d50e122c1983d8d4.jpg",
281
+ "text": "$$\n\\begin{array} { l } { { \\epsilon _ { \\mathrm { M D P } } ( \\tau , a ) \\triangleq \\epsilon _ { \\mathrm { E X T } } ( \\tau , a ) + \\displaystyle \\sum _ { \\tau ^ { \\prime } } P _ { M } ( \\tau ^ { \\prime } \\mid \\tau , a ) \\gamma \\displaystyle \\sum _ { a ^ { \\prime } } \\pi ( a ^ { \\prime } \\mid s ^ { \\prime } ) \\epsilon _ { \\mathrm { M D P } } ( \\tau ^ { \\prime } , a ^ { \\prime } ) , } } \\\\ { { \\epsilon _ { \\mathrm { E X P } } ( \\tau , a ) = \\displaystyle \\sum _ { \\tau ^ { \\prime } } \\left( P _ { M } ( \\tau ^ { \\prime } \\mid \\tau , a ) - P _ { B } ( \\tau ^ { \\prime } \\mid \\tau , a ) \\right) \\left( r ( \\tau , a , \\tau ^ { \\prime } ) + \\gamma \\displaystyle \\sum _ { a ^ { \\prime } } \\pi ( a ^ { \\prime } \\mid \\tau ^ { \\prime } ) Q _ { B } ^ { \\pi } ( \\tau ^ { \\prime } , a ^ { \\prime } ) \\right) . } } \\end{array}\n$$",
282
+ "text_format": "latex",
283
+ "bbox": [
284
+ 181,
285
+ 520,
286
+ 797,
287
+ 590
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "For the seen state-action pairs, $\\epsilon _ { \\mathrm { E X T } } ( \\tau , a ) = 0$ since $P _ { M } ( \\tau ^ { \\prime } \\mid \\tau , a ) - P _ { B } ( \\tau ^ { \\prime } \\mid \\tau , a ) = 0$ in the deterministic environment. In contrast, the $\\boldsymbol { \\epsilon } _ { \\mathrm { E X T } } ( \\tau , a )$ of unseen pairs is uncontrollable and depends entirely on the initial values in tabular setting or the network generalization in DRL. ",
294
+ "bbox": [
295
+ 174,
296
+ 594,
297
+ 823,
298
+ 638
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "To further analyze how the extrapolation error in the unseen pairs impacts the estimation of actions in the dataset, we partition $\\mathbf { \\epsilon \\epsilon _ { \\mathbf { M D P } } }$ and \u000fEXT as $\\epsilon _ { \\mathrm { M D P } } = [ \\epsilon _ { \\mathrm { s } } , \\epsilon _ { \\mathrm { u } } ] ^ { \\mathbf { T } }$ and $\\epsilon _ { \\mathbf { E X T } } = [ \\mathbf { 0 } , \\epsilon _ { \\mathbf { b } } ] ^ { \\mathrm { T } }$ respectively according to seen and unseen state-action pairs. Let denote the transition matrix of the state-action pairs as $\\bar { P } _ { M } ^ { \\pi } ( \\tau ^ { \\prime } , a ^ { \\prime } \\mid \\tau , a ) = P _ { M } ( \\tau ^ { \\prime } \\mid \\tau , a ) \\pi ( a ^ { \\prime } \\mid \\tau ^ { \\prime } )$ . We decompose the transition matrix as $P _ { M } ^ { \\pi } = \\left[ P _ { \\mathrm { s , s } } ^ { \\pi } , P _ { \\mathrm { s , u } } ^ { \\pi } ; P _ { \\mathrm { u , s } } ^ { \\pi } , P _ { \\mathrm { u , u } } ^ { \\pi } \\right]$ according to state-action pairs’ property (e.g., $P _ { \\mathrm { s , u } } ^ { \\pi } ( \\tau _ { \\mathrm { u } } ^ { \\prime } , a _ { \\mathrm { u } } ^ { \\prime } \\mid \\tau _ { \\mathrm { s } } , a _ { \\mathrm { s } } ) =$ $P _ { M } ( \\tau _ { \\mathrm { u } } ^ { \\prime } \\mid \\tau _ { \\mathrm { s } } , a _ { \\mathrm { s } } ) \\pi ( a _ { \\mathrm { u } } ^ { \\prime } \\mid \\tau _ { \\mathrm { u } } ^ { \\prime } )$ denotes the transition probability from seen to unseen pairs). Then the extrapolation error propagation can be described by the following linear system: ",
305
+ "bbox": [
306
+ 173,
307
+ 642,
308
+ 825,
309
+ 746
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "equation",
315
+ "img_path": "images/c502bfaf01bf75670ebc982f84877bdb3a060e90479a4fc4e7109f2620b2e361.jpg",
316
+ "text": "$$\n\\left[ \\epsilon _ { \\mathrm { s } } \\right] = \\gamma \\left[ P _ { \\mathrm { s , s } } ^ { \\pi } \\quad P _ { \\mathrm { s , u } } ^ { \\pi } \\right] \\left[ \\epsilon _ { \\mathrm { s } } \\right] + \\left[ \\mathbf { 0 } _ { \\mathbf { \\tau } } \\right] .\n$$",
317
+ "text_format": "latex",
318
+ "bbox": [
319
+ 369,
320
+ 750,
321
+ 629,
322
+ 785
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "Based on the above definitions, we have the following conclusion. ",
329
+ "bbox": [
330
+ 174,
331
+ 796,
332
+ 617,
333
+ 811
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "Theorem 1. Given a deterministic MDP, the propagation of $\\mathbf { \\epsilon _ { \\mathbf { b } } }$ to $\\epsilon _ { \\mathrm { s } }$ is proportional to $\\| P _ { \\mathrm { s , u } } ^ { \\pi } \\| _ { \\infty }$ : ",
340
+ "bbox": [
341
+ 179,
342
+ 814,
343
+ 810,
344
+ 830
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "equation",
350
+ "img_path": "images/1c160cfd9c68c50b27c10d44c18ad6cdfec2106b3577e86b77e27c6a2920b27b.jpg",
351
+ "text": "$$\n\\left\\| \\epsilon _ { \\mathbf { s } } \\right\\| _ { \\infty } \\leq \\frac { \\gamma \\left\\| P _ { \\mathbf { s } , \\mathbf { u } } ^ { \\pi } \\right\\| _ { \\infty } } { ( 1 - \\gamma ) \\left( 1 - \\gamma \\left\\| P _ { \\mathbf { s } , \\mathbf { s } } ^ { \\pi } \\right\\| _ { \\infty } \\right) } \\left\\| \\epsilon _ { \\mathbf { b } } \\right\\| _ { \\infty } .\n$$",
352
+ "text_format": "latex",
353
+ "bbox": [
354
+ 348,
355
+ 837,
356
+ 650,
357
+ 883
358
+ ],
359
+ "page_idx": 2
360
+ },
361
+ {
362
+ "type": "image",
363
+ "img_path": "images/f72c9cc8ba536b89d48b9f8e506a9be8cdd1a3d91e2c2fb99239142b1deede46.jpg",
364
+ "image_caption": [
365
+ "Figure 2: (a) An MMDP where $Q$ -estimates of BCQ will diverge as the number of agents increases. (b) The learning curve of the joint action-value function while running several agents in the given MMDP. The true values are similar in this task with different agent numbers, calculated by averaging the Monte-Carlo estimation under different agents. The $Q$ -estimates of BCQ (4 agents) diverge while our algorithm (ICQ) has accurate $Q$ -estimates. Please refer to Appendix C.2 for the complete results. "
366
+ ],
367
+ "image_footnote": [],
368
+ "bbox": [
369
+ 200,
370
+ 103,
371
+ 789,
372
+ 246
373
+ ],
374
+ "page_idx": 3
375
+ },
376
+ {
377
+ "type": "text",
378
+ "text": "The above theorem indicates the effect of extrapolation error on seen state-action pairs is directly proportional to $\\| \\mathcal { P } _ { \\mathrm { s , u } } ^ { \\pi } \\| _ { \\infty }$ . In the practice, $\\| P _ { \\mathrm { s , u } } ^ { \\pi } \\| _ { \\infty }$ is related to the size of action space and the dataset. If the action space is enormous, such as a multi-agent task with a number of agents, we need a larger amount of data to reduce $\\| \\mathcal { P } _ { \\mathrm { s , u } } ^ { \\pi } \\| _ { \\infty }$ . However, the dataset size in offline learning tasks is generally limited. Moreover, when using the networks to approximate the value function, $\\mathbf { \\epsilon _ { \\mathbf { b } } }$ does not remain constant as for the seen $Q _ { B } \\big ( \\tau _ { \\mathrm { u } } , a _ { \\mathrm { u } } \\big )$ could be arbitrary during training,hese reasons, we have to enforce the $P _ { \\mathrm { s , u } } ^ { \\pi } 0$ he b $Q$ -values extreme large evenvoiding using OOD actions. For example, BCQ utilizes an auxiliary generative model to constrain the target actions within a familiar action set (see Section 2 for a detailed description). However, the error propagation heavily depends on the accuracy of the generative model and is intolerable with the agent number increasing. We will demonstrate this effect in the following toy example. ",
379
+ "bbox": [
380
+ 173,
381
+ 348,
382
+ 826,
383
+ 501
384
+ ],
385
+ "page_idx": 3
386
+ },
387
+ {
388
+ "type": "text",
389
+ "text": "3.2 Toy Example ",
390
+ "text_level": 1,
391
+ "bbox": [
392
+ 174,
393
+ 517,
394
+ 303,
395
+ 532
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "We design a toy two states Multi-Agent Markov Decision Process (MMDP) to illustrate the accumulated extrapolation error in multi-agent tasks (see Figure 2a). All agents start at state $\\tau _ { 2 }$ and explore rewards for 100 environment steps by taking actions $a _ { [ 1 ] } = 0$ or $a _ { [ 2 ] } = 1$ . The optimal policy is that all agents select $a _ { [ 1 ] }$ . The MMDP task has sparse rewards. The reward is 1 when following the optimal policy, otherwise, the reward is 0. The state $\\tau _ { 2 }$ will transfer to $\\tau _ { 1 }$ if the joint policy satisfies $\\textstyle { \\bar { \\sum _ { i = 1 } ^ { n } a _ { i } } } \\leq { \\frac { n } { 2 } }$ at $\\tau _ { 2 }$ , while the state $\\tau _ { 1 }$ will never return to $\\tau _ { 2 }$ . ",
402
+ "bbox": [
403
+ 173,
404
+ 542,
405
+ 825,
406
+ 627
407
+ ],
408
+ "page_idx": 3
409
+ },
410
+ {
411
+ "type": "text",
412
+ "text": "We run BCQ and our method ICQ on a limited dataset, which only contain 32 trajectories generated by QMIX. Obviously, the number of unseen state-action pairs exponentially grows as the number of agents increases. We control the amount of valuable trajectories $\\mathit { r } = 1 \\mathit { \\Theta }$ ) in different datasets equal for fair comparisons. The multi-agent version of BCQ shares the same value-decomposition structure as ICQ (see Appendix D.2). ",
413
+ "bbox": [
414
+ 174,
415
+ 632,
416
+ 825,
417
+ 702
418
+ ],
419
+ "page_idx": 3
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "As shown in Figure 2b, the joint action-value function learned by BCQ gradually diverges as the number of agents increases while ICQ maintains a reasonable $Q$ -value. The experimental result is consistent with Theorem 1, and we provide an additional analysis for the toy example in Appendix B.2. In summary, we show theoretically and empirically that the extrapolation error is accumulated quickly as the number of agents increases and makes the $Q$ -estimates easier to diverge. ",
424
+ "bbox": [
425
+ 174,
426
+ 708,
427
+ 825,
428
+ 779
429
+ ],
430
+ "page_idx": 3
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "4 Implicit Constraint Approach for Offline Multi-Agent RL ",
435
+ "text_level": 1,
436
+ "bbox": [
437
+ 174,
438
+ 796,
439
+ 686,
440
+ 814
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "In this section, we give an effective method to solve the accumulated extrapolation error in offline Multi-Agent RL based on the analysis of Section 3. From the implementation perspective, we find that a practical approach towards offline RL is to estimate target $Q$ -value without sampled actions from the policy in training. We propose Implicit Constraint Q-learning (ICQ), which only trusts the seen state-action pairs in datasets for value estimation. Further, we extend ICQ to multi-agent tasks with a value decomposition framework and utilize a $\\lambda$ -return method to balance the variance and bias. ",
447
+ "bbox": [
448
+ 174,
449
+ 827,
450
+ 825,
451
+ 911
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "4.1 The Implicit Constraint Q-learning (ICQ) Approach ",
458
+ "text_level": 1,
459
+ "bbox": [
460
+ 173,
461
+ 90,
462
+ 576,
463
+ 107
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "Based on the analysis of Section 3, we find that the extrapolation error can be effectively alleviated by enforcing the actions within the dataset when calculating the target values, which is the most significant difference between offline and off-policy RL. For a formal comparison of off-policy and offline algorithms, we first introduce the standard Bellman operator $\\mathcal { T } ^ { \\pi }$ as follows: ",
470
+ "bbox": [
471
+ 173,
472
+ 116,
473
+ 825,
474
+ 172
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "equation",
480
+ "img_path": "images/ba57a2f7c46e4d1d82ba14d7cb4c7a0adbb43ffd4ce3c192501e645d631c5b38.jpg",
481
+ "text": "$$\n( { \\cal T } ^ { \\pi } Q ) ( \\tau , a ) \\triangleq Q ( \\tau , a ) + \\mathbb { E } _ { \\tau ^ { \\prime } } [ r + \\gamma \\mathbb { E } _ { a ^ { \\prime } \\sim } \\ [ Q ( \\tau ^ { \\prime } , a ^ { \\prime } ) ] - Q ( \\tau , a ) ] .\n$$",
482
+ "text_format": "latex",
483
+ "bbox": [
484
+ 282,
485
+ 178,
486
+ 715,
487
+ 195
488
+ ],
489
+ "page_idx": 4
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "Many off-policy evaluation methods, such as the Tree Backup [10] and Expected SARSA [41], are designed based on this operator. However, when coming into the offline setting, the standard Bellman operator suffers from the OOD issue as the actions sampled from current policy $\\pi$ are adopted for target $Q$ -value estimation. A natural way to avoid the OOD issue is adopting the importance sampling measure [30]: ",
494
+ "bbox": [
495
+ 173,
496
+ 199,
497
+ 825,
498
+ 270
499
+ ],
500
+ "page_idx": 4
501
+ },
502
+ {
503
+ "type": "equation",
504
+ "img_path": "images/080b4f4b5c2a13c1ed0e70a521f8a1413baf87d219a31857038a58d214064e7c.jpg",
505
+ "text": "$$\n( { \\cal T } ^ { \\pi } Q ) ( \\tau , a ) = Q ( \\tau , a ) + { \\mathbb E } _ { \\tau ^ { \\prime } } [ r + \\gamma { \\mathbb E } _ { a ^ { \\prime } \\sim } \\ [ \\rho ( \\tau ^ { \\prime } , a ^ { \\prime } ) Q ( \\tau ^ { \\prime } , a ^ { \\prime } ) ] - Q ( \\tau , a ) ] ,\n$$",
506
+ "text_format": "latex",
507
+ "bbox": [
508
+ 254,
509
+ 273,
510
+ 743,
511
+ 292
512
+ ],
513
+ "page_idx": 4
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "where ρ(τ 0, a0) , π(a0|τ 0)µ(a0|τ 0) denotes the importance sampling weight. If we can calculate $\\rho ( \\tau ^ { \\prime } , a ^ { \\prime } )$ with action $a ^ { \\prime }$ sampled from $\\mu$ rather than $\\pi$ , the unseen pairs will be avoided for target $Q$ -value estimation. In this case, the extrapolation error is theoretically avoided since $P _ { \\mathrm { s , u } } ^ { \\pi } 0$ . The estimated $Q$ -value based on the above operation would be stable even in complex tasks with enormous action space. However, in most real-world scenarios, it is hard to obtain the exact behavior policy to calculate $\\rho ( \\tau ^ { \\prime } , a ^ { \\prime } )$ , e.g., using expert demonstrations. Fortunately, we find that the solution of following implicit constraint optimization problem is efficient to compute the desired importance sampling weight. ",
518
+ "bbox": [
519
+ 173,
520
+ 305,
521
+ 826,
522
+ 410
523
+ ],
524
+ "page_idx": 4
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "4.1.1 Implicit Constraint Q-learning ",
529
+ "text_level": 1,
530
+ "bbox": [
531
+ 173,
532
+ 422,
533
+ 441,
534
+ 439
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "In offline tasks, the policies similar to the behavior policy are preferred while maximizing the accumulated reward $Q ^ { \\pi } ( \\tau , a )$ , i.e., $D _ { \\mathrm { K L } } ( \\pi \\parallel \\mu ) [ \\tau ] \\le \\dot { \\epsilon }$ . The policy optimization with the behavior regularized constraint can be described in the following problem: ",
541
+ "bbox": [
542
+ 174,
543
+ 446,
544
+ 825,
545
+ 489
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "equation",
551
+ "img_path": "images/9af739444f4fdcb6810f4d66edde2e7402e24bcb70b597cfd2734860f25549bb.jpg",
552
+ "text": "$$\n\\pi _ { k + 1 } = \\arg \\operatorname* { m a x } _ { \\pi } \\mathbb { E } _ { a \\sim \\pi ( \\cdot \\vert \\tau ) } [ Q ^ { \\pi _ { k } } ( \\tau , a ) ] , \\quad \\mathrm { s . t . } \\quad D _ { \\mathrm { K L } } ( \\pi \\mid \\mu ) [ \\tau ] \\leq \\epsilon .\n$$",
553
+ "text_format": "latex",
554
+ "bbox": [
555
+ 274,
556
+ 493,
557
+ 723,
558
+ 520
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "This problem has well studied in many previous works [36, 1, 58]. Note that the objective is a linear function of the decision variables $\\pi$ and all constraints are convex functions. Thus we can obtain the optimal policy $\\pi ^ { * }$ related to $\\mu$ through the KKT condition [9], for which the proof is in Appendix B.4: ",
565
+ "bbox": [
566
+ 174,
567
+ 523,
568
+ 826,
569
+ 566
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "equation",
575
+ "img_path": "images/5a2349dc4b03c02119b82ca0c5cf95d964ddc413a9f25fe37563570ae2477902.jpg",
576
+ "text": "$$\n\\pi _ { k + 1 } ^ { * } ( a \\mid \\tau ) = \\frac { 1 } { Z ( \\tau ) } \\mu ( a \\mid \\tau ) \\exp \\left( \\frac { Q ^ { \\pi _ { k } } ( \\tau , a ) } { \\alpha } \\right) ,\n$$",
577
+ "text_format": "latex",
578
+ "bbox": [
579
+ 336,
580
+ 574,
581
+ 660,
582
+ 609
583
+ ],
584
+ "page_idx": 4
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "where $\\alpha > 0$ is the Lagrangian coefficient and $\\begin{array} { r } { Z ( \\tau ) \\ = \\ \\sum _ { \\tilde { a } } \\mu ( \\tilde { a } \\ | \\ \\tau ) \\exp { \\left( \\frac { 1 } { \\alpha } Q ^ { \\pi _ { k } } ( \\tau , \\tilde { a } ) \\right) } } \\end{array}$ is the normalizing partition function. Next, we calculate the ratio between $\\pi$ and $\\mu$ by relocating $\\mu$ to the left-hand side: ",
589
+ "bbox": [
590
+ 173,
591
+ 613,
592
+ 825,
593
+ 652
594
+ ],
595
+ "page_idx": 4
596
+ },
597
+ {
598
+ "type": "equation",
599
+ "img_path": "images/85106585dd4079f64945a5f8b865c0b0c9eb6c5e307d059aa1448c68084c2b03.jpg",
600
+ "text": "$$\n\\rho ( \\tau , a ) = \\frac { \\pi _ { k + 1 } ^ { * } ( a \\mid \\tau ) } { \\mu ( a \\mid \\tau ) } = \\frac { 1 } { Z ( \\tau ) } \\exp \\left( \\frac { Q ^ { \\pi _ { k } } ( \\tau , a ) } { \\alpha } \\right) .\n$$",
601
+ "text_format": "latex",
602
+ "bbox": [
603
+ 326,
604
+ 650,
605
+ 669,
606
+ 685
607
+ ],
608
+ "page_idx": 4
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "Motivated on Equation 9, we define the Implicit Constraint Q-learning operator as ",
613
+ "bbox": [
614
+ 178,
615
+ 693,
616
+ 712,
617
+ 708
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "equation",
623
+ "img_path": "images/29e0cdab9a7ca01ec2bdbc1e37ad4579608d493212b9ffcd24ab4eca20d30c1e.jpg",
624
+ "text": "$$\n\\mathcal { T } _ { \\mathrm { I C Q } } Q ( \\tau , a ) = r + \\gamma \\mathbb { E } _ { a ^ { \\prime } \\sim \\mu } \\left[ \\frac { 1 } { Z ( \\tau ^ { \\prime } ) } \\exp \\left( \\frac { Q \\left( \\tau ^ { \\prime } , a ^ { \\prime } \\right) } { \\alpha } \\right) Q \\left( \\tau ^ { \\prime } , a ^ { \\prime } \\right) \\right] .\n$$",
625
+ "text_format": "latex",
626
+ "bbox": [
627
+ 279,
628
+ 713,
629
+ 718,
630
+ 748
631
+ ],
632
+ "page_idx": 4
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "Thus we obtain a SARAR-like algorithm which not uses any unseen pairs. ",
637
+ "bbox": [
638
+ 178,
639
+ 752,
640
+ 661,
641
+ 767
642
+ ],
643
+ "page_idx": 4
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "Comparison with previous methods. While BCQ learns an action generator to filter unseen pairs in $Q$ -value estimation, it cannot work in enormous action space due to the error of the generator (see Figure 1). Instead, in the value update of ICQ, we do not use the sampled actions to compute the target values, thus we alleviate extrapolation error effectively. There are some previous works, such as AWAC [29] and AWR [35], addressing the offline problem with similar constrained problem in Equation 7. However, these methods only impose the constraint on the policy loss and adopt the standard Bellman operator to evaluate $Q$ -function, which involves the unseen actions or converges to the value of behavior policy $\\mu$ . Differently, we re-weight the target $Q ( \\tau ^ { \\prime } , a ^ { \\prime } )$ with the importance sampling weight derived from the optimization problem, which makes the estimated value closer to the optimal value function. ",
648
+ "bbox": [
649
+ 173,
650
+ 772,
651
+ 825,
652
+ 911
653
+ ],
654
+ "page_idx": 4
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "4.1.2 Theoretical Analysis ",
659
+ "text_level": 1,
660
+ "bbox": [
661
+ 174,
662
+ 90,
663
+ 367,
664
+ 106
665
+ ],
666
+ "page_idx": 5
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "The ICQ operator in Equation 10 results in a SARSA-like algorithm, which be re-written as: ",
671
+ "bbox": [
672
+ 166,
673
+ 113,
674
+ 779,
675
+ 130
676
+ ],
677
+ "page_idx": 5
678
+ },
679
+ {
680
+ "type": "equation",
681
+ "img_path": "images/3fed399d1ae8c3302050090c47ad214774a7423a9150931cb0233783d17055ab.jpg",
682
+ "text": "$$\n{ \\mathcal T } _ { \\mathrm { I C Q } } Q ( \\tau , a ) = r + \\gamma \\sum _ { a ^ { \\prime } \\in \\mathcal { B } } \\left[ \\frac { 1 } { Z ( \\tau ^ { \\prime } ) } \\mu ( a ^ { \\prime } \\mid \\tau ^ { \\prime } ) \\exp \\left( \\frac { 1 } { \\alpha } Q \\left( \\tau ^ { \\prime } , a ^ { \\prime } \\right) \\right) Q \\left( \\tau ^ { \\prime } , a ^ { \\prime } \\right) \\right] .\n$$",
683
+ "text_format": "latex",
684
+ "bbox": [
685
+ 246,
686
+ 133,
687
+ 751,
688
+ 172
689
+ ],
690
+ "page_idx": 5
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "This update rule can be viewed as a regularized softmax operator [46, 34] in the offline setting. When $\\alpha \\to \\infty$ , $\\mathcal { T } _ { \\mathrm { I C Q } }$ approaches $\\mathcal { T } ^ { \\mu }$ . When $\\alpha 0$ , $\\mathcal { T } _ { \\mathrm { I C Q } }$ becomes the batch-constrained Bellman optimal operator $\\tau _ { \\mathrm { B C Q } }$ [16], which constrains the possible actions with respect to the batch: ",
695
+ "bbox": [
696
+ 173,
697
+ 176,
698
+ 826,
699
+ 219
700
+ ],
701
+ "page_idx": 5
702
+ },
703
+ {
704
+ "type": "equation",
705
+ "img_path": "images/9dc6a2738b990d2ac92dca398708843d19473e34e368183483a7a39e69e946a6.jpg",
706
+ "text": "$$\n\\mathcal { T } _ { \\mathrm { B C Q } } Q ( \\tau , a ) = r + \\gamma \\operatorname* { m a x } _ { a ^ { \\prime } \\in \\mathcal { B } } Q ( \\tau ^ { \\prime } , a ^ { \\prime } ) .\n$$",
707
+ "text_format": "latex",
708
+ "bbox": [
709
+ 374,
710
+ 224,
711
+ 624,
712
+ 247
713
+ ],
714
+ "page_idx": 5
715
+ },
716
+ {
717
+ "type": "text",
718
+ "text": "$\\tau _ { \\mathrm { B C Q } }$ has been shown to converge to the optimal action-value function $Q ^ { * }$ of the batch, which means $\\begin{array} { r } { \\operatorname* { l i m } _ { k \\to \\infty } \\mathcal { T } _ { \\mathrm { B C Q } } ^ { k } Q _ { 0 } = Q ^ { * } } \\end{array}$ for arbitrary $Q _ { 0 }$ . Based on this result, we show that iteratively applying $\\mathcal { T } _ { \\mathrm { I C Q } }$ will result in a $Q$ -function not far away from $Q ^ { * }$ : ",
719
+ "bbox": [
720
+ 174,
721
+ 252,
722
+ 826,
723
+ 297
724
+ ],
725
+ "page_idx": 5
726
+ },
727
+ {
728
+ "type": "text",
729
+ "text": "Theorem 2. Let ${ \\mathcal { T } } _ { \\mathrm { I C Q } } ^ { k } Q _ { 0 }$ denote that the operator $\\mathcal { T } _ { \\mathrm { I C Q } }$ are iteratively applied over an initial stateaction value function $Q _ { 0 }$ for $k$ times. Then, we have $\\forall ( \\tau , a )$ , $\\begin{array} { r } { \\operatorname* { l i m } \\operatorname* { s u p } _ { k \\to \\infty } \\mathcal { T } _ { \\mathrm { I C Q } } ^ { k } Q _ { 0 } ( \\tau , a ) \\leq Q ^ { * } ( \\tau , a ) , } \\end{array}$ ",
730
+ "bbox": [
731
+ 173,
732
+ 303,
733
+ 825,
734
+ 337
735
+ ],
736
+ "page_idx": 5
737
+ },
738
+ {
739
+ "type": "equation",
740
+ "img_path": "images/e2c89325dd03777b26ba1791cf1dbd3fa9dda6d1e1a835251203989cc1cb631e.jpg",
741
+ "text": "$$\n\\operatorname* { l i m i n f } _ { k \\to \\infty } \\ : T _ { \\mathrm { I C Q } } ^ { k } Q _ { 0 } ( \\tau , a ) \\geq Q ^ { * } ( \\tau , a ) - \\frac { \\gamma ( | A | - 1 ) } { ( 1 - \\gamma ) } \\operatorname* { m a x } \\left\\{ \\frac { 1 } { ( \\frac { 1 } { \\alpha } + 1 ) C + 1 } , \\frac { 2 Q _ { \\operatorname* { m a x } } } { 1 + C \\exp ( \\frac { 1 } { \\alpha } ) } \\right\\} ,\n$$",
742
+ "text_format": "latex",
743
+ "bbox": [
744
+ 191,
745
+ 349,
746
+ 777,
747
+ 387
748
+ ],
749
+ "page_idx": 5
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "where |A| is the action space, |Aτ | is the action space for state τ , C , inf τ ∈S inf 2≤i≤|Aτ | µ(a[1] |τ )µ(a[i]|τ ) and $\\mu ( a _ { [ 1 ] } \\mid \\tau )$ denotes the probability of choosing the expert action according to behavioral policy $\\mu$ . Moreover, the upper bound of $\\mathcal { T } _ { \\mathrm { B C Q } } ^ { k } Q _ { 0 } - \\mathcal { T } _ { \\mathrm { I C Q } } ^ { k } Q _ { 0 }$ decays exponentially fast in terms of $\\alpha$ . ",
754
+ "bbox": [
755
+ 173,
756
+ 392,
757
+ 825,
758
+ 446
759
+ ],
760
+ "page_idx": 5
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "While $\\mathcal { T } _ { \\mathrm { I C Q } }$ is not a contraction [5] (similar with the softmax operator), the $Q$ -values are still within a reasonable range. Further, $\\mathcal { T } _ { \\mathrm { I C Q } }$ converges to $\\tau _ { \\mathrm { B C Q } }$ with an exponential rate in terms of $\\alpha$ . Our result also quantifies the difficulty in offline RL problems. Based on the definition of $\\mu ( a _ { [ i ] } | \\tau )$ , $C$ shows the proportion of the expert experience in the dataset. A larger $C$ corresponds to more expert experience, which induces a smaller distance between $\\mathcal { T } _ { \\mathrm { I C Q } } ^ { k } Q _ { 0 } ( \\tau , \\mathbf { \\bar { a } } )$ and $Q ^ { * } ( \\tau , a )$ . In contrast, with a small $C$ , the expert experience is few and the conservatism in learning is necessary. ",
765
+ "bbox": [
766
+ 173,
767
+ 454,
768
+ 825,
769
+ 539
770
+ ],
771
+ "page_idx": 5
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "4.1.3 Algorithm ",
776
+ "text_level": 1,
777
+ "bbox": [
778
+ 173,
779
+ 551,
780
+ 299,
781
+ 568
782
+ ],
783
+ "page_idx": 5
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Based on the derived operator $\\mathcal { T } _ { \\mathrm { I C Q } }$ in Equation 9, we can learn $Q ( \\tau , a ; \\phi )$ by minimizing ",
788
+ "bbox": [
789
+ 173,
790
+ 575,
791
+ 761,
792
+ 592
793
+ ],
794
+ "page_idx": 5
795
+ },
796
+ {
797
+ "type": "equation",
798
+ "img_path": "images/e9581800554594fa28c4422c2ef1c19b22acab36df5358f3001c2586135c1122.jpg",
799
+ "text": "$$\n\\mathcal { I } _ { Q } ( \\phi ) = \\mathbb { E } _ { \\tau , a , \\tau ^ { \\prime } , a ^ { \\prime } \\sim B } \\left[ r + \\gamma \\frac { 1 } { Z ( \\tau ^ { \\prime } ) } \\exp \\left( \\frac { Q \\left( \\tau ^ { \\prime } , a ^ { \\prime } ; \\phi ^ { \\prime } \\right) } { \\alpha } \\right) Q \\left( \\tau ^ { \\prime } , a ^ { \\prime } ; \\phi ^ { \\prime } \\right) - Q \\left( \\tau , a ; \\phi \\right) \\right] ^ { 2 } ,\n$$",
800
+ "text_format": "latex",
801
+ "bbox": [
802
+ 194,
803
+ 597,
804
+ 774,
805
+ 633
806
+ ],
807
+ "page_idx": 5
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "where the $Q$ -network and the target $Q$ -network are parameterized by $\\phi$ and $\\phi ^ { \\prime }$ respectively. ",
812
+ "bbox": [
813
+ 176,
814
+ 637,
815
+ 769,
816
+ 652
817
+ ],
818
+ "page_idx": 5
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "As for the policy training, we project the non-parametric optimal policy $\\pi _ { k + 1 } ^ { * }$ in Equation 8 into the parameterized policy space $\\theta$ by minimizing the following KL distance, which is implemented on the data distribution of the batch: ",
823
+ "bbox": [
824
+ 174,
825
+ 657,
826
+ 823,
827
+ 700
828
+ ],
829
+ "page_idx": 5
830
+ },
831
+ {
832
+ "type": "equation",
833
+ "img_path": "images/6e5cec9bb4c8a14d6fb727d4c0b8c121f6b21bbaf34b42c835e9117748b573ac.jpg",
834
+ "text": "$$\n\\begin{array} { r l } & { \\mathcal { I } _ { \\pi } ( \\theta ) = \\mathbb { E } _ { \\tau \\sim \\mathcal { B } } \\left[ D _ { \\mathrm { K L } } \\left( \\pi _ { k + 1 } ^ { * } \\| \\pi _ { \\theta } \\right) [ \\tau ] \\right] = \\mathbb { E } _ { \\tau \\sim \\mathcal { B } } \\left[ - \\displaystyle \\sum _ { a } \\pi _ { k + 1 } ^ { * } ( a \\mid \\tau ) \\log \\frac { \\pi _ { \\theta } ( a \\mid \\tau ) } { \\pi _ { k + 1 } ^ { * } ( a \\mid \\tau ) } \\right] } \\\\ & { \\quad \\stackrel { ( a ) } { = } \\mathbb { E } _ { \\tau \\sim \\mathcal { B } } \\left[ \\displaystyle \\sum _ { a } \\frac { \\pi _ { k + 1 } ^ { * } ( a \\mid \\tau ) } { \\mu ( a \\mid \\tau ) } \\mu ( a \\mid \\tau ) \\left( - \\log \\pi _ { \\theta } ( a \\mid \\tau ) \\right) \\right] } \\\\ & { \\quad \\stackrel { ( b ) } { = } \\mathbb { E } _ { \\tau , a \\sim \\mathcal { B } } \\left[ - \\displaystyle \\frac { 1 } { Z ( \\tau ) } \\log ( \\pi ( a \\mid \\tau ; \\theta ) ) \\exp \\left( \\frac { Q ( \\tau , a ) } { \\alpha } \\right) \\right] , } \\end{array}\n$$",
835
+ "text_format": "latex",
836
+ "bbox": [
837
+ 204,
838
+ 702,
839
+ 763,
840
+ 823
841
+ ],
842
+ "page_idx": 5
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "where $( a )$ ignores $\\begin{array} { r } { \\mathbb { E } _ { \\tau \\sim B } \\left[ \\sum _ { a } \\pi _ { k + 1 } ^ { * } ( a \\mathbin { \\left| \\begin{array} { l } { \\tau } \\end{array} \\right) } \\log \\pi _ { k + 1 } ^ { * } ( a \\mathbin { \\left| \\begin{array} { l } { \\tau } \\end{array} \\right) } \\right] } \\end{array}$ that is not related to $\\theta$ , and $( b )$ applies the importance sampling weight derived in Equation 9 under forward $\\mathrm { K L }$ constraint. Note that tuning the $\\alpha$ parameter in Equation 15 between 0 and $\\infty$ interpolates between $Q$ -learning and behavioral cloning. See Appendix A for the complete workflow of the ICQ algorithm. We provide two implementation options to compute the normalizing partition function $Z ( \\tau )$ , which is discussed in detail in Appendix D.1. ",
847
+ "bbox": [
848
+ 173,
849
+ 827,
850
+ 825,
851
+ 912
852
+ ],
853
+ "page_idx": 5
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "4.2 Extending ICQ to Multi-Agent Tasks ",
858
+ "text_level": 1,
859
+ "bbox": [
860
+ 174,
861
+ 90,
862
+ 470,
863
+ 106
864
+ ],
865
+ "page_idx": 6
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "In the previous section, we propose an implicit constraint $Q$ -learning framework by re-weighting target $Q$ -value $Q ( \\tau ^ { \\prime } , a ^ { \\prime } )$ in the critic loss, which is efficient to alleviate the extrapolation error. We next extend ICQ to multi-agent tasks. For notational clarity, we name the Multi- Agent version of ICQ as ICQ-MA. ",
870
+ "bbox": [
871
+ 173,
872
+ 116,
873
+ 826,
874
+ 172
875
+ ],
876
+ "page_idx": 6
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "4.2.1 Decomposed Multi-Agent Joint-Policy under Implicit Constraint ",
881
+ "text_level": 1,
882
+ "bbox": [
883
+ 174,
884
+ 185,
885
+ 673,
886
+ 200
887
+ ],
888
+ "page_idx": 6
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "Under the CTDE framework, we have to train individual policies for decentralized execution. Besides, it is also challenging to compute $\\mathbb { E } _ { \\pmb { \\mu } } [ \\rho ( \\pmb { \\tau } ^ { \\prime } , \\pmb { a } ^ { \\prime } ) Q ^ { \\pi } ( \\pmb { \\tau } ^ { \\prime } , \\pmb { a } ^ { \\prime } ) ]$ in multi-agent policy evaluation as its computational complexity is ${ \\cal O } ( | A | ^ { n } )$ . To address the above issues, we first define the joint-policy as $\\pi ( \\textbf { \\em a } | \\textbf { \\em \\tau } ) \\triangleq \\Pi _ { i \\in N } \\pi ^ { i } ( a ^ { i } \\ | \\textbf { \\ } \\tau ^ { i } )$ , and then introduce a mild value-decomposition assumption: ",
893
+ "bbox": [
894
+ 173,
895
+ 208,
896
+ 578,
897
+ 309
898
+ ],
899
+ "page_idx": 6
900
+ },
901
+ {
902
+ "type": "equation",
903
+ "img_path": "images/ef3abb173942037449536c539880343aa087c0c8f8b600ae875de3d20628c40e.jpg",
904
+ "text": "$$\nQ ^ { \\pi } ( \\tau , a ) = \\sum _ { i } w ^ { i } ( \\tau ) Q ^ { i } ( \\tau ^ { i } , a ^ { i } ) + b ( \\tau ) ,\n$$",
905
+ "text_format": "latex",
906
+ "bbox": [
907
+ 235,
908
+ 310,
909
+ 513,
910
+ 343
911
+ ],
912
+ "page_idx": 6
913
+ },
914
+ {
915
+ "type": "image",
916
+ "img_path": "images/0a758c174ca7a421b7a33c14531785c83d7804f6456015f21aabc39130e1040a.jpg",
917
+ "image_caption": [
918
+ "Figure 3: Mixer Network. "
919
+ ],
920
+ "image_footnote": [],
921
+ "bbox": [
922
+ 589,
923
+ 226,
924
+ 828,
925
+ 342
926
+ ],
927
+ "page_idx": 6
928
+ },
929
+ {
930
+ "type": "text",
931
+ "text": "where $w ^ { i } ( \\tau ) \\geq 0$ and $b ( \\tau )$ are generated by the Mixer Network whose inputs are global observation-action history (see ",
932
+ "bbox": [
933
+ 173,
934
+ 347,
935
+ 578,
936
+ 375
937
+ ],
938
+ "page_idx": 6
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "Figure 3). Based on the above assumptions, we propose the decomposed multi-agent joint-policy under implicit constraint in the following theorem: ",
943
+ "bbox": [
944
+ 174,
945
+ 376,
946
+ 823,
947
+ 402
948
+ ],
949
+ "page_idx": 6
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "Theorem 3. Assuming the joint action-value function is linearly decomposed, we can decompose the multi-agent joint-policy under implicit constraint as follows ",
954
+ "bbox": [
955
+ 171,
956
+ 405,
957
+ 823,
958
+ 433
959
+ ],
960
+ "page_idx": 6
961
+ },
962
+ {
963
+ "type": "equation",
964
+ "img_path": "images/c1acef027690f3a5594edd6f2c0fbc720fc80531768aaa53efd9d2a4fed8431c.jpg",
965
+ "text": "$$\n\\pi = \\underset { \\pi ^ { 1 } , \\ldots , \\pi ^ { n } } { \\arg \\operatorname* { m a x } } \\sum _ { i } \\mathbb { E } _ { \\tau ^ { i } , a ^ { i } \\sim \\mathcal { B } } \\left[ \\frac { 1 } { Z ^ { i } ( \\tau ^ { i } ) } \\log ( \\pi ^ { i } ( a ^ { i } \\mid \\tau ^ { i } ) ) \\exp \\left( \\frac { w ^ { i } ( \\tau ) Q ^ { i } ( \\tau ^ { i } , a ^ { i } ) } { \\alpha } \\right) \\right] ,\n$$",
966
+ "text_format": "latex",
967
+ "bbox": [
968
+ 235,
969
+ 435,
970
+ 761,
971
+ 473
972
+ ],
973
+ "page_idx": 6
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "where $\\begin{array} { r } { Z ^ { i } ( \\tau ^ { i } ) = \\sum _ { \\tilde { a } ^ { i } } \\mu ^ { i } ( \\tilde { a } ^ { i } \\mid \\tau ^ { i } ) \\exp \\left( \\frac { 1 } { \\alpha } w ^ { i } ( \\tau ) Q ^ { i } ( \\tau ^ { i } , \\tilde { a } ^ { i } ) \\right) } \\end{array}$ is the normalizing partition function. ",
978
+ "bbox": [
979
+ 171,
980
+ 476,
981
+ 797,
982
+ 494
983
+ ],
984
+ "page_idx": 6
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "The decomposed multi-agent joint-policy has a concise form. We can train individual policies $\\pi ^ { i }$ by minimizing ",
989
+ "bbox": [
990
+ 173,
991
+ 502,
992
+ 823,
993
+ 532
994
+ ],
995
+ "page_idx": 6
996
+ },
997
+ {
998
+ "type": "equation",
999
+ "img_path": "images/09bc5baaa77e4e482d31f30bd16a3b6036940e1f760b1a57f288fb5d7df158a0.jpg",
1000
+ "text": "$$\n\\mathcal { I } _ { \\pi } ( \\theta ) = \\sum _ { i } \\mathbb { E } _ { \\tau ^ { i } , a ^ { i } \\sim \\mathcal { B } } \\left[ - \\frac { 1 } { Z ^ { i } ( \\tau ^ { i } ) } \\log ( \\pi ^ { i } ( a ^ { i } \\mid \\tau ^ { i } ; \\theta _ { i } ) ) \\exp \\left( \\frac { w ^ { i } ( \\tau ) Q ^ { i } ( \\tau ^ { i } , a ^ { i } ) } { \\alpha } \\right) \\right] .\n$$",
1001
+ "text_format": "latex",
1002
+ "bbox": [
1003
+ 232,
1004
+ 534,
1005
+ 766,
1006
+ 573
1007
+ ],
1008
+ "page_idx": 6
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Besides, $w ^ { i } ( \\tau )$ achieves the trade-off between the roles of agents. If some agents have important roles, the value of corresponding $w ^ { i } ( \\tau )$ is relatively large. Also, if $w ^ { i } ( \\pmb { \\tau } ) 0$ , $\\pi ^ { i }$ is approximately considered as the behavior cloning policy. As for the policy evaluation, we train $Q ( \\tau , a ; \\phi , \\psi )$ by minimizing ",
1013
+ "bbox": [
1014
+ 173,
1015
+ 575,
1016
+ 826,
1017
+ 631
1018
+ ],
1019
+ "page_idx": 6
1020
+ },
1021
+ {
1022
+ "type": "equation",
1023
+ "img_path": "images/55d14d064df527fb2d203d2763a28cf685c3285e60700b3a50cd67e989f6e742.jpg",
1024
+ "text": "$$\n\\mathcal { I } _ { Q } ( \\phi , \\psi ) = \\mathbb { E } _ { B } \\left[ \\sum _ { t \\geq 0 } ( \\gamma \\lambda ) ^ { t } \\left( r _ { t } + \\gamma \\frac { 1 } { Z ( \\tau _ { t + 1 } ) } \\exp \\left( \\frac { Q ( \\tau _ { t + 1 } , a _ { t + 1 } ) } { \\alpha } \\right) Q ( \\tau _ { t + 1 } , a _ { t + 1 } ) - Q ( \\tau _ { t } , a _ { t } ) \\right) \\right] ^ { 2 }\n$$",
1025
+ "text_format": "latex",
1026
+ "bbox": [
1027
+ 181,
1028
+ 635,
1029
+ 839,
1030
+ 685
1031
+ ],
1032
+ "page_idx": 6
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "4.2.2 Multi-Agent Value Estimation with $\\lambda$ -return ",
1037
+ "text_level": 1,
1038
+ "bbox": [
1039
+ 173,
1040
+ 723,
1041
+ 534,
1042
+ 739
1043
+ ],
1044
+ "page_idx": 6
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "As the offline dataset contains complete behavior trajectories, it is natural to accelerate the convergence of ICQ with the $n$ -step method. Here we adopt $Q ( \\lambda )$ [27] to improve the estimation of ICQ, which weights the future temporal difference signal with a decay sequence $\\lambda ^ { t }$ . Further, the constraint in Equation 7 implicitly meets the convergence condition of $\\bar { Q ( \\lambda ) }$ . Therefore, we extend the ICQ operator in Equation 10 to $n$ -step estimation, which is similar to $\\overset { \\triangledown } { Q } ( \\lambda )$ : ",
1049
+ "bbox": [
1050
+ 173,
1051
+ 747,
1052
+ 826,
1053
+ 818
1054
+ ],
1055
+ "page_idx": 6
1056
+ },
1057
+ {
1058
+ "type": "equation",
1059
+ "img_path": "images/15eaed37a2362e0a37dd1b4058bb435bdfc8ec82c3599c2ad31f23b8cf8f51cd.jpg",
1060
+ "text": "$$\n( \\mathcal { T } _ { \\mathrm { I C Q } } ^ { \\lambda } Q ) ( \\tau , a ) \\triangleq Q ( \\tau , a ) + \\mathbb { E } _ { \\mu } \\left[ \\sum _ { \\mathfrak { t } \\geq 0 } ( \\gamma \\lambda ) ^ { \\mathfrak { t } } \\left( r _ { t } + \\gamma \\rho ( \\tau _ { t + 1 } , a _ { t + 1 } ) Q ( \\tau _ { t + 1 } , a _ { t + 1 } ) - Q ( \\tau _ { t } , a _ { t } ) \\right) \\right] ,\n$$",
1061
+ "text_format": "latex",
1062
+ "bbox": [
1063
+ 181,
1064
+ 819,
1065
+ 818,
1066
+ 871
1067
+ ],
1068
+ "page_idx": 6
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "where $\\begin{array} { r } { \\rho ( \\tau _ { t } , a _ { t } ) = \\frac { 1 } { Z ( \\tau _ { t } ) } \\exp ( \\frac { 1 } { \\alpha } Q ( \\tau _ { t } , a _ { t } ) ) } \\end{array}$ and hyper-parameter $0 \\leq \\lambda \\leq 1$ provides the balance between bias and variance. ",
1073
+ "bbox": [
1074
+ 174,
1075
+ 880,
1076
+ 825,
1077
+ 911
1078
+ ],
1079
+ "page_idx": 6
1080
+ },
1081
+ {
1082
+ "type": "image",
1083
+ "img_path": "images/e0c70428efc90c9363319c61d5f7af4757908917bf510852b20eb780b52a2c47.jpg",
1084
+ "image_caption": [
1085
+ "Figure 4: Performance comparison in offline StarCraft II tasks. "
1086
+ ],
1087
+ "image_footnote": [],
1088
+ "bbox": [
1089
+ 174,
1090
+ 90,
1091
+ 821,
1092
+ 210
1093
+ ],
1094
+ "page_idx": 7
1095
+ },
1096
+ {
1097
+ "type": "table",
1098
+ "img_path": "images/5674c11431163b7fa6c62d1b025538d487c266c54175209256befc368e2a2d0e.jpg",
1099
+ "table_caption": [
1100
+ "Table 1: Performance of ICQ with five offline RL baselines on the single-agent offline tasks with the normalized score metric proposed by D4RL benchmark [14], averaged over three random seeds with standard deviation. Scores roughly range from 0 to 100, where 0 corresponds to a random policy performance and 100 indicates an expert. The results for BC, BCQ, CQL, AWR and BRAC-p are taken from [14, 22]. "
1101
+ ],
1102
+ "table_footnote": [],
1103
+ "table_body": "<table><tr><td>Dataset type</td><td>Environment</td><td>ICQ (ours)</td><td>BC</td><td>BCQ</td><td>CQL</td><td>AWR</td><td>BRAC-p</td></tr><tr><td>fixed</td><td>antmaze-umaze</td><td>85.0 ±2.7</td><td>65.0</td><td>78.9</td><td>74.0</td><td>56.0</td><td>50.0</td></tr><tr><td>play</td><td>antmaze-medium</td><td>80.0 ±1.3</td><td>0.0</td><td>0.0</td><td>61.2</td><td>0.0</td><td>0.0</td></tr><tr><td>play</td><td>antmaze-large</td><td>51.0 ± 4.8</td><td>0.0</td><td>6.7</td><td>15.8</td><td>0.0</td><td>0.0</td></tr><tr><td>diverse</td><td>antmaze-umaze</td><td>65.0±3.3</td><td>55.0</td><td>55.0</td><td>84.0</td><td>70.3</td><td>40.0</td></tr><tr><td>diverse</td><td>antmaze-medium</td><td>65.0 ± 3.9</td><td>0.0</td><td>0.0</td><td>53.7</td><td>0.0</td><td>0.0</td></tr><tr><td>diverse</td><td>antmaze-large</td><td>44.0 ±4.2</td><td>0.0</td><td>2.2</td><td>14.9</td><td>0.0</td><td>0.0</td></tr><tr><td>expert</td><td>adroit-door</td><td>103.9 ± 3.6</td><td>101.2</td><td>99.0</td><td>1</td><td>102.9</td><td>-0.3</td></tr><tr><td>expert</td><td>adroit-relocate</td><td>109.5 ± 11.1</td><td>101.3</td><td>41.6</td><td></td><td>91.5</td><td>-0.3</td></tr><tr><td>expert</td><td>adroit-pen</td><td>123.8 ± 22.1</td><td>85.1</td><td>114.9</td><td>=</td><td>111.0</td><td>-3.5</td></tr><tr><td>expert</td><td>adroit-hammer</td><td>128.3 ± 2.5</td><td>125.6</td><td>107.2</td><td>-</td><td>39.0</td><td>0.3</td></tr><tr><td>human</td><td>adroit-door</td><td>6.4±2.4</td><td>0.5</td><td>-0.0</td><td>9.1</td><td>0.4</td><td>-0.3</td></tr><tr><td>human</td><td>adroit-relocate</td><td>1.5 ± 0.7</td><td>-0.0</td><td>-0.1</td><td>0.35</td><td>-0.0</td><td>-0.3</td></tr><tr><td>human</td><td>adroit-pen</td><td>91.3 ± 10.3</td><td>34.4</td><td>68.9</td><td>55.8</td><td>12.3</td><td>8.1</td></tr><tr><td>human</td><td>adroit-hammer</td><td>2.0±0.9</td><td>1.5</td><td>0.5</td><td>2.1</td><td>1.2</td><td>0.3</td></tr><tr><td>medium</td><td>walker2d</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td> medium</td><td></td><td>71.8±10.7 55.6±5.7</td><td>66.6</td><td>53.1</td><td>79.2</td><td>17.4</td><td>77.5</td></tr><tr><td>medium</td><td>hopper</td><td></td><td>49.0</td><td>54.5</td><td>58.0</td><td>35.9</td><td>32.7</td></tr><tr><td></td><td>halfcheetah</td><td>42.5±1.3</td><td>36.1</td><td>40.7</td><td>44.4</td><td>37.4</td><td>43.8</td></tr><tr><td>med-expert</td><td>walker2d</td><td>98.9 ± 5.2</td><td>66.8</td><td>57.5</td><td>98.7</td><td>53.8</td><td>76.9</td></tr><tr><td>med-expert</td><td>hopper</td><td>109.0±13.6</td><td>111.9</td><td>110.9</td><td>111.0</td><td>27.1</td><td>1.9</td></tr><tr><td>med-expert</td><td>halfcheetah</td><td>110.3 ±1.1</td><td>35.8</td><td>64.7</td><td>104.8</td><td>52.7</td><td>44.2</td></tr></table>",
1104
+ "bbox": [
1105
+ 173,
1106
+ 328,
1107
+ 834,
1108
+ 647
1109
+ ],
1110
+ "page_idx": 7
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "5 Related Work ",
1115
+ "text_level": 1,
1116
+ "bbox": [
1117
+ 173,
1118
+ 676,
1119
+ 321,
1120
+ 694
1121
+ ],
1122
+ "page_idx": 7
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "As ICQ-MA seems to be the first work addressing the accumulated extrapolation error issue in offline MARL, we briefly review the prior single-agent offline RL works here, which can be divided into three categories: dynamic programming, model-based, and safe policy improvement methods. ",
1127
+ "bbox": [
1128
+ 174,
1129
+ 710,
1130
+ 825,
1131
+ 752
1132
+ ],
1133
+ "page_idx": 7
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "Dynamic Programming. Policy constraint methods in dynamic programming [20, 3, 58, 51, 17] are most closely related to our work. They attempt to enforce $\\pi$ to be close to $\\mu$ under KL-divergence, Wasserstein distance [53], or MMD [47], and then only use actions sampled from $\\pi$ in dynamic programming. For example, BCQ [16] constrains the mismatch between the state-action visitation of the policy and the state-action pairs contained in the batch by using a state-conditioned generative model to produce only previously seen actions. AWR [35] and ABM [42] attempt to estimate the value function of the behavior policy via Monte-Carlo or $\\mathrm { T D } ( \\lambda )$ . Unlike these methods, our algorithm, ICQ, estimates the $Q$ -function of the current policy using actions sampled from $\\mu$ , enabling much more efficient learning. Another series of methods [52, 32, 33] aim to estimate uncertainty to determine the trustworthiness of a $Q$ -value prediction. However, the high-fidelity requirements for uncertainty estimates limit the performance of algorithms. ",
1138
+ "bbox": [
1139
+ 173,
1140
+ 758,
1141
+ 825,
1142
+ 911
1143
+ ],
1144
+ "page_idx": 7
1145
+ },
1146
+ {
1147
+ "type": "image",
1148
+ "img_path": "images/f06a9d9eae53c0b5d3ae91f5ac0fa7cec098dfee9b4700a98025da92dd51f4ad.jpg",
1149
+ "image_caption": [
1150
+ "Figure 5: Module ablation study on MMM map. "
1151
+ ],
1152
+ "image_footnote": [],
1153
+ "bbox": [
1154
+ 186,
1155
+ 103,
1156
+ 805,
1157
+ 248
1158
+ ],
1159
+ "page_idx": 8
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "Model-based and Safe Policy Improvement. Model-based methods [18, 50, 13, 56, 19] attempt to learn the model from offline data, with minimal modification to the algorithm. Nevertheless, modeling MDPs with very high-dimensional image observations and long horizons is a major open problem, which leads to limited algorithm performance [24]. Besides, safe policy improvement methods [23, 44, 6, 11] require a separately estimated model to $\\mu$ to deal with unseen actions. However, accurately estimating $\\mu$ is especially hard if the data come from multiple sources [29]. ",
1164
+ "bbox": [
1165
+ 173,
1166
+ 297,
1167
+ 826,
1168
+ 381
1169
+ ],
1170
+ "page_idx": 8
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "6 Experiments ",
1175
+ "text_level": 1,
1176
+ "bbox": [
1177
+ 174,
1178
+ 401,
1179
+ 312,
1180
+ 417
1181
+ ],
1182
+ "page_idx": 8
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "In this section, we evaluate ICQ-MA and ICQ on multi-agent (StarCraft II) and single-agent (D4RL) offline benchmarks and compare them with state-of-the-art methods. Then, we conduct ablation studies on ICQ-MA. We aim to better understand each component’s effect and further analyze the main driver for the performance improvement. ",
1187
+ "bbox": [
1188
+ 174,
1189
+ 431,
1190
+ 825,
1191
+ 488
1192
+ ],
1193
+ "page_idx": 8
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "6.1 Multi-Agent Offline Tasks on StarCraft II ",
1198
+ "text_level": 1,
1199
+ "bbox": [
1200
+ 176,
1201
+ 505,
1202
+ 504,
1203
+ 520
1204
+ ],
1205
+ "page_idx": 8
1206
+ },
1207
+ {
1208
+ "type": "text",
1209
+ "text": "We first construct the multi-agent offline datasets based on ten maps in StarCraft II (see Table 2 in Appendix E). The datasets are made by collecting DOP [55] training data. All maps share the same reward function, and each map includes 3000 trajectories. We are interested in non-expert data or multi-source data. Therefore, we artificially divide behavior policies into three levels based on the average episode return (see Table 3 in Appendix E). Then, we evenly mix data of three levels. ",
1210
+ "bbox": [
1211
+ 174,
1212
+ 530,
1213
+ 825,
1214
+ 599
1215
+ ],
1216
+ "page_idx": 8
1217
+ },
1218
+ {
1219
+ "type": "text",
1220
+ "text": "We compare our method against QMIX [39], multi-agent version of BCQ (BCQ-MA), CQL (CQLMA), and behavior cloning (BC-MA). To maintain consistency, BCQ-MA, CQL-MA, and BC-MA share the same linear value decomposition structure with ICQ-MA. Details for baseline implementations are in Appendix D.2. Each algorithm runs with five seeds, where the performance is evaluated ten times every 50 episodes. Details for hyper-parameters are in Appendix E.1. ",
1221
+ "bbox": [
1222
+ 174,
1223
+ 606,
1224
+ 825,
1225
+ 676
1226
+ ],
1227
+ "page_idx": 8
1228
+ },
1229
+ {
1230
+ "type": "text",
1231
+ "text": "We investigate ICQ-MA’s performance compared to common baselines in different scenarios. Results in Figure 4 show that ICQ-MA significantly outperforms all baselines and achieves state-of-the-art performance in all maps. QMIX, BCQ-MA, and CQL-MA have poor performances due to the accumulated extrapolation error. Interestingly, since BC does not depend on the policy evaluation, it is not subject to extrapolation error. Thus BC-MA has a sound performance as StarCraft II is near deterministic. We implement BCQ and CQL according to their official code\\*. ",
1232
+ "bbox": [
1233
+ 174,
1234
+ 681,
1235
+ 825,
1236
+ 765
1237
+ ],
1238
+ "page_idx": 8
1239
+ },
1240
+ {
1241
+ "type": "text",
1242
+ "text": "6.2 Single-Agent Offline Tasks on D4RL ",
1243
+ "text_level": 1,
1244
+ "bbox": [
1245
+ 176,
1246
+ 781,
1247
+ 464,
1248
+ 797
1249
+ ],
1250
+ "page_idx": 8
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "To compare with current offline methods, we evaluate ICQ in the single offline tasks (e.g., D4RL), including gym domains, Adroit tasks [38] and AntMaze. Specifically, adroit tasks require controlling a 24-DoF robotic hand to imitate human behavior. AntMaze requires composing parts of sub-optimal trajectories to form more optimal policies for reaching goals on a MuJoco Ant robot. Experimental result in Table 1 shows that ICQ achieves the state-of-the-art performance in many tasks compared with the current offline methods. ",
1255
+ "bbox": [
1256
+ 174,
1257
+ 806,
1258
+ 825,
1259
+ 890
1260
+ ],
1261
+ "page_idx": 8
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "6.3 Ablation Study ",
1266
+ "text_level": 1,
1267
+ "bbox": [
1268
+ 174,
1269
+ 92,
1270
+ 316,
1271
+ 106
1272
+ ],
1273
+ "page_idx": 9
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "We conduct ablation studies of ICQ-MA in the MMM map of StarCraft II to study the effect of different modules, value estimation, important hyper-parameters, and data quality. ",
1278
+ "bbox": [
1279
+ 173,
1280
+ 116,
1281
+ 823,
1282
+ 145
1283
+ ],
1284
+ "page_idx": 9
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "Module and Value Estimation Analysis. From Figure 5, we find that if we adopt other $Q$ -value estimation methods in implicit constraint policies (e.g., $Q ( \\lambda )$ [27] or Tree Backup), the corresponding algorithms (ICQ-MA $( Q ( \\lambda ) )$ or ICQ-MA (Tree Backup)) have poor performances and incorrect estimated values. Suppose we train ICQ-MA without decomposed implicit constraint module (e.g., ICQ-MA (w/o decom)). In that case, the algorithm’s performance is poor, although the estimated value is smaller than the true value, confirming the necessity of decomposed policy. Besides, the performance of one-step estimation (ICQ-MA (one step)) indicates $n$ -step estimation is not the critical factor for improving ICQ-MA, while one-step estimation will introduce more bias. ",
1289
+ "bbox": [
1290
+ 174,
1291
+ 150,
1292
+ 825,
1293
+ 262
1294
+ ],
1295
+ "page_idx": 9
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "The Parameter $\\alpha$ . The Lagrangian coefficient $\\alpha$ of implicit constraint operator directly affects the intensity of constraint, which is a critical parameter for the performance. A smaller $\\alpha$ leads to a relaxing constraint and tends to maximize reward. If $\\alpha 0$ , ICQ-MA is simplified to $Q$ - learning [57] while $\\alpha \\to \\infty$ results in that ICQ-MA is equivalent to behavior cloning. Indeed, there is an intermediate value that performs best that can best provide the trade-off as in Appendix C.4. ",
1300
+ "bbox": [
1301
+ 174,
1302
+ 268,
1303
+ 825,
1304
+ 338
1305
+ ],
1306
+ "page_idx": 9
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "Data Quality. It is also worth studying the performance of ICQ-MA and BC-MA with varying data quality. Specifically, we make the datasets from behavior policies of different levels (e.g., Good, Medium, and Poor). As shown in Figure 9 in Appendix C.4, ICQ-MA is not sensitive to the data quality, while the performance of BC-MA drops drastically with the data quality deteriorates. Results confirm that ICQ-MA is robust to the data quality while BC-MA strongly relies on the data quality. ",
1311
+ "bbox": [
1312
+ 174,
1313
+ 343,
1314
+ 825,
1315
+ 414
1316
+ ],
1317
+ "page_idx": 9
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "Computational Complexity. With the same training steps in SMAC, BCQ-MA consumes $70 \\%$ time of ICQ-MA. Although ICQ-MA takes a little long time compared with BCQ-MA, it achieves excellent performance in benchmarks. The computing infrastructure for running experiments is a server with an AMD EPYC 7702 64-Core Processor CPU. ",
1322
+ "bbox": [
1323
+ 174,
1324
+ 420,
1325
+ 825,
1326
+ 474
1327
+ ],
1328
+ "page_idx": 9
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "7 Conclusion ",
1333
+ "text_level": 1,
1334
+ "bbox": [
1335
+ 174,
1336
+ 494,
1337
+ 299,
1338
+ 511
1339
+ ],
1340
+ "page_idx": 9
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "In this work, we demonstrate a critical problem in multi-agent off-policy reinforcement learning with finite data, where it introduces accumulated extrapolation error in the number of agents. We empirically show the current offline algorithms are ineffective in the multi-agent offline setting. Therefore, we propose the Implicit Constraint Q-learning (ICQ) method, which effectively alleviates extrapolation error by only trusting the state-action pairs in datasets. To the best of our knowledge, the multi-agent version of ICQ is the first multi-agent offline algorithm capable of learning from complex multi-agent datasets. Due to the importance of offline tasks and multi-agent systems, we sincerely hope our algorithms can be a solid foothold for applying RL to practical applications. ",
1345
+ "bbox": [
1346
+ 174,
1347
+ 525,
1348
+ 826,
1349
+ 637
1350
+ ],
1351
+ "page_idx": 9
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "Acknowledgments and Disclosure of Funding ",
1356
+ "text_level": 1,
1357
+ "bbox": [
1358
+ 174,
1359
+ 655,
1360
+ 555,
1361
+ 674
1362
+ ],
1363
+ "page_idx": 9
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "This work was funded by the National Natural Science Foundation of China (ID:U1813216), National Key Research and Development Project of China under Grant 2017YFC0704100 and Grant 2016YFB0901900, in part by the National Natural Science Foundation of China under Grant 61425027, the 111 International Collaboration Program of China under Grant BP2018006, and BNRist Program (BNR2019TD01009) and the National Innovation Center of High Speed Train R&D project (CX/KJ-2020-0006). ",
1368
+ "bbox": [
1369
+ 174,
1370
+ 686,
1371
+ 825,
1372
+ 770
1373
+ ],
1374
+ "page_idx": 9
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "We sincerely appreciate reviewers, whose valuable comments have benefited our paper significantly! ",
1379
+ "bbox": [
1380
+ 173,
1381
+ 776,
1382
+ 823,
1383
+ 791
1384
+ ],
1385
+ "page_idx": 9
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "References ",
1390
+ "text_level": 1,
1391
+ "bbox": [
1392
+ 174,
1393
+ 90,
1394
+ 266,
1395
+ 106
1396
+ ],
1397
+ "page_idx": 10
1398
+ },
1399
+ {
1400
+ "type": "text",
1401
+ "text": "[1] Abbas Abdolmaleki, Jost Tobias Springenberg, Yuval Tassa, Remi Munos, Nicolas Heess, and Martin Riedmiller. Maximum a posteriori policy optimisation. In International Conference on Learning Representations, 2018. \n[2] Jeffrey L Adler and Victor J Blue. A cooperative multi-agent transportation management and route guidance system. Transportation Research Part C: Emerging Technologies, 10(5-6):433– 454, 2002. \n[3] Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning, pages 104–114. PMLR, 2020. \n[4] Anurag Ajay, Aviral Kumar, Pulkit Agrawal, Sergey Levine, and Ofir Nachum. OPAL: Offline primitive discovery for accelerating offline reinforcement learning. In International Conference on Learning Representations, 2020. \n[5] Kavosh Asadi and Michael L Littman. An alternative softmax operator for reinforcement learning. In International Conference on Machine Learning, pages 243–252. PMLR, 2017. \n[6] Felix Berkenkamp, Matteo Turchetta, Angela P Schoellig, and Andreas Krause. Safe modelbased reinforcement learning with stability guarantees. arXiv preprint arXiv:1705.08551, 2017. \n[7] Duncan S Callaway and Ian A Hiskens. Achieving controllability of electric loads. Proceedings of the IEEE, 99(1):184–199, 2010. \n[8] Yuanjiang Cao, Xiaocong Chen, Lina Yao, Xianzhi Wang, and Wei Emma Zhang. Adversarial attacks and detection on reinforcement learning-based interactive recommender systems. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 1669–1672, 2020. \n[9] Axel Dreves, Francisco Facchinei, Christian Kanzow, and Simone Sagratella. On the solution of the KKT conditions of generalized nash equilibrium problems. SIAM Journal on Optimization, 21(3):1082–1108, 2011. \n[10] Damien Ernst, Pierre Geurts, and Louis Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6:503–556, 2005. \n[11] Benjamin Eysenbach, Shixiang Gu, Julian Ibarz, and Sergey Levine. Leave no trace: Learning to reset for safe and autonomous reinforcement learning. arXiv preprint arXiv:1711.06782, 2017. \n[12] Rasool Fakoor, Pratik Chaudhari, and Alexander J Smola. P3O: Policy-on policy-off policy optimization. In Uncertainty in Artificial Intelligence, pages 1017–1027. PMLR, 2020. \n[13] Mehrdad Farajtabar, Yinlam Chow, and Mohammad Ghavamzadeh. More robust doubly robust off-policy evaluation. In International Conference on Machine Learning, pages 1447–1456. PMLR, 2018. \n[14] Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4RL: Datasets for deep data-driven reinforcement learning. arXiv preprint arXiv:2004.07219, 2020. \n[15] Scott Fujimoto, Edoardo Conti, Mohammad Ghavamzadeh, and Joelle Pineau. Benchmarking batch deep reinforcement learning algorithms. arXiv preprint arXiv:1910.01708, 2019. \n[16] Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In International Conference on Machine Learning, pages 2052–2062. PMLR, 2019. \n[17] Natasha Jaques, Asma Ghandeharioun, Judy Hanwen Shen, Craig Ferguson, Agata Lapedriza, Noah Jones, Shixiang Gu, and Rosalind Picard. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog. arXiv preprint arXiv:1907.00456, 2019. \n[18] Nan Jiang and Lihong Li. Doubly robust off-policy value evaluation for reinforcement learning. In International Conference on Machine Learning, pages 652–661. PMLR, 2016. \n[19] Gregory Kahn, Adam Villaflor, Pieter Abbeel, and Sergey Levine. Composable actionconditioned predictors: Flexible off-policy learning for robot navigation. In Conference on Robot Learning, pages 806–816. PMLR, 2018. \n[20] Dmitry Kalashnikov, Alex Irpan, Peter Pastor, Julian Ibarz, Alexander Herzog, Eric Jang, Deirdre Quillen, Ethan Holly, Mrinal Kalakrishnan, Vincent Vanhoucke, et al. Scalable deep reinforcement learning for vision-based robotic manipulation. In Conference on Robot Learning, pages 651–673. PMLR, 2018. \n[21] Aviral Kumar, Justin Fu, Matthew Soh, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. In Advances in Neural Information Processing Systems, pages 11784–11794, 2019. \n[22] Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning. arXiv preprint arXiv:2006.04779, 2020. \n[23] Romain Laroche, Paul Trichelair, and Remi Tachet Des Combes. Safe policy improvement with baseline bootstrapping. In International Conference on Machine Learning, pages 3652–3661. PMLR, 2019. \n[24] Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020. \n[25] Chenghao Li, Chengjie Wu, Tonghan Wang, Jun Yang, Qianchuan Zhao, and Chongjie Zhang. Celebrating diversity in shared multi-agent reinforcement learning. arXiv preprint arXiv:2106.02195, 2021. \n[26] Xiaoteng Ma, Yiqin Yang, Chenghao Li, Yiwen Lu, Qianchuan Zhao, and Jun Yang. Modeling the interaction between agents in cooperative multi-agent reinforcement learning. In Proceedings of the 20th International Conference on Autonomous Agents and MultiAgent Systems, pages 853–861, 2021. \n[27] Rémi Munos. $\\mathrm { Q } ( \\lambda )$ with off-policy corrections. In Algorithmic Learning Theory: International Conference, ALT 2016, Bari, Italy, October 19-21, 2016, Proceedings, volume 9925, page 305. Springer, 2016. \n[28] Ofir Nachum, Yinlam Chow, Bo Dai, and Lihong Li. DualDICE: Behavior-agnostic estimation of discounted stationary distribution corrections. Advances in Neural Information Processing Systems, 32:2318–2328, 2019. \n[29] Ashvin Nair, Murtaza Dalal, Abhishek Gupta, and Sergey Levine. Accelerating online reinforcement learning with offline datasets. arXiv preprint arXiv:2006.09359, 2020. \n[30] Radford M Neal. Annealed importance sampling. Statistics and computing, 11(2):125–139, 2001. \n[31] Frans A Oliehoek, Christopher Amato, et al. A concise introduction to decentralized POMDPs, volume 1. Springer, 2016. \n[32] Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 8626–8638, 2018. \n[33] Brendan O’Donoghue, Ian Osband, Remi Munos, and Volodymyr Mnih. The uncertainty bellman equation and exploration. In International Conference on Machine Learning, pages 3836–3845, 2018. \n[34] Ling Pan, Qingpeng Cai, and Longbo Huang. Softmax deep double deterministic policy gradients. In Advances in Neural Information Processing Systems, volume 33, pages 11767– 11777, 2020. \n[35] Xue Bin Peng, Aviral Kumar, Grace Zhang, and Sergey Levine. Advantage-weighted regression: Simple and scalable off-policy reinforcement learning. arXiv preprint arXiv:1910.00177, 2019. \n[36] Jan Peters, Katharina Mulling, and Yasemin Altun. Relative entropy policy search. In AAAI Conference on Artificial Intelligence, volume 24, 2010. \n[37] Michael Rabbat and Robert Nowak. Distributed optimization in sensor networks. In Proceedings of the 3rd international symposium on Information processing in sensor networks, pages 20–27, 2004. \n[38] Aravind Rajeswaran, Vikash Kumar, Abhishek Gupta, Giulia Vezzani, John Schulman, Emanuel Todorov, and Sergey Levine. Learning complex dexterous manipulation with deep reinforcement learning and demonstrations. arXiv preprint arXiv:1709.10087, 2017. ",
1402
+ "bbox": [
1403
+ 173,
1404
+ 95,
1405
+ 828,
1406
+ 912
1407
+ ],
1408
+ "page_idx": 10
1409
+ },
1410
+ {
1411
+ "type": "text",
1412
+ "text": "",
1413
+ "bbox": [
1414
+ 171,
1415
+ 46,
1416
+ 828,
1417
+ 917
1418
+ ],
1419
+ "page_idx": 11
1420
+ },
1421
+ {
1422
+ "type": "text",
1423
+ "text": "[39] Tabish Rashid, Mikayel Samvelyan, Christian Schroeder, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. QMIX: Monotonic value function factorisation for deep multi-agent reinforcement learning. In International Conference on Machine Learning, pages 4295–4304, 2018. ",
1424
+ "bbox": [
1425
+ 174,
1426
+ 92,
1427
+ 828,
1428
+ 146
1429
+ ],
1430
+ "page_idx": 12
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "[40] Mikayel Samvelyan, Tabish Rashid, Christian Schroeder de Witt, Gregory Farquhar, Nantas Nardelli, Tim GJ Rudner, Chia-Man Hung, Philip HS Torr, Jakob Foerster, and Shimon Whiteson. The StarCraft multi-agent challenge. In International Conference on Autonomous Agents and Multiagent Systems, pages 2186–2188, 2019. ",
1435
+ "bbox": [
1436
+ 176,
1437
+ 152,
1438
+ 821,
1439
+ 208
1440
+ ],
1441
+ "page_idx": 12
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "text": "[41] Juan C Santamaria, Richard S Sutton, and Ashwin Ram. Experiments with reinforcement learning in problems with continuous state and action spaces. Adaptive behavior, 6(2):163–217, 1997. ",
1446
+ "bbox": [
1447
+ 173,
1448
+ 213,
1449
+ 823,
1450
+ 256
1451
+ ],
1452
+ "page_idx": 12
1453
+ },
1454
+ {
1455
+ "type": "text",
1456
+ "text": "[42] Noah Siegel, Jost Tobias Springenberg, Felix Berkenkamp, Abbas Abdolmaleki, Michael Neunert, Thomas Lampe, Roland Hafner, Nicolas Heess, and Martin Riedmiller. Keep doing what worked: Behavior modelling priors for offline reinforcement learning. In International Conference on Learning Representations, 2019. ",
1457
+ "bbox": [
1458
+ 173,
1459
+ 262,
1460
+ 823,
1461
+ 318
1462
+ ],
1463
+ "page_idx": 12
1464
+ },
1465
+ {
1466
+ "type": "text",
1467
+ "text": "[43] Kyunghwan Son, Daewoo Kim, Wan Ju Kang, David Earl Hostallero, and Yung Yi. QTRAN: Learning to factorize with transformation for cooperative multi-agent reinforcement learning. In International Conference on Machine Learning, pages 5887–5896, 2019. ",
1468
+ "bbox": [
1469
+ 171,
1470
+ 323,
1471
+ 821,
1472
+ 366
1473
+ ],
1474
+ "page_idx": 12
1475
+ },
1476
+ {
1477
+ "type": "text",
1478
+ "text": "[44] Aaron Sonabend-W, Junwei Lu, Leo A Celi, Tianxi Cai, and Peter Szolovits. Expertsupervised reinforcement learning for offline policy learning and evaluation. arXiv preprint arXiv:2006.13189, 2020. ",
1479
+ "bbox": [
1480
+ 173,
1481
+ 371,
1482
+ 823,
1483
+ 414
1484
+ ],
1485
+ "page_idx": 12
1486
+ },
1487
+ {
1488
+ "type": "text",
1489
+ "text": "[45] H Francis Song, Abbas Abdolmaleki, Jost Tobias Springenberg, Aidan Clark, Hubert Soyer, Jack W Rae, Seb Noury, Arun Ahuja, Siqi Liu, Dhruva Tirumala, et al. V-mpo: On-policy maximum a posteriori policy optimization for discrete and continuous control. In International Conference on Learning Representations, 2019. ",
1490
+ "bbox": [
1491
+ 174,
1492
+ 419,
1493
+ 826,
1494
+ 476
1495
+ ],
1496
+ "page_idx": 12
1497
+ },
1498
+ {
1499
+ "type": "text",
1500
+ "text": "[46] Zhao Song, Ron Parr, and Lawrence Carin. Revisiting the softmax bellman operator: New benefits and new perspective. In International Conference on Machine Learning, pages 5916– 5925. PMLR, 2019. ",
1501
+ "bbox": [
1502
+ 173,
1503
+ 481,
1504
+ 825,
1505
+ 522
1506
+ ],
1507
+ "page_idx": 12
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "[47] Bharath K Sriperumbudur, Kenji Fukumizu, Arthur Gretton, Bernhard Schölkopf, Gert RG Lanckriet, et al. On the empirical estimation of integral probability metrics. Electronic Journal of Statistics, 6:1550–1599, 2012. ",
1512
+ "bbox": [
1513
+ 173,
1514
+ 529,
1515
+ 823,
1516
+ 570
1517
+ ],
1518
+ "page_idx": 12
1519
+ },
1520
+ {
1521
+ "type": "text",
1522
+ "text": "[48] Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi, Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z Leibo, Karl Tuyls, et al. Valuedecomposition networks for cooperative multi-agent learning based on team reward. In International Conference on Autonomous Agents and MultiAgent Systems, pages 2085–2087, 2018. ",
1523
+ "bbox": [
1524
+ 171,
1525
+ 577,
1526
+ 828,
1527
+ 646
1528
+ ],
1529
+ "page_idx": 12
1530
+ },
1531
+ {
1532
+ "type": "text",
1533
+ "text": "[49] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT press, 2018. ",
1534
+ "bbox": [
1535
+ 176,
1536
+ 650,
1537
+ 826,
1538
+ 680
1539
+ ],
1540
+ "page_idx": 12
1541
+ },
1542
+ {
1543
+ "type": "text",
1544
+ "text": "[50] Philip Thomas and Emma Brunskill. Data-efficient off-policy policy evaluation for reinforcement learning. In International Conference on Machine Learning, pages 2139–2148. PMLR, 2016. ",
1545
+ "bbox": [
1546
+ 174,
1547
+ 685,
1548
+ 825,
1549
+ 727
1550
+ ],
1551
+ "page_idx": 12
1552
+ },
1553
+ {
1554
+ "type": "text",
1555
+ "text": "[51] Emanuel Todorov. Linearly-solvable markov decision problems. In Advances in neural information processing systems, pages 1369–1376, 2007. ",
1556
+ "bbox": [
1557
+ 173,
1558
+ 733,
1559
+ 823,
1560
+ 762
1561
+ ],
1562
+ "page_idx": 12
1563
+ },
1564
+ {
1565
+ "type": "text",
1566
+ "text": "[52] Ahmed Touati, Harsh Satija, Joshua Romoff, Joelle Pineau, and Pascal Vincent. Randomized value functions via multiplicative normalizing flows. In Uncertainty in Artificial Intelligence, pages 422–432. PMLR, 2020. ",
1567
+ "bbox": [
1568
+ 173,
1569
+ 767,
1570
+ 823,
1571
+ 809
1572
+ ],
1573
+ "page_idx": 12
1574
+ },
1575
+ {
1576
+ "type": "text",
1577
+ "text": "[53] SS Vallender. Calculation of the wasserstein distance between probability distributions on the line. Theory of Probability & Its Applications, 18(4):784–786, 1974. ",
1578
+ "bbox": [
1579
+ 176,
1580
+ 815,
1581
+ 823,
1582
+ 843
1583
+ ],
1584
+ "page_idx": 12
1585
+ },
1586
+ {
1587
+ "type": "text",
1588
+ "text": "[54] Quan Vuong, Yiming Zhang, and Keith W Ross. Supervised policy update for deep reinforcement learning. In International Conference on Learning Representations, 2018. ",
1589
+ "bbox": [
1590
+ 174,
1591
+ 848,
1592
+ 821,
1593
+ 878
1594
+ ],
1595
+ "page_idx": 12
1596
+ },
1597
+ {
1598
+ "type": "text",
1599
+ "text": "[55] Yihan Wang, Beining Han, Tonghan Wang, Heng Dong, and Chongjie Zhang. Off-policy multi-agent decomposed policy gradients. arXiv preprint arXiv:2007.12322, 2020. ",
1600
+ "bbox": [
1601
+ 171,
1602
+ 883,
1603
+ 826,
1604
+ 911
1605
+ ],
1606
+ "page_idx": 12
1607
+ },
1608
+ {
1609
+ "type": "text",
1610
+ "text": "[56] Yu-Xiang Wang, Alekh Agarwal, and Miroslav Dudık. Optimal and adaptive off-policy evaluation in contextual bandits. In International Conference on Machine Learning, pages 3589–3597. PMLR, 2017. \n[57] Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992. \n[58] Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. arXiv preprint arXiv:1911.11361, 2019. \n[59] Deheng Ye, Zhao Liu, Mingfei Sun, Bei Shi, Peilin Zhao, Hao Wu, Hongsheng Yu, Shaojie Yang, Xipeng Wu, Qingwei Guo, et al. Mastering complex control in MOBA games with deep reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 6672–6679, 2020. ",
1611
+ "bbox": [
1612
+ 173,
1613
+ 90,
1614
+ 828,
1615
+ 258
1616
+ ],
1617
+ "page_idx": 13
1618
+ }
1619
+ ]
parse/train/yNzF41lHYV/yNzF41lHYV_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/yNzF41lHYV/yNzF41lHYV_model.json ADDED
The diff for this file is too large to render. See raw diff