Datasets:
Add files using upload-large-folder tool
Browse files- parse/train/-NEXDKk8gZ/-NEXDKk8gZ.md +414 -0
- parse/train/-NEXDKk8gZ/-NEXDKk8gZ_content_list.json +2111 -0
- parse/train/-NEXDKk8gZ/-NEXDKk8gZ_middle.json +0 -0
- parse/train/-NEXDKk8gZ/-NEXDKk8gZ_model.json +0 -0
- parse/train/Byt3oJ-0W/Byt3oJ-0W.md +580 -0
- parse/train/Byt3oJ-0W/Byt3oJ-0W_content_list.json +0 -0
- parse/train/Byt3oJ-0W/Byt3oJ-0W_middle.json +0 -0
- parse/train/Byt3oJ-0W/Byt3oJ-0W_model.json +0 -0
- parse/train/DKabt9MFnT/DKabt9MFnT.md +477 -0
- parse/train/DKabt9MFnT/DKabt9MFnT_content_list.json +1511 -0
- parse/train/DKabt9MFnT/DKabt9MFnT_middle.json +0 -0
- parse/train/DKabt9MFnT/DKabt9MFnT_model.json +0 -0
- parse/train/rJiaRbk0-/rJiaRbk0-.md +321 -0
- parse/train/rJiaRbk0-/rJiaRbk0-_content_list.json +1754 -0
- parse/train/rJiaRbk0-/rJiaRbk0-_middle.json +0 -0
- parse/train/rJiaRbk0-/rJiaRbk0-_model.json +0 -0
- parse/train/ypJS_nyu-I/ypJS_nyu-I.md +518 -0
- parse/train/ypJS_nyu-I/ypJS_nyu-I_content_list.json +0 -0
- parse/train/ypJS_nyu-I/ypJS_nyu-I_middle.json +0 -0
- parse/train/ypJS_nyu-I/ypJS_nyu-I_model.json +0 -0
parse/train/-NEXDKk8gZ/-NEXDKk8gZ.md
ADDED
|
@@ -0,0 +1,414 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# IMPROVED DENOISING DIFFUSION PROBABILISTIC MODELS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We explore denoising diffusion probabilistic models, a class of generative models which have recently been shown to produce excellent samples in the image and audio domains. While these models produce excellent samples, it has yet to be shown that they can achieve competitive log-likelihoods. We show that, with several small modifications, diffusion models can achieve competitive log-likelihoods in the image domain while maintaining high sample quality. Additionally, our models allow for sampling with an order of magnitude fewer diffusion steps with only a modest difference in sample quality. Finally, we explore how sample quality and log-likelihood scale with the number of diffusion steps and the amount of model capacity. We conclude that denoising diffusion probabilistic models are a promising class of generative models with excellent scaling properties and sample quality.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Sohl-Dickstein et al. (2015) introduced diffusion probabilistic models ("diffusion models" for brevity), a class of generative models which match a data distribution by learning to reverse a gradual, multi-step noising process. More recently, Ho et al. (2020) showed an equivalence between these models and score based generative models (Song & Ermon, 2019; 2020), which learn a gradient of the log-density of the data distribution using denoising score matching (Hyvärinen, 2005). It has recently been shown that this class of models can produce high-quality images (Ho et al., 2020; Song & Ermon, 2020; Jolicoeur-Martineau et al., 2020) and audio (Chen et al., 2020b; Kong et al., 2020), but it has yet to be shown that diffusion models can achieve competitive log-likelihoods. Furthermore, while Ho et al. (2020) showed extremely good results on the CIFAR-10 (Krizhevsky, 2009) and LSUN (Yu et al., 2015) datasets, it is unclear how well diffusion models scale to datasets with higher diversity such as ImageNet. Finally, while Chen et al. (2020b) found that diffusion models can efficiently generate audio using a small number of sampling steps, it has yet to be shown that the same is true for images.
|
| 12 |
+
|
| 13 |
+
In this paper, we show that diffusion models can achieve competitive log-likelihoods while maintaining good sample quality, even on high-diversity datasets like ImageNet. Additionally, we show that our improved models can produce competitive samples an order of magnitude faster than those from Ho et al. (2020). We achieve these results by combining a simple reparameterization of the reverse process variance, a hybrid learning objective that combines the variational lower-bound with the simplified objective from Ho et al. (2020), and a novel noise schedule which allows the model to better leverage the entire diffusion process.
|
| 14 |
+
|
| 15 |
+
We find surprisingly that, with our hybrid objective, our models obtain better log-likelihoods than those obtained by optimizing the log-likelihood directly, and discover that the latter objective has much more gradient noise during training. We show that a simple importance sampling technique reduces this noise and allows us to achieve better log-likelihoods than with the hybrid objective. Using our trained models, we study how sample quality and log-likelihood change as we adjust the number of diffusion steps used at sampling time. We demonstrate that our improved models allow us to use an order of magnitude fewer steps at test time with only a modest change in sample quality and log-likelihood, thus speeding up sampling for use in practical applications.
|
| 16 |
+
|
| 17 |
+
Finally, we evaluate the performance of these models as we increase model size, and observe trends that suggest predictable improvements in performance as we increase training compute.
|
| 18 |
+
|
| 19 |
+
# 2 DENOISING DIFFUSION PROBABILISTIC MODELS
|
| 20 |
+
|
| 21 |
+
We briefly review the formulation of diffusion models from Ho et al. (2020). This formulation makes various simplifying assumptions, such as a fixed noising process $q$ which adds diagonal Gaussian noise at each timestep. For a more general derivation, see Sohl-Dickstein et al. (2015).
|
| 22 |
+
|
| 23 |
+
# 2.1 DEFINITIONS
|
| 24 |
+
|
| 25 |
+
Given a data distribution $x _ { 0 } \sim q ( x _ { 0 } )$ , we define a forward noising process $q$ which produces latents $x _ { 1 }$ through $x _ { T }$ by adding Gaussian noise at time $t$ with variance $\beta _ { t } \in ( 0 , 1 )$ as follows:
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
\begin{array} { r l r } { { q ( x _ { 1 } , . . . , x _ { T } | x _ { 0 } ) : = \prod _ { t = 1 } ^ { T } q ( x _ { t } | x _ { t - 1 } ) } } \\ & { } & { q ( x _ { t } | x _ { t - 1 } ) : = \mathcal { N } ( x _ { t } ; \sqrt { 1 - \beta _ { t } } x _ { t - 1 } , \beta _ { t } \mathbf { I } ) } \end{array}
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
Given sufficiently large $T$ and a well behaved schedule of $\beta _ { t }$ , the latent $x _ { T }$ is nearly an isotropic Gaussian distribution. Thus, if we know the exact reverse distribution $q ( x _ { t - 1 } | x _ { t } )$ , we can sample $x _ { T } \sim \mathcal { N } ( 0 , \mathbf { I } )$ and run the process in reverse to get a sample from $q ( x _ { 0 } )$ . However, since $q ( x _ { t - 1 } | x _ { t } )$ depends on the entire data distribution, we approximate it using a neural network:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
p _ { \theta } ( x _ { t - 1 } | x _ { t } ) : = \mathcal { N } ( x _ { t - 1 } ; \mu _ { \theta } ( x _ { t } , t ) , \Sigma _ { \theta } ( x _ { t } , t ) )
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
The combination of $q$ and $p$ is a variational auto-encoder (Kingma & Welling, 2013), and we can write the variational lower bound (VLB) as follows:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { r l } & { L _ { \mathrm { v l b } } : = L _ { 0 } + L _ { 1 } + \ldots + L _ { T - 1 } + L _ { T } } \\ & { \quad L _ { 0 } : = - \log p _ { \theta } ( x _ { 0 } | x _ { 1 } ) } \\ & { L _ { t - 1 } : = D _ { K L } ( q ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) \parallel p _ { \theta } ( x _ { t - 1 } | x _ { t } ) ) } \\ & { \quad L _ { T } : = D _ { K L } ( q ( x _ { T } | x _ { 0 } ) \parallel p ( x _ { T } ) ) } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
Aside from $L _ { 0 }$ , each term of Equation 4 is a $K L$ divergence between two Gaussian distributions, and can thus be evaluated in closed form. To evaluate $L _ { 0 }$ for images, we assume that each color component is divided into 256 bins, and we compute the probability of $p _ { \theta } ( x _ { 0 } | x _ { 1 } )$ landing in the correct bin (which is tractable using the CDF of the Gaussian distribution). Also note that while $L _ { T }$ does not depend on $\theta$ , it will be close to zero if the forward noising process adequately destroys the data distribution so that $q ( x _ { T } | x _ { 0 } ) \approx \mathcal { N } ( 0 , \mathbf { I } )$ .
|
| 44 |
+
|
| 45 |
+
It is useful to define and derive several other quantities which are relevant to the forward noising process, so we repeat them here from Ho et al. (2020):
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\begin{array} { c } { { \displaystyle \alpha _ { t } \mapsto 1 - \beta _ { t } } } \\ { { { \displaystyle \bar { \alpha } _ { t } : = \prod _ { s = 0 } ^ { t } \alpha _ { s } } } } \\ { { { \displaystyle \bar { \beta } _ { t } : = \frac { 1 - \bar { \alpha } _ { t - 1 } } { 1 - \bar { \alpha } _ { t } } \beta _ { t } } } } \\ { { { \displaystyle \tilde { \mu } _ { t } ( x _ { t } , x _ { 0 } ) : = \frac { \sqrt { \bar { \alpha } _ { t - 1 } } \beta _ { t } } { 1 - \bar { \alpha } _ { t } } x _ { 0 } + \frac { \sqrt { \alpha _ { t } } ( 1 - \bar { \alpha } _ { t - 1 } ) } { 1 - \bar { \alpha } _ { t } } x _ { t } } } } \\ { { { { \displaystyle q ( x _ { t } | x _ { 0 } ) = \sqrt { ( x _ { t } ; \zeta ) \bar { \alpha } _ { t } } x _ { 0 } } , ~ ( 1 - \bar { \alpha } _ { t } ) } } } \\ { { { \displaystyle q ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) = \sqrt { ( x _ { t - 1 } ; \tilde { \mu } ( x _ { t } , x _ { 0 } ) , \tilde { \beta } _ { t } ] } } } } \end{array}
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
# 2.2 TRAINING IN PRACTICE
|
| 52 |
+
|
| 53 |
+
Equation 12 provides an efficient way to jump directly to an arbitrary step of the forward noising process. This makes it possible to randomly sample $t$ during training. Ho et al. (2020) uniformly sample $t$ for each image in each mini-batch.
|
| 54 |
+
|
| 55 |
+
There are many different ways to parameterize $\mu _ { \theta } ( x _ { t } , t )$ . The most obvious option is to predict $\mu _ { \theta } ( x _ { t } , t )$ directly with a neural network; alternatively, the network could predict $x _ { 0 }$ , and this output could then be fed through $\tilde { \mu } ( \boldsymbol { x } _ { t } , \boldsymbol { x } _ { 0 } )$ ; finally, the network could predict the noise $\epsilon$ added to $x _ { 0 }$ , and this noise could be used to predict $x _ { 0 }$ via
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
x _ { 0 } = \frac { 1 } { \sqrt { \alpha _ { t } } } \left( x _ { t } - \frac { \beta _ { t } } { \sqrt { 1 - \bar { \alpha } _ { t } } } \epsilon \right)
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
Ho et al. (2020) found that predicting $\epsilon$ worked best, especially when combined with a reweighted loss function:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
L _ { \mathrm { s i m p l e } } = E _ { t , x _ { 0 } , \epsilon } \left[ | | \epsilon - \epsilon _ { \theta } ( x _ { t } , t ) | | ^ { 2 } \right]
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
This objective can be seen as a reweighted form of $L _ { \mathrm { v l b } }$ (without the terms affecting $\Sigma _ { \theta }$ ). The authors found that optimizing this reweighted objective resulted in much better sample quality than optimizing $L _ { \mathrm { v l b } }$ directly, and explain this by drawing a connection to generative score matching (Song & Ermon, 2019; 2020).
|
| 68 |
+
|
| 69 |
+
One subtlety is that $L _ { \mathrm { s i m p l e } }$ provides no learning signal for $\Sigma _ { \theta } ( x _ { t } , t )$ . This is irrelevant, however, since Ho et al. (2020) achieved their best results by fixing the variance to $\sigma _ { t } ^ { 2 } \mathbf { I }$ rather than learning it. They found that they achieve similar sample quality using either $\sigma _ { t } ^ { 2 } = \beta _ { t }$ or $\sigma _ { t } ^ { 2 } = \tilde { \beta } _ { t }$ , which are two extremes given by $\boxed { q ( \boldsymbol { x } _ { 0 } ) }$ being either isotropic Gaussian noise or a delta function, respectively.
|
| 70 |
+
|
| 71 |
+
# 3 IMPROVING THE LOG-LIKELIHOOD
|
| 72 |
+
|
| 73 |
+
While Ho et al. (2020) found that diffusion models can generate high-fidelity samples according to FID (Heusel et al., 2017) and Inception Score (Salimans et al., 2016), they were unable to achieve competitive log-likelihoods with these models. Log-likelihood is a widely used metric in generative modeling, and it is generally believed that optimizing log-likelihood forces generative models to capture all of the modes of the data distribution (Razavi et al., 2019). Additionally, recent work (Henighan et al., 2020) has shown that small improvements in log-likelihood can have a dramatic impact on sample quality and learnt feature representations. Thus, it is important to explore why diffusion models seem to perform poorly on this metric, since this may suggest a fundamental shortcoming such as bad mode coverage. This section explores several modifications to the algorithm described in Section 2 that, when combined, allow diffusion models to achieve much better log-likelihoods on image datasets, suggesting that these models enjoy the same benefits as other likelihood-based generative models.
|
| 74 |
+
|
| 75 |
+
To study the effects of different modifications, we train fixed model architectures with fixed hyperparameters (Appendix A) on the ImageNet $6 4 \times 6 4$ (van den Oord et al., 2016a) and CIFAR-10 (Krizhevsky, 2009) datasets. While CIFAR-10 has seen more usage for this class of models, we chose to study ImageNet $6 4 \times 6 4$ as well because it provides a good trade-off between diversity and resolution, allowing us to train models quickly without worrying about overfitting. Additionally, ImageNet $6 4 \times 6 4$ has been studied extensively in the context of generative modeling (van den Oord et al., 2016b; Menick & Kalchbrenner, 2018; Child et al., 2019; Roy et al., 2020), allowing us to compare diffusion models directly to many other generative models.
|
| 76 |
+
|
| 77 |
+
The setup from Ho et al. (2020) (optimizing $\boldsymbol { L } _ { \mathrm { s i m p l e } }$ while setting $\sigma _ { t } ^ { 2 } = \beta _ { t }$ and $T = 1 0 0 0$ ) achieves a log-likelihood of 3.99 bits/dim on ImageNet $6 \dot { 4 } \times 6 4$ after $2 0 0 \mathrm { K }$ training iterations. We found in early experiments that we could get a boost in log-likelihood by increasing $T$ from 1000 to 4000; with this change, the log-likelihood improves to 3.77 bits/dim. For the remainder of this section, we use $T = 4 0 0 0$ , but we explore this choice in Section 4.
|
| 78 |
+
|
| 79 |
+
# 3.1 LEARNING $\Sigma _ { \theta } ( x _ { t } , t )$
|
| 80 |
+
|
| 81 |
+
In Ho et al. (2020), the authors set $\Sigma _ { \theta } ( x _ { t } , t ) = \sigma _ { t } ^ { 2 } \mathbf { I }$ , where $\sigma _ { t }$ is not learned. Oddly, they found that fixing $\sigma _ { t } ^ { 2 }$ to $\beta _ { t }$ yielded roughly the same sample quality as fixing it to $\tilde { \beta } _ { t }$ . Considering that $\beta _ { t }$ and $\tilde { \beta } _ { t }$ represent two opposite extremes, it is reasonable to ask why this choice doesn’t affect samples. One clue is given by Figure 1a, which shows that $\beta _ { t }$ and $\tilde { \beta } _ { t }$ are almost equal except near $t = 0$ , i.e. where the model is dealing with imperceptible details. Furthermore, as we increase the number of diffusion steps, $\beta _ { t }$ and $\tilde { \beta } _ { t }$ seem to remain close to one another for more of the diffusion process.
|
| 82 |
+
|
| 83 |
+

|
| 84 |
+
Figure 1a: The ratio $\tilde { \beta } _ { t } / \beta _ { t }$ for every diffusion step for diffusion processes of different lengths.
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 1b: Terms of the VLB vs diffusion step. The first few terms contribute most to NLL.
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 2: Latent samples from linear (top) and cosine (bottom) schedules respectively at linearly spaced values of $t$ from 0 to $T$ . The latents in the last quarter of the linear schedule are almost purely noise, whereas the cosine schedule adds noise more slowly
|
| 91 |
+
|
| 92 |
+
This suggests that, in the limit of infinite diffusion steps, the choice of $\sigma _ { t }$ might not matter at all for sample quality. In other words, as we add more diffusion steps, the model mean $\mu _ { \theta } ( x _ { t } , t )$ determines the distribution much more than $\Sigma _ { \theta } ( x _ { t } , t )$ .
|
| 93 |
+
|
| 94 |
+
While the above argument suggests that fixing $\sigma _ { t }$ is a reasonable choice for the sake of sample quality, it says nothing about log-likelihood. In fact, Figure 1b shows that the first few steps of the diffusion process contribute the most to the variational lower bound. Thus, it seems likely that we could improve log-likelihood by using a better choice of $\Sigma _ { \theta } ( x _ { t } , t )$ . To achieve this, we must learn $\Sigma _ { \theta } ( x _ { t } , t ) $ without the instabilities encountered by Ho et al. (2020).
|
| 95 |
+
|
| 96 |
+
Since Figure 1a shows that the reasonable range for $\Sigma _ { \theta } ( x _ { t } , t )$ is very small, it would be hard for a neural network to predict $\Sigma _ { \theta } ( x _ { t } , t )$ directly, even in the log domain, as observed by Ho et al. (2020). Instead, we found it better to parameterize the variance as an interpolation between $\beta _ { t }$ and $\tilde { \beta } _ { t }$ in the log domain. In particular, our model outputs a vector $v$ containing one component per dimension, and we turn this output into variances as follows:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\Sigma _ { \theta } ( x _ { t } , t ) = \exp ( v \log \beta _ { t } + ( 1 - v ) \log \tilde { \beta } _ { t } )
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
We did not apply any constraints on $v$ , theoretically allowing the model to predict variances outside of the interpolated range. However, we did not observe the network doing this in practice, suggesting that the bounds for $\Sigma _ { \theta } ( x _ { t } , t )$ are indeed expressive enough.
|
| 103 |
+
|
| 104 |
+
Since $L _ { \mathrm { s i m p l e } }$ doesn’t depend on $\Sigma _ { \theta } ( x _ { t } , t )$ , we define a new hybrid objective:
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
L _ { \mathrm { h y b r i d } } = L _ { \mathrm { s i m p l e } } + \lambda L _ { \mathrm { v l b } }
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
For our experiments, we set $\lambda = 0 . 0 0 1$ to prevent $L _ { \mathrm { v l b } }$ from overwhelming $L _ { \mathrm { s i m p l e } }$ . Along this same line of reasoning, we also apply a stop-gradient to the $\mu _ { \theta } ( x _ { t } , t )$ output for the $\dot { L } _ { \mathrm { v l b } }$ term. This way, $L _ { \mathrm { v l b } }$ can guide $\Sigma _ { \theta } ( x _ { t } , t )$ while $L _ { \mathrm { s i m p l e } }$ is still the main source of influence over $\mu _ { \theta } ( x _ { t } , t )$ .
|
| 111 |
+
|
| 112 |
+
# 3.2 IMPROVING THE NOISE SCHEDULE
|
| 113 |
+
|
| 114 |
+
We found that the noise schedule used in Ho et al. (2020) was sub-optimal for ImageNet $6 4 \times 6 4$ . In particular, the end of the forward noising process is too noisy, and so doesn’t contribute very
|
| 115 |
+
|
| 116 |
+

|
| 117 |
+
Figure 3a: FID when skipping a prefix of the reverse diffusion process on ImageNet $6 4 \times 6 4$ .
|
| 118 |
+
|
| 119 |
+

|
| 120 |
+
Figure 3b: $\bar { \alpha } _ { t }$ throughout diffusion in the linear schedule and our proposed cosine schedule.
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 4a: Learning curves comparing the loglikelihoods achieved by different objectives on ImageNet $6 4 \times 6 4$ .
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 4b: Gradient noise scales for the $L _ { \mathrm { v l b } }$ and $L _ { \mathrm { h y b r i d } }$ objectives on ImageNet $6 4 \times 6 4$ .
|
| 127 |
+
|
| 128 |
+
much to sample quality. This can be seen visually in Figure 2. The result of this effect is studied in Figure 3a, where we see that a model trained with the linear schedule does not get much worse (as measured by FID) when we skip up to $20 \%$ of the reverse diffusion process.
|
| 129 |
+
|
| 130 |
+
To address this problem, we construct a different noise schedule in terms of $\bar { \alpha } _ { t }$ :
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\bar { \alpha } _ { t } = \frac { f ( t ) } { f ( 0 ) } , f ( t ) = \cos \left( \frac { t / T + s } { 1 + s } \cdot \frac { \pi } { 2 } \right) ^ { 2 } , s = 0 . 0 0 8
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
To go from this definition to variances $\beta _ { t }$ , we note that $\begin{array} { r } { \beta _ { t } = 1 - \frac { { { { \bar { \alpha } } _ { t } } } } { { { { \bar { \alpha } } _ { t - 1 } } } } } \end{array}$ α¯tα¯ . In practice, we clip βt to be no larger than 0.999 to prevent singularities at the end of the diffusion process near $t = T$ .
|
| 137 |
+
|
| 138 |
+
Our cosine schedule is designed to have a linear drop-off of $\bar { \alpha } _ { t }$ in the middle of the process, while changing very little near the extremes of $t = 0$ and $t = T$ to prevent abrupt changes in noise level. Figure 3b shows how $\bar { \alpha } _ { t }$ progresses for both schedules. We can see that the linear schedule from Ho et al. (2020) falls towards zero much faster, destroying information more quickly than necessary.
|
| 139 |
+
|
| 140 |
+
The small offset $s$ in our schedule prevents $\beta _ { t }$ from being too small near $t = 0$ , since we found that having tiny amounts of noise at the beginning of the process made it hard for the network to√ predict $\epsilon$ accurately enough. In particular, we selected $s$ such that $\sqrt { \beta _ { 0 } }$ was slightly smaller than the pixel bin size, $1 / 1 2 7 . 5$ . We chose to use $c o s ^ { 2 }$ in particular because it is a common mathematical function with the shape we were looking for. This choice was arbitrary, and we expect that many other functions with similar shapes would work as well.
|
| 141 |
+
|
| 142 |
+
# 3.3 REDUCING GRADIENT NOISE
|
| 143 |
+
|
| 144 |
+
We expected to achieve the best log-likelihoods by optimizing $L _ { \mathrm { v l b } }$ directly, rather than by optimizing $L _ { \mathrm { h y b r i d } }$ . However, we were surprised to find that $L _ { \mathrm { v l b } }$ was actually quite difficult to optimize in practice, at least on the diverse ImageNet $6 4 \times 6 4$ dataset. Figure 4a shows the learning curves for both $L _ { \mathrm { v l b } }$ and $L _ { \mathrm { h y b r i d } }$ . Both curves are noisy, but the hybrid objective clearly achieves better log-likelihoods on the training set given the same amount of training time.
|
| 145 |
+
|
| 146 |
+
Table 1: Comparison of NLL and FID for different diffusion models on ImageNet $6 4 \times 6 4 .$ . $L _ { \mathrm { v l b } }$ and $L _ { \mathrm { h y b r i d } }$ were trained with learned sigmas using the parameterization from Section 3.1. For $L _ { \mathrm { v l b } }$ , we used the resampling scheme from Section 3.3. Using our cosine schedule and $L _ { \mathrm { { h y b r i d } } }$ improves both log-likelihood and FID over the baseline from Ho et al. (2020). Optimizing $L _ { \mathrm { v l b } }$ further improves log-likelihood at the cost of a higher FID.
|
| 147 |
+
|
| 148 |
+
<table><tr><td>MODEL</td><td>TRAINITERS.</td><td>T</td><td>SCHEDULE</td><td>OBJECTIVE</td><td>NLL (bits/dim)</td><td>FID</td></tr><tr><td rowspan="2">Baseline</td><td>200K</td><td>1K</td><td>linear</td><td>Lsimple</td><td>3.99</td><td>31.0</td></tr><tr><td>200K</td><td>4K</td><td>linear</td><td>Lsimple</td><td>3.77</td><td>29.7</td></tr><tr><td rowspan="4">Improved</td><td>200K</td><td>4K</td><td>linear</td><td>Lhybrid</td><td>3.66</td><td>30.4</td></tr><tr><td>200K</td><td>4K</td><td>cosine</td><td>Lsimple</td><td>3.68</td><td>25.6</td></tr><tr><td>200K</td><td>4K</td><td>cosine</td><td>Lhybrid</td><td>3.62</td><td>26.6</td></tr><tr><td>200K</td><td>4K</td><td>cosine</td><td>Lvlb</td><td>3.57</td><td>54.7</td></tr><tr><td rowspan="2">Improved</td><td>1.5M</td><td>4K</td><td>cosine</td><td>Lhybrid</td><td>3.57</td><td>18.3</td></tr><tr><td>1.5M</td><td>4K</td><td>cosine</td><td>Lvlb</td><td>3.53</td><td>38.3</td></tr></table>
|
| 149 |
+
|
| 150 |
+
Table 2: Comparison of NLL and FID for different diffusion models on CIFAR-10. Using our cosine schedule and $L _ { \mathrm { h y b r i d } }$ improves log-likelihood with a marginal impact on FID. Optimizing $L _ { \mathrm { v l b } }$ further improves log-likelihood at the cost of a significantly higher FID.
|
| 151 |
+
|
| 152 |
+
<table><tr><td>MODEL</td><td>TRAIN ITERS.</td><td>T</td><td>SCHEDULE</td><td>OBJECTIVE</td><td>NLL (bits/dim)</td><td>FID</td></tr><tr><td rowspan="2">Baseline</td><td>500K</td><td>1K</td><td>linear</td><td>Lsimple</td><td>3.73</td><td>3.29</td></tr><tr><td>500K</td><td>4K</td><td>linear</td><td>Lsimple</td><td>3.37</td><td>2.90</td></tr><tr><td rowspan="4">Improved</td><td>500K</td><td>4K</td><td>linear</td><td>Lhybrid</td><td>3.26</td><td>3.07</td></tr><tr><td>500K</td><td>4K</td><td>cosine</td><td>Lsimple</td><td>3.26</td><td>3.05</td></tr><tr><td>500K</td><td>4K</td><td>cosine</td><td>Lhybrid</td><td>3.17</td><td>3.19</td></tr><tr><td>500K</td><td>4K</td><td>cosine</td><td>Lv1b</td><td>2.94</td><td>11.47</td></tr></table>
|
| 153 |
+
|
| 154 |
+
We hypothesized that the gradient of $L _ { \mathrm { v l b } }$ was much noisier than that of $L _ { \mathrm { h y b r i d } }$ . We confirmed this by evaluating the gradient noise scales (McCandlish et al., 2018) for models trained with both objectives, as shown in Figure 4b. Thus, we sought out a way to reduce the variance of $L _ { \mathrm { v l b } }$ in order to optimize directly for log-likelihood.
|
| 155 |
+
|
| 156 |
+
Noting that different terms of $L _ { \mathrm { v l b } }$ have greatly different magnitudes (Figure 1b), we hypothesized that sampling $t$ uniformly causes unnecessary noise in the $L _ { \mathrm { v l b } }$ objective. To address this, we employ importance sampling:
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
L _ { \mathrm { v l b } } = E _ { t \sim p _ { t } } \left[ \frac { L _ { t } } { p _ { t } } \right] , \mathrm { w h e r e } p _ { t } \propto \sqrt { E [ L _ { t } ^ { 2 } ] } \mathrm { a n d } \sum p _ { t } = 1
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
Since $E [ L _ { t } ^ { 2 } ]$ is unknown beforehand and may change throughout training, we maintain a history of the previous 10 values for each loss term, and update this dynamically during training. At the beginning of training, we sample $t$ uniformly until we draw 10 samples for every $t \in [ 0 , T - 1 ]$ .
|
| 163 |
+
|
| 164 |
+
With this importance sampled objective, we are able to achieve our best log-likelihoods by optimizing $L _ { \mathrm { v l b } }$ .1 This can be seen in Figure 4a as the $" L _ { v l b }$ (resampled)" curve. The figure also shows that the importance sampled objective is considerably less noisy than the original, uniformly sampled objective.
|
| 165 |
+
|
| 166 |
+
# 3.4 RESULTS AND ABLATIONS
|
| 167 |
+
|
| 168 |
+
In this section, we ablate the changes we have made to achieve better log-likelihoods. Table 1 summarizes the results of our ablations on ImageNet $6 4 \times 6 4$ , and Table 2 shows them for CIFAR10. We also trained our best ImageNet $6 4 \times 6 4$ models for 1.5M iterations, and report these results as well. Based on the results, we recommend always using the cosine schedule, and the $L _ { \mathrm { { h y b r i d } } }$ objective in most cases. If one is only optimizing for likelihood and not sample quality, the importance sampled $L _ { \mathrm { v l b } }$ is the best objective to use.
|
| 169 |
+
|
| 170 |
+
Table 3: Comparison of diffusion models to other likelihood-based models on CIFAR-10 and Unconditional ImageNet $6 4 \times 6 4$ . On ImageNet $6 4 \times 6 4$ , our model is competitive with the best conventional models, but is worse than fully transformer-based architectures.
|
| 171 |
+
|
| 172 |
+
<table><tr><td rowspan=1 colspan=1>MODEL</td><td rowspan=1 colspan=1>ImageNet 64 × 64NLL (bits/dim)</td><td rowspan=1 colspan=1>CIFAR-10NLL (bits/dim)</td></tr><tr><td rowspan=4 colspan=1>Glow (Kingma & Dhariwal, 2018)Flow++ (Ho et al., 2019)PixelCNN (van den Oord et al., 2016b)PixelSNAIL (Chen et al., 2018)SPN(Menick&Kalchbrenner,2018)Image Transformer (Parmar et al., 2018)Sparse Transformer (Child et al., 2019)Routing Transformer (Roy et al., 2020)</td><td rowspan=1 colspan=1>3.81</td><td rowspan=1 colspan=1>3.35</td></tr><tr><td rowspan=1 colspan=1>3.69</td><td rowspan=1 colspan=1>3.08</td></tr><tr><td rowspan=2 colspan=1>3.573.523.523.483.443.43</td><td rowspan=1 colspan=1>3.14</td></tr><tr><td rowspan=1 colspan=1>2.85=2.902.801</td></tr><tr><td rowspan=2 colspan=1>Diffusion (Ho et al., 2020)Improved Diffusion (ours)</td><td rowspan=1 colspan=1>3.77</td><td rowspan=1 colspan=1>3.70</td></tr><tr><td rowspan=1 colspan=1>3.53</td><td rowspan=1 colspan=1>2.94</td></tr></table>
|
| 173 |
+
|
| 174 |
+
# 4 IMPROVING SAMPLING SPEED
|
| 175 |
+
|
| 176 |
+
All of our models were trained with 4000 diffusion steps, and thus producing a single sample takes several minutes on a modern GPU. In this section, we explore how performance scales if we reduce the steps used during sampling, and find that our pre-trained models can produce high-quality samples with many fewer diffusion steps than they were trained with without any fine-tuning. Reducing the steps in this way makes it possible to sample from our models in a number of seconds rather than minutes, and greatly improves the practical applicability of image diffusion models.
|
| 177 |
+
|
| 178 |
+
For a model trained with $T$ diffusion steps, we would typically sample using the same set of $t$ values $( 1 , 2 , . . . , T )$ as used during training. However, it is also possible to sample using an arbitrary set of $t$ values. We define a sequence $S$ of $t$ values to use for sampling, such as a strided schedule like $S = ( 1 , 3 , 5 , . . . , T - 1 )$ . Given the training noise schedule $\bar { \alpha } _ { t }$ , we can obtain the sampling noise schedule $\bar { \alpha } _ { S _ { t } }$ , which can be used to obtain corresponding sampling variances
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
\beta _ { S _ { t } } = 1 - \frac { \bar { \alpha } _ { S _ { t } } } { \bar { \alpha } _ { S _ { t - 1 } } } , \quad \tilde { \beta } _ { S _ { t } } = \frac { 1 - \bar { \alpha } _ { S _ { t - 1 } } } { 1 - \bar { \alpha } _ { S _ { t } } } \beta _ { S _ { t } }
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+
We can compute $p ( x _ { S _ { t - 1 } } | x _ { S _ { t } } )$ as $\mathcal { N } ( \mu _ { \theta } ( x _ { S _ { t } } , S _ { t } ) , \Sigma _ { \theta } ( x _ { S _ { t } } , S _ { t } ) )$ . Note that $\Sigma _ { \theta } ( x _ { S _ { t } } , S _ { t } )$ is parameterized as a range between $\beta _ { S _ { t } }$ and $\tilde { \beta } _ { S _ { t } }$ so it will automatically be rescaled for the shorter diffusion process.
|
| 185 |
+
|
| 186 |
+
To evaluate sample quality for reduced numbers of sampling steps, we use a stride $K$ over timesteps to reduce the total number of sampling steps from $T$ to $T / K$ . In Figures 5a and 5c, we evaluate FIDs for an $L _ { \mathrm { { h y b r i d } } }$ model and an $L _ { \mathrm { s i m p l e } }$ model that were trained with 4000 diffusion steps, using 30, 50, 100, 150, 200, 400, and 4000 sampling steps. We do this for multiple checkpoints throughout training. We find that the $L _ { \mathrm { s i m p l e } }$ model suffers much more in sample quality when using a reduced number of sampling steps, whereas our $L _ { \mathrm { h y b r i d } }$ model maintains sample quality. Furthermore, we find that using more sampling steps becomes increasingly beneficial throughout training. However, 100 sampling steps is still sufficient to achieve near-optimal FIDs for our fully trained models.
|
| 187 |
+
|
| 188 |
+
In initial experiments, we found that although constant striding did not significantly affect FID, it drastically reduced log-likelihood. To address this, we use a strided subset of timesteps as for FID (with stride $K .$ ), but we also include every $t$ from 1 to $T / K$ . This requires $T / K$ extra evaluation steps, but greatly improves log-likelihood compared to the uniformly strided schedule. In Figures 5b and 5d we present log-likelihoods with this modified strided schedule.
|
| 189 |
+
|
| 190 |
+
# 5 SCALING MODEL SIZE
|
| 191 |
+
|
| 192 |
+
In the previous sections, we showed algorithmic changes that improved log-likelihood and FID without changing the amount of training compute. However, a trend in modern machine learning is that larger models and more training time tend to improve model performance (Kaplan et al., 2020;
|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
Figure 5b: NLL versus evaluation steps on ImageNet $6 4 \times 6 4$ .
|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
Figure 5a: FID versus sampling steps on ImageNet $6 4 \times 6 4$ .
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
Figure 5c: FID versus sampling steps on CIFAR10.
|
| 202 |
+
Figure 5d: NLL versus evaluation steps on CIFAR-10.
|
| 203 |
+
|
| 204 |
+
Figure 5: NLL and FID versus number of evaluation/sampling steps, for models trained on ImageNet $6 4 \times 6 4$ and CIFAR-10. All models were trained with 4000 diffusion steps. Models that learn sigmas using our reparametrization and $L _ { \mathrm { h y b r i d } }$ objective (Section 3.1) increase marginally in NLL and FID as we reduce evaluation/sampling steps, while using fixed sigmas as in Ho et al. (2020) results in a larger increase.
|
| 205 |
+
|
| 206 |
+
Chen et al., 2020a; Brown et al., 2020). Given this observation, we investigate how FID and NLL scale as a function of model size. Our results suggest that diffusion models can achieve better and better performance as training compute increases.
|
| 207 |
+
|
| 208 |
+
To measure how performance scales with compute, we train four different models on ImageNet $6 4 \times 6 4$ with the $L _ { \mathrm { { h y b r i d } } }$ objective described in Section 3.1. To change model capacity, we apply a depth multiplier across all layers, such that the first layer has either 64, 96, 128, or 192 channels. Note that our previous experiments used 128 channels in the first layer. Since the depth of each layer affects the scale of the initial weights, we scale the Adam learning rate for each model by√ $1 / \sqrt { }$ channel multiplier, such that the 128 channel model has a learning rate of 0.0001 (as in our other experiments).
|
| 209 |
+
|
| 210 |
+
Figure 6a and 6b show how FID and NLL improve relative to compute. These plots reveal that, to achieve optimal performance for a given amount of compute, it often makes sense to train a larger model for fewer iterations, rather than training a smaller model to convergence. We note that these models do not achieve optimal log-likelihoods because they were trained with our $L _ { \mathrm { h y b r i d } }$ objective and not directly with $L _ { \mathrm { v l b } }$ to keep both good log-likelihoods and sample quality. The $\mathbf { X }$ -axis in both figures is the theoretical amount of training compute, assuming full hardware utilization.
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Figure 6a: FID throughout training on ImageNet $6 4 \times 6 4$ for different model sizes.
|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
Figure 6b: NLL throughout training on ImageNet $6 4 \times 6 4$ for different model sizes.
|
| 217 |
+
|
| 218 |
+
# 6 RELATED WORK
|
| 219 |
+
|
| 220 |
+
Chen et al. (2020b) and Kong et al. (2020) are two recent works that use diffusion models to produce high fidelity audio conditioned on mel-spectrograms. Concurrent to our work, Chen et al. (2020b) use a combination of improved schedule and $L _ { 1 }$ loss to allow sampling with fewer steps with very little reduction in sample quality. However, compared to our unconditional image generation task, their generative task has a strong input conditioning signal provided by the mel-spectrograms, and we hypothesize that this makes it easier to sample with fewer diffusion steps.
|
| 221 |
+
|
| 222 |
+
Jolicoeur-Martineau et al. (2020) explored score matching in the image domain, and constructed an adversarial training objective to produce better $x _ { 0 }$ predictions. However, they found that choosing a better network architecture removed the need for this adversarial objective, suggesting that the adversarial objective is not necessary for powerful generative modeling.
|
| 223 |
+
|
| 224 |
+
# 7 CONCLUSION
|
| 225 |
+
|
| 226 |
+
We have shown that, with a few modifications, diffusion models can sample much faster and achieve better log-likelihoods with little impact on sample quality. Here we summarize our main findings:
|
| 227 |
+
|
| 228 |
+
• Our cosine noise schedule improves NLL (and sometimes FID) compared to the linear schedule from Ho et al. (2020).
|
| 229 |
+
• Learning $\Sigma _ { \theta }$ using our parameterization and $L _ { \mathrm { h y b r i d } }$ objective provides a good trade-off between NLL and FID. More importantly, it allows sampling with many fewer steps without decreased sample quality.
|
| 230 |
+
• One can optimize $L _ { \mathrm { v l b } }$ directly using our importance sampling technique to achieve the best possible NLL at the expense of sample quality.
|
| 231 |
+
|
| 232 |
+
The combination of these results makes diffusion models an attractive choice for generative modeling, since they combine good log-likelihoods, high-quality samples, and fast sampling with a wellgrounded, stationary training objective. Furthermore, we have investigated how diffusion models scale with the amount of available training compute, and found that more training compute trivially leads to better sample quality and log-likelihood. These results indicate that diffusion models are a promising direction for future research, especially as the affordability of compute increases over time.
|
| 233 |
+
|
| 234 |
+
# REFERENCES
|
| 235 |
+
|
| 236 |
+
Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners, 2020.
|
| 237 |
+
|
| 238 |
+
Mark Chen, Alec Radford, Rewon Child, Jeff Wu, Heewoo Jun, Prafulla Dhariwal, David Luan, and Ilya Sutskever. Generative pretraining from pixels, 2020a. URL https://cdn.openai. com/papers/Generative_Pretraining_from_Pixels_V2.pdf.
|
| 239 |
+
|
| 240 |
+
Nanxin Chen, Yu Zhang, Heiga Zen, Ron J. Weiss, Mohammad Norouzi, and William Chan. Wavegrad: Estimating gradients for waveform generation, 2020b.
|
| 241 |
+
|
| 242 |
+
Xi Chen, Nikhil Mishra, Mostafa Rohaninejad, and Pieter Abbeel. Pixelsnail: An improved autoregressive generative model. In International Conference on Machine Learning, pp. 864–872. PMLR, 2018.
|
| 243 |
+
|
| 244 |
+
Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers, 2019.
|
| 245 |
+
|
| 246 |
+
Terrance DeVries, Michal Drozdzal, and Graham W Taylor. Instance selection for gans. arXiv preprint arXiv:2007.15255, 2020.
|
| 247 |
+
|
| 248 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition, 2015.
|
| 249 |
+
|
| 250 |
+
Tom Henighan, Jared Kaplan, Mor Katz, Mark Chen, Christopher Hesse, Jacob Jackson, Heewoo Jun, Tom B. Brown, Prafulla Dhariwal, Scott Gray, Chris Hallacy, Benjamin Mann, Alec Radford, Aditya Ramesh, Nick Ryder, Daniel M. Ziegler, John Schulman, Dario Amodei, and Sam McCandlish. Scaling laws for autoregressive generative modeling, 2020.
|
| 251 |
+
|
| 252 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in Neural Information Processing Systems 30 (NIPS 2017), 2017.
|
| 253 |
+
|
| 254 |
+
Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, and Pieter Abbeel. Flow $^ { + + }$ : Improving flowbased generative models with variational dequantization and architecture design. arXiv preprint arXiv:1902.00275, 2019.
|
| 255 |
+
|
| 256 |
+
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models, 2020.
|
| 257 |
+
|
| 258 |
+
Aapo Hyvärinen. Estimation of non-normalized statistical models by score matching. Journal of Machine Learning Research, 6(Apr):695–709, 2005.
|
| 259 |
+
|
| 260 |
+
Alexia Jolicoeur-Martineau, Rémi Piché-Taillefer, Rémi Tachet des Combes, and Ioannis Mitliagkas. Adversarial score matching and improved sampling for image generation, 2020.
|
| 261 |
+
|
| 262 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models, 2020.
|
| 263 |
+
|
| 264 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2014.
|
| 265 |
+
|
| 266 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes, 2013.
|
| 267 |
+
|
| 268 |
+
Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in neural information processing systems, pp. 10215–10224, 2018.
|
| 269 |
+
|
| 270 |
+
Zhifeng Kong, Wei Ping, Jiaji Huang, Kexin Zhao, and Bryan Catanzaro. Diffwave: A versatile diffusion model for audio synthesis, 2020.
|
| 271 |
+
|
| 272 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images, 2009. URL http:// www.cs.toronto.edu/\~kriz/learning-features-2009-TR.pdf.
|
| 273 |
+
|
| 274 |
+
Sam McCandlish, Jared Kaplan, Dario Amodei, and OpenAI Dota Team. An empirical model of large-batch training, 2018.
|
| 275 |
+
|
| 276 |
+
Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling, 2018.
|
| 277 |
+
|
| 278 |
+
Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. arXiv preprint arXiv:1802.05751, 2018.
|
| 279 |
+
|
| 280 |
+
Ali Razavi, Aaron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with vq-vae-2, 2019.
|
| 281 |
+
|
| 282 |
+
Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers, 2020.
|
| 283 |
+
|
| 284 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans, 2016.
|
| 285 |
+
|
| 286 |
+
Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P. Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications, 2017.
|
| 287 |
+
|
| 288 |
+
Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics, 2015.
|
| 289 |
+
|
| 290 |
+
Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. In Advances in Neural Information Processing Systems, pp. 11918–11930, 2019.
|
| 291 |
+
|
| 292 |
+
Yang Song and Stefano Ermon. Improved techniques for training score-based generative models. arXiv preprint arXiv:2006.09011, 2020.
|
| 293 |
+
|
| 294 |
+
Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with pixelcnn decoders, 2016a. URL http:// image-net.org/small/download.php.
|
| 295 |
+
|
| 296 |
+
Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with pixelcnn decoders, 2016b.
|
| 297 |
+
|
| 298 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need, 2017.
|
| 299 |
+
|
| 300 |
+
Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop, 2015.
|
| 301 |
+
|
| 302 |
+
Yang Zhao, Chunyuan Li, Ping Yu, Jianfeng Gao, and Changyou Chen. Feature quantization improves gan training. arXiv, pp. arXiv–2004, 2020.
|
| 303 |
+
|
| 304 |
+
# A HYPERPARAMETERS
|
| 305 |
+
|
| 306 |
+
For all of our experiments, we use a UNet model architecture2 similar to that used by Ho et al. (2020). We changed the attention layers to use multi-head attention (Vaswani et al., 2017), and opted to use four attention heads rather than one (while keeping the same total number of channels). We employed attention not only at the 16x16 resolution, but also at the 8x8 resolution. Additionally, we changed the way the model conditions on $t$ . In particular, instead of computing conditioning vector $v$ and injecting it into hidden state $h$ as $\mathrm { G r o u p N o r m } ( h + v )$ , we compute conditioning vectors $w$ and $b$ and inject them into the hidden state as $\mathrm { G r o u p N o r m } ( h ) ( w + 1 ) + b$ . We found in preliminary experiments on ImageNet $6 4 \times 6 4$ that these modifications slightly improved FID.
|
| 307 |
+
|
| 308 |
+
We used a 120M parameter model for all ImageNet $6 4 \times 6 4$ experiments except in Section 5, where we scaled the number of channels in all layers. In this architecture, the downsampling stack performs four steps of downsampling, each with three residual blocks (He et al., 2015). The upsampling stack is setup as a mirror image of the downsampling stack. From highest to lowest resolution, the UNet stages use $[ C , 2 C , 3 C , 4 \bar { C } ]$ channels, respectively. In all experiments except those in Section 5, we set $C = 1 2 8$ . We estimate that, with $C = 1 2 8$ , our model requires roughly 39 billion FLOPs in the forward pass.
|
| 309 |
+
|
| 310 |
+
For our CIFAR-10 experiments, we used a smaller model with three resblocks per downsampling stage and layer widths $[ C , 2 C , 2 C , 2 C ]$ with $C = 1 2 8$ . We swept over dropout values $\{ 0 . 1 , 0 . 2 , \bar { 0 . 3 } \bar \}$ and found that 0.1 worked best for the linear schedule while 0.3 worked best for our cosine schedule (Section 3.2). We expand upon this in Appendix E.
|
| 311 |
+
|
| 312 |
+
For all of our experiments, we used Adam (Kingma & Ba, 2014) with a batch size of 128 and an exponential moving average (EMA) over model parameters with a rate of 0.9999. Except in Section 5, we fixed the learning rate to 0.0001. For quick comparisons in Section 3, we trained models for 200K iterations. This is not enough to reach convergence, but we believe it is enough to fairly compare different modifications. We then trained the best models for 1.5M iterations to achieve better performance.
|
| 313 |
+
|
| 314 |
+
When using the linear noise schedule from Ho et al. (2020), we linearly interpolated from $\beta _ { 1 } =$ $0 . 0 0 0 1 / 4$ to $\beta _ { 4 0 0 0 } = 0 . 0 2 / 4$ in order to preserve the shape of $\bar { \alpha } _ { t }$ for the $T = 4 0 0 0$ schedule.
|
| 315 |
+
|
| 316 |
+
When computing FID for CIFAR-10, we produce 50K samples and compare them against the training set for consistency with other work. When computing FID for ImageNet $6 4 \times 6 4$ , we produce 10K samples and compute FID against 50K validation images unless otherwise stated. Using only 10K samples biases the FID to be worse-than-necessary, but requires much less compute for sampling. Since we mainly use FID for relative comparisons, this bias is acceptable.
|
| 317 |
+
|
| 318 |
+

|
| 319 |
+
|
| 320 |
+

|
| 321 |
+
Figure 7a: 50 sampling steps
|
| 322 |
+
|
| 323 |
+

|
| 324 |
+
Figure 7c: 200 sampling steps
|
| 325 |
+
Figure 7e: 1000 sampling steps
|
| 326 |
+
|
| 327 |
+

|
| 328 |
+
|
| 329 |
+

|
| 330 |
+
Figure 7b: 100 sampling steps
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
Figure 7d: 400 sampling steps
|
| 334 |
+
Figure 7f: 4000 sampling steps
|
| 335 |
+
|
| 336 |
+
Figure 7: Unconditional ImageNet $6 4 \times 6 4$ samples as we reduce number of sampling steps for a $L _ { \mathrm { h y b r i d } }$ model with $4 K$ diffusion steps trained for $1 . 5 \mathbf { M }$ training iterations.
|
| 337 |
+
|
| 338 |
+

|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 8a: 50 sampling steps
|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
Figure 8c: 200 sampling steps
|
| 345 |
+
Figure 8e: 1000 sampling steps
|
| 346 |
+
|
| 347 |
+

|
| 348 |
+
|
| 349 |
+

|
| 350 |
+
Figure 8b: 100 sampling steps
|
| 351 |
+
|
| 352 |
+

|
| 353 |
+
Figure 8d: 400 sampling steps
|
| 354 |
+
Figure 8f: 4000 sampling steps
|
| 355 |
+
|
| 356 |
+
Figure 8: Unconditional CIFAR-10 samples as we reduce number of sampling steps for a Lhybrid model with $4 K$ diffusion steps trained for 500K training iterations.
|
| 357 |
+
|
| 358 |
+

|
| 359 |
+
Figure 9a: Samples from $L _ { \mathrm { h y b r i d } }$ model
|
| 360 |
+
|
| 361 |
+

|
| 362 |
+
Figure 9b: Samples from $L _ { \mathrm { v l b } }$ model
|
| 363 |
+
|
| 364 |
+
Figure 9: Unconditional ImageNet $6 4 \times 6 4$ samples generated from an $L _ { \mathrm { h y b r i d } }$ and $L _ { \mathrm { v l b } }$ model respectively using the exact same random noise. Both models were trained for 1.5M training iterations.
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
Figure 10a: Samples from $L _ { \mathrm { h y b r i d } }$ model
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 10b: Samples from $L _ { \mathrm { v l b } }$ model
|
| 371 |
+
|
| 372 |
+
Figure 10: Unconditional CIFAR-10 samples generated from an $L _ { \mathrm { h y b r i d } }$ and $L _ { \mathrm { v l b } }$ model respectively using the exact same random noise. Both models were trained for 500K training iterations.
|
| 373 |
+
|
| 374 |
+

|
| 375 |
+
Figure 11a: The ratio between VLB terms for each diffusion step of $\theta _ { \mathrm { h y b r i d } }$ and $\theta _ { \mathrm { v l b } }$ . Values less than 1.0 indicate that $\theta _ { \mathrm { h y b r i d } }$ is "better" than $\theta _ { \mathrm { v l b } }$ for that timestep of the diffusion process.
|
| 376 |
+
|
| 377 |
+

|
| 378 |
+
Figure 11b: Samples from $\theta _ { \mathrm { v l b } }$ and $\theta _ { \mathrm { h y b r i d } }$ , as well as an ensemble produced by using $\theta _ { \mathrm { v l b } }$ for the first and last 100 diffusion steps. For these samples, the seed was fixed, allowing a direct comparison between models.
|
| 379 |
+
|
| 380 |
+

|
| 381 |
+
Figure 12a: Samples with random noise.
|
| 382 |
+
|
| 383 |
+

|
| 384 |
+
Figure 12b: Samples with same noise in a column
|
| 385 |
+
|
| 386 |
+
Figure 12: Conditional ImageNet $6 4 \times 6 4$ samples generated from an $L _ { \mathrm { h y b r i d } }$ model trained for 1.7M training steps. The classes are 9: ostrich, 11: goldfinch, 130: flamingo, 141: redshank, 154: pekinese, 157: papillon, 97: drake and 28: spotted salamander. On right we fix the random noise seed in each column to see how the class label affects the sampling process.
|
| 387 |
+
|
| 388 |
+
# C COMBINING $L _ { \mathrm { H Y B R I D } }$ AND $L _ { \mathrm { V L B } }$ MODELS
|
| 389 |
+
|
| 390 |
+
To understand the trade-off between $L _ { \mathrm { h y b r i d } }$ and $L _ { \mathrm { v l b } }$ , we show in Figure 11a that the model resulting from $L _ { \mathrm { v l b } }$ (referred to as $\theta _ { \mathrm { v l b } } \mathrm { ~ , ~ }$ ) is better at the start and end of the diffusion process, while the model resulting from $L _ { \mathrm { h y b r i d } }$ (referred to as $\theta _ { \mathrm { h y b r i d } } )$ is better throughout the middle of the diffusion process. This suggests that $\theta _ { \mathrm { v l b } }$ is focusing more on imperceptible details, hence the lower sample quality.
|
| 391 |
+
|
| 392 |
+
Given the above observation, we performed an experiment on ImageNet $6 4 \times 6 4$ to combine the two models by constructing an ensemble that uses $\theta _ { \mathrm { h y b r i d } }$ for $t \in [ 1 0 0 , T - 1 0 0 )$ and $\theta _ { \mathrm { v l b } }$ elsewhere. We found that this model achieved an FID of 18.9 and an NLL of 3.52 bits/dim. As we see from Table 1, this is only slightly worse than $\theta _ { \mathrm { h y b r i d } }$ in terms of FID, while being better than both models in terms of NLL.
|
| 393 |
+
|
| 394 |
+
# D COMPARING SAMPLE QUALITY TO OTHER GENERATIVE MODELS
|
| 395 |
+
|
| 396 |
+
While this paper does not focus on comparing sample quality to other types of generative models, we were curious how diffusion models compared to modern generative models on ImageNet $6 4 \times$ 64. Unfortunately, we did not find any literature which computed FID for unconditional ImageNet
|
| 397 |
+
|
| 398 |
+
Table 4: Sample quality comparison on class conditional ImageNet $6 4 \times 6 4$
|
| 399 |
+
|
| 400 |
+
<table><tr><td>MODEL</td><td>FID</td></tr><tr><td>FQ-GAN (Zhao et al., 2020)</td><td>9.67</td></tr><tr><td>Instance Selection GAN (DeVries et al., 2020)</td><td>9.07</td></tr><tr><td>Improved Diffusion (ours)</td><td>8.43</td></tr></table>
|
| 401 |
+
|
| 402 |
+

|
| 403 |
+
Figure 13a: FID over the course of training.
|
| 404 |
+
|
| 405 |
+

|
| 406 |
+
Figure 13b: Negative log-likelihood over the course of training.
|
| 407 |
+
|
| 408 |
+
Figure 13: Evaluation metrics over the course of training for two CIFAR-10 models, both with dropout 0.1. The model trained with the linear schedule learns more slowly, but does not overfit as quickly. When too much overfitting occurs, we observed overfitting artifacts similar to those from Salimans et al. (2017), which is reflected by increasing FID.
|
| 409 |
+
|
| 410 |
+
$6 4 \times 6 4$ . We ran an additional experiment where we trained a class-conditional diffusion model for 1.7M iterations using the $L _ { \mathrm { h y b r i d } }$ objective. To make the model class-conditional, we inject class information through the same pathway as the timestep $t$ . In particular, we add a class embedding $v _ { i }$ to the timestep embedding $e _ { t }$ , and pass this embedding to residual blocks throughout the model. When computing FID for this task, we generated 50K samples (rather than 10K) to be directly comparable to other works. We found that using more samples led to a decrease in estimated FID of roughly 2 points. This is the only FID we report that was computed using 50K samples. Figure 12 shows our samples, and Table 4 summarizes our results.
|
| 411 |
+
|
| 412 |
+
# E OVERFITTIG ON CIFAR-10
|
| 413 |
+
|
| 414 |
+
On CIFAR-10, we noticed that all models overfit, but tended to reach similar optimal FID at some point during training. Holding dropout constant, we found that models trained with our cosine schedule tended to reach optimal performance (and then overfit) more quickly than those trained with the linear schedule (Figure 13). In our experiments, we corrected for this difference by using more dropout for our cosine models than the linear models. We suspect that the overfitting from the cosine schedule is either due to 1) less noise in the cosine schedule providing less regularization, or 2) the cosine schedule making optimization, and thus overfitting, easier.
|
parse/train/-NEXDKk8gZ/-NEX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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "IMPROVED DENOISING DIFFUSION PROBABILISTIC MODELS ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
823,
|
| 10 |
+
145
|
| 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": "We explore denoising diffusion probabilistic models, a class of generative models which have recently been shown to produce excellent samples in the image and audio domains. While these models produce excellent samples, it has yet to be shown that they can achieve competitive log-likelihoods. We show that, with several small modifications, diffusion models can achieve competitive log-likelihoods in the image domain while maintaining high sample quality. Additionally, our models allow for sampling with an order of magnitude fewer diffusion steps with only a modest difference in sample quality. Finally, we explore how sample quality and log-likelihood scale with the number of diffusion steps and the amount of model capacity. We conclude that denoising diffusion probabilistic models are a promising class of generative models with excellent scaling properties and sample quality. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
263,
|
| 43 |
+
764,
|
| 44 |
+
431
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
454,
|
| 55 |
+
336,
|
| 56 |
+
470
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Sohl-Dickstein et al. (2015) introduced diffusion probabilistic models (\"diffusion models\" for brevity), a class of generative models which match a data distribution by learning to reverse a gradual, multi-step noising process. More recently, Ho et al. (2020) showed an equivalence between these models and score based generative models (Song & Ermon, 2019; 2020), which learn a gradient of the log-density of the data distribution using denoising score matching (Hyvärinen, 2005). It has recently been shown that this class of models can produce high-quality images (Ho et al., 2020; Song & Ermon, 2020; Jolicoeur-Martineau et al., 2020) and audio (Chen et al., 2020b; Kong et al., 2020), but it has yet to be shown that diffusion models can achieve competitive log-likelihoods. Furthermore, while Ho et al. (2020) showed extremely good results on the CIFAR-10 (Krizhevsky, 2009) and LSUN (Yu et al., 2015) datasets, it is unclear how well diffusion models scale to datasets with higher diversity such as ImageNet. Finally, while Chen et al. (2020b) found that diffusion models can efficiently generate audio using a small number of sampling steps, it has yet to be shown that the same is true for images. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
173,
|
| 65 |
+
486,
|
| 66 |
+
825,
|
| 67 |
+
665
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "In this paper, we show that diffusion models can achieve competitive log-likelihoods while maintaining good sample quality, even on high-diversity datasets like ImageNet. Additionally, we show that our improved models can produce competitive samples an order of magnitude faster than those from Ho et al. (2020). We achieve these results by combining a simple reparameterization of the reverse process variance, a hybrid learning objective that combines the variational lower-bound with the simplified objective from Ho et al. (2020), and a novel noise schedule which allows the model to better leverage the entire diffusion process. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
672,
|
| 77 |
+
823,
|
| 78 |
+
770
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "We find surprisingly that, with our hybrid objective, our models obtain better log-likelihoods than those obtained by optimizing the log-likelihood directly, and discover that the latter objective has much more gradient noise during training. We show that a simple importance sampling technique reduces this noise and allows us to achieve better log-likelihoods than with the hybrid objective. Using our trained models, we study how sample quality and log-likelihood change as we adjust the number of diffusion steps used at sampling time. We demonstrate that our improved models allow us to use an order of magnitude fewer steps at test time with only a modest change in sample quality and log-likelihood, thus speeding up sampling for use in practical applications. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
777,
|
| 88 |
+
825,
|
| 89 |
+
888
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "Finally, we evaluate the performance of these models as we increase model size, and observe trends that suggest predictable improvements in performance as we increase training compute. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
895,
|
| 99 |
+
821,
|
| 100 |
+
924
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "2 DENOISING DIFFUSION PROBABILISTIC MODELS ",
|
| 107 |
+
"text_level": 1,
|
| 108 |
+
"bbox": [
|
| 109 |
+
173,
|
| 110 |
+
102,
|
| 111 |
+
612,
|
| 112 |
+
118
|
| 113 |
+
],
|
| 114 |
+
"page_idx": 1
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"type": "text",
|
| 118 |
+
"text": "We briefly review the formulation of diffusion models from Ho et al. (2020). This formulation makes various simplifying assumptions, such as a fixed noising process $q$ which adds diagonal Gaussian noise at each timestep. For a more general derivation, see Sohl-Dickstein et al. (2015). ",
|
| 119 |
+
"bbox": [
|
| 120 |
+
174,
|
| 121 |
+
132,
|
| 122 |
+
825,
|
| 123 |
+
176
|
| 124 |
+
],
|
| 125 |
+
"page_idx": 1
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"type": "text",
|
| 129 |
+
"text": "2.1 DEFINITIONS ",
|
| 130 |
+
"text_level": 1,
|
| 131 |
+
"bbox": [
|
| 132 |
+
174,
|
| 133 |
+
193,
|
| 134 |
+
307,
|
| 135 |
+
207
|
| 136 |
+
],
|
| 137 |
+
"page_idx": 1
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"type": "text",
|
| 141 |
+
"text": "Given a data distribution $x _ { 0 } \\sim q ( x _ { 0 } )$ , we define a forward noising process $q$ which produces latents $x _ { 1 }$ through $x _ { T }$ by adding Gaussian noise at time $t$ with variance $\\beta _ { t } \\in ( 0 , 1 )$ as follows: ",
|
| 142 |
+
"bbox": [
|
| 143 |
+
173,
|
| 144 |
+
218,
|
| 145 |
+
826,
|
| 146 |
+
248
|
| 147 |
+
],
|
| 148 |
+
"page_idx": 1
|
| 149 |
+
},
|
| 150 |
+
{
|
| 151 |
+
"type": "equation",
|
| 152 |
+
"img_path": "images/b64cabd2c45926c034f519f04870c95c53bb1d6e046ecc621cdc529039e68de5.jpg",
|
| 153 |
+
"text": "$$\n\\begin{array} { r l r } { { q ( x _ { 1 } , . . . , x _ { T } | x _ { 0 } ) : = \\prod _ { t = 1 } ^ { T } q ( x _ { t } | x _ { t - 1 } ) } } \\\\ & { } & { q ( x _ { t } | x _ { t - 1 } ) : = \\mathcal { N } ( x _ { t } ; \\sqrt { 1 - \\beta _ { t } } x _ { t - 1 } , \\beta _ { t } \\mathbf { I } ) } \\end{array}\n$$",
|
| 154 |
+
"text_format": "latex",
|
| 155 |
+
"bbox": [
|
| 156 |
+
346,
|
| 157 |
+
253,
|
| 158 |
+
651,
|
| 159 |
+
321
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 1
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "Given sufficiently large $T$ and a well behaved schedule of $\\beta _ { t }$ , the latent $x _ { T }$ is nearly an isotropic Gaussian distribution. Thus, if we know the exact reverse distribution $q ( x _ { t - 1 } | x _ { t } )$ , we can sample $x _ { T } \\sim \\mathcal { N } ( 0 , \\mathbf { I } )$ and run the process in reverse to get a sample from $q ( x _ { 0 } )$ . However, since $q ( x _ { t - 1 } | x _ { t } )$ depends on the entire data distribution, we approximate it using a neural network: ",
|
| 166 |
+
"bbox": [
|
| 167 |
+
173,
|
| 168 |
+
332,
|
| 169 |
+
823,
|
| 170 |
+
388
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 1
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "equation",
|
| 176 |
+
"img_path": "images/87dc501276c91eaad6858be6e757b19558d5879296122205ef3412ee4ee3b5f4.jpg",
|
| 177 |
+
"text": "$$\np _ { \\theta } ( x _ { t - 1 } | x _ { t } ) : = \\mathcal { N } ( x _ { t - 1 } ; \\mu _ { \\theta } ( x _ { t } , t ) , \\Sigma _ { \\theta } ( x _ { t } , t ) )\n$$",
|
| 178 |
+
"text_format": "latex",
|
| 179 |
+
"bbox": [
|
| 180 |
+
348,
|
| 181 |
+
395,
|
| 182 |
+
650,
|
| 183 |
+
412
|
| 184 |
+
],
|
| 185 |
+
"page_idx": 1
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"type": "text",
|
| 189 |
+
"text": "The combination of $q$ and $p$ is a variational auto-encoder (Kingma & Welling, 2013), and we can write the variational lower bound (VLB) as follows: ",
|
| 190 |
+
"bbox": [
|
| 191 |
+
173,
|
| 192 |
+
426,
|
| 193 |
+
823,
|
| 194 |
+
455
|
| 195 |
+
],
|
| 196 |
+
"page_idx": 1
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"type": "equation",
|
| 200 |
+
"img_path": "images/6d2d5b2828e1929c5acd98d302a76bfa889ec9ab8713a372cb41cd891793ff24.jpg",
|
| 201 |
+
"text": "$$\n\\begin{array} { r l } & { L _ { \\mathrm { v l b } } : = L _ { 0 } + L _ { 1 } + \\ldots + L _ { T - 1 } + L _ { T } } \\\\ & { \\quad L _ { 0 } : = - \\log p _ { \\theta } ( x _ { 0 } | x _ { 1 } ) } \\\\ & { L _ { t - 1 } : = D _ { K L } ( q ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) \\parallel p _ { \\theta } ( x _ { t - 1 } | x _ { t } ) ) } \\\\ & { \\quad L _ { T } : = D _ { K L } ( q ( x _ { T } | x _ { 0 } ) \\parallel p ( x _ { T } ) ) } \\end{array}\n$$",
|
| 202 |
+
"text_format": "latex",
|
| 203 |
+
"bbox": [
|
| 204 |
+
346,
|
| 205 |
+
460,
|
| 206 |
+
651,
|
| 207 |
+
535
|
| 208 |
+
],
|
| 209 |
+
"page_idx": 1
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"type": "text",
|
| 213 |
+
"text": "Aside from $L _ { 0 }$ , each term of Equation 4 is a $K L$ divergence between two Gaussian distributions, and can thus be evaluated in closed form. To evaluate $L _ { 0 }$ for images, we assume that each color component is divided into 256 bins, and we compute the probability of $p _ { \\theta } ( x _ { 0 } | x _ { 1 } )$ landing in the correct bin (which is tractable using the CDF of the Gaussian distribution). Also note that while $L _ { T }$ does not depend on $\\theta$ , it will be close to zero if the forward noising process adequately destroys the data distribution so that $q ( x _ { T } | x _ { 0 } ) \\approx \\mathcal { N } ( 0 , \\mathbf { I } )$ . ",
|
| 214 |
+
"bbox": [
|
| 215 |
+
173,
|
| 216 |
+
546,
|
| 217 |
+
826,
|
| 218 |
+
631
|
| 219 |
+
],
|
| 220 |
+
"page_idx": 1
|
| 221 |
+
},
|
| 222 |
+
{
|
| 223 |
+
"type": "text",
|
| 224 |
+
"text": "It is useful to define and derive several other quantities which are relevant to the forward noising process, so we repeat them here from Ho et al. (2020): ",
|
| 225 |
+
"bbox": [
|
| 226 |
+
174,
|
| 227 |
+
637,
|
| 228 |
+
823,
|
| 229 |
+
666
|
| 230 |
+
],
|
| 231 |
+
"page_idx": 1
|
| 232 |
+
},
|
| 233 |
+
{
|
| 234 |
+
"type": "equation",
|
| 235 |
+
"img_path": "images/69bc7d69781017fc3cb230a37e56c4d6ec5477fbe6267a6fcdaad66c480cac9e.jpg",
|
| 236 |
+
"text": "$$\n\\begin{array} { c } { { \\displaystyle \\alpha _ { t } \\mapsto 1 - \\beta _ { t } } } \\\\ { { { \\displaystyle \\bar { \\alpha } _ { t } : = \\prod _ { s = 0 } ^ { t } \\alpha _ { s } } } } \\\\ { { { \\displaystyle \\bar { \\beta } _ { t } : = \\frac { 1 - \\bar { \\alpha } _ { t - 1 } } { 1 - \\bar { \\alpha } _ { t } } \\beta _ { t } } } } \\\\ { { { \\displaystyle \\tilde { \\mu } _ { t } ( x _ { t } , x _ { 0 } ) : = \\frac { \\sqrt { \\bar { \\alpha } _ { t - 1 } } \\beta _ { t } } { 1 - \\bar { \\alpha } _ { t } } x _ { 0 } + \\frac { \\sqrt { \\alpha _ { t } } ( 1 - \\bar { \\alpha } _ { t - 1 } ) } { 1 - \\bar { \\alpha } _ { t } } x _ { t } } } } \\\\ { { { { \\displaystyle q ( x _ { t } | x _ { 0 } ) = \\sqrt { ( x _ { t } ; \\zeta ) \\bar { \\alpha } _ { t } } x _ { 0 } } , ~ ( 1 - \\bar { \\alpha } _ { t } ) } } } \\\\ { { { \\displaystyle q ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) = \\sqrt { ( x _ { t - 1 } ; \\tilde { \\mu } ( x _ { t } , x _ { 0 } ) , \\tilde { \\beta } _ { t } ] } } } } \\end{array}\n$$",
|
| 237 |
+
"text_format": "latex",
|
| 238 |
+
"bbox": [
|
| 239 |
+
320,
|
| 240 |
+
671,
|
| 241 |
+
673,
|
| 242 |
+
843
|
| 243 |
+
],
|
| 244 |
+
"page_idx": 1
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"type": "text",
|
| 248 |
+
"text": "2.2 TRAINING IN PRACTICE ",
|
| 249 |
+
"text_level": 1,
|
| 250 |
+
"bbox": [
|
| 251 |
+
174,
|
| 252 |
+
854,
|
| 253 |
+
382,
|
| 254 |
+
869
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 1
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "text",
|
| 260 |
+
"text": "Equation 12 provides an efficient way to jump directly to an arbitrary step of the forward noising process. This makes it possible to randomly sample $t$ during training. Ho et al. (2020) uniformly sample $t$ for each image in each mini-batch. ",
|
| 261 |
+
"bbox": [
|
| 262 |
+
174,
|
| 263 |
+
881,
|
| 264 |
+
823,
|
| 265 |
+
924
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 1
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "There are many different ways to parameterize $\\mu _ { \\theta } ( x _ { t } , t )$ . The most obvious option is to predict $\\mu _ { \\theta } ( x _ { t } , t )$ directly with a neural network; alternatively, the network could predict $x _ { 0 }$ , and this output could then be fed through $\\tilde { \\mu } ( \\boldsymbol { x } _ { t } , \\boldsymbol { x } _ { 0 } )$ ; finally, the network could predict the noise $\\epsilon$ added to $x _ { 0 }$ , and this noise could be used to predict $x _ { 0 }$ via ",
|
| 272 |
+
"bbox": [
|
| 273 |
+
174,
|
| 274 |
+
103,
|
| 275 |
+
825,
|
| 276 |
+
160
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 2
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "equation",
|
| 282 |
+
"img_path": "images/cc6dad84e5b97edebb1cce5ea8cb1c813c73a0968428f39e2110d64a1e541a5b.jpg",
|
| 283 |
+
"text": "$$\nx _ { 0 } = \\frac { 1 } { \\sqrt { \\alpha _ { t } } } \\left( x _ { t } - \\frac { \\beta _ { t } } { \\sqrt { 1 - \\bar { \\alpha } _ { t } } } \\epsilon \\right)\n$$",
|
| 284 |
+
"text_format": "latex",
|
| 285 |
+
"bbox": [
|
| 286 |
+
397,
|
| 287 |
+
166,
|
| 288 |
+
602,
|
| 289 |
+
202
|
| 290 |
+
],
|
| 291 |
+
"page_idx": 2
|
| 292 |
+
},
|
| 293 |
+
{
|
| 294 |
+
"type": "text",
|
| 295 |
+
"text": "Ho et al. (2020) found that predicting $\\epsilon$ worked best, especially when combined with a reweighted loss function: ",
|
| 296 |
+
"bbox": [
|
| 297 |
+
173,
|
| 298 |
+
207,
|
| 299 |
+
823,
|
| 300 |
+
233
|
| 301 |
+
],
|
| 302 |
+
"page_idx": 2
|
| 303 |
+
},
|
| 304 |
+
{
|
| 305 |
+
"type": "equation",
|
| 306 |
+
"img_path": "images/aff5fd5f6a0b990138613ee89f39acdd23304d06c64f0df0c4bb891925273f20.jpg",
|
| 307 |
+
"text": "$$\nL _ { \\mathrm { s i m p l e } } = E _ { t , x _ { 0 } , \\epsilon } \\left[ | | \\epsilon - \\epsilon _ { \\theta } ( x _ { t } , t ) | | ^ { 2 } \\right]\n$$",
|
| 308 |
+
"text_format": "latex",
|
| 309 |
+
"bbox": [
|
| 310 |
+
380,
|
| 311 |
+
232,
|
| 312 |
+
616,
|
| 313 |
+
251
|
| 314 |
+
],
|
| 315 |
+
"page_idx": 2
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "This objective can be seen as a reweighted form of $L _ { \\mathrm { v l b } }$ (without the terms affecting $\\Sigma _ { \\theta }$ ). The authors found that optimizing this reweighted objective resulted in much better sample quality than optimizing $L _ { \\mathrm { v l b } }$ directly, and explain this by drawing a connection to generative score matching (Song & Ermon, 2019; 2020). ",
|
| 320 |
+
"bbox": [
|
| 321 |
+
173,
|
| 322 |
+
252,
|
| 323 |
+
825,
|
| 324 |
+
309
|
| 325 |
+
],
|
| 326 |
+
"page_idx": 2
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "text",
|
| 330 |
+
"text": "One subtlety is that $L _ { \\mathrm { s i m p l e } }$ provides no learning signal for $\\Sigma _ { \\theta } ( x _ { t } , t )$ . This is irrelevant, however, since Ho et al. (2020) achieved their best results by fixing the variance to $\\sigma _ { t } ^ { 2 } \\mathbf { I }$ rather than learning it. They found that they achieve similar sample quality using either $\\sigma _ { t } ^ { 2 } = \\beta _ { t }$ or $\\sigma _ { t } ^ { 2 } = \\tilde { \\beta } _ { t }$ , which are two extremes given by $\\boxed { q ( \\boldsymbol { x } _ { 0 } ) }$ being either isotropic Gaussian noise or a delta function, respectively. ",
|
| 331 |
+
"bbox": [
|
| 332 |
+
173,
|
| 333 |
+
315,
|
| 334 |
+
825,
|
| 335 |
+
376
|
| 336 |
+
],
|
| 337 |
+
"page_idx": 2
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"type": "text",
|
| 341 |
+
"text": "3 IMPROVING THE LOG-LIKELIHOOD ",
|
| 342 |
+
"text_level": 1,
|
| 343 |
+
"bbox": [
|
| 344 |
+
174,
|
| 345 |
+
396,
|
| 346 |
+
496,
|
| 347 |
+
411
|
| 348 |
+
],
|
| 349 |
+
"page_idx": 2
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"type": "text",
|
| 353 |
+
"text": "While Ho et al. (2020) found that diffusion models can generate high-fidelity samples according to FID (Heusel et al., 2017) and Inception Score (Salimans et al., 2016), they were unable to achieve competitive log-likelihoods with these models. Log-likelihood is a widely used metric in generative modeling, and it is generally believed that optimizing log-likelihood forces generative models to capture all of the modes of the data distribution (Razavi et al., 2019). Additionally, recent work (Henighan et al., 2020) has shown that small improvements in log-likelihood can have a dramatic impact on sample quality and learnt feature representations. Thus, it is important to explore why diffusion models seem to perform poorly on this metric, since this may suggest a fundamental shortcoming such as bad mode coverage. This section explores several modifications to the algorithm described in Section 2 that, when combined, allow diffusion models to achieve much better log-likelihoods on image datasets, suggesting that these models enjoy the same benefits as other likelihood-based generative models. ",
|
| 354 |
+
"bbox": [
|
| 355 |
+
173,
|
| 356 |
+
426,
|
| 357 |
+
825,
|
| 358 |
+
593
|
| 359 |
+
],
|
| 360 |
+
"page_idx": 2
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"type": "text",
|
| 364 |
+
"text": "To study the effects of different modifications, we train fixed model architectures with fixed hyperparameters (Appendix A) on the ImageNet $6 4 \\times 6 4$ (van den Oord et al., 2016a) and CIFAR-10 (Krizhevsky, 2009) datasets. While CIFAR-10 has seen more usage for this class of models, we chose to study ImageNet $6 4 \\times 6 4$ as well because it provides a good trade-off between diversity and resolution, allowing us to train models quickly without worrying about overfitting. Additionally, ImageNet $6 4 \\times 6 4$ has been studied extensively in the context of generative modeling (van den Oord et al., 2016b; Menick & Kalchbrenner, 2018; Child et al., 2019; Roy et al., 2020), allowing us to compare diffusion models directly to many other generative models. ",
|
| 365 |
+
"bbox": [
|
| 366 |
+
173,
|
| 367 |
+
601,
|
| 368 |
+
825,
|
| 369 |
+
713
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 2
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "text",
|
| 375 |
+
"text": "The setup from Ho et al. (2020) (optimizing $\\boldsymbol { L } _ { \\mathrm { s i m p l e } }$ while setting $\\sigma _ { t } ^ { 2 } = \\beta _ { t }$ and $T = 1 0 0 0$ ) achieves a log-likelihood of 3.99 bits/dim on ImageNet $6 \\dot { 4 } \\times 6 4$ after $2 0 0 \\mathrm { K }$ training iterations. We found in early experiments that we could get a boost in log-likelihood by increasing $T$ from 1000 to 4000; with this change, the log-likelihood improves to 3.77 bits/dim. For the remainder of this section, we use $T = 4 0 0 0$ , but we explore this choice in Section 4. ",
|
| 376 |
+
"bbox": [
|
| 377 |
+
174,
|
| 378 |
+
718,
|
| 379 |
+
825,
|
| 380 |
+
789
|
| 381 |
+
],
|
| 382 |
+
"page_idx": 2
|
| 383 |
+
},
|
| 384 |
+
{
|
| 385 |
+
"type": "text",
|
| 386 |
+
"text": "3.1 LEARNING $\\Sigma _ { \\theta } ( x _ { t } , t )$ ",
|
| 387 |
+
"text_level": 1,
|
| 388 |
+
"bbox": [
|
| 389 |
+
174,
|
| 390 |
+
805,
|
| 391 |
+
354,
|
| 392 |
+
820
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 2
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "In Ho et al. (2020), the authors set $\\Sigma _ { \\theta } ( x _ { t } , t ) = \\sigma _ { t } ^ { 2 } \\mathbf { I }$ , where $\\sigma _ { t }$ is not learned. Oddly, they found that fixing $\\sigma _ { t } ^ { 2 }$ to $\\beta _ { t }$ yielded roughly the same sample quality as fixing it to $\\tilde { \\beta } _ { t }$ . Considering that $\\beta _ { t }$ and $\\tilde { \\beta } _ { t }$ represent two opposite extremes, it is reasonable to ask why this choice doesn’t affect samples. One clue is given by Figure 1a, which shows that $\\beta _ { t }$ and $\\tilde { \\beta } _ { t }$ are almost equal except near $t = 0$ , i.e. where the model is dealing with imperceptible details. Furthermore, as we increase the number of diffusion steps, $\\beta _ { t }$ and $\\tilde { \\beta } _ { t }$ seem to remain close to one another for more of the diffusion process. ",
|
| 399 |
+
"bbox": [
|
| 400 |
+
173,
|
| 401 |
+
830,
|
| 402 |
+
825,
|
| 403 |
+
924
|
| 404 |
+
],
|
| 405 |
+
"page_idx": 2
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "image",
|
| 409 |
+
"img_path": "images/3afe566e863516f1bc83d7b5411df1eb052398ef0048d58af723dbf95505dbcd.jpg",
|
| 410 |
+
"image_caption": [
|
| 411 |
+
"Figure 1a: The ratio $\\tilde { \\beta } _ { t } / \\beta _ { t }$ for every diffusion step for diffusion processes of different lengths. "
|
| 412 |
+
],
|
| 413 |
+
"image_footnote": [],
|
| 414 |
+
"bbox": [
|
| 415 |
+
199,
|
| 416 |
+
106,
|
| 417 |
+
483,
|
| 418 |
+
244
|
| 419 |
+
],
|
| 420 |
+
"page_idx": 3
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "image",
|
| 424 |
+
"img_path": "images/610cf255770df4d3afaeb5bb81ebc5eea35aacbb9a66456647820e05064ab822.jpg",
|
| 425 |
+
"image_caption": [
|
| 426 |
+
"Figure 1b: Terms of the VLB vs diffusion step. The first few terms contribute most to NLL. "
|
| 427 |
+
],
|
| 428 |
+
"image_footnote": [],
|
| 429 |
+
"bbox": [
|
| 430 |
+
514,
|
| 431 |
+
104,
|
| 432 |
+
799,
|
| 433 |
+
248
|
| 434 |
+
],
|
| 435 |
+
"page_idx": 3
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"type": "image",
|
| 439 |
+
"img_path": "images/ea6ba75ccf8622fc8f8d35da5ded00228f8128a29446eb2688305a860da8f37a.jpg",
|
| 440 |
+
"image_caption": [
|
| 441 |
+
"Figure 2: Latent samples from linear (top) and cosine (bottom) schedules respectively at linearly spaced values of $t$ from 0 to $T$ . The latents in the last quarter of the linear schedule are almost purely noise, whereas the cosine schedule adds noise more slowly "
|
| 442 |
+
],
|
| 443 |
+
"image_footnote": [],
|
| 444 |
+
"bbox": [
|
| 445 |
+
174,
|
| 446 |
+
299,
|
| 447 |
+
823,
|
| 448 |
+
391
|
| 449 |
+
],
|
| 450 |
+
"page_idx": 3
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"type": "text",
|
| 454 |
+
"text": "This suggests that, in the limit of infinite diffusion steps, the choice of $\\sigma _ { t }$ might not matter at all for sample quality. In other words, as we add more diffusion steps, the model mean $\\mu _ { \\theta } ( x _ { t } , t )$ determines the distribution much more than $\\Sigma _ { \\theta } ( x _ { t } , t )$ . ",
|
| 455 |
+
"bbox": [
|
| 456 |
+
174,
|
| 457 |
+
470,
|
| 458 |
+
825,
|
| 459 |
+
513
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 3
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "text",
|
| 465 |
+
"text": "While the above argument suggests that fixing $\\sigma _ { t }$ is a reasonable choice for the sake of sample quality, it says nothing about log-likelihood. In fact, Figure 1b shows that the first few steps of the diffusion process contribute the most to the variational lower bound. Thus, it seems likely that we could improve log-likelihood by using a better choice of $\\Sigma _ { \\theta } ( x _ { t } , t )$ . To achieve this, we must learn $\\Sigma _ { \\theta } ( x _ { t } , t ) $ without the instabilities encountered by Ho et al. (2020). ",
|
| 466 |
+
"bbox": [
|
| 467 |
+
173,
|
| 468 |
+
520,
|
| 469 |
+
825,
|
| 470 |
+
590
|
| 471 |
+
],
|
| 472 |
+
"page_idx": 3
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"type": "text",
|
| 476 |
+
"text": "Since Figure 1a shows that the reasonable range for $\\Sigma _ { \\theta } ( x _ { t } , t )$ is very small, it would be hard for a neural network to predict $\\Sigma _ { \\theta } ( x _ { t } , t )$ directly, even in the log domain, as observed by Ho et al. (2020). Instead, we found it better to parameterize the variance as an interpolation between $\\beta _ { t }$ and $\\tilde { \\beta } _ { t }$ in the log domain. In particular, our model outputs a vector $v$ containing one component per dimension, and we turn this output into variances as follows: ",
|
| 477 |
+
"bbox": [
|
| 478 |
+
173,
|
| 479 |
+
595,
|
| 480 |
+
825,
|
| 481 |
+
669
|
| 482 |
+
],
|
| 483 |
+
"page_idx": 3
|
| 484 |
+
},
|
| 485 |
+
{
|
| 486 |
+
"type": "equation",
|
| 487 |
+
"img_path": "images/8513404d47a68653ecb64e9185b70be3d71feee2f8fd22756e6469a9eade82e3.jpg",
|
| 488 |
+
"text": "$$\n\\Sigma _ { \\theta } ( x _ { t } , t ) = \\exp ( v \\log \\beta _ { t } + ( 1 - v ) \\log \\tilde { \\beta } _ { t } )\n$$",
|
| 489 |
+
"text_format": "latex",
|
| 490 |
+
"bbox": [
|
| 491 |
+
357,
|
| 492 |
+
675,
|
| 493 |
+
642,
|
| 494 |
+
695
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 3
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "text",
|
| 500 |
+
"text": "We did not apply any constraints on $v$ , theoretically allowing the model to predict variances outside of the interpolated range. However, we did not observe the network doing this in practice, suggesting that the bounds for $\\Sigma _ { \\theta } ( x _ { t } , t )$ are indeed expressive enough. ",
|
| 501 |
+
"bbox": [
|
| 502 |
+
174,
|
| 503 |
+
708,
|
| 504 |
+
825,
|
| 505 |
+
752
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 3
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "text",
|
| 511 |
+
"text": "Since $L _ { \\mathrm { s i m p l e } }$ doesn’t depend on $\\Sigma _ { \\theta } ( x _ { t } , t )$ , we define a new hybrid objective: ",
|
| 512 |
+
"bbox": [
|
| 513 |
+
174,
|
| 514 |
+
757,
|
| 515 |
+
673,
|
| 516 |
+
773
|
| 517 |
+
],
|
| 518 |
+
"page_idx": 3
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "equation",
|
| 522 |
+
"img_path": "images/a61ab857b1d178f8962a527c1eaf5167e734afc81de9d0b6e83169f28e9dc696.jpg",
|
| 523 |
+
"text": "$$\nL _ { \\mathrm { h y b r i d } } = L _ { \\mathrm { s i m p l e } } + \\lambda L _ { \\mathrm { v l b } }\n$$",
|
| 524 |
+
"text_format": "latex",
|
| 525 |
+
"bbox": [
|
| 526 |
+
416,
|
| 527 |
+
780,
|
| 528 |
+
581,
|
| 529 |
+
796
|
| 530 |
+
],
|
| 531 |
+
"page_idx": 3
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"type": "text",
|
| 535 |
+
"text": "For our experiments, we set $\\lambda = 0 . 0 0 1$ to prevent $L _ { \\mathrm { v l b } }$ from overwhelming $L _ { \\mathrm { s i m p l e } }$ . Along this same line of reasoning, we also apply a stop-gradient to the $\\mu _ { \\theta } ( x _ { t } , t )$ output for the $\\dot { L } _ { \\mathrm { v l b } }$ term. This way, $L _ { \\mathrm { v l b } }$ can guide $\\Sigma _ { \\theta } ( x _ { t } , t )$ while $L _ { \\mathrm { s i m p l e } }$ is still the main source of influence over $\\mu _ { \\theta } ( x _ { t } , t )$ . ",
|
| 536 |
+
"bbox": [
|
| 537 |
+
174,
|
| 538 |
+
810,
|
| 539 |
+
825,
|
| 540 |
+
854
|
| 541 |
+
],
|
| 542 |
+
"page_idx": 3
|
| 543 |
+
},
|
| 544 |
+
{
|
| 545 |
+
"type": "text",
|
| 546 |
+
"text": "3.2 IMPROVING THE NOISE SCHEDULE ",
|
| 547 |
+
"text_level": 1,
|
| 548 |
+
"bbox": [
|
| 549 |
+
176,
|
| 550 |
+
869,
|
| 551 |
+
457,
|
| 552 |
+
883
|
| 553 |
+
],
|
| 554 |
+
"page_idx": 3
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "text",
|
| 558 |
+
"text": "We found that the noise schedule used in Ho et al. (2020) was sub-optimal for ImageNet $6 4 \\times 6 4$ . In particular, the end of the forward noising process is too noisy, and so doesn’t contribute very ",
|
| 559 |
+
"bbox": [
|
| 560 |
+
173,
|
| 561 |
+
895,
|
| 562 |
+
825,
|
| 563 |
+
924
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 3
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "image",
|
| 569 |
+
"img_path": "images/542c925b9a52bcacd9bceafce4200265da02c30db097f2329d5e0323611d7120.jpg",
|
| 570 |
+
"image_caption": [
|
| 571 |
+
"Figure 3a: FID when skipping a prefix of the reverse diffusion process on ImageNet $6 4 \\times 6 4$ . "
|
| 572 |
+
],
|
| 573 |
+
"image_footnote": [],
|
| 574 |
+
"bbox": [
|
| 575 |
+
199,
|
| 576 |
+
103,
|
| 577 |
+
485,
|
| 578 |
+
253
|
| 579 |
+
],
|
| 580 |
+
"page_idx": 4
|
| 581 |
+
},
|
| 582 |
+
{
|
| 583 |
+
"type": "image",
|
| 584 |
+
"img_path": "images/b17ad3de3e19f2149b9041f8bd237b6a3f5a5217020892257d8d4586a27099ea.jpg",
|
| 585 |
+
"image_caption": [
|
| 586 |
+
"Figure 3b: $\\bar { \\alpha } _ { t }$ throughout diffusion in the linear schedule and our proposed cosine schedule. "
|
| 587 |
+
],
|
| 588 |
+
"image_footnote": [],
|
| 589 |
+
"bbox": [
|
| 590 |
+
514,
|
| 591 |
+
104,
|
| 592 |
+
800,
|
| 593 |
+
252
|
| 594 |
+
],
|
| 595 |
+
"page_idx": 4
|
| 596 |
+
},
|
| 597 |
+
{
|
| 598 |
+
"type": "image",
|
| 599 |
+
"img_path": "images/157dabac69db32207d3fcadd8fc7e1ea223578fb65a6f6d5b18104a0b8718367.jpg",
|
| 600 |
+
"image_caption": [
|
| 601 |
+
"Figure 4a: Learning curves comparing the loglikelihoods achieved by different objectives on ImageNet $6 4 \\times 6 4$ . "
|
| 602 |
+
],
|
| 603 |
+
"image_footnote": [],
|
| 604 |
+
"bbox": [
|
| 605 |
+
197,
|
| 606 |
+
304,
|
| 607 |
+
483,
|
| 608 |
+
449
|
| 609 |
+
],
|
| 610 |
+
"page_idx": 4
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"type": "image",
|
| 614 |
+
"img_path": "images/48869de8cc03a07b9614ffbec1c4cb58f3b3cb0a2e867f8feb98bb5fd16aef1b.jpg",
|
| 615 |
+
"image_caption": [
|
| 616 |
+
"Figure 4b: Gradient noise scales for the $L _ { \\mathrm { v l b } }$ and $L _ { \\mathrm { h y b r i d } }$ objectives on ImageNet $6 4 \\times 6 4$ . "
|
| 617 |
+
],
|
| 618 |
+
"image_footnote": [],
|
| 619 |
+
"bbox": [
|
| 620 |
+
514,
|
| 621 |
+
309,
|
| 622 |
+
799,
|
| 623 |
+
455
|
| 624 |
+
],
|
| 625 |
+
"page_idx": 4
|
| 626 |
+
},
|
| 627 |
+
{
|
| 628 |
+
"type": "text",
|
| 629 |
+
"text": "much to sample quality. This can be seen visually in Figure 2. The result of this effect is studied in Figure 3a, where we see that a model trained with the linear schedule does not get much worse (as measured by FID) when we skip up to $20 \\%$ of the reverse diffusion process. ",
|
| 630 |
+
"bbox": [
|
| 631 |
+
176,
|
| 632 |
+
520,
|
| 633 |
+
825,
|
| 634 |
+
563
|
| 635 |
+
],
|
| 636 |
+
"page_idx": 4
|
| 637 |
+
},
|
| 638 |
+
{
|
| 639 |
+
"type": "text",
|
| 640 |
+
"text": "To address this problem, we construct a different noise schedule in terms of $\\bar { \\alpha } _ { t }$ : ",
|
| 641 |
+
"bbox": [
|
| 642 |
+
174,
|
| 643 |
+
569,
|
| 644 |
+
692,
|
| 645 |
+
584
|
| 646 |
+
],
|
| 647 |
+
"page_idx": 4
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"type": "equation",
|
| 651 |
+
"img_path": "images/c88eb0220231d130668ea2b4b43d1a94697d2dd394257d3e230c45052725cfed.jpg",
|
| 652 |
+
"text": "$$\n\\bar { \\alpha } _ { t } = \\frac { f ( t ) } { f ( 0 ) } , f ( t ) = \\cos \\left( \\frac { t / T + s } { 1 + s } \\cdot \\frac { \\pi } { 2 } \\right) ^ { 2 } , s = 0 . 0 0 8\n$$",
|
| 653 |
+
"text_format": "latex",
|
| 654 |
+
"bbox": [
|
| 655 |
+
315,
|
| 656 |
+
587,
|
| 657 |
+
683,
|
| 658 |
+
625
|
| 659 |
+
],
|
| 660 |
+
"page_idx": 4
|
| 661 |
+
},
|
| 662 |
+
{
|
| 663 |
+
"type": "text",
|
| 664 |
+
"text": "To go from this definition to variances $\\beta _ { t }$ , we note that $\\begin{array} { r } { \\beta _ { t } = 1 - \\frac { { { { \\bar { \\alpha } } _ { t } } } } { { { { \\bar { \\alpha } } _ { t - 1 } } } } } \\end{array}$ α¯tα¯ . In practice, we clip βt to be no larger than 0.999 to prevent singularities at the end of the diffusion process near $t = T$ . ",
|
| 665 |
+
"bbox": [
|
| 666 |
+
174,
|
| 667 |
+
627,
|
| 668 |
+
821,
|
| 669 |
+
659
|
| 670 |
+
],
|
| 671 |
+
"page_idx": 4
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "text",
|
| 675 |
+
"text": "Our cosine schedule is designed to have a linear drop-off of $\\bar { \\alpha } _ { t }$ in the middle of the process, while changing very little near the extremes of $t = 0$ and $t = T$ to prevent abrupt changes in noise level. Figure 3b shows how $\\bar { \\alpha } _ { t }$ progresses for both schedules. We can see that the linear schedule from Ho et al. (2020) falls towards zero much faster, destroying information more quickly than necessary. ",
|
| 676 |
+
"bbox": [
|
| 677 |
+
173,
|
| 678 |
+
665,
|
| 679 |
+
825,
|
| 680 |
+
722
|
| 681 |
+
],
|
| 682 |
+
"page_idx": 4
|
| 683 |
+
},
|
| 684 |
+
{
|
| 685 |
+
"type": "text",
|
| 686 |
+
"text": "The small offset $s$ in our schedule prevents $\\beta _ { t }$ from being too small near $t = 0$ , since we found that having tiny amounts of noise at the beginning of the process made it hard for the network to√ predict $\\epsilon$ accurately enough. In particular, we selected $s$ such that $\\sqrt { \\beta _ { 0 } }$ was slightly smaller than the pixel bin size, $1 / 1 2 7 . 5$ . We chose to use $c o s ^ { 2 }$ in particular because it is a common mathematical function with the shape we were looking for. This choice was arbitrary, and we expect that many other functions with similar shapes would work as well. ",
|
| 687 |
+
"bbox": [
|
| 688 |
+
174,
|
| 689 |
+
728,
|
| 690 |
+
825,
|
| 691 |
+
811
|
| 692 |
+
],
|
| 693 |
+
"page_idx": 4
|
| 694 |
+
},
|
| 695 |
+
{
|
| 696 |
+
"type": "text",
|
| 697 |
+
"text": "3.3 REDUCING GRADIENT NOISE ",
|
| 698 |
+
"text_level": 1,
|
| 699 |
+
"bbox": [
|
| 700 |
+
176,
|
| 701 |
+
828,
|
| 702 |
+
419,
|
| 703 |
+
843
|
| 704 |
+
],
|
| 705 |
+
"page_idx": 4
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"type": "text",
|
| 709 |
+
"text": "We expected to achieve the best log-likelihoods by optimizing $L _ { \\mathrm { v l b } }$ directly, rather than by optimizing $L _ { \\mathrm { h y b r i d } }$ . However, we were surprised to find that $L _ { \\mathrm { v l b } }$ was actually quite difficult to optimize in practice, at least on the diverse ImageNet $6 4 \\times 6 4$ dataset. Figure 4a shows the learning curves for both $L _ { \\mathrm { v l b } }$ and $L _ { \\mathrm { h y b r i d } }$ . Both curves are noisy, but the hybrid objective clearly achieves better log-likelihoods on the training set given the same amount of training time. ",
|
| 710 |
+
"bbox": [
|
| 711 |
+
174,
|
| 712 |
+
853,
|
| 713 |
+
823,
|
| 714 |
+
924
|
| 715 |
+
],
|
| 716 |
+
"page_idx": 4
|
| 717 |
+
},
|
| 718 |
+
{
|
| 719 |
+
"type": "table",
|
| 720 |
+
"img_path": "images/a58a5a96d357cfb9dbe266909785d258d2d20660028536b458284fdac6d37ec9.jpg",
|
| 721 |
+
"table_caption": [
|
| 722 |
+
"Table 1: Comparison of NLL and FID for different diffusion models on ImageNet $6 4 \\times 6 4 .$ . $L _ { \\mathrm { v l b } }$ and $L _ { \\mathrm { h y b r i d } }$ were trained with learned sigmas using the parameterization from Section 3.1. For $L _ { \\mathrm { v l b } }$ , we used the resampling scheme from Section 3.3. Using our cosine schedule and $L _ { \\mathrm { { h y b r i d } } }$ improves both log-likelihood and FID over the baseline from Ho et al. (2020). Optimizing $L _ { \\mathrm { v l b } }$ further improves log-likelihood at the cost of a higher FID. "
|
| 723 |
+
],
|
| 724 |
+
"table_footnote": [],
|
| 725 |
+
"table_body": "<table><tr><td>MODEL</td><td>TRAINITERS.</td><td>T</td><td>SCHEDULE</td><td>OBJECTIVE</td><td>NLL (bits/dim)</td><td>FID</td></tr><tr><td rowspan=\"2\">Baseline</td><td>200K</td><td>1K</td><td>linear</td><td>Lsimple</td><td>3.99</td><td>31.0</td></tr><tr><td>200K</td><td>4K</td><td>linear</td><td>Lsimple</td><td>3.77</td><td>29.7</td></tr><tr><td rowspan=\"4\">Improved</td><td>200K</td><td>4K</td><td>linear</td><td>Lhybrid</td><td>3.66</td><td>30.4</td></tr><tr><td>200K</td><td>4K</td><td>cosine</td><td>Lsimple</td><td>3.68</td><td>25.6</td></tr><tr><td>200K</td><td>4K</td><td>cosine</td><td>Lhybrid</td><td>3.62</td><td>26.6</td></tr><tr><td>200K</td><td>4K</td><td>cosine</td><td>Lvlb</td><td>3.57</td><td>54.7</td></tr><tr><td rowspan=\"2\">Improved</td><td>1.5M</td><td>4K</td><td>cosine</td><td>Lhybrid</td><td>3.57</td><td>18.3</td></tr><tr><td>1.5M</td><td>4K</td><td>cosine</td><td>Lvlb</td><td>3.53</td><td>38.3</td></tr></table>",
|
| 726 |
+
"bbox": [
|
| 727 |
+
173,
|
| 728 |
+
99,
|
| 729 |
+
825,
|
| 730 |
+
229
|
| 731 |
+
],
|
| 732 |
+
"page_idx": 5
|
| 733 |
+
},
|
| 734 |
+
{
|
| 735 |
+
"type": "table",
|
| 736 |
+
"img_path": "images/f8a50d5abf4262b143acbf911531dd528790098043f540a74fec0ac92225b6dd.jpg",
|
| 737 |
+
"table_caption": [
|
| 738 |
+
"Table 2: Comparison of NLL and FID for different diffusion models on CIFAR-10. Using our cosine schedule and $L _ { \\mathrm { h y b r i d } }$ improves log-likelihood with a marginal impact on FID. Optimizing $L _ { \\mathrm { v l b } }$ further improves log-likelihood at the cost of a significantly higher FID. "
|
| 739 |
+
],
|
| 740 |
+
"table_footnote": [],
|
| 741 |
+
"table_body": "<table><tr><td>MODEL</td><td>TRAIN ITERS.</td><td>T</td><td>SCHEDULE</td><td>OBJECTIVE</td><td>NLL (bits/dim)</td><td>FID</td></tr><tr><td rowspan=\"2\">Baseline</td><td>500K</td><td>1K</td><td>linear</td><td>Lsimple</td><td>3.73</td><td>3.29</td></tr><tr><td>500K</td><td>4K</td><td>linear</td><td>Lsimple</td><td>3.37</td><td>2.90</td></tr><tr><td rowspan=\"4\">Improved</td><td>500K</td><td>4K</td><td>linear</td><td>Lhybrid</td><td>3.26</td><td>3.07</td></tr><tr><td>500K</td><td>4K</td><td>cosine</td><td>Lsimple</td><td>3.26</td><td>3.05</td></tr><tr><td>500K</td><td>4K</td><td>cosine</td><td>Lhybrid</td><td>3.17</td><td>3.19</td></tr><tr><td>500K</td><td>4K</td><td>cosine</td><td>Lv1b</td><td>2.94</td><td>11.47</td></tr></table>",
|
| 742 |
+
"bbox": [
|
| 743 |
+
173,
|
| 744 |
+
324,
|
| 745 |
+
828,
|
| 746 |
+
426
|
| 747 |
+
],
|
| 748 |
+
"page_idx": 5
|
| 749 |
+
},
|
| 750 |
+
{
|
| 751 |
+
"type": "text",
|
| 752 |
+
"text": "We hypothesized that the gradient of $L _ { \\mathrm { v l b } }$ was much noisier than that of $L _ { \\mathrm { h y b r i d } }$ . We confirmed this by evaluating the gradient noise scales (McCandlish et al., 2018) for models trained with both objectives, as shown in Figure 4b. Thus, we sought out a way to reduce the variance of $L _ { \\mathrm { v l b } }$ in order to optimize directly for log-likelihood. ",
|
| 753 |
+
"bbox": [
|
| 754 |
+
174,
|
| 755 |
+
506,
|
| 756 |
+
825,
|
| 757 |
+
563
|
| 758 |
+
],
|
| 759 |
+
"page_idx": 5
|
| 760 |
+
},
|
| 761 |
+
{
|
| 762 |
+
"type": "text",
|
| 763 |
+
"text": "Noting that different terms of $L _ { \\mathrm { v l b } }$ have greatly different magnitudes (Figure 1b), we hypothesized that sampling $t$ uniformly causes unnecessary noise in the $L _ { \\mathrm { v l b } }$ objective. To address this, we employ importance sampling: ",
|
| 764 |
+
"bbox": [
|
| 765 |
+
174,
|
| 766 |
+
569,
|
| 767 |
+
825,
|
| 768 |
+
612
|
| 769 |
+
],
|
| 770 |
+
"page_idx": 5
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"type": "equation",
|
| 774 |
+
"img_path": "images/268d0b63149ed60ccc2a40f77acd6872b62a33dfb1d20a42c013251f1107a6bd.jpg",
|
| 775 |
+
"text": "$$\nL _ { \\mathrm { v l b } } = E _ { t \\sim p _ { t } } \\left[ \\frac { L _ { t } } { p _ { t } } \\right] , \\mathrm { w h e r e } p _ { t } \\propto \\sqrt { E [ L _ { t } ^ { 2 } ] } \\mathrm { a n d } \\sum p _ { t } = 1\n$$",
|
| 776 |
+
"text_format": "latex",
|
| 777 |
+
"bbox": [
|
| 778 |
+
305,
|
| 779 |
+
619,
|
| 780 |
+
692,
|
| 781 |
+
655
|
| 782 |
+
],
|
| 783 |
+
"page_idx": 5
|
| 784 |
+
},
|
| 785 |
+
{
|
| 786 |
+
"type": "text",
|
| 787 |
+
"text": "Since $E [ L _ { t } ^ { 2 } ]$ is unknown beforehand and may change throughout training, we maintain a history of the previous 10 values for each loss term, and update this dynamically during training. At the beginning of training, we sample $t$ uniformly until we draw 10 samples for every $t \\in [ 0 , T - 1 ]$ . ",
|
| 788 |
+
"bbox": [
|
| 789 |
+
174,
|
| 790 |
+
662,
|
| 791 |
+
825,
|
| 792 |
+
705
|
| 793 |
+
],
|
| 794 |
+
"page_idx": 5
|
| 795 |
+
},
|
| 796 |
+
{
|
| 797 |
+
"type": "text",
|
| 798 |
+
"text": "With this importance sampled objective, we are able to achieve our best log-likelihoods by optimizing $L _ { \\mathrm { v l b } }$ .1 This can be seen in Figure 4a as the $\" L _ { v l b }$ (resampled)\" curve. The figure also shows that the importance sampled objective is considerably less noisy than the original, uniformly sampled objective. ",
|
| 799 |
+
"bbox": [
|
| 800 |
+
174,
|
| 801 |
+
712,
|
| 802 |
+
825,
|
| 803 |
+
768
|
| 804 |
+
],
|
| 805 |
+
"page_idx": 5
|
| 806 |
+
},
|
| 807 |
+
{
|
| 808 |
+
"type": "text",
|
| 809 |
+
"text": "3.4 RESULTS AND ABLATIONS ",
|
| 810 |
+
"text_level": 1,
|
| 811 |
+
"bbox": [
|
| 812 |
+
176,
|
| 813 |
+
786,
|
| 814 |
+
398,
|
| 815 |
+
801
|
| 816 |
+
],
|
| 817 |
+
"page_idx": 5
|
| 818 |
+
},
|
| 819 |
+
{
|
| 820 |
+
"type": "text",
|
| 821 |
+
"text": "In this section, we ablate the changes we have made to achieve better log-likelihoods. Table 1 summarizes the results of our ablations on ImageNet $6 4 \\times 6 4$ , and Table 2 shows them for CIFAR10. We also trained our best ImageNet $6 4 \\times 6 4$ models for 1.5M iterations, and report these results as well. Based on the results, we recommend always using the cosine schedule, and the $L _ { \\mathrm { { h y b r i d } } }$ objective in most cases. If one is only optimizing for likelihood and not sample quality, the importance sampled $L _ { \\mathrm { v l b } }$ is the best objective to use. ",
|
| 822 |
+
"bbox": [
|
| 823 |
+
173,
|
| 824 |
+
813,
|
| 825 |
+
825,
|
| 826 |
+
897
|
| 827 |
+
],
|
| 828 |
+
"page_idx": 5
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
"type": "table",
|
| 832 |
+
"img_path": "images/4c1959585511479197d1f60db0efb5c02c908422d83d23724549f08e769484ed.jpg",
|
| 833 |
+
"table_caption": [
|
| 834 |
+
"Table 3: Comparison of diffusion models to other likelihood-based models on CIFAR-10 and Unconditional ImageNet $6 4 \\times 6 4$ . On ImageNet $6 4 \\times 6 4$ , our model is competitive with the best conventional models, but is worse than fully transformer-based architectures. "
|
| 835 |
+
],
|
| 836 |
+
"table_footnote": [],
|
| 837 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>MODEL</td><td rowspan=1 colspan=1>ImageNet 64 × 64NLL (bits/dim)</td><td rowspan=1 colspan=1>CIFAR-10NLL (bits/dim)</td></tr><tr><td rowspan=4 colspan=1>Glow (Kingma & Dhariwal, 2018)Flow++ (Ho et al., 2019)PixelCNN (van den Oord et al., 2016b)PixelSNAIL (Chen et al., 2018)SPN(Menick&Kalchbrenner,2018)Image Transformer (Parmar et al., 2018)Sparse Transformer (Child et al., 2019)Routing Transformer (Roy et al., 2020)</td><td rowspan=1 colspan=1>3.81</td><td rowspan=1 colspan=1>3.35</td></tr><tr><td rowspan=1 colspan=1>3.69</td><td rowspan=1 colspan=1>3.08</td></tr><tr><td rowspan=2 colspan=1>3.573.523.523.483.443.43</td><td rowspan=1 colspan=1>3.14</td></tr><tr><td rowspan=1 colspan=1>2.85=2.902.801</td></tr><tr><td rowspan=2 colspan=1>Diffusion (Ho et al., 2020)Improved Diffusion (ours)</td><td rowspan=1 colspan=1>3.77</td><td rowspan=1 colspan=1>3.70</td></tr><tr><td rowspan=1 colspan=1>3.53</td><td rowspan=1 colspan=1>2.94</td></tr></table>",
|
| 838 |
+
"bbox": [
|
| 839 |
+
223,
|
| 840 |
+
99,
|
| 841 |
+
774,
|
| 842 |
+
270
|
| 843 |
+
],
|
| 844 |
+
"page_idx": 6
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"type": "text",
|
| 848 |
+
"text": "4 IMPROVING SAMPLING SPEED ",
|
| 849 |
+
"text_level": 1,
|
| 850 |
+
"bbox": [
|
| 851 |
+
176,
|
| 852 |
+
348,
|
| 853 |
+
457,
|
| 854 |
+
364
|
| 855 |
+
],
|
| 856 |
+
"page_idx": 6
|
| 857 |
+
},
|
| 858 |
+
{
|
| 859 |
+
"type": "text",
|
| 860 |
+
"text": "All of our models were trained with 4000 diffusion steps, and thus producing a single sample takes several minutes on a modern GPU. In this section, we explore how performance scales if we reduce the steps used during sampling, and find that our pre-trained models can produce high-quality samples with many fewer diffusion steps than they were trained with without any fine-tuning. Reducing the steps in this way makes it possible to sample from our models in a number of seconds rather than minutes, and greatly improves the practical applicability of image diffusion models. ",
|
| 861 |
+
"bbox": [
|
| 862 |
+
174,
|
| 863 |
+
378,
|
| 864 |
+
825,
|
| 865 |
+
464
|
| 866 |
+
],
|
| 867 |
+
"page_idx": 6
|
| 868 |
+
},
|
| 869 |
+
{
|
| 870 |
+
"type": "text",
|
| 871 |
+
"text": "For a model trained with $T$ diffusion steps, we would typically sample using the same set of $t$ values $( 1 , 2 , . . . , T )$ as used during training. However, it is also possible to sample using an arbitrary set of $t$ values. We define a sequence $S$ of $t$ values to use for sampling, such as a strided schedule like $S = ( 1 , 3 , 5 , . . . , T - 1 )$ . Given the training noise schedule $\\bar { \\alpha } _ { t }$ , we can obtain the sampling noise schedule $\\bar { \\alpha } _ { S _ { t } }$ , which can be used to obtain corresponding sampling variances ",
|
| 872 |
+
"bbox": [
|
| 873 |
+
174,
|
| 874 |
+
469,
|
| 875 |
+
825,
|
| 876 |
+
541
|
| 877 |
+
],
|
| 878 |
+
"page_idx": 6
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"type": "equation",
|
| 882 |
+
"img_path": "images/2e35a5ddb9dff15bbf06ad7849a8bacf0ef212e80725e9e750104a3319bd7701.jpg",
|
| 883 |
+
"text": "$$\n\\beta _ { S _ { t } } = 1 - \\frac { \\bar { \\alpha } _ { S _ { t } } } { \\bar { \\alpha } _ { S _ { t - 1 } } } , \\quad \\tilde { \\beta } _ { S _ { t } } = \\frac { 1 - \\bar { \\alpha } _ { S _ { t - 1 } } } { 1 - \\bar { \\alpha } _ { S _ { t } } } \\beta _ { S _ { t } }\n$$",
|
| 884 |
+
"text_format": "latex",
|
| 885 |
+
"bbox": [
|
| 886 |
+
357,
|
| 887 |
+
546,
|
| 888 |
+
638,
|
| 889 |
+
582
|
| 890 |
+
],
|
| 891 |
+
"page_idx": 6
|
| 892 |
+
},
|
| 893 |
+
{
|
| 894 |
+
"type": "text",
|
| 895 |
+
"text": "We can compute $p ( x _ { S _ { t - 1 } } | x _ { S _ { t } } )$ as $\\mathcal { N } ( \\mu _ { \\theta } ( x _ { S _ { t } } , S _ { t } ) , \\Sigma _ { \\theta } ( x _ { S _ { t } } , S _ { t } ) )$ . Note that $\\Sigma _ { \\theta } ( x _ { S _ { t } } , S _ { t } )$ is parameterized as a range between $\\beta _ { S _ { t } }$ and $\\tilde { \\beta } _ { S _ { t } }$ so it will automatically be rescaled for the shorter diffusion process. ",
|
| 896 |
+
"bbox": [
|
| 897 |
+
174,
|
| 898 |
+
588,
|
| 899 |
+
825,
|
| 900 |
+
635
|
| 901 |
+
],
|
| 902 |
+
"page_idx": 6
|
| 903 |
+
},
|
| 904 |
+
{
|
| 905 |
+
"type": "text",
|
| 906 |
+
"text": "To evaluate sample quality for reduced numbers of sampling steps, we use a stride $K$ over timesteps to reduce the total number of sampling steps from $T$ to $T / K$ . In Figures 5a and 5c, we evaluate FIDs for an $L _ { \\mathrm { { h y b r i d } } }$ model and an $L _ { \\mathrm { s i m p l e } }$ model that were trained with 4000 diffusion steps, using 30, 50, 100, 150, 200, 400, and 4000 sampling steps. We do this for multiple checkpoints throughout training. We find that the $L _ { \\mathrm { s i m p l e } }$ model suffers much more in sample quality when using a reduced number of sampling steps, whereas our $L _ { \\mathrm { h y b r i d } }$ model maintains sample quality. Furthermore, we find that using more sampling steps becomes increasingly beneficial throughout training. However, 100 sampling steps is still sufficient to achieve near-optimal FIDs for our fully trained models. ",
|
| 907 |
+
"bbox": [
|
| 908 |
+
173,
|
| 909 |
+
640,
|
| 910 |
+
825,
|
| 911 |
+
753
|
| 912 |
+
],
|
| 913 |
+
"page_idx": 6
|
| 914 |
+
},
|
| 915 |
+
{
|
| 916 |
+
"type": "text",
|
| 917 |
+
"text": "In initial experiments, we found that although constant striding did not significantly affect FID, it drastically reduced log-likelihood. To address this, we use a strided subset of timesteps as for FID (with stride $K .$ ), but we also include every $t$ from 1 to $T / K$ . This requires $T / K$ extra evaluation steps, but greatly improves log-likelihood compared to the uniformly strided schedule. In Figures 5b and 5d we present log-likelihoods with this modified strided schedule. ",
|
| 918 |
+
"bbox": [
|
| 919 |
+
174,
|
| 920 |
+
758,
|
| 921 |
+
825,
|
| 922 |
+
829
|
| 923 |
+
],
|
| 924 |
+
"page_idx": 6
|
| 925 |
+
},
|
| 926 |
+
{
|
| 927 |
+
"type": "text",
|
| 928 |
+
"text": "5 SCALING MODEL SIZE ",
|
| 929 |
+
"text_level": 1,
|
| 930 |
+
"bbox": [
|
| 931 |
+
176,
|
| 932 |
+
849,
|
| 933 |
+
395,
|
| 934 |
+
866
|
| 935 |
+
],
|
| 936 |
+
"page_idx": 6
|
| 937 |
+
},
|
| 938 |
+
{
|
| 939 |
+
"type": "text",
|
| 940 |
+
"text": "In the previous sections, we showed algorithmic changes that improved log-likelihood and FID without changing the amount of training compute. However, a trend in modern machine learning is that larger models and more training time tend to improve model performance (Kaplan et al., 2020; ",
|
| 941 |
+
"bbox": [
|
| 942 |
+
176,
|
| 943 |
+
882,
|
| 944 |
+
823,
|
| 945 |
+
924
|
| 946 |
+
],
|
| 947 |
+
"page_idx": 6
|
| 948 |
+
},
|
| 949 |
+
{
|
| 950 |
+
"type": "image",
|
| 951 |
+
"img_path": "images/4b7c277a7c5a75e12866ba4634a41be45f0e985af119bb5556cb9f5882ef852f.jpg",
|
| 952 |
+
"image_caption": [
|
| 953 |
+
"Figure 5b: NLL versus evaluation steps on ImageNet $6 4 \\times 6 4$ . "
|
| 954 |
+
],
|
| 955 |
+
"image_footnote": [],
|
| 956 |
+
"bbox": [
|
| 957 |
+
199,
|
| 958 |
+
103,
|
| 959 |
+
803,
|
| 960 |
+
306
|
| 961 |
+
],
|
| 962 |
+
"page_idx": 7
|
| 963 |
+
},
|
| 964 |
+
{
|
| 965 |
+
"type": "image",
|
| 966 |
+
"img_path": "images/0b35db3da15742b9013a989166188b25555e7ed357b7890848a67f8977844264.jpg",
|
| 967 |
+
"image_caption": [
|
| 968 |
+
"Figure 5a: FID versus sampling steps on ImageNet $6 4 \\times 6 4$ . "
|
| 969 |
+
],
|
| 970 |
+
"image_footnote": [],
|
| 971 |
+
"bbox": [
|
| 972 |
+
199,
|
| 973 |
+
347,
|
| 974 |
+
483,
|
| 975 |
+
494
|
| 976 |
+
],
|
| 977 |
+
"page_idx": 7
|
| 978 |
+
},
|
| 979 |
+
{
|
| 980 |
+
"type": "image",
|
| 981 |
+
"img_path": "images/f6f336695237b6b5ad8dc0276c6f5f99a7e70b9b94a3c28ef94eac7078257f75.jpg",
|
| 982 |
+
"image_caption": [
|
| 983 |
+
"Figure 5c: FID versus sampling steps on CIFAR10. ",
|
| 984 |
+
"Figure 5d: NLL versus evaluation steps on CIFAR-10. "
|
| 985 |
+
],
|
| 986 |
+
"image_footnote": [],
|
| 987 |
+
"bbox": [
|
| 988 |
+
513,
|
| 989 |
+
344,
|
| 990 |
+
799,
|
| 991 |
+
496
|
| 992 |
+
],
|
| 993 |
+
"page_idx": 7
|
| 994 |
+
},
|
| 995 |
+
{
|
| 996 |
+
"type": "text",
|
| 997 |
+
"text": "Figure 5: NLL and FID versus number of evaluation/sampling steps, for models trained on ImageNet $6 4 \\times 6 4$ and CIFAR-10. All models were trained with 4000 diffusion steps. Models that learn sigmas using our reparametrization and $L _ { \\mathrm { h y b r i d } }$ objective (Section 3.1) increase marginally in NLL and FID as we reduce evaluation/sampling steps, while using fixed sigmas as in Ho et al. (2020) results in a larger increase. ",
|
| 998 |
+
"bbox": [
|
| 999 |
+
173,
|
| 1000 |
+
542,
|
| 1001 |
+
825,
|
| 1002 |
+
611
|
| 1003 |
+
],
|
| 1004 |
+
"page_idx": 7
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"type": "text",
|
| 1008 |
+
"text": "Chen et al., 2020a; Brown et al., 2020). Given this observation, we investigate how FID and NLL scale as a function of model size. Our results suggest that diffusion models can achieve better and better performance as training compute increases. ",
|
| 1009 |
+
"bbox": [
|
| 1010 |
+
174,
|
| 1011 |
+
686,
|
| 1012 |
+
825,
|
| 1013 |
+
728
|
| 1014 |
+
],
|
| 1015 |
+
"page_idx": 7
|
| 1016 |
+
},
|
| 1017 |
+
{
|
| 1018 |
+
"type": "text",
|
| 1019 |
+
"text": "To measure how performance scales with compute, we train four different models on ImageNet $6 4 \\times 6 4$ with the $L _ { \\mathrm { { h y b r i d } } }$ objective described in Section 3.1. To change model capacity, we apply a depth multiplier across all layers, such that the first layer has either 64, 96, 128, or 192 channels. Note that our previous experiments used 128 channels in the first layer. Since the depth of each layer affects the scale of the initial weights, we scale the Adam learning rate for each model by√ $1 / \\sqrt { }$ channel multiplier, such that the 128 channel model has a learning rate of 0.0001 (as in our other experiments). ",
|
| 1020 |
+
"bbox": [
|
| 1021 |
+
174,
|
| 1022 |
+
736,
|
| 1023 |
+
825,
|
| 1024 |
+
833
|
| 1025 |
+
],
|
| 1026 |
+
"page_idx": 7
|
| 1027 |
+
},
|
| 1028 |
+
{
|
| 1029 |
+
"type": "text",
|
| 1030 |
+
"text": "Figure 6a and 6b show how FID and NLL improve relative to compute. These plots reveal that, to achieve optimal performance for a given amount of compute, it often makes sense to train a larger model for fewer iterations, rather than training a smaller model to convergence. We note that these models do not achieve optimal log-likelihoods because they were trained with our $L _ { \\mathrm { h y b r i d } }$ objective and not directly with $L _ { \\mathrm { v l b } }$ to keep both good log-likelihoods and sample quality. The $\\mathbf { X }$ -axis in both figures is the theoretical amount of training compute, assuming full hardware utilization. ",
|
| 1031 |
+
"bbox": [
|
| 1032 |
+
173,
|
| 1033 |
+
840,
|
| 1034 |
+
825,
|
| 1035 |
+
924
|
| 1036 |
+
],
|
| 1037 |
+
"page_idx": 7
|
| 1038 |
+
},
|
| 1039 |
+
{
|
| 1040 |
+
"type": "image",
|
| 1041 |
+
"img_path": "images/569c9d20ce337d7cd5592baddaba68e0925e6603df5b96dc52be014485719858.jpg",
|
| 1042 |
+
"image_caption": [
|
| 1043 |
+
"Figure 6a: FID throughout training on ImageNet $6 4 \\times 6 4$ for different model sizes. "
|
| 1044 |
+
],
|
| 1045 |
+
"image_footnote": [],
|
| 1046 |
+
"bbox": [
|
| 1047 |
+
179,
|
| 1048 |
+
104,
|
| 1049 |
+
482,
|
| 1050 |
+
263
|
| 1051 |
+
],
|
| 1052 |
+
"page_idx": 8
|
| 1053 |
+
},
|
| 1054 |
+
{
|
| 1055 |
+
"type": "image",
|
| 1056 |
+
"img_path": "images/33ed41e715d53390139de134a04b4b1907e8cb502e6ee534a3b1d95fe7028b93.jpg",
|
| 1057 |
+
"image_caption": [
|
| 1058 |
+
"Figure 6b: NLL throughout training on ImageNet $6 4 \\times 6 4$ for different model sizes. "
|
| 1059 |
+
],
|
| 1060 |
+
"image_footnote": [],
|
| 1061 |
+
"bbox": [
|
| 1062 |
+
514,
|
| 1063 |
+
107,
|
| 1064 |
+
816,
|
| 1065 |
+
262
|
| 1066 |
+
],
|
| 1067 |
+
"page_idx": 8
|
| 1068 |
+
},
|
| 1069 |
+
{
|
| 1070 |
+
"type": "text",
|
| 1071 |
+
"text": "6 RELATED WORK ",
|
| 1072 |
+
"text_level": 1,
|
| 1073 |
+
"bbox": [
|
| 1074 |
+
174,
|
| 1075 |
+
325,
|
| 1076 |
+
344,
|
| 1077 |
+
340
|
| 1078 |
+
],
|
| 1079 |
+
"page_idx": 8
|
| 1080 |
+
},
|
| 1081 |
+
{
|
| 1082 |
+
"type": "text",
|
| 1083 |
+
"text": "Chen et al. (2020b) and Kong et al. (2020) are two recent works that use diffusion models to produce high fidelity audio conditioned on mel-spectrograms. Concurrent to our work, Chen et al. (2020b) use a combination of improved schedule and $L _ { 1 }$ loss to allow sampling with fewer steps with very little reduction in sample quality. However, compared to our unconditional image generation task, their generative task has a strong input conditioning signal provided by the mel-spectrograms, and we hypothesize that this makes it easier to sample with fewer diffusion steps. ",
|
| 1084 |
+
"bbox": [
|
| 1085 |
+
174,
|
| 1086 |
+
356,
|
| 1087 |
+
825,
|
| 1088 |
+
440
|
| 1089 |
+
],
|
| 1090 |
+
"page_idx": 8
|
| 1091 |
+
},
|
| 1092 |
+
{
|
| 1093 |
+
"type": "text",
|
| 1094 |
+
"text": "Jolicoeur-Martineau et al. (2020) explored score matching in the image domain, and constructed an adversarial training objective to produce better $x _ { 0 }$ predictions. However, they found that choosing a better network architecture removed the need for this adversarial objective, suggesting that the adversarial objective is not necessary for powerful generative modeling. ",
|
| 1095 |
+
"bbox": [
|
| 1096 |
+
174,
|
| 1097 |
+
446,
|
| 1098 |
+
825,
|
| 1099 |
+
503
|
| 1100 |
+
],
|
| 1101 |
+
"page_idx": 8
|
| 1102 |
+
},
|
| 1103 |
+
{
|
| 1104 |
+
"type": "text",
|
| 1105 |
+
"text": "7 CONCLUSION ",
|
| 1106 |
+
"text_level": 1,
|
| 1107 |
+
"bbox": [
|
| 1108 |
+
176,
|
| 1109 |
+
523,
|
| 1110 |
+
318,
|
| 1111 |
+
540
|
| 1112 |
+
],
|
| 1113 |
+
"page_idx": 8
|
| 1114 |
+
},
|
| 1115 |
+
{
|
| 1116 |
+
"type": "text",
|
| 1117 |
+
"text": "We have shown that, with a few modifications, diffusion models can sample much faster and achieve better log-likelihoods with little impact on sample quality. Here we summarize our main findings: ",
|
| 1118 |
+
"bbox": [
|
| 1119 |
+
173,
|
| 1120 |
+
554,
|
| 1121 |
+
823,
|
| 1122 |
+
583
|
| 1123 |
+
],
|
| 1124 |
+
"page_idx": 8
|
| 1125 |
+
},
|
| 1126 |
+
{
|
| 1127 |
+
"type": "text",
|
| 1128 |
+
"text": "• Our cosine noise schedule improves NLL (and sometimes FID) compared to the linear schedule from Ho et al. (2020). \n• Learning $\\Sigma _ { \\theta }$ using our parameterization and $L _ { \\mathrm { h y b r i d } }$ objective provides a good trade-off between NLL and FID. More importantly, it allows sampling with many fewer steps without decreased sample quality. \n• One can optimize $L _ { \\mathrm { v l b } }$ directly using our importance sampling technique to achieve the best possible NLL at the expense of sample quality. ",
|
| 1129 |
+
"bbox": [
|
| 1130 |
+
215,
|
| 1131 |
+
597,
|
| 1132 |
+
825,
|
| 1133 |
+
704
|
| 1134 |
+
],
|
| 1135 |
+
"page_idx": 8
|
| 1136 |
+
},
|
| 1137 |
+
{
|
| 1138 |
+
"type": "text",
|
| 1139 |
+
"text": "The combination of these results makes diffusion models an attractive choice for generative modeling, since they combine good log-likelihoods, high-quality samples, and fast sampling with a wellgrounded, stationary training objective. Furthermore, we have investigated how diffusion models scale with the amount of available training compute, and found that more training compute trivially leads to better sample quality and log-likelihood. These results indicate that diffusion models are a promising direction for future research, especially as the affordability of compute increases over time. ",
|
| 1140 |
+
"bbox": [
|
| 1141 |
+
173,
|
| 1142 |
+
717,
|
| 1143 |
+
825,
|
| 1144 |
+
814
|
| 1145 |
+
],
|
| 1146 |
+
"page_idx": 8
|
| 1147 |
+
},
|
| 1148 |
+
{
|
| 1149 |
+
"type": "text",
|
| 1150 |
+
"text": "REFERENCES ",
|
| 1151 |
+
"text_level": 1,
|
| 1152 |
+
"bbox": [
|
| 1153 |
+
176,
|
| 1154 |
+
103,
|
| 1155 |
+
285,
|
| 1156 |
+
117
|
| 1157 |
+
],
|
| 1158 |
+
"page_idx": 9
|
| 1159 |
+
},
|
| 1160 |
+
{
|
| 1161 |
+
"type": "text",
|
| 1162 |
+
"text": "Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners, 2020. ",
|
| 1163 |
+
"bbox": [
|
| 1164 |
+
174,
|
| 1165 |
+
126,
|
| 1166 |
+
825,
|
| 1167 |
+
210
|
| 1168 |
+
],
|
| 1169 |
+
"page_idx": 9
|
| 1170 |
+
},
|
| 1171 |
+
{
|
| 1172 |
+
"type": "text",
|
| 1173 |
+
"text": "Mark Chen, Alec Radford, Rewon Child, Jeff Wu, Heewoo Jun, Prafulla Dhariwal, David Luan, and Ilya Sutskever. Generative pretraining from pixels, 2020a. URL https://cdn.openai. com/papers/Generative_Pretraining_from_Pixels_V2.pdf. ",
|
| 1174 |
+
"bbox": [
|
| 1175 |
+
173,
|
| 1176 |
+
219,
|
| 1177 |
+
825,
|
| 1178 |
+
263
|
| 1179 |
+
],
|
| 1180 |
+
"page_idx": 9
|
| 1181 |
+
},
|
| 1182 |
+
{
|
| 1183 |
+
"type": "text",
|
| 1184 |
+
"text": "Nanxin Chen, Yu Zhang, Heiga Zen, Ron J. Weiss, Mohammad Norouzi, and William Chan. Wavegrad: Estimating gradients for waveform generation, 2020b. ",
|
| 1185 |
+
"bbox": [
|
| 1186 |
+
173,
|
| 1187 |
+
272,
|
| 1188 |
+
821,
|
| 1189 |
+
301
|
| 1190 |
+
],
|
| 1191 |
+
"page_idx": 9
|
| 1192 |
+
},
|
| 1193 |
+
{
|
| 1194 |
+
"type": "text",
|
| 1195 |
+
"text": "Xi Chen, Nikhil Mishra, Mostafa Rohaninejad, and Pieter Abbeel. Pixelsnail: An improved autoregressive generative model. In International Conference on Machine Learning, pp. 864–872. PMLR, 2018. ",
|
| 1196 |
+
"bbox": [
|
| 1197 |
+
173,
|
| 1198 |
+
310,
|
| 1199 |
+
825,
|
| 1200 |
+
353
|
| 1201 |
+
],
|
| 1202 |
+
"page_idx": 9
|
| 1203 |
+
},
|
| 1204 |
+
{
|
| 1205 |
+
"type": "text",
|
| 1206 |
+
"text": "Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers, 2019. ",
|
| 1207 |
+
"bbox": [
|
| 1208 |
+
169,
|
| 1209 |
+
363,
|
| 1210 |
+
825,
|
| 1211 |
+
392
|
| 1212 |
+
],
|
| 1213 |
+
"page_idx": 9
|
| 1214 |
+
},
|
| 1215 |
+
{
|
| 1216 |
+
"type": "text",
|
| 1217 |
+
"text": "Terrance DeVries, Michal Drozdzal, and Graham W Taylor. Instance selection for gans. arXiv preprint arXiv:2007.15255, 2020. ",
|
| 1218 |
+
"bbox": [
|
| 1219 |
+
171,
|
| 1220 |
+
402,
|
| 1221 |
+
823,
|
| 1222 |
+
431
|
| 1223 |
+
],
|
| 1224 |
+
"page_idx": 9
|
| 1225 |
+
},
|
| 1226 |
+
{
|
| 1227 |
+
"type": "text",
|
| 1228 |
+
"text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition, 2015. ",
|
| 1229 |
+
"bbox": [
|
| 1230 |
+
173,
|
| 1231 |
+
440,
|
| 1232 |
+
821,
|
| 1233 |
+
469
|
| 1234 |
+
],
|
| 1235 |
+
"page_idx": 9
|
| 1236 |
+
},
|
| 1237 |
+
{
|
| 1238 |
+
"type": "text",
|
| 1239 |
+
"text": "Tom Henighan, Jared Kaplan, Mor Katz, Mark Chen, Christopher Hesse, Jacob Jackson, Heewoo Jun, Tom B. Brown, Prafulla Dhariwal, Scott Gray, Chris Hallacy, Benjamin Mann, Alec Radford, Aditya Ramesh, Nick Ryder, Daniel M. Ziegler, John Schulman, Dario Amodei, and Sam McCandlish. Scaling laws for autoregressive generative modeling, 2020. ",
|
| 1240 |
+
"bbox": [
|
| 1241 |
+
174,
|
| 1242 |
+
479,
|
| 1243 |
+
825,
|
| 1244 |
+
536
|
| 1245 |
+
],
|
| 1246 |
+
"page_idx": 9
|
| 1247 |
+
},
|
| 1248 |
+
{
|
| 1249 |
+
"type": "text",
|
| 1250 |
+
"text": "Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in Neural Information Processing Systems 30 (NIPS 2017), 2017. ",
|
| 1251 |
+
"bbox": [
|
| 1252 |
+
174,
|
| 1253 |
+
546,
|
| 1254 |
+
825,
|
| 1255 |
+
589
|
| 1256 |
+
],
|
| 1257 |
+
"page_idx": 9
|
| 1258 |
+
},
|
| 1259 |
+
{
|
| 1260 |
+
"type": "text",
|
| 1261 |
+
"text": "Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, and Pieter Abbeel. Flow $^ { + + }$ : Improving flowbased generative models with variational dequantization and architecture design. arXiv preprint arXiv:1902.00275, 2019. ",
|
| 1262 |
+
"bbox": [
|
| 1263 |
+
173,
|
| 1264 |
+
599,
|
| 1265 |
+
826,
|
| 1266 |
+
642
|
| 1267 |
+
],
|
| 1268 |
+
"page_idx": 9
|
| 1269 |
+
},
|
| 1270 |
+
{
|
| 1271 |
+
"type": "text",
|
| 1272 |
+
"text": "Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models, 2020. ",
|
| 1273 |
+
"bbox": [
|
| 1274 |
+
169,
|
| 1275 |
+
651,
|
| 1276 |
+
772,
|
| 1277 |
+
667
|
| 1278 |
+
],
|
| 1279 |
+
"page_idx": 9
|
| 1280 |
+
},
|
| 1281 |
+
{
|
| 1282 |
+
"type": "text",
|
| 1283 |
+
"text": "Aapo Hyvärinen. Estimation of non-normalized statistical models by score matching. Journal of Machine Learning Research, 6(Apr):695–709, 2005. ",
|
| 1284 |
+
"bbox": [
|
| 1285 |
+
171,
|
| 1286 |
+
676,
|
| 1287 |
+
825,
|
| 1288 |
+
705
|
| 1289 |
+
],
|
| 1290 |
+
"page_idx": 9
|
| 1291 |
+
},
|
| 1292 |
+
{
|
| 1293 |
+
"type": "text",
|
| 1294 |
+
"text": "Alexia Jolicoeur-Martineau, Rémi Piché-Taillefer, Rémi Tachet des Combes, and Ioannis Mitliagkas. Adversarial score matching and improved sampling for image generation, 2020. ",
|
| 1295 |
+
"bbox": [
|
| 1296 |
+
171,
|
| 1297 |
+
714,
|
| 1298 |
+
825,
|
| 1299 |
+
744
|
| 1300 |
+
],
|
| 1301 |
+
"page_idx": 9
|
| 1302 |
+
},
|
| 1303 |
+
{
|
| 1304 |
+
"type": "text",
|
| 1305 |
+
"text": "Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models, 2020. ",
|
| 1306 |
+
"bbox": [
|
| 1307 |
+
173,
|
| 1308 |
+
753,
|
| 1309 |
+
823,
|
| 1310 |
+
796
|
| 1311 |
+
],
|
| 1312 |
+
"page_idx": 9
|
| 1313 |
+
},
|
| 1314 |
+
{
|
| 1315 |
+
"type": "text",
|
| 1316 |
+
"text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2014. ",
|
| 1317 |
+
"bbox": [
|
| 1318 |
+
173,
|
| 1319 |
+
806,
|
| 1320 |
+
748,
|
| 1321 |
+
821
|
| 1322 |
+
],
|
| 1323 |
+
"page_idx": 9
|
| 1324 |
+
},
|
| 1325 |
+
{
|
| 1326 |
+
"type": "text",
|
| 1327 |
+
"text": "Diederik P Kingma and Max Welling. Auto-encoding variational bayes, 2013. ",
|
| 1328 |
+
"bbox": [
|
| 1329 |
+
174,
|
| 1330 |
+
832,
|
| 1331 |
+
687,
|
| 1332 |
+
847
|
| 1333 |
+
],
|
| 1334 |
+
"page_idx": 9
|
| 1335 |
+
},
|
| 1336 |
+
{
|
| 1337 |
+
"type": "text",
|
| 1338 |
+
"text": "Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in neural information processing systems, pp. 10215–10224, 2018. ",
|
| 1339 |
+
"bbox": [
|
| 1340 |
+
173,
|
| 1341 |
+
856,
|
| 1342 |
+
820,
|
| 1343 |
+
886
|
| 1344 |
+
],
|
| 1345 |
+
"page_idx": 9
|
| 1346 |
+
},
|
| 1347 |
+
{
|
| 1348 |
+
"type": "text",
|
| 1349 |
+
"text": "Zhifeng Kong, Wei Ping, Jiaji Huang, Kexin Zhao, and Bryan Catanzaro. Diffwave: A versatile diffusion model for audio synthesis, 2020. ",
|
| 1350 |
+
"bbox": [
|
| 1351 |
+
176,
|
| 1352 |
+
895,
|
| 1353 |
+
823,
|
| 1354 |
+
924
|
| 1355 |
+
],
|
| 1356 |
+
"page_idx": 9
|
| 1357 |
+
},
|
| 1358 |
+
{
|
| 1359 |
+
"type": "text",
|
| 1360 |
+
"text": "Alex Krizhevsky. Learning multiple layers of features from tiny images, 2009. URL http:// www.cs.toronto.edu/\\~kriz/learning-features-2009-TR.pdf. ",
|
| 1361 |
+
"bbox": [
|
| 1362 |
+
173,
|
| 1363 |
+
103,
|
| 1364 |
+
823,
|
| 1365 |
+
133
|
| 1366 |
+
],
|
| 1367 |
+
"page_idx": 10
|
| 1368 |
+
},
|
| 1369 |
+
{
|
| 1370 |
+
"type": "text",
|
| 1371 |
+
"text": "Sam McCandlish, Jared Kaplan, Dario Amodei, and OpenAI Dota Team. An empirical model of large-batch training, 2018. ",
|
| 1372 |
+
"bbox": [
|
| 1373 |
+
173,
|
| 1374 |
+
141,
|
| 1375 |
+
823,
|
| 1376 |
+
170
|
| 1377 |
+
],
|
| 1378 |
+
"page_idx": 10
|
| 1379 |
+
},
|
| 1380 |
+
{
|
| 1381 |
+
"type": "text",
|
| 1382 |
+
"text": "Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling, 2018. ",
|
| 1383 |
+
"bbox": [
|
| 1384 |
+
171,
|
| 1385 |
+
178,
|
| 1386 |
+
825,
|
| 1387 |
+
208
|
| 1388 |
+
],
|
| 1389 |
+
"page_idx": 10
|
| 1390 |
+
},
|
| 1391 |
+
{
|
| 1392 |
+
"type": "text",
|
| 1393 |
+
"text": "Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. arXiv preprint arXiv:1802.05751, 2018. ",
|
| 1394 |
+
"bbox": [
|
| 1395 |
+
171,
|
| 1396 |
+
215,
|
| 1397 |
+
825,
|
| 1398 |
+
246
|
| 1399 |
+
],
|
| 1400 |
+
"page_idx": 10
|
| 1401 |
+
},
|
| 1402 |
+
{
|
| 1403 |
+
"type": "text",
|
| 1404 |
+
"text": "Ali Razavi, Aaron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with vq-vae-2, 2019. ",
|
| 1405 |
+
"bbox": [
|
| 1406 |
+
173,
|
| 1407 |
+
253,
|
| 1408 |
+
825,
|
| 1409 |
+
284
|
| 1410 |
+
],
|
| 1411 |
+
"page_idx": 10
|
| 1412 |
+
},
|
| 1413 |
+
{
|
| 1414 |
+
"type": "text",
|
| 1415 |
+
"text": "Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers, 2020. ",
|
| 1416 |
+
"bbox": [
|
| 1417 |
+
171,
|
| 1418 |
+
291,
|
| 1419 |
+
825,
|
| 1420 |
+
321
|
| 1421 |
+
],
|
| 1422 |
+
"page_idx": 10
|
| 1423 |
+
},
|
| 1424 |
+
{
|
| 1425 |
+
"type": "text",
|
| 1426 |
+
"text": "Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans, 2016. ",
|
| 1427 |
+
"bbox": [
|
| 1428 |
+
173,
|
| 1429 |
+
329,
|
| 1430 |
+
821,
|
| 1431 |
+
359
|
| 1432 |
+
],
|
| 1433 |
+
"page_idx": 10
|
| 1434 |
+
},
|
| 1435 |
+
{
|
| 1436 |
+
"type": "text",
|
| 1437 |
+
"text": "Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P. Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications, 2017. ",
|
| 1438 |
+
"bbox": [
|
| 1439 |
+
173,
|
| 1440 |
+
367,
|
| 1441 |
+
823,
|
| 1442 |
+
397
|
| 1443 |
+
],
|
| 1444 |
+
"page_idx": 10
|
| 1445 |
+
},
|
| 1446 |
+
{
|
| 1447 |
+
"type": "text",
|
| 1448 |
+
"text": "Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics, 2015. ",
|
| 1449 |
+
"bbox": [
|
| 1450 |
+
171,
|
| 1451 |
+
405,
|
| 1452 |
+
821,
|
| 1453 |
+
435
|
| 1454 |
+
],
|
| 1455 |
+
"page_idx": 10
|
| 1456 |
+
},
|
| 1457 |
+
{
|
| 1458 |
+
"type": "text",
|
| 1459 |
+
"text": "Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. In Advances in Neural Information Processing Systems, pp. 11918–11930, 2019. ",
|
| 1460 |
+
"bbox": [
|
| 1461 |
+
173,
|
| 1462 |
+
443,
|
| 1463 |
+
821,
|
| 1464 |
+
473
|
| 1465 |
+
],
|
| 1466 |
+
"page_idx": 10
|
| 1467 |
+
},
|
| 1468 |
+
{
|
| 1469 |
+
"type": "text",
|
| 1470 |
+
"text": "Yang Song and Stefano Ermon. Improved techniques for training score-based generative models. arXiv preprint arXiv:2006.09011, 2020. ",
|
| 1471 |
+
"bbox": [
|
| 1472 |
+
173,
|
| 1473 |
+
479,
|
| 1474 |
+
821,
|
| 1475 |
+
510
|
| 1476 |
+
],
|
| 1477 |
+
"page_idx": 10
|
| 1478 |
+
},
|
| 1479 |
+
{
|
| 1480 |
+
"type": "text",
|
| 1481 |
+
"text": "Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with pixelcnn decoders, 2016a. URL http:// image-net.org/small/download.php. ",
|
| 1482 |
+
"bbox": [
|
| 1483 |
+
174,
|
| 1484 |
+
517,
|
| 1485 |
+
823,
|
| 1486 |
+
561
|
| 1487 |
+
],
|
| 1488 |
+
"page_idx": 10
|
| 1489 |
+
},
|
| 1490 |
+
{
|
| 1491 |
+
"type": "text",
|
| 1492 |
+
"text": "Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with pixelcnn decoders, 2016b. ",
|
| 1493 |
+
"bbox": [
|
| 1494 |
+
173,
|
| 1495 |
+
569,
|
| 1496 |
+
821,
|
| 1497 |
+
599
|
| 1498 |
+
],
|
| 1499 |
+
"page_idx": 10
|
| 1500 |
+
},
|
| 1501 |
+
{
|
| 1502 |
+
"type": "text",
|
| 1503 |
+
"text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need, 2017. ",
|
| 1504 |
+
"bbox": [
|
| 1505 |
+
174,
|
| 1506 |
+
607,
|
| 1507 |
+
821,
|
| 1508 |
+
637
|
| 1509 |
+
],
|
| 1510 |
+
"page_idx": 10
|
| 1511 |
+
},
|
| 1512 |
+
{
|
| 1513 |
+
"type": "text",
|
| 1514 |
+
"text": "Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop, 2015. ",
|
| 1515 |
+
"bbox": [
|
| 1516 |
+
174,
|
| 1517 |
+
645,
|
| 1518 |
+
821,
|
| 1519 |
+
675
|
| 1520 |
+
],
|
| 1521 |
+
"page_idx": 10
|
| 1522 |
+
},
|
| 1523 |
+
{
|
| 1524 |
+
"type": "text",
|
| 1525 |
+
"text": "Yang Zhao, Chunyuan Li, Ping Yu, Jianfeng Gao, and Changyou Chen. Feature quantization improves gan training. arXiv, pp. arXiv–2004, 2020. ",
|
| 1526 |
+
"bbox": [
|
| 1527 |
+
174,
|
| 1528 |
+
683,
|
| 1529 |
+
823,
|
| 1530 |
+
713
|
| 1531 |
+
],
|
| 1532 |
+
"page_idx": 10
|
| 1533 |
+
},
|
| 1534 |
+
{
|
| 1535 |
+
"type": "text",
|
| 1536 |
+
"text": "A HYPERPARAMETERS ",
|
| 1537 |
+
"text_level": 1,
|
| 1538 |
+
"bbox": [
|
| 1539 |
+
176,
|
| 1540 |
+
102,
|
| 1541 |
+
380,
|
| 1542 |
+
118
|
| 1543 |
+
],
|
| 1544 |
+
"page_idx": 11
|
| 1545 |
+
},
|
| 1546 |
+
{
|
| 1547 |
+
"type": "text",
|
| 1548 |
+
"text": "For all of our experiments, we use a UNet model architecture2 similar to that used by Ho et al. (2020). We changed the attention layers to use multi-head attention (Vaswani et al., 2017), and opted to use four attention heads rather than one (while keeping the same total number of channels). We employed attention not only at the 16x16 resolution, but also at the 8x8 resolution. Additionally, we changed the way the model conditions on $t$ . In particular, instead of computing conditioning vector $v$ and injecting it into hidden state $h$ as $\\mathrm { G r o u p N o r m } ( h + v )$ , we compute conditioning vectors $w$ and $b$ and inject them into the hidden state as $\\mathrm { G r o u p N o r m } ( h ) ( w + 1 ) + b$ . We found in preliminary experiments on ImageNet $6 4 \\times 6 4$ that these modifications slightly improved FID. ",
|
| 1549 |
+
"bbox": [
|
| 1550 |
+
173,
|
| 1551 |
+
202,
|
| 1552 |
+
825,
|
| 1553 |
+
314
|
| 1554 |
+
],
|
| 1555 |
+
"page_idx": 11
|
| 1556 |
+
},
|
| 1557 |
+
{
|
| 1558 |
+
"type": "text",
|
| 1559 |
+
"text": "We used a 120M parameter model for all ImageNet $6 4 \\times 6 4$ experiments except in Section 5, where we scaled the number of channels in all layers. In this architecture, the downsampling stack performs four steps of downsampling, each with three residual blocks (He et al., 2015). The upsampling stack is setup as a mirror image of the downsampling stack. From highest to lowest resolution, the UNet stages use $[ C , 2 C , 3 C , 4 \\bar { C } ]$ channels, respectively. In all experiments except those in Section 5, we set $C = 1 2 8$ . We estimate that, with $C = 1 2 8$ , our model requires roughly 39 billion FLOPs in the forward pass. ",
|
| 1560 |
+
"bbox": [
|
| 1561 |
+
174,
|
| 1562 |
+
320,
|
| 1563 |
+
825,
|
| 1564 |
+
417
|
| 1565 |
+
],
|
| 1566 |
+
"page_idx": 11
|
| 1567 |
+
},
|
| 1568 |
+
{
|
| 1569 |
+
"type": "text",
|
| 1570 |
+
"text": "For our CIFAR-10 experiments, we used a smaller model with three resblocks per downsampling stage and layer widths $[ C , 2 C , 2 C , 2 C ]$ with $C = 1 2 8$ . We swept over dropout values $\\{ 0 . 1 , 0 . 2 , \\bar { 0 . 3 } \\bar \\}$ and found that 0.1 worked best for the linear schedule while 0.3 worked best for our cosine schedule (Section 3.2). We expand upon this in Appendix E. ",
|
| 1571 |
+
"bbox": [
|
| 1572 |
+
173,
|
| 1573 |
+
425,
|
| 1574 |
+
823,
|
| 1575 |
+
481
|
| 1576 |
+
],
|
| 1577 |
+
"page_idx": 11
|
| 1578 |
+
},
|
| 1579 |
+
{
|
| 1580 |
+
"type": "text",
|
| 1581 |
+
"text": "For all of our experiments, we used Adam (Kingma & Ba, 2014) with a batch size of 128 and an exponential moving average (EMA) over model parameters with a rate of 0.9999. Except in Section 5, we fixed the learning rate to 0.0001. For quick comparisons in Section 3, we trained models for 200K iterations. This is not enough to reach convergence, but we believe it is enough to fairly compare different modifications. We then trained the best models for 1.5M iterations to achieve better performance. ",
|
| 1582 |
+
"bbox": [
|
| 1583 |
+
173,
|
| 1584 |
+
487,
|
| 1585 |
+
825,
|
| 1586 |
+
570
|
| 1587 |
+
],
|
| 1588 |
+
"page_idx": 11
|
| 1589 |
+
},
|
| 1590 |
+
{
|
| 1591 |
+
"type": "text",
|
| 1592 |
+
"text": "When using the linear noise schedule from Ho et al. (2020), we linearly interpolated from $\\beta _ { 1 } =$ $0 . 0 0 0 1 / 4$ to $\\beta _ { 4 0 0 0 } = 0 . 0 2 / 4$ in order to preserve the shape of $\\bar { \\alpha } _ { t }$ for the $T = 4 0 0 0$ schedule. ",
|
| 1593 |
+
"bbox": [
|
| 1594 |
+
171,
|
| 1595 |
+
578,
|
| 1596 |
+
821,
|
| 1597 |
+
607
|
| 1598 |
+
],
|
| 1599 |
+
"page_idx": 11
|
| 1600 |
+
},
|
| 1601 |
+
{
|
| 1602 |
+
"type": "text",
|
| 1603 |
+
"text": "When computing FID for CIFAR-10, we produce 50K samples and compare them against the training set for consistency with other work. When computing FID for ImageNet $6 4 \\times 6 4$ , we produce 10K samples and compute FID against 50K validation images unless otherwise stated. Using only 10K samples biases the FID to be worse-than-necessary, but requires much less compute for sampling. Since we mainly use FID for relative comparisons, this bias is acceptable. ",
|
| 1604 |
+
"bbox": [
|
| 1605 |
+
174,
|
| 1606 |
+
613,
|
| 1607 |
+
823,
|
| 1608 |
+
684
|
| 1609 |
+
],
|
| 1610 |
+
"page_idx": 11
|
| 1611 |
+
},
|
| 1612 |
+
{
|
| 1613 |
+
"type": "image",
|
| 1614 |
+
"img_path": "images/de81663cd6a4669bd19766a9f287c0cf1a6c7efa6408272b16efd09a753d3094.jpg",
|
| 1615 |
+
"image_caption": [],
|
| 1616 |
+
"image_footnote": [],
|
| 1617 |
+
"bbox": [
|
| 1618 |
+
194,
|
| 1619 |
+
141,
|
| 1620 |
+
486,
|
| 1621 |
+
368
|
| 1622 |
+
],
|
| 1623 |
+
"page_idx": 12
|
| 1624 |
+
},
|
| 1625 |
+
{
|
| 1626 |
+
"type": "image",
|
| 1627 |
+
"img_path": "images/168b1b62014b261d6e40f1c67275e8d6ecd53f8b5f0a330b87ff225bf65777af.jpg",
|
| 1628 |
+
"image_caption": [
|
| 1629 |
+
"Figure 7a: 50 sampling steps "
|
| 1630 |
+
],
|
| 1631 |
+
"image_footnote": [],
|
| 1632 |
+
"bbox": [
|
| 1633 |
+
194,
|
| 1634 |
+
388,
|
| 1635 |
+
486,
|
| 1636 |
+
613
|
| 1637 |
+
],
|
| 1638 |
+
"page_idx": 12
|
| 1639 |
+
},
|
| 1640 |
+
{
|
| 1641 |
+
"type": "image",
|
| 1642 |
+
"img_path": "images/eff5583a8851e96aaebabe255acbc1d7f1e613e608b21bb7c31bf70b57266989.jpg",
|
| 1643 |
+
"image_caption": [
|
| 1644 |
+
"Figure 7c: 200 sampling steps ",
|
| 1645 |
+
"Figure 7e: 1000 sampling steps "
|
| 1646 |
+
],
|
| 1647 |
+
"image_footnote": [],
|
| 1648 |
+
"bbox": [
|
| 1649 |
+
194,
|
| 1650 |
+
636,
|
| 1651 |
+
486,
|
| 1652 |
+
861
|
| 1653 |
+
],
|
| 1654 |
+
"page_idx": 12
|
| 1655 |
+
},
|
| 1656 |
+
{
|
| 1657 |
+
"type": "image",
|
| 1658 |
+
"img_path": "images/47457906fc73cb6471e362dfde815a887bd61e7743638fe671f1f672d318992f.jpg",
|
| 1659 |
+
"image_caption": [],
|
| 1660 |
+
"image_footnote": [],
|
| 1661 |
+
"bbox": [
|
| 1662 |
+
509,
|
| 1663 |
+
141,
|
| 1664 |
+
802,
|
| 1665 |
+
367
|
| 1666 |
+
],
|
| 1667 |
+
"page_idx": 12
|
| 1668 |
+
},
|
| 1669 |
+
{
|
| 1670 |
+
"type": "image",
|
| 1671 |
+
"img_path": "images/bd09f8ceb91f240c78d017bb5591b12e2b066b834ed25685503c86f63ec91a44.jpg",
|
| 1672 |
+
"image_caption": [
|
| 1673 |
+
"Figure 7b: 100 sampling steps "
|
| 1674 |
+
],
|
| 1675 |
+
"image_footnote": [],
|
| 1676 |
+
"bbox": [
|
| 1677 |
+
509,
|
| 1678 |
+
388,
|
| 1679 |
+
802,
|
| 1680 |
+
613
|
| 1681 |
+
],
|
| 1682 |
+
"page_idx": 12
|
| 1683 |
+
},
|
| 1684 |
+
{
|
| 1685 |
+
"type": "image",
|
| 1686 |
+
"img_path": "images/3c0f04e5dce93f6e4e1a4d7f02c946b8bd1a745a6c7dbf120fcd659f0e17df40.jpg",
|
| 1687 |
+
"image_caption": [
|
| 1688 |
+
"Figure 7d: 400 sampling steps ",
|
| 1689 |
+
"Figure 7f: 4000 sampling steps "
|
| 1690 |
+
],
|
| 1691 |
+
"image_footnote": [],
|
| 1692 |
+
"bbox": [
|
| 1693 |
+
509,
|
| 1694 |
+
635,
|
| 1695 |
+
802,
|
| 1696 |
+
859
|
| 1697 |
+
],
|
| 1698 |
+
"page_idx": 12
|
| 1699 |
+
},
|
| 1700 |
+
{
|
| 1701 |
+
"type": "text",
|
| 1702 |
+
"text": "Figure 7: Unconditional ImageNet $6 4 \\times 6 4$ samples as we reduce number of sampling steps for a $L _ { \\mathrm { h y b r i d } }$ model with $4 K$ diffusion steps trained for $1 . 5 \\mathbf { M }$ training iterations. ",
|
| 1703 |
+
"bbox": [
|
| 1704 |
+
171,
|
| 1705 |
+
891,
|
| 1706 |
+
825,
|
| 1707 |
+
920
|
| 1708 |
+
],
|
| 1709 |
+
"page_idx": 12
|
| 1710 |
+
},
|
| 1711 |
+
{
|
| 1712 |
+
"type": "image",
|
| 1713 |
+
"img_path": "images/6f7495c128c528424f1af27e795a62780463f13f7922a5193cacd9f2d4a2589e.jpg",
|
| 1714 |
+
"image_caption": [],
|
| 1715 |
+
"image_footnote": [],
|
| 1716 |
+
"bbox": [
|
| 1717 |
+
194,
|
| 1718 |
+
102,
|
| 1719 |
+
486,
|
| 1720 |
+
327
|
| 1721 |
+
],
|
| 1722 |
+
"page_idx": 13
|
| 1723 |
+
},
|
| 1724 |
+
{
|
| 1725 |
+
"type": "image",
|
| 1726 |
+
"img_path": "images/cfd3f496d92e05bf047b5777081089958e0a594d22fb1fd44900c6ea0f6387d4.jpg",
|
| 1727 |
+
"image_caption": [
|
| 1728 |
+
"Figure 8a: 50 sampling steps "
|
| 1729 |
+
],
|
| 1730 |
+
"image_footnote": [],
|
| 1731 |
+
"bbox": [
|
| 1732 |
+
194,
|
| 1733 |
+
348,
|
| 1734 |
+
486,
|
| 1735 |
+
574
|
| 1736 |
+
],
|
| 1737 |
+
"page_idx": 13
|
| 1738 |
+
},
|
| 1739 |
+
{
|
| 1740 |
+
"type": "image",
|
| 1741 |
+
"img_path": "images/547b85e409074124784edf735f3190edd190313c6c03a032e34086e8d2b34b27.jpg",
|
| 1742 |
+
"image_caption": [
|
| 1743 |
+
"Figure 8c: 200 sampling steps ",
|
| 1744 |
+
"Figure 8e: 1000 sampling steps "
|
| 1745 |
+
],
|
| 1746 |
+
"image_footnote": [],
|
| 1747 |
+
"bbox": [
|
| 1748 |
+
194,
|
| 1749 |
+
594,
|
| 1750 |
+
486,
|
| 1751 |
+
820
|
| 1752 |
+
],
|
| 1753 |
+
"page_idx": 13
|
| 1754 |
+
},
|
| 1755 |
+
{
|
| 1756 |
+
"type": "image",
|
| 1757 |
+
"img_path": "images/3116d6dc69e564a5af3cdac331a1483e5868cb9328c69cb6e248a143467c8c0c.jpg",
|
| 1758 |
+
"image_caption": [],
|
| 1759 |
+
"image_footnote": [],
|
| 1760 |
+
"bbox": [
|
| 1761 |
+
509,
|
| 1762 |
+
102,
|
| 1763 |
+
802,
|
| 1764 |
+
327
|
| 1765 |
+
],
|
| 1766 |
+
"page_idx": 13
|
| 1767 |
+
},
|
| 1768 |
+
{
|
| 1769 |
+
"type": "image",
|
| 1770 |
+
"img_path": "images/e43004287ed50ec28089f962e1800bb63432bb392861603248c6ec02afa2441b.jpg",
|
| 1771 |
+
"image_caption": [
|
| 1772 |
+
"Figure 8b: 100 sampling steps "
|
| 1773 |
+
],
|
| 1774 |
+
"image_footnote": [],
|
| 1775 |
+
"bbox": [
|
| 1776 |
+
509,
|
| 1777 |
+
348,
|
| 1778 |
+
802,
|
| 1779 |
+
574
|
| 1780 |
+
],
|
| 1781 |
+
"page_idx": 13
|
| 1782 |
+
},
|
| 1783 |
+
{
|
| 1784 |
+
"type": "image",
|
| 1785 |
+
"img_path": "images/686dcfdeb384058c5eec25a1a8dd1793eee52a01d9ce1199c2a2c2e129dc013b.jpg",
|
| 1786 |
+
"image_caption": [
|
| 1787 |
+
"Figure 8d: 400 sampling steps ",
|
| 1788 |
+
"Figure 8f: 4000 sampling steps "
|
| 1789 |
+
],
|
| 1790 |
+
"image_footnote": [],
|
| 1791 |
+
"bbox": [
|
| 1792 |
+
509,
|
| 1793 |
+
594,
|
| 1794 |
+
802,
|
| 1795 |
+
820
|
| 1796 |
+
],
|
| 1797 |
+
"page_idx": 13
|
| 1798 |
+
},
|
| 1799 |
+
{
|
| 1800 |
+
"type": "text",
|
| 1801 |
+
"text": "Figure 8: Unconditional CIFAR-10 samples as we reduce number of sampling steps for a Lhybrid model with $4 K$ diffusion steps trained for 500K training iterations. ",
|
| 1802 |
+
"bbox": [
|
| 1803 |
+
171,
|
| 1804 |
+
852,
|
| 1805 |
+
823,
|
| 1806 |
+
880
|
| 1807 |
+
],
|
| 1808 |
+
"page_idx": 13
|
| 1809 |
+
},
|
| 1810 |
+
{
|
| 1811 |
+
"type": "image",
|
| 1812 |
+
"img_path": "images/b37567d321a411767f1b09650ac1abfcc32c76d154c1020e3ac9e8230d1fcc4e.jpg",
|
| 1813 |
+
"image_caption": [
|
| 1814 |
+
"Figure 9a: Samples from $L _ { \\mathrm { h y b r i d } }$ model "
|
| 1815 |
+
],
|
| 1816 |
+
"image_footnote": [],
|
| 1817 |
+
"bbox": [
|
| 1818 |
+
194,
|
| 1819 |
+
102,
|
| 1820 |
+
486,
|
| 1821 |
+
327
|
| 1822 |
+
],
|
| 1823 |
+
"page_idx": 14
|
| 1824 |
+
},
|
| 1825 |
+
{
|
| 1826 |
+
"type": "image",
|
| 1827 |
+
"img_path": "images/ae235f34617e27cfa4952d1fbf4572a95165141b9535c59a271a876c78c4bca5.jpg",
|
| 1828 |
+
"image_caption": [
|
| 1829 |
+
"Figure 9b: Samples from $L _ { \\mathrm { v l b } }$ model "
|
| 1830 |
+
],
|
| 1831 |
+
"image_footnote": [],
|
| 1832 |
+
"bbox": [
|
| 1833 |
+
509,
|
| 1834 |
+
102,
|
| 1835 |
+
803,
|
| 1836 |
+
327
|
| 1837 |
+
],
|
| 1838 |
+
"page_idx": 14
|
| 1839 |
+
},
|
| 1840 |
+
{
|
| 1841 |
+
"type": "text",
|
| 1842 |
+
"text": "Figure 9: Unconditional ImageNet $6 4 \\times 6 4$ samples generated from an $L _ { \\mathrm { h y b r i d } }$ and $L _ { \\mathrm { v l b } }$ model respectively using the exact same random noise. Both models were trained for 1.5M training iterations. ",
|
| 1843 |
+
"bbox": [
|
| 1844 |
+
171,
|
| 1845 |
+
359,
|
| 1846 |
+
826,
|
| 1847 |
+
387
|
| 1848 |
+
],
|
| 1849 |
+
"page_idx": 14
|
| 1850 |
+
},
|
| 1851 |
+
{
|
| 1852 |
+
"type": "image",
|
| 1853 |
+
"img_path": "images/056168e8993f430f3415a13a53d0689ed0a7b86f264ef4174d756e605545a6ce.jpg",
|
| 1854 |
+
"image_caption": [
|
| 1855 |
+
"Figure 10a: Samples from $L _ { \\mathrm { h y b r i d } }$ model "
|
| 1856 |
+
],
|
| 1857 |
+
"image_footnote": [],
|
| 1858 |
+
"bbox": [
|
| 1859 |
+
194,
|
| 1860 |
+
417,
|
| 1861 |
+
486,
|
| 1862 |
+
643
|
| 1863 |
+
],
|
| 1864 |
+
"page_idx": 14
|
| 1865 |
+
},
|
| 1866 |
+
{
|
| 1867 |
+
"type": "image",
|
| 1868 |
+
"img_path": "images/f8f66f53b5e3134a001a2bd9811c062950e934210c929c73448e439a00a7a603.jpg",
|
| 1869 |
+
"image_caption": [
|
| 1870 |
+
"Figure 10b: Samples from $L _ { \\mathrm { v l b } }$ model "
|
| 1871 |
+
],
|
| 1872 |
+
"image_footnote": [],
|
| 1873 |
+
"bbox": [
|
| 1874 |
+
509,
|
| 1875 |
+
417,
|
| 1876 |
+
802,
|
| 1877 |
+
643
|
| 1878 |
+
],
|
| 1879 |
+
"page_idx": 14
|
| 1880 |
+
},
|
| 1881 |
+
{
|
| 1882 |
+
"type": "text",
|
| 1883 |
+
"text": "Figure 10: Unconditional CIFAR-10 samples generated from an $L _ { \\mathrm { h y b r i d } }$ and $L _ { \\mathrm { v l b } }$ model respectively using the exact same random noise. Both models were trained for 500K training iterations. ",
|
| 1884 |
+
"bbox": [
|
| 1885 |
+
169,
|
| 1886 |
+
675,
|
| 1887 |
+
825,
|
| 1888 |
+
704
|
| 1889 |
+
],
|
| 1890 |
+
"page_idx": 14
|
| 1891 |
+
},
|
| 1892 |
+
{
|
| 1893 |
+
"type": "image",
|
| 1894 |
+
"img_path": "images/87ca2c7645926b7182836a5c7e8df6b71dc5252da86d5903f5950e410a0d3ffb.jpg",
|
| 1895 |
+
"image_caption": [
|
| 1896 |
+
"Figure 11a: The ratio between VLB terms for each diffusion step of $\\theta _ { \\mathrm { h y b r i d } }$ and $\\theta _ { \\mathrm { v l b } }$ . Values less than 1.0 indicate that $\\theta _ { \\mathrm { h y b r i d } }$ is \"better\" than $\\theta _ { \\mathrm { v l b } }$ for that timestep of the diffusion process. "
|
| 1897 |
+
],
|
| 1898 |
+
"image_footnote": [],
|
| 1899 |
+
"bbox": [
|
| 1900 |
+
197,
|
| 1901 |
+
104,
|
| 1902 |
+
483,
|
| 1903 |
+
248
|
| 1904 |
+
],
|
| 1905 |
+
"page_idx": 15
|
| 1906 |
+
},
|
| 1907 |
+
{
|
| 1908 |
+
"type": "image",
|
| 1909 |
+
"img_path": "images/2e5c21f2ac5d6dabaf7befbce2fb61d6828e53ba1d3728c5cc4ccbbfd9ef01e5.jpg",
|
| 1910 |
+
"image_caption": [
|
| 1911 |
+
"Figure 11b: Samples from $\\theta _ { \\mathrm { v l b } }$ and $\\theta _ { \\mathrm { h y b r i d } }$ , as well as an ensemble produced by using $\\theta _ { \\mathrm { v l b } }$ for the first and last 100 diffusion steps. For these samples, the seed was fixed, allowing a direct comparison between models. "
|
| 1912 |
+
],
|
| 1913 |
+
"image_footnote": [],
|
| 1914 |
+
"bbox": [
|
| 1915 |
+
511,
|
| 1916 |
+
121,
|
| 1917 |
+
802,
|
| 1918 |
+
218
|
| 1919 |
+
],
|
| 1920 |
+
"page_idx": 15
|
| 1921 |
+
},
|
| 1922 |
+
{
|
| 1923 |
+
"type": "image",
|
| 1924 |
+
"img_path": "images/7586b3b3e90ff19cbefa4f9ac104b677df16f07f903c35101677a8f57137f553.jpg",
|
| 1925 |
+
"image_caption": [
|
| 1926 |
+
"Figure 12a: Samples with random noise. "
|
| 1927 |
+
],
|
| 1928 |
+
"image_footnote": [],
|
| 1929 |
+
"bbox": [
|
| 1930 |
+
194,
|
| 1931 |
+
324,
|
| 1932 |
+
486,
|
| 1933 |
+
549
|
| 1934 |
+
],
|
| 1935 |
+
"page_idx": 15
|
| 1936 |
+
},
|
| 1937 |
+
{
|
| 1938 |
+
"type": "image",
|
| 1939 |
+
"img_path": "images/77984c8c078cfb82684348593a46e8bd4d53988dab366613cfe1107347a036e4.jpg",
|
| 1940 |
+
"image_caption": [
|
| 1941 |
+
"Figure 12b: Samples with same noise in a column "
|
| 1942 |
+
],
|
| 1943 |
+
"image_footnote": [],
|
| 1944 |
+
"bbox": [
|
| 1945 |
+
509,
|
| 1946 |
+
324,
|
| 1947 |
+
802,
|
| 1948 |
+
549
|
| 1949 |
+
],
|
| 1950 |
+
"page_idx": 15
|
| 1951 |
+
},
|
| 1952 |
+
{
|
| 1953 |
+
"type": "text",
|
| 1954 |
+
"text": "Figure 12: Conditional ImageNet $6 4 \\times 6 4$ samples generated from an $L _ { \\mathrm { h y b r i d } }$ model trained for 1.7M training steps. The classes are 9: ostrich, 11: goldfinch, 130: flamingo, 141: redshank, 154: pekinese, 157: papillon, 97: drake and 28: spotted salamander. On right we fix the random noise seed in each column to see how the class label affects the sampling process. ",
|
| 1955 |
+
"bbox": [
|
| 1956 |
+
173,
|
| 1957 |
+
582,
|
| 1958 |
+
825,
|
| 1959 |
+
637
|
| 1960 |
+
],
|
| 1961 |
+
"page_idx": 15
|
| 1962 |
+
},
|
| 1963 |
+
{
|
| 1964 |
+
"type": "text",
|
| 1965 |
+
"text": "C COMBINING $L _ { \\mathrm { H Y B R I D } }$ AND $L _ { \\mathrm { V L B } }$ MODELS ",
|
| 1966 |
+
"text_level": 1,
|
| 1967 |
+
"bbox": [
|
| 1968 |
+
174,
|
| 1969 |
+
664,
|
| 1970 |
+
534,
|
| 1971 |
+
681
|
| 1972 |
+
],
|
| 1973 |
+
"page_idx": 15
|
| 1974 |
+
},
|
| 1975 |
+
{
|
| 1976 |
+
"type": "text",
|
| 1977 |
+
"text": "To understand the trade-off between $L _ { \\mathrm { h y b r i d } }$ and $L _ { \\mathrm { v l b } }$ , we show in Figure 11a that the model resulting from $L _ { \\mathrm { v l b } }$ (referred to as $\\theta _ { \\mathrm { v l b } } \\mathrm { ~ , ~ }$ ) is better at the start and end of the diffusion process, while the model resulting from $L _ { \\mathrm { h y b r i d } }$ (referred to as $\\theta _ { \\mathrm { h y b r i d } } )$ is better throughout the middle of the diffusion process. This suggests that $\\theta _ { \\mathrm { v l b } }$ is focusing more on imperceptible details, hence the lower sample quality. ",
|
| 1978 |
+
"bbox": [
|
| 1979 |
+
174,
|
| 1980 |
+
695,
|
| 1981 |
+
825,
|
| 1982 |
+
752
|
| 1983 |
+
],
|
| 1984 |
+
"page_idx": 15
|
| 1985 |
+
},
|
| 1986 |
+
{
|
| 1987 |
+
"type": "text",
|
| 1988 |
+
"text": "Given the above observation, we performed an experiment on ImageNet $6 4 \\times 6 4$ to combine the two models by constructing an ensemble that uses $\\theta _ { \\mathrm { h y b r i d } }$ for $t \\in [ 1 0 0 , T - 1 0 0 )$ and $\\theta _ { \\mathrm { v l b } }$ elsewhere. We found that this model achieved an FID of 18.9 and an NLL of 3.52 bits/dim. As we see from Table 1, this is only slightly worse than $\\theta _ { \\mathrm { h y b r i d } }$ in terms of FID, while being better than both models in terms of NLL. ",
|
| 1989 |
+
"bbox": [
|
| 1990 |
+
174,
|
| 1991 |
+
758,
|
| 1992 |
+
825,
|
| 1993 |
+
829
|
| 1994 |
+
],
|
| 1995 |
+
"page_idx": 15
|
| 1996 |
+
},
|
| 1997 |
+
{
|
| 1998 |
+
"type": "text",
|
| 1999 |
+
"text": "D COMPARING SAMPLE QUALITY TO OTHER GENERATIVE MODELS ",
|
| 2000 |
+
"text_level": 1,
|
| 2001 |
+
"bbox": [
|
| 2002 |
+
174,
|
| 2003 |
+
851,
|
| 2004 |
+
740,
|
| 2005 |
+
866
|
| 2006 |
+
],
|
| 2007 |
+
"page_idx": 15
|
| 2008 |
+
},
|
| 2009 |
+
{
|
| 2010 |
+
"type": "text",
|
| 2011 |
+
"text": "While this paper does not focus on comparing sample quality to other types of generative models, we were curious how diffusion models compared to modern generative models on ImageNet $6 4 \\times$ 64. Unfortunately, we did not find any literature which computed FID for unconditional ImageNet ",
|
| 2012 |
+
"bbox": [
|
| 2013 |
+
176,
|
| 2014 |
+
882,
|
| 2015 |
+
823,
|
| 2016 |
+
924
|
| 2017 |
+
],
|
| 2018 |
+
"page_idx": 15
|
| 2019 |
+
},
|
| 2020 |
+
{
|
| 2021 |
+
"type": "table",
|
| 2022 |
+
"img_path": "images/06453837360f58ef900e259ad31d76c45c0d44224e9a9099eaca80ae09b5ecab.jpg",
|
| 2023 |
+
"table_caption": [
|
| 2024 |
+
"Table 4: Sample quality comparison on class conditional ImageNet $6 4 \\times 6 4$ "
|
| 2025 |
+
],
|
| 2026 |
+
"table_footnote": [],
|
| 2027 |
+
"table_body": "<table><tr><td>MODEL</td><td>FID</td></tr><tr><td>FQ-GAN (Zhao et al., 2020)</td><td>9.67</td></tr><tr><td>Instance Selection GAN (DeVries et al., 2020)</td><td>9.07</td></tr><tr><td>Improved Diffusion (ours)</td><td>8.43</td></tr></table>",
|
| 2028 |
+
"bbox": [
|
| 2029 |
+
315,
|
| 2030 |
+
98,
|
| 2031 |
+
687,
|
| 2032 |
+
159
|
| 2033 |
+
],
|
| 2034 |
+
"page_idx": 16
|
| 2035 |
+
},
|
| 2036 |
+
{
|
| 2037 |
+
"type": "image",
|
| 2038 |
+
"img_path": "images/f5acb122cab517c7a07f972f648b7658019578a29210c415e30372c877d0db3b.jpg",
|
| 2039 |
+
"image_caption": [
|
| 2040 |
+
"Figure 13a: FID over the course of training. "
|
| 2041 |
+
],
|
| 2042 |
+
"image_footnote": [],
|
| 2043 |
+
"bbox": [
|
| 2044 |
+
199,
|
| 2045 |
+
204,
|
| 2046 |
+
483,
|
| 2047 |
+
356
|
| 2048 |
+
],
|
| 2049 |
+
"page_idx": 16
|
| 2050 |
+
},
|
| 2051 |
+
{
|
| 2052 |
+
"type": "image",
|
| 2053 |
+
"img_path": "images/87c5f71fe98c742df203bab3db177316e0148e33b88e95f996c9c118ab230e1e.jpg",
|
| 2054 |
+
"image_caption": [
|
| 2055 |
+
"Figure 13b: Negative log-likelihood over the course of training. "
|
| 2056 |
+
],
|
| 2057 |
+
"image_footnote": [],
|
| 2058 |
+
"bbox": [
|
| 2059 |
+
514,
|
| 2060 |
+
202,
|
| 2061 |
+
800,
|
| 2062 |
+
347
|
| 2063 |
+
],
|
| 2064 |
+
"page_idx": 16
|
| 2065 |
+
},
|
| 2066 |
+
{
|
| 2067 |
+
"type": "text",
|
| 2068 |
+
"text": "Figure 13: Evaluation metrics over the course of training for two CIFAR-10 models, both with dropout 0.1. The model trained with the linear schedule learns more slowly, but does not overfit as quickly. When too much overfitting occurs, we observed overfitting artifacts similar to those from Salimans et al. (2017), which is reflected by increasing FID. ",
|
| 2069 |
+
"bbox": [
|
| 2070 |
+
173,
|
| 2071 |
+
393,
|
| 2072 |
+
825,
|
| 2073 |
+
450
|
| 2074 |
+
],
|
| 2075 |
+
"page_idx": 16
|
| 2076 |
+
},
|
| 2077 |
+
{
|
| 2078 |
+
"type": "text",
|
| 2079 |
+
"text": "$6 4 \\times 6 4$ . We ran an additional experiment where we trained a class-conditional diffusion model for 1.7M iterations using the $L _ { \\mathrm { h y b r i d } }$ objective. To make the model class-conditional, we inject class information through the same pathway as the timestep $t$ . In particular, we add a class embedding $v _ { i }$ to the timestep embedding $e _ { t }$ , and pass this embedding to residual blocks throughout the model. When computing FID for this task, we generated 50K samples (rather than 10K) to be directly comparable to other works. We found that using more samples led to a decrease in estimated FID of roughly 2 points. This is the only FID we report that was computed using 50K samples. Figure 12 shows our samples, and Table 4 summarizes our results. ",
|
| 2080 |
+
"bbox": [
|
| 2081 |
+
173,
|
| 2082 |
+
477,
|
| 2083 |
+
825,
|
| 2084 |
+
588
|
| 2085 |
+
],
|
| 2086 |
+
"page_idx": 16
|
| 2087 |
+
},
|
| 2088 |
+
{
|
| 2089 |
+
"type": "text",
|
| 2090 |
+
"text": "E OVERFITTIG ON CIFAR-10 ",
|
| 2091 |
+
"text_level": 1,
|
| 2092 |
+
"bbox": [
|
| 2093 |
+
176,
|
| 2094 |
+
608,
|
| 2095 |
+
434,
|
| 2096 |
+
625
|
| 2097 |
+
],
|
| 2098 |
+
"page_idx": 16
|
| 2099 |
+
},
|
| 2100 |
+
{
|
| 2101 |
+
"type": "text",
|
| 2102 |
+
"text": "On CIFAR-10, we noticed that all models overfit, but tended to reach similar optimal FID at some point during training. Holding dropout constant, we found that models trained with our cosine schedule tended to reach optimal performance (and then overfit) more quickly than those trained with the linear schedule (Figure 13). In our experiments, we corrected for this difference by using more dropout for our cosine models than the linear models. We suspect that the overfitting from the cosine schedule is either due to 1) less noise in the cosine schedule providing less regularization, or 2) the cosine schedule making optimization, and thus overfitting, easier. ",
|
| 2103 |
+
"bbox": [
|
| 2104 |
+
174,
|
| 2105 |
+
640,
|
| 2106 |
+
825,
|
| 2107 |
+
738
|
| 2108 |
+
],
|
| 2109 |
+
"page_idx": 16
|
| 2110 |
+
}
|
| 2111 |
+
]
|
parse/train/-NEXDKk8gZ/-NEXDKk8gZ_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/-NEXDKk8gZ/-NEXDKk8gZ_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/Byt3oJ-0W/Byt3oJ-0W.md
ADDED
|
@@ -0,0 +1,580 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING LATENT PERMUTATIONS WITH GUMBELSINKHORN NETWORKS
|
| 2 |
+
|
| 3 |
+
Gonzalo E. Mena ∗ Department of Statistics, Columbia University gem2131@columbia.edu
|
| 4 |
+
|
| 5 |
+
David Belanger Google Brain
|
| 6 |
+
|
| 7 |
+
Scott Linderman Department of Statistics, Columbia University
|
| 8 |
+
|
| 9 |
+
Jasper Snoek Google Brain
|
| 10 |
+
|
| 11 |
+
# ABSTRACT
|
| 12 |
+
|
| 13 |
+
Permutations and matchings are core building blocks in a variety of latent variable models, as they allow us to align, canonicalize, and sort data. Learning in such models is difficult, however, because exact marginalization over these combinatorial objects is intractable. In response, this paper introduces a collection of new methods for end-to-end learning in such models that approximate discrete maximum-weight matching using the continuous Sinkhorn operator. Sinkhorn operator is attractive because it functions as a simple, easy-to-implement analog of the softmax operator. With this, we can define the Gumbel-Sinkhorn method, an extension of the Gumbel-Softmax method (Jang et al., 2016; Maddison et al., 2016) to distributions over latent matchings. We demonstrate the effectiveness of our method by outperforming competitive baselines on a range of qualitatively different tasks: sorting numbers, solving jigsaw puzzles, and identifying neural signals in worms.
|
| 14 |
+
|
| 15 |
+
# 1 INTRODUCTION
|
| 16 |
+
|
| 17 |
+
In principle, deep networks can learn arbitrarily sophisticated mappings from inputs to outputs. However, in practice we must encode specific inductive biases in order to learn accurate models from limit data. In a variety of recent research efforts, practitioners have provided models with the ability to explicitly manipulate latent combinatorial objects such as stacks (Dyer et al., 2015; Joulin & Mikolov, 2015), memory slots (Graves et al., 2014; Sukhbaatar et al., 2015), mathematical expressions (Neelakantan et al., 2015), program traces (Gaunt et al., 2016; Bosnjak et al., 2017), ˇ and first order logic (Rocktaschel & Riedel, 2017). Operations on these discrete objects can be ¨ approximated using differentiable operations on continuous relaxations of the objects. As such, these operations can be included as modules in neural network models that can be trained end-toend by gradient descent.
|
| 18 |
+
|
| 19 |
+
Matchings and permutations are a fundamental building block in a variety of applications, as they can be used to align, canonicalize, and sort data. Prior work has developed learning algorithms for supervised learning where the training data includes annotated matchings (Caetano et al., 2009; Petterson et al., 2009; Tang et al., 2016). However, we would like to learn models with latent matchings, where the matching is not provided to us as supervision. This is a common and relevant setting. For example, Linderman et al. (2017) showed a problem from neuroscience involving the identification of neurons from the worm C. elegans can be cast as the inference of latent permutation on a larger hierarchical structure.
|
| 20 |
+
|
| 21 |
+
Unfortunately, maximizing the marginal likelihood for problems with latent matchings is very challenging. Unlike for problems with categorical latent variables, we cannot obtain unbiased stochastic gradients of the marginal likelihood using the score function estimator (Williams, 1992), as computing the probability of a given matching requires computing an intractable partition function for a structured distribution. Instead, we draw on recent work that obtains biased stochastic gradients by relaxing the discrete latent variables into continuous random variables that support the reparametrization trick (Jang et al., 2016; Maddison et al., 2016).
|
| 22 |
+
|
| 23 |
+
Our contributions are the following: first, in Section 2 we present a theoretical result showing that the non-differentiable parameterization of a permutation can be approximated in terms of a differentiable relaxation, the so-called Sinkhorn operator. Based on this result, in Section 3 we introduce Sinkhorn networks, which generalize the work of method of Adams & Zemel (2011) for predicting rankings, and complements the concurrent work by Cruz et al. (2017), by focusing on more fundamental aspects. Further, in Section 4 we introduce the Gumbel-Sinkhorn, an analog of the Gumbel Softmax distribution (Jang et al., 2016; Maddison et al., 2016) for permutations. This enables optimization of the marginal likelihood by the reparametrization trick. Finally, in Section 5 we demonstrate that our methods outperform strong neural network baselines on the tasks of sorting numbers, solving jigsaw puzzles, and identifying neural signals from C. elegans worms.
|
| 24 |
+
|
| 25 |
+
# 2 THE SINKHORN OPERATOR: AN ANALOG OF THE SOFTMAX FORPERMUTATIONS
|
| 26 |
+
|
| 27 |
+
One sensible way to approximate a discrete category by continuous values is by using a temperature-dependent softmax function, component-wise defined as $\begin{array} { r l } { \operatorname { s o f t m a x } _ { \tau } ( x ) _ { i } } & { = } \end{array}$ $\begin{array} { r } { \exp ( x _ { i } / \tau ) \dot { / } \sum _ { j = 1 } \exp ( x _ { j } / \tau ) } \end{array}$ . For positive values of $\tau$ , $\operatorname { s o f t m a x } _ { \tau } ( x ) _ { i }$ is a point in the probability simplex. Also, in the limit $\tau 0$ , $\operatorname { s o f t m a x } _ { \tau } ( x ) _ { i }$ converges to a vertex of the simplex, a one-hot vector corresponding to the largest $x _ { i }$ 1. This approximation is a key ingredient in the successful implementations by Jang et al. (2016); Maddison et al. (2016), and here we extend it to permutations.
|
| 28 |
+
|
| 29 |
+
To do so, we first state an analog of the normalization implemented by the softmax. This is achieved through the Sinkhorn operator (or Sinkhorn normalization, or Sinkhorn balancing), which iteratively normalizes rows and columns of a matrix. Specifically, following Adams & Zemel (2011), we define the Sinkhorn operator $S ( X )$ over an $N$ dimensional square matrix $X$ as:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\begin{array} { r c l } { { S ^ { 0 } ( X ) } } & { { = } } & { { \exp ( X ) , } } \\ { { S ^ { l } ( X ) } } & { { = } } & { { { \mathcal T } _ { c } ( { \mathcal T } _ { r } ( S ^ { l - 1 } ( X ) ) ) , } } \\ { { S ( X ) } } & { { = } } & { { \displaystyle \operatorname* { l i m } _ { l \infty } S ^ { l } ( X ) . } } \end{array}
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
where $\mathcal { T } _ { r } ( X ) = X \oslash ( X \mathbf { 1 } _ { N } \mathbf { 1 } _ { N } ^ { \top } )$ , and $\mathcal { T } _ { c } ( X ) \ : = \ : X \ : \emptyset \ : ( \mathbf { 1 } _ { N } \mathbf { 1 } _ { N } ^ { \top } X )$ as the row and column-wise normalization operators of a matrix, with $\oslash$ denoting the element-wise division and $\mathbf { 1 } _ { N }$ a column vector of ones. Sinkhorn (1964) proved that $S ( X )$ must belong to the Birkhoff polytope, the set of doubly stochastic matrices, that we denote $\boldsymbol { B } _ { N }$ 2 .
|
| 36 |
+
|
| 37 |
+
Building on our analogy with categories, notice that choosing a category can always be cast as a maximization problem: the choice $\operatorname { a r g m a x } _ { i } x _ { i }$ is the one that maximizes the function $\langle x , v \rangle$ (with $v$ being a one-hot vector), i.e. the maximizing $v ^ { * }$ indexes the largest $x _ { i }$ . Similarly, one may parameterize the choice of a permutation $P$ through a square matrix $X$ , as the solution to the linear assignment problem (Kuhn, 1955), with $\mathcal { P } _ { N }$ denoting the set of permutation matrices and $\langle A , B \rangle _ { F } = \mathrm { t r a c e } ( A ^ { \top } \mathbf { \hat { B } } )$ the (Frobenius) inner product of matrices:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
M ( X ) = \mathop { \underset { P \in \mathcal { P } _ { N } } { \operatorname { a r g m a x } } } \left. P , X \right. _ { F } .
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
We call $M ( \cdot )$ the matching operator, through which we parameterize the hard choice of a permutation (see Figure 3a for an example). Our theoretical contribution is to show that $M ( X )$ can be obtained as the limit of $S ( X / \tau )$ , meaning that one can approximate $M ( X ) \approx S ( X / \tau )$ with a small $\tau$ . Theorem 1 summarizes our finding. We provide a rigorous proof in appendix A; briefly, it is based on showing that $S ( X / \tau )$ solves a certain entropy-regularized problem in $B _ { n }$ , which in the limit converges to the matching problem in equation 2.
|
| 44 |
+
|
| 45 |
+
Theorem 1. For a doubly-stochastic matrix $P$ , define its entropy as $\begin{array} { r } { h ( P ) = - \sum _ { i , j } P _ { i , j } \log { ( P _ { i , j } ) } } \end{array}$ Then, one has,
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
S ( X / \tau ) = \underset { P \in \mathcal { B } _ { N } } { \arg \operatorname* { m a x } } \langle P , X \rangle _ { F } + \tau h ( P ) .
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
Now, assume also the entries of $X$ are drawn independently from a distribution that is absolutely continuous with respect to the Lebesgue measure in $\mathbb { R }$ . Then, almost surely, the following convergence holds:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
M ( X ) = \operatorname* { l i m } _ { \tau 0 ^ { + } } S ( X / \tau ) .
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
Finally, we note that Theorem 1 cannot be realized in practice, as it involves a limit on the Sinkhorn iterations $l$ . Instead, we’ll always consider the incomplete version of the Sinkhorn operator (Adams & Zemel, 2011), where we truncate $l$ in (1) to $L$ . Figure 3b in appendix A.3 illustrates the dependence of the approximation in $\tau$ and $L$ .
|
| 58 |
+
|
| 59 |
+
# 3 SINKHORN NETWORKS
|
| 60 |
+
|
| 61 |
+
Now we show how to apply the approximation in Theorem 1 in the context of artificial neural networks. We construct a layer that encodes the representation of a permutation, and show how to train networks containing such layers as intermediate representations.
|
| 62 |
+
|
| 63 |
+
We define the components of this network through a minimal example: consider the supervised task of learning a mapping from scrambled objects $\tilde { X }$ to actual, non-scrambled $X$ . Data, then, are $M$ pairs $( X _ { i } , \tilde { X } _ { i } )$ where ${ \tilde { X } } _ { i }$ can be constructed by randomly permuting pieces of $X _ { i }$ . We state this problem as a permutation-valued regression $X _ { i } = P _ { \theta , \tilde { X } _ { i } } ^ { - 1 } \tilde { X } _ { i } + \varepsilon _ { i }$ , where $\varepsilon _ { i }$ is a noise term, and $P _ { \theta , \tilde { X } _ { i } }$ is the permutation matrix mapping $X _ { i }$ to ${ \tilde { X } } _ { i }$ , which depends on ${ \tilde { X } } _ { i }$ and parameters $\theta$ . We are concerned with minimization of the reconstruction error 3:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
f ( \theta , X , \tilde { X } ) = \sum _ { i = 1 } ^ { M } | | X _ { i } - P _ { \theta , \tilde { X } _ { i } } ^ { - 1 } \tilde { X } _ { i } | | ^ { 2 } .
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
One way to express a complex parameterization of this kind is through a neural network: this network receives $\bar { X } _ { i }$ as input, which is then passed through some intermediate, feed-forward computations of the type $g _ { h } ( W _ { h } x _ { h } + b _ { h } )$ , where $g _ { h }$ are nonlinear activation functions, $x _ { h }$ is the output of a previous layer, and $\theta = \{ ( W _ { h } , b _ { h } ) \} _ { h }$ are the network parameters. To make the final network output be a permutation, we appeal to constructions developed in Section 2: by assuming that the final network output $P _ { \theta , \tilde { X } }$ can be parameterized as the solution of the assignments problem; i.e., $P _ { \theta , \tilde { X } } = M ( g ( \tilde { X } , \theta ) )$ , where $g ( \cdot , \theta )$ represents the outcome of all operations involving $g _ { h }$ .
|
| 70 |
+
|
| 71 |
+
Unfortunately, the above construction involves a non-differentiable $f$ (in $\theta$ ). We use Theorem 1 as a justification for replacing $M ( g ( \tilde { X } , \theta ) )$ by the differentiable $S ( g ( \tilde { X } , \theta ) / \tau )$ in the computational graph. The value of $\tau$ must be chosen with caution: if $\tau$ is too small, gradients vanishes almost everywhere, as $S ( g ( \tilde { X } , \theta ) / \tau )$ approaches the non-differentiable $M ( g ( \tilde { X } , \bar { \theta } ) )$ . Conversely, if $\tau$ is too large, $S ( X / \tau )$ may be far from the vertices of the Birkhoff polytope, and reconstructions $P _ { \theta , \tilde { X } } ^ { - 1 } \tilde { X }$ may be nonsensical (see Figure 2a). Importantly, we will always add noise to the output layer $g ( { \tilde { X } } , \theta )$ as a regularization device: by doing so we ensure uniqueness of $M ( g ( \tilde { X } , \theta ) )$ , which is required for convergence in Theorem 1.
|
| 72 |
+
|
| 73 |
+
# 3.1 PERMUTATION EQUIVARIANCE
|
| 74 |
+
|
| 75 |
+
Among all possible architectures that respect the aforementioned parameterization, we will only consider networks that are permutation equivariant, the natural kind of symmetry arising in this context. Specifically, we require networks to satisfy:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
P _ { \theta , P ^ { \prime } \tilde { X } } \left( P ^ { \prime } \tilde { X } \right) = P ^ { \prime } \left( P _ { \theta , \tilde { X } } \tilde { X } \right)
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
where $P ^ { \prime }$ is an arbitrary permutation. The underlying intuition is simple: reconstructions of objects should not depend on how pieces were scrambled, but only on the pieces themselves. We achieve permutation equivariance by using the same network to process each piece of $\tilde { X }$ , throwing an $N$ dimensional output. Then, these $N$ outputs (each with $N$ components) are used to create the rows of the matrix $g ( \tilde { X } , \theta )$ , to which we finally apply the (differentiable) Sinkhorn operator (i.e. $g$ stacks the composition of the $g _ { h }$ acting locally on each piece). One can interpret each row as representing a vector of local likelihoods of assignment, but they might be inconsistent. The Sinkhorn operator, then, mixes those separate representations, and ensures that consistent (approximate) assignment are produced. With permutation equivariance, the only consideration left to the practitioner is the choice of the particular architecture, which will depend on the particular kind of data. In Section 5 we illustrate the uses of Sinkhorn networks with three examples, each of them using a different architecture. Also, in figure 1 we illustrate a network architecture used in one of our examples.
|
| 82 |
+
|
| 83 |
+
# 3.2 SUMMARY
|
| 84 |
+
|
| 85 |
+
Sinkhorn network is a supervised method for learning to reconstruct a scrambled object $\tilde { X }$ (input) given several training examples $( X _ { i } , \tilde { X _ { i } } )$ . By applying some non-linear transformations, a Sinkhorn network richly parameterizes the mapping between $\tilde { X }$ and the permutation $P$ that once applied to $\tilde { X }$ , will allow to reconstruct the original object as $X _ { r e c } = P ^ { \top } \tilde { X }$ (the output). We note that Sinkhorn networks may be similarly used not only to learn permutations, but also to learn matchings between objects of two sets of the same size.
|
| 86 |
+
|
| 87 |
+

|
| 88 |
+
Figure 1: Schematic of Sinkhorn Network for Jigsaw puzzles. Each piece of the scrambled digit $\tilde { X }$ is processed with the same (convolutional) network $g _ { 1 }$ (arrows with solid circles). The outputs lying on a latent space (rectangles surrounding $\tilde { X }$ ) are then connected through $g _ { 2 }$ (arrows with empty circles) to conform the rows of the matrix $g ( { \tilde { X } } , \theta )$ ; $g ( \tilde { X } , \theta ) _ { i } = g _ { 1 } \circ g _ { 2 } ( \tilde { \tilde { X } } _ { i } )$ . Rows may be interpreted as unnormalized assignment probabilities, indicating individual unnormalized likelihoods of pieces of $\tilde { X }$ to be at every position in the actual image. Applying $S ( \cdot )$ leads to a ‘soft-permutation’ $P _ { \theta , \tilde { X } }$ that resolves inconsistencies in $g ( { \tilde { X } } , \theta )$ . $P _ { \theta , \tilde { X } }$ is then used to recover the actual $X$ at training, although at test time one may use the actual $M ( g ( \tilde { X } , \theta ) )$ .
|
| 89 |
+
|
| 90 |
+
# 4 PROBABILISTIC ASPECTS: THE GUMBEL-SINKHORN AND GUMBEL-MATCHING DISTRIBUTIONS
|
| 91 |
+
|
| 92 |
+
Recently, in Jang et al. (2016) and Maddison et al. (2016), the Gumbel-Softmax or Concrete distributions were defined for computational graphs with stochastic nodes; i.e, latent probabilistic representations. Their choice is guided by the following i) they seek re-parameterizable distributions to enable the re-parameterization trick (Kingma & Welling, 2013), and note that via the Gumbel trick (see below) any categorical distribution is re-parameterizable, ii) since the re-parameterization in i)
|
| 93 |
+
|
| 94 |
+
is not differentiable, they consider instead sampling under the softmax approximation. This gives rise to the Gumbel-Softmax distribution.
|
| 95 |
+
|
| 96 |
+
Here we parallel these choices to enable learning of a probabilistic latent representation of permutations. To this aim, we start by considering a generic distribution on the discrete set $\mathcal { V }$ , with potential function $X : \mathcal { V } \mathbb { R }$ :
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
p ( y | X ) \propto \exp \left( X ( y ) \right) \mathbf { 1 } _ { y \in \mathcal { Y } } .
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
Regarding i), the Gumbel trick arises in the context of Perturb and MAP methods (Papandreou & Yuille, 2011) for sampling in discrete graphical models. This has recently received renewed interest (Balog et al., 2017), as it recasts the a difficult sampling problem as an easier optimization problem. In detail, sampling from (6), can be achieved by the maximization of random perturbations of each potential $X ( y )$ , with Gumbel i.i.d. noise $\gamma ( y )$ ; i.e., arg $\begin{array} { r } { \operatorname* { m a x } _ { y \in \mathcal { V } } \{ X ( y ) + \gamma ( y ) \} \sim p ( \cdot | X ) } \end{array}$ . Therefore, one can re-parameterize any categorical distribution (corresponding to (6) with $X ( y ) =$ $\langle X , y \rangle )$ by the choice of a category, after injecting noise.
|
| 103 |
+
|
| 104 |
+
However, the above scheme is unfeasible in our context, as $| y | = N !$ . Nonetheless, we appeal to an interesting result: in cases where $\begin{array} { r } { \gamma ( y ) = \sum _ { i = 1 } ^ { N } \gamma _ { i } ( y _ { i } ) } \end{array}$ i=1 is proposed as a more tractable alternative. Although ultimately heuristic, they $\mathcal { V }$ factorizes, $\begin{array} { r } { \mathcal { Y } = \prod _ { i = 1 } ^ { N } \mathcal { Y } _ { i } ^ { \ 4 } } \end{array}$ , the use of rank-one perturbations be understood as providing approximate or unbiased samples from the true density (Hazan et al., 2013; Tomczak, 2016).
|
| 105 |
+
|
| 106 |
+
Guided by this, we say the random permutation $P$ follows the Gumbel-Matching distribution with parameter $X$ , denoted $P \sim \mathcal { G . M . } ( X )$ , if it has the distribution arising by the rank-one perturbation of (6) on permutations, with the linear potential $X ( P ) = \langle X , P \rangle _ { F }$ (replacing $y$ with $P$ ). One can verify, in a similar line as in Li et al. (2013), that $M ( X + \varepsilon ) \sim { \mathcal { G } } . { \bar { M } } . ( X )$ , if $\varepsilon$ is a matrix of standard i.i.d. Gumbel noise.
|
| 107 |
+
|
| 108 |
+
Unfortunately, as ii) with the categorical case, Gumbel-Matching distribution samples are not differentiable in $X$ , but by appealing to Theorem 1, we define its relaxation for doubly stochastic matrices as follows: we say $P$ follows the Gumbel-Sinkhorn distribution with parameter $X$ and temperature $\tau$ , denoted $P \sim \mathcal { G } . S . ( X , \tau )$ , if it has the distribution of $S ( ( X + \varepsilon ) / \tau )$ . Samples of $\mathcal { G . S . } ( X , \tau )$ converge almost surely to samples of the Gumbel-Matching distribution (see Fig 3c in appendix A.3).
|
| 109 |
+
|
| 110 |
+
Unlike for the categorical case, neither the Gumbel-Matching nor Gumbel-Sinkhorn distributions have tractable densities. However, this does not preclude inference: likelihood-free methods have recently been developed to enable learning in such implicitly defined distributions (Ranganath et al., 2016; Tran et al., 2017). These methods avoid evaluating the likelihood based on the observation that in many cases inference can be cast as the estimation of a likelihood ratio, which can be obtained from samples (Huszar, 2017). Regardless of these useful advances, in the following we develop a ´ solution based on using the likelihoods of random variables whose densities are available.
|
| 111 |
+
|
| 112 |
+
# 4.1 APPROXIMATE POSTERIOR INFERENCE
|
| 113 |
+
|
| 114 |
+
Consider a latent variable model probabilistic model with observed data $Y$ , and latent $Z = \{ P , W \}$ where $P$ is a permutation and $W$ are other variables. Here we illustrate how to approximate the posterior probability $p ( \{ P , W \} | Y )$ using variational inference Blei et al. (2017). Specifically, we aim to maximize the ELBO, the r.h.s. of (7):
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\log p ( y ) \geq E _ { q ( Z | Y ) } \left( \log p ( Y | Z ) \right) - K L ( q ( Z | Y ) \parallel p ( Z ) ) .
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
We assume that both the prior and variational posteriors decompose as products (mean-field). That is, $q ( \{ P , W \} | Y ) = q ( P ) q ( W ) , p ( P , W ) = p ( P ) p ( W )$ . With this assumption, we may focus only on the discrete part of the problem, i.e. without loss of generality we can assume $Z = P$ .
|
| 121 |
+
|
| 122 |
+
We parameterize our variational prior and posteriors on $P$ using the Gumbel-Matching distributions with some parameter $X$ ; ${ \mathcal { G } } . { \mathcal { M } } . ( X )$ . To enable differentiability, we replace them by $\mathcal { G . S . } ( X , \tau )$ distributions, leading to a surrogate ELBO that uses relaxed (continuous) variables. In more detail,
|
| 123 |
+
|
| 124 |
+
<table><tr><td>Test distribution</td><td colspan="5">N=5 N=10 N=15 N=80 N =100 N= 120</td></tr><tr><td>U(0,1)</td><td>.0 .0</td><td>.0</td><td>.0</td><td>.0</td><td>.01</td></tr><tr><td>U(0,1) (Vinyals et al.,2015)</td><td>.06</td><td>0.43 0.9</td><td>1</td><td>1</td><td>1</td></tr><tr><td>U(0,10)</td><td>.0</td><td>.0</td><td>.0</td><td>.0 .02</td><td>.03</td></tr><tr><td>U(0,1000)</td><td>.0</td><td>.0</td><td>.0 .01</td><td>.02</td><td>.04</td></tr><tr><td>U(1,2)</td><td>.0</td><td>.0</td><td>.0 .01</td><td>.04</td><td>.08</td></tr><tr><td>U(10,11)</td><td>.0</td><td>.0</td><td>.0</td><td>.08 .08</td><td>.6</td></tr><tr><td>U(100,101)</td><td>.0</td><td>.0</td><td>.01</td><td>.02 .99</td><td>1.</td></tr><tr><td>U(1000,1001)</td><td>.0</td><td>.0</td><td>.07</td><td>1. 1.</td><td>1.</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Table 1: Results on the number sorting task measured using Prop. any wrong. In the top two rows we compare to Vinyals et al. (2015), showing that our approach can sort far more inputs at significantly higher accuracy. In the bottom rows we evaluate generalization to different intervals on the real line.
|
| 127 |
+
|
| 128 |
+
for our uniform prior over permutations we use the isotropic $\mathcal { G S } . ( X = 0 , \tau _ { p r i o r } )$ distribution, while for the variational posterior we consider the more generic $\mathcal { G . S . } ( X , \tau )$ .
|
| 129 |
+
|
| 130 |
+
Unfortunately, the term $K L ( q ( P | Y ) \parallel p ( P ) ) = K L ( { \mathcal G } . S . ( X , \tau ) \parallel { \mathcal G } . S . ( X = 0 , \tau _ { p r i o r } ) )$ in equation (7) is intractable as there is not closed form expression for the density of ${ \mathcal { G . S } }$ . random variables. As a solution, we use that our prior and posterior are re-parameterizable in terms of matrices $\varepsilon$ of Gumbel i.i.d variables: we have $S ( ( X + \varepsilon ) / \tau ) \sim \mathcal { G } . S . ( X , \tau )$ and $S ( \varepsilon / \tau _ { p r i o r } ) \sim \mathcal { G } . S . ( X =$ $0 , \tau _ { p r i o r } )$ , for the posterior and prior, respectively. To obtain a tractable expression, we propose to use as ‘code’ or stochastic node $Z$ , the variable $( X + \varepsilon ) / \tau$ instead. Then, the KL term substantially simplifies to $K L ( ( X + \varepsilon ) / \tau \parallel \varepsilon / \tau _ { p r i o r } )$ . This term can be computed explicitly, as shown in appendix B.3.
|
| 131 |
+
|
| 132 |
+
This ‘trick’, however, comes at a cost: the divergence $K L ( Z _ { 1 } \parallel Z _ { 2 } )$ would certainly remain unchanged by applying the same invertible transformation $g$ to both variables $Z _ { 1 }$ and $Z _ { 2 }$ , but in the general case, for non-invertible transformations, such as $S ( \cdot )$ , one has $K L ( Z _ { 1 } \parallel Z _ { 2 } ) \geq$ $K L ( g ( \mathsf { \bar { Z } } _ { 1 } ) \parallel g ( Z _ { 2 } ) )$ . This implies that working in the ‘Gumbel space’ might entail the optimization of a less tight lower bound. Nonetheless, through categorical experiments on MNIST (see appendix C.3) we observe this loss of tightness is minimal, suggesting the suitability of our approach on permutations. Finally, we note that key to to our treatment of the problem is the fact that both the prior and posterior were the same function $( S ( \cdot ) )$ of a simpler distribution. This may not be the case in more general models.
|
| 133 |
+
|
| 134 |
+
To conclude this section, we refer the reader to table 8 in appendix D.2 for a summary of all the constructions on permutations developed in this work.
|
| 135 |
+
|
| 136 |
+
# 5 EXPERIMENTS
|
| 137 |
+
|
| 138 |
+
In this section we perform several experiments comparing to existing methods. In the first three experiments we explore different Sinkhorn network architectures of increasing complexity, and therefore, they mostly implements section 3. The fourth experiment relates to the probabilistic constructions described in section 4, and addresses a problem involving marginal inferences over a latent, unobserved permutation. All experimental details not stated here are in appendix B.
|
| 139 |
+
|
| 140 |
+
# 5.1 SORTING NUMBERS
|
| 141 |
+
|
| 142 |
+
To illustrate the capabilities of Sinkhorn Networks in a simple scenario, we consider the task of sorting numbers using artificial neural networks as in Vinyals et al. (2015). Specifically, we sample uniform random numbers $\tilde { X }$ in the [0, 1] interval and we train our network with pairs $( { \tilde { X } } , X )$ where $X$ are the same $\tilde { X }$ but in sorted order. The network has a first fully connected layer that links a number with an intermediate representation (with 32 units), and a second (also fully connected) layer that turns that representation into a row of the matrix $g ( { \tilde { X } } , \theta )$ .
|
| 143 |
+
|
| 144 |
+
Table 1 shows our network learns to sort up to $N = 1 2 0$ numbers. As an evaluation measure, we report the proportion of sequences where there was at least one error (Prop. any wrong). Surprisingly, the network learns to sort numbers even when test examples are not sampled from $U ( 0 , 1 )$ , but on a considerably different interval. This indicates the network is not overfitting. These results can be compared with those from Vinyals et al. (2015), where a much more complex (recurrent) network was used, but performance guarantees were obtained only with at most $N = 1 5$ numbers. In that case, the reported error rate is 0.9, whereas ours starts to degrade only after $N \approx 1 0 0$ for most test intervals.
|
| 145 |
+
|
| 146 |
+
Table 2: Jigsaw puzzle results. We compare to the available result on the Kendall Tau metric from Cruz et al. (2017) and provide additional results from our experiments. Randomly guessed permutations of $n$ items have an expected proportion of errors of $( \bar { n } - 1 ) / n$ . Note that our model has at least $2 0 \mathrm { x }$ fewer parameters..
|
| 147 |
+
|
| 148 |
+
<table><tr><td rowspan="2"></td><td colspan="5">MNIST</td><td colspan="4">Celeba</td><td colspan="2">Imagenet</td></tr><tr><td>2x2</td><td>3x3</td><td>4x4</td><td>5x5</td><td>6x6</td><td>2x2</td><td>3x3</td><td>4x4</td><td>5x5</td><td>2x2</td><td>3x3</td></tr><tr><td>Kendall tau Kendall tau</td><td>1.</td><td>.83</td><td>.43</td><td>.39</td><td>.27</td><td>1.0</td><td>.96</td><td>.88</td><td>.78</td><td>.85</td><td>.73</td></tr><tr><td>(Cruz et al., 2017)</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>-</td><td>.72</td></tr><tr><td>Prop. wrong</td><td>.0</td><td>.09</td><td>.45</td><td>.45</td><td>.59</td><td>.0</td><td>.03</td><td>.1</td><td>.21</td><td>.12</td><td>.26</td></tr><tr><td> Prop. any wrong</td><td>.0</td><td>.28</td><td>.97</td><td>1.</td><td>1.</td><td>.0</td><td>.09</td><td>.36</td><td>.73</td><td>.19</td><td>.53</td></tr><tr><td>11</td><td>.0</td><td>.0</td><td>.04</td><td>.02</td><td>.03</td><td>.0</td><td>.01</td><td>.04</td><td>.08</td><td>.05</td><td>.12</td></tr><tr><td>12</td><td>.0</td><td>.0</td><td>.26</td><td>.18</td><td>.19</td><td>.0</td><td>.11</td><td>.18</td><td>.24</td><td>.22</td><td>.31</td></tr></table>
|
| 149 |
+
|
| 150 |
+
# 5.2 JIGSAW PUZZLES
|
| 151 |
+
|
| 152 |
+
A more complex scenario for learning permutations arises in the reconstruction of an image $X$ from a collection of scrambled “jigsaw” pieces $\tilde { X }$ (Noroozi & Favaro, 2016; Cruz et al., 2017). In this example, our network differs from the one in 5.1 in the first layer is a simple CNN (convolution $^ +$ max pooling), which maps the puzzle pieces to an intermediate representation (see figure 1 for details).
|
| 153 |
+
|
| 154 |
+
For evaluation on test data, we report several measures: first, in addition to Prop. any wrong we also consider Prop. wrong, the overall proportion of scrambled pieces that were wrongly assigned to their actual position. Also, we use $l 1$ and l2 (train) losses and the Kendall tau, a “correlation coefficient” for ranked data. In Table 2, we benchmark results for the MNIST, Celeba and Imagenet datasets, with puzzles between $2 \mathbf { x } 2$ and 6x6 pieces. In MNIST we achieve very low $l 1$ and $l 2$ on up to 6x6 puzzles but a high proportion of errors. This is a consequence of our loss being agnostic to particular permutations, but only caring about reconstruction errors: as the number of black pieces increases with the number of puzzle pieces, many become unidentifiable under this loss.
|
| 155 |
+
|
| 156 |
+
In Celeba, we are able to solve puzzles of up to 5x5 pieces with only $21 \%$ of pieces of faces being incorrectly ordered (see Figure 2a for examples of reconstructions). For this dataset, we provide additional baselines in Table 4 of appendix C.1: there, we show that performance substantially decreases if the temperature is too small or large, but only slightly decreases if only one Sinkhorn iterations is made. We observe that temperature does play a relevant role, consistent with the findings of Maddison et al. (2016); Jang et al. (2016). This might not be obvious a-priori, as one could reason that temperature over-parameterizes the network. However, results confirm this is not the case. We hypothesize that different temperatures result in parameter convergence in different phases or regions. Also, the minor difference for a single iteration suggest that only a few might be necessary, implying potential savings in the memory needed to unroll computations in the graph, during training.
|
| 157 |
+
|
| 158 |
+
Learning in the Imagenet dataset is much more challenging, as there isn’t a sequential structure that generalizes among images, unlike Celeba and MNIST. In this dataset, our network ties with the .72 Kendall tau score reported in (Cruz et al., 2017). Their network, named DeepPermNet, is based on the stacking of up to the sixth fully connected layer fc6 of AlexNet (Krizhevsky et al., 2012), which finally (fully) connects to a Sinkhorn layer through intermediate fc7 and fc8. We note, however, our network is much simpler, with only two layers and far fewer parameters. Specifically, the network that produced our best results had around 1,050,000 parameters (see appendix $\mathbf { B }$ for a derivation), while in DeepPermNet, the layer connecting $f c 6$ with $f c 7$ has $5 1 2 \times 4 0 9 6 \times 9 \approx 1 9 , 0 0 0 , 0 0 0$ parameters, let alone the AlexNet parameters (also to be learned). Indeed, we believe there is no reason to consider a complex stacking of convolutions: as the number of pieces increases, each piece is smaller and the convolutional layer eventually becomes fully connected. In the following experiment we explore this phenomenon in more detail.
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
Figure 2: (a) Sinkhorn networks can be trained to solve Jigsaw Puzzles. Given a trained model, ‘soft’ reconstructions are shown at different $\tau$ using $S ( X / \tau )$ . We also show hard reconstructions, made by computing $M ( X )$ with the Hungarian algorithm (Munkres, 1957). (b) Sinkhorn networks can also be used to learn to transform any MNIST digit into another. We show hard and soft reconstructions, with $\tau = 1$ .
|
| 162 |
+
|
| 163 |
+
# 5.3 ASSEMBLY OF ARBITRARY MNIST DIGITS FROM PIECES
|
| 164 |
+
|
| 165 |
+
We also consider an original application, motivated by the observation that the Jigsaw Puzzle task becomes ill-posed if a puzzle contains too many pieces. Indeed, consider the binarized MNIST dataset: there, reconstructions are not unique if pieces are sufficiently atomic, and in the limit case of pieces of size 1x1 squared pixels, for a given scrambled MNIST digit there are as many valid reconstructions as there are MNIST digits with the same number of white pixels. In other words, reconstructions stop being probabilistic and become a multimodal distribution over permutations.
|
| 166 |
+
|
| 167 |
+
We exploit this intuition to ask whether a neural network can be trained to achieve arbitrary digit reconstructions, given their loose atomic pieces. To address this question, we slightly changed the network in 5.2, this time stacking several second layers linking an intermediate representation to the output. We trained the network to reconstruct a particular digit with each layer, by using digit identity to indicate which layer should activate with a particular training example.
|
| 168 |
+
|
| 169 |
+
Our results demonstrate a positive answer: Figure 2b shows reconstructions of arbitrary digits given $1 0 \mathrm { x } 1 0$ scrambled pieces. In general, they can be unambiguously identified by the naked eye. Moreover, this judgement is supported by the assessment of a neural network. Specifically, we trained a two-layer CNN 5 on MNIST (achieving a $9 9 . 2 \%$ accuracy on test set) and evaluated its performance on the test set generated by arbitrary transformations of each digit of the original test set into any other digit. We found the CNN made an appropriate judgement in $8 5 . 1 \%$ of the time. More specific results, regarding specific transformations are presented in Table 5 of appendix C.2.
|
| 170 |
+
|
| 171 |
+
Finally, we note that meaningful assemblies are possible regardless of the original digit: in Figure 4 of appendix C.2 we show arbitrary reconstructions, by this same network, of “digits” from a ‘strongly mixed’ MNIST dataset. In detail, these “digits” were crafted by sampling, without replacement, from a bag containing all the small pieces from all original digits. These reconstructions suggest the possibility of an alternative to generative modeling, based on the (random) assembly of small pieces of noise, instead of the processing of noise through a neural network. However, this would require training the network without supervision, which is beyond the scope of this work.
|
| 172 |
+
|
| 173 |
+
<table><tr><td rowspan="2">Prop. known neurons Difficulty</td><td colspan="2">40.%</td><td colspan="2">30.%</td><td colspan="2">20.%</td><td colspan="2">10.%</td></tr><tr><td>Easy</td><td>Hard</td><td>Easy</td><td>Hard</td><td>Easy</td><td>Hard</td><td>Easy</td><td>Hard</td></tr><tr><td>MCMC</td><td>.85</td><td>.82</td><td>.51</td><td>.44</td><td>.29</td><td>.27</td><td>.16</td><td>.12</td></tr><tr><td>(Linderman et al., 2017)</td><td>.97</td><td>.95</td><td>.90</td><td>.85</td><td>.77</td><td>.59</td><td>.39</td><td>.21</td></tr><tr><td>Gumbel-Sinkhorn</td><td>.97</td><td>.96</td><td>.92</td><td>.84</td><td>.76</td><td>.59</td><td>.44</td><td>.26</td></tr><tr><td>Gumbel-Sinkhorn, no regularization</td><td>.96</td><td>.93</td><td>.89</td><td>.78</td><td>.71</td><td>.52</td><td>.4</td><td>.23</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Table 3: Results for the C. elegans neural inference problem.
|
| 176 |
+
|
| 177 |
+
# 5.4 POSTERIOR INFERENCE OVER PERMUTATIONS WITH THE GUMBEL-SINKHORN ESTIMATOR
|
| 178 |
+
|
| 179 |
+
We illustrate how the ${ \mathcal { G . S } }$ . distribution can be used as a continuous relaxation for stochastic nodes in a computational graph. To this end, we revisit the “C. elegans neural identification problem”, originally introduced in Linderman et al. (2017). We refer the reader to (Linderman et al., 2017) for an in-depth introduction, but briefly, C. elegans is a nematode (worm) whose biological neural configuration – the connectome – is stereotypical; i.e. specimens always posses the same number of somatic neurons (282) (Varshney et al., 2011), and the ways those neurons connect and interact changes little from worm to worm. Therefore, its brain can be thought of as a canonical object, and its neurons can unequivocally be identified with names.
|
| 180 |
+
|
| 181 |
+
The task, then, consists of matching traces from the observed neural dynamics $Y$ to identities (neuron names) in the canonical brain. This problem is stated in terms of a Bayesian hierarchical model, in order to profit from prior information that may constrain the possibilities. Specifically, one states a linear dynamical system $\begin{array} { r } { Y _ { t } = P W P ^ { \top } Y _ { t - 1 } \dot { + } \nu _ { t } } \end{array}$ , where $\nu _ { t }$ is a noise term and $W$ and $P$ are latent variables with respective prior distributions. $W$ encodes the dynamics, with a prior $p ( W )$ to represent the sparseness of the connectome, etc., and $P$ is a permutation matrix representing the matching between indexes of observed neurons and their canonical counterparts, where we place a flat prior $p ( P )$ over permutations. Notably, within the framework it is possible to model the simultaneous problem with many worms sharing the same dynamical system, but here we avoid explicit references to individuals for notational ease.
|
| 182 |
+
|
| 183 |
+
Given this model, we seek the posterior distribution $p ( \{ P , W \} | Y )$ , a problem that we address with variational inference (Blei et al., 2017) using the constructions developed in 4.1. In Table 3 (and also in Table 7 of appendix C.4) we show results for this task, using accuracy in matching as the performance measure. These are broken down by relevant experimental covariates (Linderman et al., 2017): different proportion of neurons known beforehand, and by task difficulty. As baselines, we include i) a simple MCMC sampler that proposes local swipes on permutations ii) the rounding method presented in Linderman et al. (2017), iii) our method, where we also consider the absence of regularization. Results show our method outperforms the alternatives in most cases. MCMC fails because mixing is poor, but differences are much subtler with the other baselines. With them, we see that clear differences with the no-regularization case confirm the stochastic nature of this problem, i.e., that it is truly necessary to represent a latent probabilistic permutation. We believe our method outperforms the one in Linderman et al. (2017) because theirs, although it provides a explicit density, is a less tight relaxation, in the sense that points can be anywhere in the space, and not only on the Birkhoff polytope. Therefore, their prior also needs to be defined on the entire space and may not property act as an efficient regularizer.
|
| 184 |
+
|
| 185 |
+
# 6 RELATED WORK
|
| 186 |
+
|
| 187 |
+
Learning with matchings has been extensively been studied in the machine learning community; but current applications mostly relate to structured prediction (Petterson et al., 2009; Tang et al., 2016). However, our probabilistic treatment focuses on marginal inference in a model with a latent matching. This is a more challenging scenario, as standard learning techniques, i.e. the score function estimator or REINFORCE (Williams, 1992), are not applicable due to the partition function for non-trivial distributions over matchings.
|
| 188 |
+
|
| 189 |
+
In the case of latent categories, a recent technique that combines a relaxation and the reparameterization trick (Kingma & Welling, 2013) was proposed as a competitive alternative to REINFORCE for the marginal inference scenario. Specifically, Maddison et al. (2016); Jang et al. (2016) use the Gumbel-trick to re-parameterize a discrete density, and then replace it with a relaxed surrogate, the Gumbel Softmax distribution, to enable gradient-descent. Our work, like the simultaneous work of Linderman et al. (2017), aims to extends the scope of this technique to latent permutations. We deem our Gumbel Sinkhorn distributions as the most natural tractable extension of the Gumbel Softmax to permutations, as we clearly parallel each of the steps leading to its construction. A parallel is also presented in Linderman et al. (2017); and notably, unlike ours, their framework produces tractable densities. However, it is less clear how their constructions extend each of the features of the Gumbel Softmax: for example, their rounding-based relaxation also utilizes the Sinkhorn operator, but the limit they consider does not make use of the non-trivial statement of Theorem 1, which naturally extends the categorical case (see appendix A.2 for details). In practice, we see our results favor the Gumbel Sinkhorn distribution, since it is a tighter relaxation.
|
| 190 |
+
|
| 191 |
+
Connections between permutations and the Sinkhorn operator have been known for at least twenty years. Indeed, the limit in Theorem 1 was first presented in Kosowsky & Yuille (1994), but their interpretation and motivation were more linked to statistical physics and economics. However, our approach is different and links to recent developments in optimal transport (OT) (Villani, 2003): Theorem 1 draws on the entropy-regularization for OT technique developed inCuturi (2013), where the entropy-regularized transportation problem is referred to as a ‘Sinkhorn distance’. The extension is sensible as in the case of transportation between two discrete measures (here) the Birkhoff polytope appears naturally as the optimization set (Villani, 2003). Entropy regularization as means to achieve a differentiable version of a loss was first proposed in Genevay et al. (2017) in the context of generative modeling. Although this field may appear separate, recent work (Salimans et al., 2018) makes explicit the connection to permutations: to compute a (Wasserstein) distance between a batch of dataset samples and one of generative samples of the same size, one needs to solve the matching problem so that the distance between matched samples is minimized. Finally, we note our work shares with Salimans et al. (2018); Genevay et al. (2017) in that the OT cost function (here, the matrix $X$ ) is learned using an artificial neural network.
|
| 192 |
+
|
| 193 |
+
We understand our work as extending Adams & Zemel (2011), which developed neural networks to learn a permutation-like structure; a ranking. However, there, as in Helmbold & Warmuth (2009), the objective function was linear and the Sinkhorn operator was instead used as an approximation of a matrix of the marginals, i.e., $S ( P ) \approx E ( P )$ . In consequence, there was no need to introduce a temperature parameter and consider a limit argument, which is critical to our case. Interestingly, equation (10) can be understood in terms of approximate marginal inference, justifying the approximation $S ( P ) \approx E ( P )$ . We comment on this in appendix D.1. Note that Sinkhorn iteration can be interpreted as mean-field inference in an associated Gibbs distribution over matchings. With this in mind, backpropagation through Sinkhorn is an end-to-end learning in an unrolled inference algorithm Stoyanov et al. (2011); Domke (2013). In future work, it may be fruitful to unroll alternative algorithms for marginal inference over matchings, such as belief propagation (Huang & Jebara, 2009).
|
| 194 |
+
|
| 195 |
+
Sinkhorn networks were also very recently introduced in Cruz et al. (2017), although their work substantially differs from ours. While their interest lies in the representational aspects of CNN’s, we are more concerned with the more fundamental properties. In their work, they don’t consider a temperature parameter $\tau$ , but their network still successfully learns, as $\tau = 1$ happens to fall within the range of reasonable values. On the Jigsaw puzzle task, we showed that we achieve equivalent performance with a much simpler network having several times fewer parameters and layers. Nonetheless, we recognize the need for more complex architectures for the tasks considered in Cruz et al. (2017), and we hope our more general theory; particularly, Theorem 1 and the notion of equivariance, may aid further developments in that direction.
|
| 196 |
+
|
| 197 |
+
# 7 DISCUSSION
|
| 198 |
+
|
| 199 |
+
We have demonstrated Sinkhorn networks are able to learn to find the right permutation in the most elementary cases; where all training samples obey the same sequential structure; e.g., in sorted number and in pieces of faces, as we expect parts of faces occupy similar positions from sample to sample. This is already non-trivial, as indicates one can train a neural network to solve the linear assignment problem.
|
| 200 |
+
|
| 201 |
+
However, the fact that Imagenet represented a much more challenging scenario indicates there are clear limits to our formulation. As the most obvious extension we propose to introduce a sequential stage, in which current solutions are kept on a memory buffer, and improved. One way to achieve this would be by exploring more complex parameterizations for permutations; i.e. replacing $M ( X )$ by a quadratic operator that may parameterize a notion of local distance between pieces. Alternatively, one may resort to reinforcement learning techniques, as suggested in Bello et al. (2016). Either sequential improvement would help solve the “Order Matters” problem (Vinyals et al., 2015), and we deem our elementary work as a significant step in that direction.
|
| 202 |
+
|
| 203 |
+
We have made available Tensorflow code for Gumbel-Sinkhorn networks featuring an implementation of the number sorting experiment at http://github.com/google/gumbel sinkhorn .
|
| 204 |
+
|
| 205 |
+
# REFERENCES
|
| 206 |
+
|
| 207 |
+
Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016.
|
| 208 |
+
Ryan Prescott Adams and Richard S Zemel. Ranking via sinkhorn propagation. arXiv preprint arXiv:1106.1925, 2011.
|
| 209 |
+
Matej Balog, Nilesh Tripuraneni, Zoubin Ghahramani, and Adrian Weller. Lost relatives of the gumbel trick. arXiv preprint arXiv:1706.04161, 2017.
|
| 210 |
+
Irwan Bello, Hieu Pham, Quoc V Le, Mohammad Norouzi, and Samy Bengio. Neural combinatorial optimization with reinforcement learning. arXiv preprint arXiv:1611.09940, 2016.
|
| 211 |
+
Garrett Birkhoff. Tres observaciones sobre el algebra lineal. Univ. Nac. Tucuman. Revista A ´ , 5: 147–151, 1946.
|
| 212 |
+
David M Blei, Alp Kucukelbir, and Jon D McAuliffe. Variational inference: A review for statisticians. Journal of the American Statistical Association, (just-accepted), 2017.
|
| 213 |
+
Matko Bosnjak, Tim Rockt ˇ aschel, Jason Naradowsky, and Sebastian Riedel. Programming with a ¨ differentiable forth interpreter. In Doina Precup and Yee Whye Teh (eds.), Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 547–556, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR. URL http://proceedings.mlr.press/v70/bosnjak17a.html.
|
| 214 |
+
Tiberio S Caetano, Julian J McAuley, Li Cheng, Quoc V Le, and Alex J Smola. Learning graph ´ matching. IEEE transactions on pattern analysis and machine intelligence, 31(6):1048–1058, 2009.
|
| 215 |
+
Roberto Cominetti and Jaime San Mart´ın. Asymptotic analysis of the exponential penalty trajectory in linear programming. Mathematical Programming, 67(1-3):169–187, 1994.
|
| 216 |
+
Rodrigo Santa Cruz, Basura Fernando, Anoop Cherian, and Stephen Gould. Deeppermnet: Visual permutation learning. arXiv preprint arXiv:1704.02729, 2017.
|
| 217 |
+
Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in neural information processing systems, pp. 2292–2300, 2013.
|
| 218 |
+
Justin Domke. Learning graphical model parameters with approximate marginal inference. IEEE transactions on pattern analysis and machine intelligence, 35(10):2454–2467, 2013.
|
| 219 |
+
Chris Dyer, Miguel Ballesteros, Wang Ling, Austin Matthews, and Noah A Smith. Transition-based dependency parsing with stack long short-term memory. arXiv preprint arXiv:1505.08075, 2015.
|
| 220 |
+
Alexander L Gaunt, Marc Brockschmidt, Rishabh Singh, Nate Kushman, Pushmeet Kohli, Jonathan Taylor, and Daniel Tarlow. Terpret: A probabilistic programming language for program induction. arXiv preprint arXiv:1608.04428, 2016.
|
| 221 |
+
|
| 222 |
+
Aude Genevay, Gabriel Peyre, and Marco Cuturi. Learning generative models with sinkhorn diver- ´ gences. arXiv preprint arXiv:1706.00292, 2017.
|
| 223 |
+
|
| 224 |
+
Amir Globerson and Tommi Jaakkola. Approximate inference using conditional entropy decompositions. In International Conference on Artificial Intelligence and Statistics, pp. 130–138, 2007.
|
| 225 |
+
|
| 226 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
|
| 227 |
+
|
| 228 |
+
Tamir Hazan and Tommi Jaakkola. On the partition function and random maximum a-posteriori perturbations. arXiv preprint arXiv:1206.6410, 2012.
|
| 229 |
+
|
| 230 |
+
Tamir Hazan, Subhransu Maji, and Tommi Jaakkola. On sampling from the gibbs distribution with random maximum a-posteriori perturbations. In Advances in Neural Information Processing Systems, pp. 1268–1276, 2013.
|
| 231 |
+
|
| 232 |
+
David P Helmbold and Manfred K Warmuth. Learning permutations with exponential weights. Journal of Machine Learning Research, 10(Jul):1705–1736, 2009.
|
| 233 |
+
|
| 234 |
+
Bert Huang and Tony Jebara. Approximating the permanent with belief propagation. arXiv preprint arXiv:0908.1769, 2009.
|
| 235 |
+
|
| 236 |
+
Ferenc Huszar. Variational inference using implicit distributions. ´ arXiv preprint arXiv:1702.08235, 2017.
|
| 237 |
+
|
| 238 |
+
Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016.
|
| 239 |
+
|
| 240 |
+
Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett (eds.), Advances in Neural Information Processing Systems 28, pp. 190– 198. Curran Associates, Inc., 2015. URL http://papers.nips.cc/paper/ 5857-inferring-algorithmic-patterns-with-stack-augmented-recurrent-nets. pdf.
|
| 241 |
+
|
| 242 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 243 |
+
|
| 244 |
+
Philip A Knight. The sinkhorn–knopp algorithm: convergence and applications. SIAM Journal on Matrix Analysis and Applications, 30(1):261–275, 2008.
|
| 245 |
+
|
| 246 |
+
JJ Kosowsky and Alan L Yuille. The invisible hand algorithm: Solving the assignment problem with statistical physics. Neural networks, 7(3):477–490, 1994.
|
| 247 |
+
|
| 248 |
+
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.
|
| 249 |
+
|
| 250 |
+
Harold W Kuhn. The hungarian method for the assignment problem. Naval Research Logistics (NRL), 2(1-2):83–97, 1955.
|
| 251 |
+
|
| 252 |
+
Ke Li, Kevin Swersly, Ryan, and Richard S Zemel. Efficient feature learning using perturb-and-map. NIPS Workshop on Perturbations, Optimization, and Statistics, 2013.
|
| 253 |
+
|
| 254 |
+
Scott W Linderman, Gonzalo E Mena, Hal Cooper, Liam Paninski, and John P Cunningham. Reparameterizing the birkhoff polytope for variational permutation inference. arXiv preprint arXiv:1710.09508, 2017.
|
| 255 |
+
|
| 256 |
+
Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016.
|
| 257 |
+
|
| 258 |
+
James Munkres. Algorithms for the assignment and transportation problems. Journal of the society for industrial and applied mathematics, 5(1):32–38, 1957.
|
| 259 |
+
|
| 260 |
+
Arvind Neelakantan, Quoc V Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. arXiv preprint arXiv:1511.04834, 2015.
|
| 261 |
+
|
| 262 |
+
Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European Conference on Computer Vision, pp. 69–84. Springer, 2016.
|
| 263 |
+
|
| 264 |
+
George Papandreou and Alan L Yuille. Perturb-and-map random fields: Using discrete optimization to learn and sample from energy models. In Computer Vision (ICCV), 2011 IEEE International Conference on, pp. 193–200. IEEE, 2011.
|
| 265 |
+
|
| 266 |
+
James Petterson, Jin Yu, Julian J McAuley, and Tiberio S Caetano. Exponential family graph match- ´ ing and ranking. In Advances in Neural Information Processing Systems, pp. 1455–1463, 2009.
|
| 267 |
+
|
| 268 |
+
Rajesh Ranganath, Dustin Tran, Jaan Altosaar, and David Blei. Operator variational inference. In Advances in Neural Information Processing Systems, pp. 496–504, 2016.
|
| 269 |
+
|
| 270 |
+
C Radhakrishna Rao. Convexity properties of entropy functions and analysis of diversity. Lecture Notes-Monograph Series, pp. 68–77, 1984.
|
| 271 |
+
|
| 272 |
+
Ralph Tyrell Rockafellar. Convex analysis. Princeton university press, 1970.
|
| 273 |
+
|
| 274 |
+
Tim Rocktaschel and Sebastian Riedel. End-to-end differentiable proving. ¨ arXiv preprint arXiv:1705.11040, 2017.
|
| 275 |
+
|
| 276 |
+
Tim Salimans, Han Zhang, Alec Radford, and Dimitris Metaxas. Improving GANs using optimal transport. In International Conference on Learning Representations, 2018. URL https:// openreview.net/forum?id $=$ rkQkBnJAb.
|
| 277 |
+
|
| 278 |
+
Richard Sinkhorn. A relationship between arbitrary positive matrices and doubly stochastic matrices. The annals of mathematical statistics, 35(2):876–879, 1964.
|
| 279 |
+
|
| 280 |
+
Richard Sinkhorn and Paul Knopp. Concerning nonnegative matrices and doubly stochastic matrices. Pacific Journal of Mathematics, 21(2):343–348, 1967.
|
| 281 |
+
|
| 282 |
+
Veselin Stoyanov, Alexander Ropson, and Jason Eisner. Empirical risk minimization of graphical model parameters given approximate inference, decoding, and model structure. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, pp. 725–733, 2011.
|
| 283 |
+
|
| 284 |
+
Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pp. 2440–2448, 2015.
|
| 285 |
+
|
| 286 |
+
Kui Tang, Nicholas Ruozzi, David Belanger, and Tony Jebara. Bethe learning of conditional random fields via map decoding. AISTATS, 2016.
|
| 287 |
+
|
| 288 |
+
Jakub M Tomczak. On some properties of the low-dimensional gumbel perturbations in the perturband-map model. Statistics & Probability Letters, 115:8–15, 2016.
|
| 289 |
+
|
| 290 |
+
Dustin Tran, Rajesh Ranganath, and David M Blei. Deep and hierarchical implicit models. arXiv preprint arXiv:1702.08896, 2017.
|
| 291 |
+
|
| 292 |
+
Lav R Varshney, Beth L Chen, Eric Paniagua, David H Hall, and Dmitri B Chklovskii. Structural properties of the caenorhabditis elegans neuronal network. PLoS computational biology, 7(2): e1001066, 2011.
|
| 293 |
+
|
| 294 |
+
Cedric Villani. ´ Topics in optimal transportation. Number 58. American Mathematical Soc., 2003.
|
| 295 |
+
|
| 296 |
+
Luke Vilnis, David Belanger, Daniel Sheldon, and Andrew McCallum. Bethe projections for nonlocal inference. arXiv preprint arXiv:1503.01397, 2015.
|
| 297 |
+
|
| 298 |
+
Oriol Vinyals, Samy Bengio, and Manjunath Kudlur. Order matters: Sequence to sequence for sets. arXiv preprint arXiv:1511.06391, 2015.
|
| 299 |
+
|
| 300 |
+
Martin J Wainwright, Michael I Jordan, et al. Graphical models, exponential families, and variational inference. Foundations and Trends
|
| 301 |
+
|
| 302 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 303 |
+
|
| 304 |
+
Jonathan S Yedidia, William T Freeman, and Yair Weiss. Bethe free energy, kikuchi approximations, and belief propagation algorithms. Advances in neural information processing systems, 13, 2001.
|
| 305 |
+
|
| 306 |
+
# A PROOF OF THEOREM 1
|
| 307 |
+
|
| 308 |
+
In this section we give a rigorous proof of Theorem 1. Also, in A.2 we briefly comment on how Theorem 1 extend a perhaps more intuitive results, in the probability simplex.
|
| 309 |
+
|
| 310 |
+
Before stating Theorem 1 we need some preliminary definitions. We start by recalling a well-known result in matrix theory, the Sinkhorn theorem.
|
| 311 |
+
|
| 312 |
+
Theorem (Sinkhorn). Let $A$ be an $N$ dimensional square matrix with positive entries. Then, there exists two diagonal matrices $D _ { 1 } , D _ { 2 }$ , with positive diagonals, so that $P = D _ { 1 } A D _ { 2 }$ is a doubly stochastic matrix. These $D _ { 1 } , D _ { 2 }$ are unique up to a scalar factor. Also, $P$ can be obtained through the iterative process of alternatively normalizing the rows and columns of $A$ .
|
| 313 |
+
|
| 314 |
+
Proof. See Sinkhorn (1964); Sinkhorn & Knopp (1967); Knight (2008).
|
| 315 |
+
|
| 316 |
+
For our purposes, it is useful to define the Sinkhorn operator $S ( \cdot )$ as follows:
|
| 317 |
+
|
| 318 |
+
Definition 1. Let $X$ be an arbitrary matrix with dimension $N$ . Denote ${ \mathcal { T } } _ { r } ( X ) ~ = ~ X ~ \oslash$ $( X 1 _ { N } 1 _ { N } ^ { \top } )$ , $\mathcal { T } _ { c } ( X ) = X \oslash ( 1 _ { N } 1 _ { N } ^ { \top } X )$ (with $\oslash$ representing the element-wise division and $1 _ { n }$ the $n$ dimensional vector of ones) the row and column-wise normalization operators, respectively. Then, we define the Sinkhorn operator applied to $X$ ; $S ( X )$ , as follows:
|
| 319 |
+
|
| 320 |
+
$$
|
| 321 |
+
\begin{array} { r c l } { { S ^ { 0 } ( X ) } } & { { = } } & { { \exp ( X ) , } } \\ { { S ^ { l } ( X ) } } & { { = } } & { { { \mathcal T } _ { c } ( { \mathcal T } _ { r } ( S ^ { l - 1 } ( X ) ) ) , } } \\ { { S ( X ) } } & { { = } } & { { \displaystyle \operatorname* { l i m } _ { n \infty } S ^ { l } ( X ) . } } \end{array}
|
| 322 |
+
$$
|
| 323 |
+
|
| 324 |
+
Here, the $\exp ( \cdot )$ operator is interpreted as the component-wise exponential. By Sinkhorn’s theorem, $S ( X )$ is a doubly stochastic matrix.
|
| 325 |
+
|
| 326 |
+
Finally, we review some key properties related to the space of doubly stochastic matrices. First, we need to define a relevant geometric object.
|
| 327 |
+
|
| 328 |
+
Definition 2. We denote by $B _ { N }$ the $N$ -Birkhoff polytope, i.e., the set of doubly stochastic matrices of dimension $N$ . Likewise, we denote $\mathcal { P } _ { n }$ be the set of permutation matrices of size $N$ . Alternatively,
|
| 329 |
+
|
| 330 |
+
$$
|
| 331 |
+
\mathcal { B } _ { N } = \{ P \in [ 0 , 1 ] \in \mathbb { R } ^ { N , N } ~ P 1 _ { N } = 1 _ { N } , P ^ { \top } 1 _ { N } = 1 _ { N } \} ,
|
| 332 |
+
$$
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\mathcal { P } _ { N } = \{ P \in \{ 0 , 1 \} \in \mathbb { R } ^ { N , N } ~ P 1 _ { N } = 1 _ { N } , P ^ { \top } 1 _ { N } = 1 _ { N } \} .
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
Theorem (Birkhoff). $\mathcal { P } _ { N }$ is the set of extremal points of $B _ { N }$ . In other words, the convex hull of $B _ { N }$ equals $\mathcal { P } _ { N }$ .
|
| 339 |
+
|
| 340 |
+
Proof. See Birkhoff (1946).
|
| 341 |
+
|
| 342 |
+
# A.1 AN APPROXIMATION THEOREM FOR THE MATCHING PROBLEM
|
| 343 |
+
|
| 344 |
+
Let’s now focus on the standard combinatorial assignment (or matching) problem, for an arbitrary $N$ dimensional matrix $X$ . We aim to maximize a linear functional (in the sense of the Frobenius norm) in the space of permutation matrices. In this context, let’s define the matching operator $M ( \cdot )$ as the one that returns the solution of the assignment problem:
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
M ( X ) \equiv \underset { P \in \mathcal { P } _ { N } } { \arg \operatorname* { m a x } } { \langle P , X \rangle } _ { F } .
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
Likewise, we define $\tilde { M } ( \cdot )$ as a related operator, but changing the feasible space by the Birkhoff polytope:
|
| 351 |
+
|
| 352 |
+
$$
|
| 353 |
+
\tilde { M } ( X ) \equiv \underset { P \in \mathcal { B } _ { N } } { \arg \operatorname* { m a x } } { \langle P , X \rangle } _ { F } .
|
| 354 |
+
$$
|
| 355 |
+
|
| 356 |
+
Notice that in general ${ \tilde { M } } ( X ) , M ( X )$ might not be unique matrices, but a face of the Birkhoff polytope, or a set of permutations, respectively (see Lemma 2 for details). In any case, the relation
|
| 357 |
+
|
| 358 |
+
$M ( X ) \subseteq { \tilde { M } } ( X )$ holds by virtue of Birkhoff’s theorem, and the fundamental theorem of linear programming.
|
| 359 |
+
|
| 360 |
+
Now we state the main theorem of this work:
|
| 361 |
+
|
| 362 |
+
Theorem 1. For a doubly stochastic matrix $P$ define its entropy as $\begin{array} { r } { h ( P ) = - \sum _ { i , j } P _ { i , j } \log { ( P _ { i , j } ) } } \end{array}$ Then, one has,
|
| 363 |
+
|
| 364 |
+
$$
|
| 365 |
+
S ( X / \tau ) = \underset { P \in \mathcal { B } _ { N } } { \arg \operatorname* { m a x } } \langle P , X \rangle _ { F } + \tau h ( P ) .
|
| 366 |
+
$$
|
| 367 |
+
|
| 368 |
+
Now, assume also the entries of $X$ are drawn independently from a distribution that is absolutely continuous with respect to the Lebesgue measure in $\mathcal { R }$ . Then, almost surely the following convergence holds:
|
| 369 |
+
|
| 370 |
+
$$
|
| 371 |
+
M ( X ) = \operatorname* { l i m } _ { \tau 0 ^ { + } } S ( X / \tau ) .
|
| 372 |
+
$$
|
| 373 |
+
|
| 374 |
+
We divide the proof of Theorem 1 in three steps. First, in Lemma 1 we state a relation between $S ( X / \tau )$ and the entropy regularized problem in equation (10). Then, in Lemma 2 we show that under our stochastic regime, uniqueness of solutions holds. Finally, in Lemma 3 we show that in this well-behaved regime, convergence of solutions holds. states that and Lemma 2b endows us with the tools to make a limit argument.
|
| 375 |
+
|
| 376 |
+
A.1.1 INTERMEDIATE RESULTS FOR THEOREM 1
|
| 377 |
+
|
| 378 |
+
Lemma 1.
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
S ( X / \tau ) = \underset { P \in \mathcal { B } _ { N } } { \arg \operatorname* { m a x } } \langle P , X \rangle _ { F } + \tau h ( P ) .
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
Proof. We first notice that the solution $P _ { \tau }$ of the above problem exists, and it is unique. This is a simple consequence of the strict concavity of the objective (recall the entropy is strictly concave Rao (1984)).
|
| 385 |
+
|
| 386 |
+
Now, let’s state the Lagrangian of this constrained problem
|
| 387 |
+
|
| 388 |
+
$$
|
| 389 |
+
\mathcal { L } ( \alpha , \beta , P ) = \left. P , X \right. _ { F } + \tau h ( P ) + \alpha ^ { \top } ( P 1 _ { N } - 1 _ { N } ) + \beta ^ { \top } ( P ^ { \top } 1 _ { N } - 1 _ { N } ) ,
|
| 390 |
+
$$
|
| 391 |
+
|
| 392 |
+
It is easy to see, by stating the equality $\partial \mathcal { L } / \partial P = 0$ that one must have for each $i , j$ ,
|
| 393 |
+
|
| 394 |
+
$$
|
| 395 |
+
p _ { \tau } ^ { i , j } = \mathrm { e x p } ( \alpha _ { i } / \tau - 1 / 2 ) \mathrm { e x p } ( X _ { i , j } / \tau ) \mathrm { e x p } ( \beta _ { j } / \tau - 1 / 2 ) ,
|
| 396 |
+
$$
|
| 397 |
+
|
| 398 |
+
in other words, $P _ { \tau } = D _ { 1 } \exp ( X _ { i , j } / \tau ) D _ { 2 }$ for certain diagonal matrices $D _ { 1 } , D _ { 2 }$ , with positive diagonals. By Sinkhorn’s theorem, and our definition of the Sinkhorn operator, we must have that $\bar { S ( \cal X / \tau ) } = \dot { \cal P } _ { \tau }$ . □
|
| 399 |
+
|
| 400 |
+
Lemma 2. Suppose the entries of $X$ are drawn independently from a distribution that is absolutely continuous with respect to the Lebesgue measure in $\mathbb { R }$ . Then, almost surely, ${ \tilde { M } } ( X ) = M ( X )$ is $a$ unique permutation matrix.
|
| 401 |
+
|
| 402 |
+
Proof. This is a known result from sensibility analysis on linear programming which we prove for completeness. Notice first that the problem in (2) is a linear program on a polytope. As such, by the fundamental theorem of linear program, the optimal solution set must correspond to a face of the polytope. Let $\mathcal { F }$ be a face of $\boldsymbol { B } _ { N }$ of dimension $\geq 1$ , and take $P _ { 1 } , P _ { 2 } \in { \mathcal { F } }$ , $P _ { 1 } \neq P _ { 2 }$ . If $\mathcal { F }$ is an optimal face for a certain $X _ { \mathcal { F } }$ , then $X _ { \mathcal { F } } \in \{ X \ : \ \langle P _ { 1 } , X \rangle _ { F } = \langle P _ { 2 } , X \rangle _ { F } \}$ . Nonetheless, the latter set does not have full dimension, and consequently has measure zero, given our distributional assumption on $X$ . Repeating the argument for every face of dimension $\geq 1$ and taking a union bound we conclude that, almost surely, the optimal solution lies on a face of dimension 0, i.e, a vertex. From here uniqueness follows. □
|
| 403 |
+
|
| 404 |
+
Lemma 3. Call $P _ { \tau }$ the solution to the problem in equation $I O$ , i.e. $P _ { \tau } = P _ { \tau } ( X ) = S ( X / \tau )$ . Under the assumptions of Lemma 2, $P _ { \tau } \to P _ { 0 }$ when if $\tau \to 0 ^ { + }$ .
|
| 405 |
+
|
| 406 |
+
Proof. Proof Notice that by Lemmas 1 and 2, $P _ { \tau }$ is well defined and unique for each $\tau \geq 0$ . Moreover, at $\tau = 0$ , $P _ { 0 } = M ( X )$ is the unique solution of a linear program. Now, let’s define $f _ { \tau } ( \cdot ) = \langle \cdot , X \rangle _ { F } + \tau h ( \cdot )$ . We observe that $f _ { 0 } ( \bar { P _ { \tau } } ) \to f _ { 0 } ( P _ { 0 } )$ . Indeed, one has:
|
| 407 |
+
|
| 408 |
+
$$
|
| 409 |
+
\begin{array} { l l l } { f _ { 0 } ( P _ { 0 } ) - f _ { 0 } ( P _ { \tau } ) } & { = } & { \langle P _ { 0 } , X \rangle _ { F } - \langle P _ { \tau } , X \rangle _ { F } } \\ & { = } & { \langle P _ { 0 } , X \rangle _ { F } - f _ { \tau } ( P _ { \tau } ) + \tau h ( P _ { \tau } ) } \\ & { < } & { \langle P _ { 0 } , X \rangle _ { F } - f _ { \tau } ( P _ { 0 } ) + \tau h ( P _ { \tau } ) } \\ & { < } & { \tau \left( h ( P _ { \tau } ) - h ( P _ { 0 } ) \right) } \\ & { < } & { \tau \displaystyle \operatorname* { m a x } _ { P \in \mathcal { B } _ { N } } h ( P ) . } \end{array}
|
| 410 |
+
$$
|
| 411 |
+
|
| 412 |
+
From which convergence follows trivially. Moreover, in this case convergence of the values implies the converge of $P _ { \tau }$ : suppose $P _ { \tau }$ does not converge to $P _ { 0 }$ . Then, there would exist a certain $\delta$ and sequence $\tau _ { n } 0$ such that $\| P _ { \tau _ { n } } - P _ { 0 } \| > \delta$ . On the other hand, since $P _ { 0 }$ is the unique maximizer of an LP, there exists $\varepsilon > 0$ such that $f _ { 0 } ( P _ { 0 } ) - f _ { 0 } ( P ) > \varepsilon$ whenever $\| P - P _ { 0 } \| > \delta$ , $P \in B _ { N }$ . This contradicts the convergence of $f _ { 0 } ( P _ { \tau _ { n } } )$ . □
|
| 413 |
+
|
| 414 |
+
# A.1.2 PROOF OF THEOREM 1
|
| 415 |
+
|
| 416 |
+
The first statement is Lemma 1. Convergence (equation 11) is a direct consequence of Lemma 3, after noticing $P _ { \tau } = S ( X / \tau )$ and $P _ { 0 } = M ( X )$ . We note that an alternative approach for the limiting argument is presented in Cominetti & San Mart´ın (1994).
|
| 417 |
+
|
| 418 |
+
# A.2 RELATION TO SOFTMAX
|
| 419 |
+
|
| 420 |
+
Finally, we notice that all of the above results can be understood as a generalization of the wellknown approximation result arg $\begin{array} { r } { \operatorname* { m a x } _ { i } x _ { i } = \operatorname* { l i m } _ { \tau \to 0 ^ { + } } s o f t m a x ( x / \tau ) } \end{array}$ . To see this, treat a category as a one-hot vector. Then, one has
|
| 421 |
+
|
| 422 |
+
$$
|
| 423 |
+
\arg \operatorname* { m a x } _ { i } x _ { i } = \underset { e \in S _ { N } } { \arg \operatorname* { m a x } } \langle e , x \rangle ,
|
| 424 |
+
$$
|
| 425 |
+
|
| 426 |
+
where $S _ { n }$ is the probability simplex, the convex hull of the one-hot vectors (denoted ${ \mathcal { H } } _ { n }$ ). Again, by the fundamental theorem of linear algebra, the following holds:
|
| 427 |
+
|
| 428 |
+
$$
|
| 429 |
+
\arg \operatorname* { m a x } _ { i } x _ { i } = \underset { e \in \mathcal { H } _ { N } } { \arg \operatorname* { m a x } } \langle e , x \rangle .
|
| 430 |
+
$$
|
| 431 |
+
|
| 432 |
+
On the other hand, by a similar (but simpler) argument than of the proof of theorem 4 one can easily show that
|
| 433 |
+
|
| 434 |
+
$$
|
| 435 |
+
s o f t m a x ( x / \tau ) \equiv \frac { \exp ( x / \tau ) } { \sum _ { i = 1 } \exp ( x _ { i } / \tau ) } = \arg \operatorname* { m a x } _ { e \in S _ { n } } \langle e , x \rangle + \tau h ( e ) ,
|
| 436 |
+
$$
|
| 437 |
+
|
| 438 |
+
where the entropy $h ( \cdot )$ is not defined as $\begin{array} { r } { h ( e ) = - \sum _ { i = 1 } ^ { n } e _ { i } \log ( e _ { i } ) } \end{array}$
|
| 439 |
+
|
| 440 |
+
# A.3 ILLUSTRATING THEOREM 1
|
| 441 |
+
|
| 442 |
+

|
| 443 |
+
Figure 3: Illustrating the Matching and Sinkhorn operators, and the Gumbel-Matching and GumbelSinkhorn distributions. Each 5x5 grid represents a matrix, with the shading indicating cell values (a) Matching operator $M ( X )$ applied to a parameter matrix $X$ . (b) Sinkhorn Operator $S ( X / \tau )$ approximating $M ( X )$ for different temperature $\tau$ and number of Sinkhorn iterations, $L$ . (c). First row: samples from the Matching Sinkhorn distribution. Second and third rows: samples from the Gumbel-Sinkhorn distribution at two temperatures. At low temperature, both distributions are indistinguishable.
|
| 444 |
+
|
| 445 |
+
# B SUPPLEMENTAL METHODS
|
| 446 |
+
|
| 447 |
+
# B.1 EXPERIMENTAL PROTOCOLS
|
| 448 |
+
|
| 449 |
+
All experiments were run on a cluster using Tensorflow Abadi et al. (2016), using several GPU (Tesla K20, K40, K80 and P100) in parallel to enable an efficient exploration of the hyperparameter space: temperature, learning rate, and neural network parameters (dimensions).
|
| 450 |
+
|
| 451 |
+
In all cases, we used $L = 2 0$ Sinkhorn Operator Iterations, and a $1 0 \mathrm { x } 1 0$ batch size: for each sample in the batch we used Gumbel perturbations to generate 10 different reconstructions.
|
| 452 |
+
|
| 453 |
+
For evaluation, we used the Hungarian Algorithm Munkres (1957) to compute $M ( X )$ required to infer the predicted matching.
|
| 454 |
+
|
| 455 |
+
Finally, experiments of section 5.4 were done consistent with model specifications stated in Linderman et al. (2017)
|
| 456 |
+
|
| 457 |
+
# B.2 NUMBER OF PARAMETERS ON SINKHORN NETWORKS
|
| 458 |
+
|
| 459 |
+
In the simplest network, the one that sorts number, the number of parameters is given by $n _ { u } + N \times n _ { u }$ : Indeed, each number is connected with the hidden layer with $n _ { u }$ (here, 32) units. This layer connects with another layer with $N$ units, representing a row of $g ( { \tilde { X } } , \theta )$ .
|
| 460 |
+
|
| 461 |
+
For images, the first layer is a convolution, composed by $n _ { f }$ convolutional filters of receptive field size $K _ { s }$ with $n _ { c }$ channels (one or three) followed by a ReLU $^ +$ max-pooling (with stride $s$ ) operations. Then, the number of parameters in the first layer is given by $\bar { K _ { s } ^ { 2 } } \times n _ { c } \bar { \times } n _ { f } + n _ { f }$ . The second layers connects the output of a convolution, i.e., the stacked convolved $l \times l$ images by each of the filters (after max-pooling) and $p ^ { 2 }$ units, where $p$ is the number of pieces each side was divided by. Therefore, the number of parameters is given by $l ^ { 2 } / ( p ^ { 2 } s ^ { 2 } ) \times n _ { f } \times \dot { p } ^ { 2 } = l ^ { 2 } / s ^ { 2 } \times n _ { f }$ , up to rounding and padding subtleties. Then, the total number of parameters is $l ^ { 2 } / s ^ { 2 } \times n _ { f } + K _ { s } ^ { 2 } \times n _ { c } \times n _ { f } + n _ { f }$ . For the $3 \mathrm { x } 3$ puzzle on Imagenet, $l = 2 5 6 , p = 3 , n _ { c } = 3$ and the optimal network was such that $n _ { f } = 6 4 , s = 2 , K _ { s } = 5$ . Then, it had 1,053,440 parameters.
|
| 462 |
+
|
| 463 |
+
Finally, for arbitrary assembly experiments, as one includes additional fully connected second layers, the total number of parameters is $n _ { l } \times l ^ { 2 } / s ^ { 2 } \times n _ { f } + K _ { s } ^ { 2 } \times n _ { c } \times n _ { f } + \bar { n _ { f } }$ , where $n _ { l }$ is the number of labels (here, $n _ { l } = 1 0 $ ).
|
| 464 |
+
|
| 465 |
+
# B.3 INFERENCE WITH THE IMPLICIT GUMBEL-SINKHORN DISTRIBUTION
|
| 466 |
+
|
| 467 |
+
Here we show how to compute $K L ( ( X + \varepsilon ) / \tau \parallel \varepsilon / \tau _ { p r i o r } )$ , as defined in 4.1. We first notice that the density of the variable $h = ( a + g ) / b$ , where $g$ has a Gumbel distribution and $a , b$ are constants is given by:
|
| 468 |
+
|
| 469 |
+
$$
|
| 470 |
+
\log p _ { h } ( z ) = \log b - \left( b z - a + \exp \left( a - b z \right) \right) .
|
| 471 |
+
$$
|
| 472 |
+
|
| 473 |
+
Therefore, the log density ratio $L R ( z )$ between each component of $h _ { 1 } = ( x _ { i , j } + \varepsilon _ { i , j } ) / \tau$ and $h _ { 2 } =$ $\varepsilon _ { i , j } / \tau _ { p r i o r }$ is (suppressing indexing for simplicity)
|
| 474 |
+
|
| 475 |
+
$$
|
| 476 |
+
\begin{array} { r l } & { L R ( z ) = \log p _ { h _ { 1 } } ( z ) / \log p _ { h _ { 2 } } ( z ) } \\ & { \qquad = \log \tau - ( \tau z - x + \exp { ( x - z \tau ) } ) - \log \tau _ { p r i o r } + ( \tau _ { p r i o r } z + \exp { ( - z \tau _ { p r i o r } ) } ) . } \end{array}
|
| 477 |
+
$$
|
| 478 |
+
|
| 479 |
+
We need to take expectations with respect to the distribution of $h _ { 1 }$ . To compute this expectation, we first express the above ratio in terms of $\varepsilon$
|
| 480 |
+
|
| 481 |
+
$$
|
| 482 |
+
L R ( \varepsilon ) = \log ( \tau / \tau _ { p r i o r } ) - ( \varepsilon + \exp \left( - \varepsilon \right) - ( \varepsilon + x ) \tau _ { p r i o r } / \tau - \exp \left( - ( \varepsilon + x ) \tau _ { p r i o r } / \tau \right) ) )
|
| 483 |
+
$$
|
| 484 |
+
|
| 485 |
+
Now we appeal to the law of the unconscious statistician, and take the expectation with respect to $\varepsilon$ . Using the identities
|
| 486 |
+
|
| 487 |
+
• $E ( \varepsilon ) = \gamma \approx 0 . 5 7 7 2$ (the Euler-Mascheroni constant)
|
| 488 |
+
• Moment generating function $E ( \exp ( t \varepsilon ) ) = \Gamma ( 1 - t )$ ; implying $E ( \exp ( - \varepsilon ) ) = 1$ and $E ( \exp \left( - \tau _ { p r i o r } / \tau \varepsilon \right) ) = \Gamma ( 1 + \tau _ { p r i o r } / \tau ) )$
|
| 489 |
+
|
| 490 |
+
we have:
|
| 491 |
+
|
| 492 |
+
$$
|
| 493 |
+
\begin{array} { r l } & { \Xi _ { h _ { 1 } } \left( L R ( z ) \right) = E _ { \varepsilon } \left( L R ( \varepsilon ) \right) } \\ & { \qquad = \log ( \tau / \tau _ { p r i o r } ) - \left( \gamma ( 1 - \tau _ { p r i o r } / \tau ) + 1 - x \tau _ { p r i o r } / \tau - \exp \left( - x \tau _ { p r i o r } / \tau \right) \Gamma ( 1 + \tau _ { p r i o r } / \tau ) \right) } \end{array}
|
| 494 |
+
$$
|
| 495 |
+
|
| 496 |
+
From this, it easily follows (adding all the $N ^ { 2 }$ components) that
|
| 497 |
+
|
| 498 |
+
$$
|
| 499 |
+
\begin{array} { l } { { \displaystyle { \ddot { \times } L ( ( X + \varepsilon ) / \tau \parallel \varepsilon / \tau _ { p r i o r } ) = \sum _ { i , j } E _ { g _ { 1 } } \left( L R ( z _ { i , j } ) \right) } } \ ~ } \\ { { \displaystyle ~ = N ^ { 2 } \left( \log ( \tau / \tau _ { p r i o r } ) - 1 + \gamma ( \tau _ { p r i o r } / \tau - 1 ) \right) + S _ { 1 } + \Gamma ( 1 + \tau _ { p r i o r } / \tau ) S _ { 2 } } . } \end{array}
|
| 500 |
+
$$
|
| 501 |
+
|
| 502 |
+
where $S _ { 1 } = \tau _ { p r i o r } / \tau \sum _ { i , j } x _ { i , j }$ and $\begin{array} { r } { S _ { 2 } = \sum _ { i , j } \exp \left( - x _ { i , j } { \tau _ { p r i o r } } / \tau \right) } \end{array}$ .
|
| 503 |
+
|
| 504 |
+
# C SUPPLEMENTAL RESULTS
|
| 505 |
+
|
| 506 |
+
# C.1 PUZZLES
|
| 507 |
+
|
| 508 |
+
In table 4 we provide further performance measures for the Jigsaw puzzle task on Celeba, for extreme hyper-parameter values: small temperature, large temperature, and a single Sinkhorn iteration These are worse than the ones in table 2, although surprisingly, one Sinkhorn iteration already provides reasonable performance, as long temperature is chosen in an appropriate range.
|
| 509 |
+
|
| 510 |
+
# C.2 TRANSFORMATIONS INTO ARBITRARY DIGITS
|
| 511 |
+
|
| 512 |
+
In table 5 we show performance of a 2-layer CNN in detecting transformed digits as the ones they are intended to be. From this we see the most troublesome transformation was to one, as this network most of the times categorized it as a different number. Also, in figure 4 we show transformations, showing that to reconstruct to arbitrary digits it is not required that the original ones have an actual digit-like structure, but they can be only pieces of ‘strokes’ or ‘dust’.
|
| 513 |
+
|
| 514 |
+
Table 4: Jigsaw puzzle results for different extreme hyper-parameter values
|
| 515 |
+
|
| 516 |
+
<table><tr><td></td><td colspan="4">T = 0.01</td><td colspan="4">T=100</td><td colspan="4">L=1</td></tr><tr><td></td><td>2x2</td><td>3x3</td><td>4x4</td><td>5x5</td><td>2x2</td><td>3x3</td><td>4x4</td><td>5x5</td><td>.2x2</td><td>3x3</td><td>4x4</td><td>5x5</td></tr><tr><td>Prop. wrong</td><td>.06</td><td>.08</td><td>.23</td><td>.36</td><td>.03</td><td>.1</td><td>.28</td><td>.5</td><td>.0</td><td>.03</td><td>.13</td><td>.28</td></tr><tr><td>Prop. any wrong</td><td>.1</td><td>.22</td><td>.36</td><td>.9</td><td>.04</td><td>.23</td><td>.67</td><td>.97</td><td>.0</td><td>.08</td><td>.42</td><td>.82</td></tr><tr><td>Kendall tau</td><td>.9</td><td>.89</td><td>.74</td><td>.62</td><td>.97</td><td>.88</td><td>.7</td><td>.47</td><td>1.0</td><td>.96</td><td>.86</td><td>.72</td></tr><tr><td>11</td><td>.03</td><td>.04</td><td>.1</td><td>.14</td><td>.01</td><td>.04</td><td>.11</td><td>.19</td><td>.0</td><td>.01</td><td>.05</td><td>.11</td></tr><tr><td>12</td><td>.16</td><td>.18</td><td>.28</td><td>.34</td><td>.11</td><td>.19</td><td>.3</td><td>.38</td><td>.0</td><td>.11</td><td>.21</td><td>.3</td></tr></table>
|
| 517 |
+
|
| 518 |
+
Becomes
|
| 519 |
+
Table 5: Accuracies of two-layer convolutional neural network in identifying transformed digits
|
| 520 |
+
|
| 521 |
+
<table><tr><td></td><td>0</td><td></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr><tr><td></td><td>0</td><td></td><td>.0</td><td>1.</td><td>1.</td><td>1.</td><td>1.</td><td>1.</td><td>1.</td><td>1.</td><td>1.</td></tr><tr><td></td><td>1</td><td></td><td></td><td>.97</td><td>.99</td><td>.99</td><td>1.</td><td>1.</td><td>.56</td><td>.75</td><td>.2</td></tr><tr><td></td><td>23456</td><td></td><td></td><td></td><td></td><td></td><td></td><td>1</td><td>.70</td><td></td><td>1.</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>11111</td><td></td><td>.96</td></tr><tr><td></td><td></td><td></td><td>10.0.46</td><td></td><td></td><td></td><td></td><td></td><td></td><td>1168</td><td>.36</td></tr><tr><td>Hrp1eaat</td><td></td><td>914.113</td><td>品</td><td></td><td></td><td>111611L</td><td>II1LL</td><td>6116</td><td></td><td>.16.11L</td><td>1.</td></tr><tr><td></td><td></td><td></td><td></td><td>911111211</td><td>1111146</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>7</td><td></td><td></td><td>.73</td><td></td><td></td><td></td><td>1.</td><td>11</td><td></td><td></td><td></td></tr><tr><td>8</td><td>.0 1.</td><td></td><td>.07</td><td></td><td>1.</td><td></td><td>1.</td><td></td><td>.07</td><td></td><td>11216</td></tr><tr><td>9</td><td>1.</td><td></td><td>.33</td><td></td><td>1.</td><td>1.</td><td>1.</td><td>1.</td><td>1.</td><td></td><td></td></tr></table>
|
| 522 |
+
|
| 523 |
+
# C.3 RESULTS ON CATEGORIAL VAE IN MNIST
|
| 524 |
+
|
| 525 |
+
In general, for arbitrary random variables $Z _ { 1 } , Z _ { 2 }$ and a function $g$ , one has
|
| 526 |
+
|
| 527 |
+
$$
|
| 528 |
+
K L ( Z _ { 1 } \parallel Z _ { 2 } ) \geq K L ( g ( Z _ { 1 } ) \parallel g ( Z _ { 2 } ) ) .
|
| 529 |
+
$$
|
| 530 |
+
|
| 531 |
+
We prove this in the discrete case, for simplicity: call $q ( z )$ and $p ( z )$ the densities of $Z _ { 1 } , Z _ { 2 }$ , and call $y = g ( z )$ . This induces two joint distributions, $p ( z , y )$ and $q ( z , y )$ . Now, define
|
| 532 |
+
|
| 533 |
+
$$
|
| 534 |
+
K L ( q ( z | y ) \parallel p ( z | y ) ) = \sum _ { y , z } ( q ( z , y ) \log q ( z | y ) - \log p ( z | y ) ) .
|
| 535 |
+
$$
|
| 536 |
+
|
| 537 |
+
Under this definition, one can verify that
|
| 538 |
+
|
| 539 |
+
$$
|
| 540 |
+
\begin{array} { r } { K L ( q ( \boldsymbol { z } , \boldsymbol { y } ) \parallel p ( \boldsymbol { z } , \boldsymbol { y } ) ) = K L ( q ( \boldsymbol { z } ) \parallel p ( \boldsymbol { z } ) ) + K L ( q ( \boldsymbol { y } | \boldsymbol { z } ) \parallel p ( \boldsymbol { y } | \boldsymbol { z } ) ) } \\ { = K L ( q ( \boldsymbol { y } ) \parallel p ( \boldsymbol { y } ) ) + K L ( q ( \boldsymbol { z } | \boldsymbol { y } ) \parallel p ( \boldsymbol { z } | \boldsymbol { y } ) ) . } \end{array}
|
| 541 |
+
$$
|
| 542 |
+
|
| 543 |
+
But $K L ( ( q ( y | z ) \quad \parallel \quad p ( y | z ) ) = 0 .$ , as $y$ is a deterministic function of $z$ . Therefore, $K L ( ( q ( z ) \parallel p ( z ) ) = K L ( q ( y ) \parallel p ( y ) ) + K L ( q ( z | y ) \parallel p ( z | y ) )$ , and since the second term is positive (a KL divergence) we conclude $K L ( q ( z ) \parallel p ( z ) ) \geq K L ( q ( y ) \parallel p ( y ) )$ .
|
| 544 |
+
|
| 545 |
+
This implies a lower (or less tight) ELBO if using $Z _ { 1 } , Z _ { 2 }$ instead of $g ( Z _ { 1 } ) , g ( Z _ { 2 } )$ . However, we note that in the categorical case this has a minimal impact in performance. Indeed, we replicated the density estimation on MNIST task described in Jang et al. (2016); Maddison et al. (2016), and as alternative method we considered the concrete distribution, but using as stochastic node $( \varepsilon + x ) / \tau$ (with prior $\varepsilon / \tau _ { p r i o r }$ instead of two concrete distributions. In other words, for us $g ( x ) = \mathrm { s o f t m a x } _ { \tau } ( x )$ and $Z _ { 1 } \stackrel { . } { = } ( \varepsilon + x ) / \tau , Z _ { 2 } = ( \varepsilon ) / \tau _ { p r i o r }$ (in law). Results are shown in Table 6. We first see that Concrete distribution does worse than Gumbel-Softmax, which we attribute to a sub-optimal parameter search. However, we see that working in the Gumbel space has little impact on $\log p ( x )$ : the difference was smaller than .5 nats.
|
| 546 |
+
|
| 547 |
+

|
| 548 |
+
Figure 4: First column: samples from dataset created by mixing all pieces of digits, and then reassembling them into ‘digits’. Second column: random permutations of first column. Third column: hard reconstructions using $M ( X )$ . Fourth column: soft reconstructions using $S ( X / \tau )$ and $\tau = 1$ . Metaphorically, one is able to reconstruct pieces out of ‘dust’.
|
| 549 |
+
|
| 550 |
+
Table 6: Summary of results in VAE
|
| 551 |
+
|
| 552 |
+
<table><tr><td>Method</td><td>-log p(x)</td></tr><tr><td>Gumbel-Softmax</td><td>106.7</td></tr><tr><td>Concrete</td><td>111.5</td></tr><tr><td>Concrete (Gumbel space)</td><td>111.9</td></tr></table>
|
| 553 |
+
|
| 554 |
+
Table 7: Accuracy in the C.elegans neural identification problem, for varying mean number of candidate neurons (10, 30, 45, 60) and number of worms (1 and 4).
|
| 555 |
+
|
| 556 |
+
<table><tr><td rowspan="2">Mean number of candidates Difficulty</td><td colspan="2">10</td><td colspan="2">30</td><td colspan="2">45</td><td colspan="2">60</td></tr><tr><td>1 worm</td><td>4 worms</td><td>1 Worm</td><td>4 worms</td><td>1 worm</td><td> 4 worms</td><td>1 worms</td><td>4 worms</td></tr><tr><td>MCMC</td><td>.34</td><td>.65</td><td>.18</td><td>.28</td><td>.14</td><td>.17</td><td>.13</td><td>.16</td></tr><tr><td>(Linderman et al., 2017)</td><td>.77</td><td>.93</td><td>.33</td><td>.7</td><td>.18</td><td>.48</td><td>.17</td><td>.37</td></tr><tr><td>Gumbel-Sinkhorn</td><td>.79</td><td>.94</td><td>.4</td><td>.69</td><td>.25</td><td>.51</td><td>.21</td><td>.44</td></tr><tr><td>Gumbel-Sinkhorn (no regularization)</td><td>0.77</td><td>.92</td><td>.4</td><td>.64</td><td>.25</td><td>.44</td><td>.21</td><td>.39</td></tr></table>
|
| 557 |
+
|
| 558 |
+
# C.4 SUPPLEMENTARY RESULTS ON C.ELEGANS
|
| 559 |
+
|
| 560 |
+
Finally, in Table 7 we show additional results for the C.elegans experiment. The setting is the same as in Figure 4(a) in Linderman et al. (2017). Likewise, Table 3 correspond to the setting of Figure 4(b) in Linderman et al. (2017).
|
| 561 |
+
|
| 562 |
+
# D SUPPLEMENTARY DISCUSSION
|
| 563 |
+
|
| 564 |
+
# D.1 SINKHORN OPERATOR FOR APPROXIMATE MARGINAL INFERENCE
|
| 565 |
+
|
| 566 |
+
A second connection between the distribution in (6) (and therefore, the Matching Gumbel distribution) and the Sinkhorn operator arises as a consequence of Theorem 1. This relates to the estimation of the marginals $E _ { \theta } ( P _ { i , j } )$ , known to be a $\# \mathrm { P }$ hard problem. A well known result (Globerson & Jaakkola, 2007; Wainwright et al., 2008), consequence of Fenchel (conjugate) duality (Rockafellar, 1970) applied to exponential families, links this problem to optimization in the following way: lets denote by $\mathcal { M }$ the marginal polytope, the convex hull of the set of realizable sufficient statistics, that here coincides with $B _ { n }$ . Also, lets call $\mathcal { H } ( \mu )$ the entropy of (6) for the parameter $\theta ( \mu )$ such that
|
| 567 |
+
|
| 568 |
+
$\mu = E _ { \theta ( \mu ) } ( P )$ . Then,
|
| 569 |
+
|
| 570 |
+
$$
|
| 571 |
+
E _ { \theta } ( P ) = \arg \operatorname* { m a x } _ { \mu \in \mathcal { M } } \langle \theta , \mu \rangle _ { F } + \mathcal { H } ( \mu ) .
|
| 572 |
+
$$
|
| 573 |
+
|
| 574 |
+
Notice the only difference between the optimization problems in (17) and (10) is the entropy term, after identifying $X$ with $\theta$ . Therefore, one may understand the Sinkhorn operator as providing approximations for the partition function and the marginals, which will be accurate insofar as $h ( \mu )$ is a good approximation for $\mathcal { H } ( \mu )$ . In this way, one can understand $S ( X )$ as an approximation for $E _ { \theta } ( P )$ , that may complement more classical ones, as the Bethe and Kituchani’s approximations for $\mathcal { H } ( \mu )$ , and the corresponding approximate inference algorithms that they give rise to (Yedidia et al., 2001; Vilnis et al., 2015).
|
| 575 |
+
|
| 576 |
+
# D.2 SUMMARY OF EXTENSIONS
|
| 577 |
+
|
| 578 |
+
Table 8: Analogies between permutation and categories
|
| 579 |
+
|
| 580 |
+
<table><tr><td colspan="2">Categories</td><td>Permutations</td></tr><tr><td colspan="3"></td></tr><tr><td>Polytope</td><td>Probability simplex S</td><td>Birkhoff polytope BN</td></tr><tr><td>Linear program</td><td>arg max xi = arg maxsεs(x,s)</td><td>M(X)= arg maxpeB (P,X) F</td></tr><tr><td>Approximation</td><td>arg maxi xi = limr→0+ softmax(x/τ)</td><td>M(X)= limr→0+ S(X/τ)</td></tr><tr><td>Entropy</td><td>h(s)=∑-silog Si</td><td>h(P)=∑i,j-Pi,j log(Pi,j)</td></tr><tr><td>Entropy regularized linear program</td><td></td><td>softmax(x/T)= arg maxs∈s(x,s)+ Th(s) S(X/τ) = arg maxp∈B(P,X)F + Th(P)</td></tr><tr><td>Reparameterization</td><td>Gumbel-max trick argmaxi(xi+∈i)</td><td>Gumbel-Matching 9M(X) M(X+ ε)</td></tr><tr><td>Continuous approximation</td><td>Concrete softmax((x +∈)/τ)</td><td>Gumbel-Sinkhorn GS(X, T) S((X+∈)/τ)</td></tr></table>
|
parse/train/Byt3oJ-0W/Byt3oJ-0W_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/Byt3oJ-0W/Byt3oJ-0W_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/Byt3oJ-0W/Byt3oJ-0W_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/DKabt9MFnT/DKabt9MFnT.md
ADDED
|
@@ -0,0 +1,477 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# How Gradient Descent Separates Data with Neural Collapse: A Layer-Peeled Perspective
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 In this paper, we study the inductive bias of the neural features and parameters
|
| 11 |
+
2 from neural networks with cross-entropy loss. We study a surrogate model named
|
| 12 |
+
3 unconstrained layer peeled model (ULPM), which helps us to illustrate that the
|
| 13 |
+
4 features and classifiers in the last layer of the neural network will converge to
|
| 14 |
+
5 a certain neural collapse structure [28], where the cross-example within-class
|
| 15 |
+
6 variability of the last-layer features collapse to zero and the class-means converge
|
| 16 |
+
7 to a Simplex Equiangular Tight Frame (ETF). We illustrate that the ULPM with
|
| 17 |
+
8 cross-entropy loss enjoys a benign global landscape on this model where all the
|
| 18 |
+
9 critical points are strict saddle points except the only global minimizers which
|
| 19 |
+
10 exhibit neural collapse phenomenon. Empirically we show that our results also
|
| 20 |
+
11 hold during the training of neural networks in real world tasks when explicit
|
| 21 |
+
12 regularization or weight decay is not included.
|
| 22 |
+
|
| 23 |
+
# 13 1 Introduction
|
| 24 |
+
|
| 25 |
+
14 Deep learning has achieved state-of-the-art per
|
| 26 |
+
15 formances in various applications [20], from
|
| 27 |
+
16 computer vision [16], to natural language
|
| 28 |
+
17 processing[6] and even scientific discovery [23,
|
| 29 |
+
18 41]. Despite the empirical successes achieved,
|
| 30 |
+
19 how gradient descent or its variants leads deep
|
| 31 |
+
20 neural networks to be biased towards solutions
|
| 32 |
+
21 with good generalization performance on the
|
| 33 |
+
22 test set is still a major open question. To de
|
| 34 |
+
23 velop a theoretical foundation for deep learn
|
| 35 |
+
24 ing, many works have studied the implicit
|
| 36 |
+
25 bias of gradient descent in different settings
|
| 37 |
+
26 [21, 1, 37, 33, 25, 3].
|
| 38 |
+
27 It is well-acknowledged that well-trained end
|
| 39 |
+
28 to-end deep architectures have the ability to ef
|
| 40 |
+
29 fectively extract features relevant to the given label. Although theoretical analysis of deep learning
|
| 41 |
+
30 has several achievements in recent years [2, 13], most of the works that aim to analyze properties
|
| 42 |
+
31 of the final output function fail to understand the feature learned. Recently in [28], authors observe
|
| 43 |
+
32 that the within-class cross-sample features will collapse to the mean and the mean will converge
|
| 44 |
+
33 to an Equiangular Tight Frame (ETF) during the terminal phase of training, i.e. after achieving
|
| 45 |
+
34 zero training error and interpolating the in-sample training data. Such phenomenon, namely Neural
|
| 46 |
+
35 Collapse (NC) [28], provides a clear view of how the last layer features in the neural network involve
|
| 47 |
+
36 after interpolation and enables us to understand the benefit of training after achieving zero training
|
| 48 |
+
37 error to achieve better properties in generalization and robustness. To theoretically analyze the neuron
|
| 49 |
+
38 collapse phenomenon, [9, 24, 39] propose the Layer-Peeled Model (LPM) as a simplification for
|
| 50 |
+
39 neural networks, where the last-layer features are modeled as free optimization variables. In particular,
|
| 51 |
+
40 in a $K$ -class classification problem using a neural network with $d$ neurons in the last hidden layer, a
|
| 52 |
+
41 corresponding class of LPMs can be defined through the form
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
Figure 1: Illustration of Neural Collapse [28].
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\begin{array} { r l } & { \displaystyle \operatorname* { m i n } _ { W , H } \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \mathcal { L } \left( W h _ { i } , y _ { i } \right) } \\ & { \displaystyle \quad \mathrm { s . t . } \ \frac { 1 } { 2 } | | W | | _ { F } ^ { 2 } \leq C _ { 1 } , \frac { 1 } { 2 } | | H | | _ { F } ^ { 2 } \leq C _ { 2 } } \end{array}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
42 for some positive constant $C _ { 1 } , C _ { 2 }$ . Here $\ b { W } = [ \ b { w } _ { 1 } , \ b { w } _ { 2 } , \ b { \cdot } \ b { \cdot } \ b { \cdot } \ , \ b { w } _ { K } ] ^ { \top } \in \mathbb { R } ^ { K \times d }$ is the weight of the
|
| 62 |
+
43 final linear classifier, $\pmb { H } = [ h _ { 1 } , h _ { 2 } , \cdot \cdot \cdot , h _ { N } ] \in \mathbb { R } ^ { d \times N }$ is the feature of the last layer and $y _ { i }$ is the
|
| 63 |
+
44 corresponding label. The intuition behind LPM is that the modern deep networks are often highly
|
| 64 |
+
45 over-parameterized, with the capacity to learn any representations of the input data. It has been shown
|
| 65 |
+
46 that equiangular tight frame (ETF), i.e. feature with neural collapse, is the only global optimum
|
| 66 |
+
47 of the LPM objective (1) [9, 24, 39]. However, even for this simplified model, the non-convexity
|
| 67 |
+
48 nature of it makes the analysis highly non-trivial. In this paper we aim to understand how gradient
|
| 68 |
+
49 descent separates data with neural collapse. To do this, we build a connection between the neural
|
| 69 |
+
50 collapse with the recently proposed normalized margin [25, 38]. In [25], the authors shows that, using
|
| 70 |
+
51 gradient descent, the direction of the weight converges to the direction that maximizes the $\ell _ { 2 }$ -margin
|
| 71 |
+
52 of the data while the norm of the weight diverges to $+ \infty$ in homogeneous neural networks. Based on
|
| 72 |
+
53 these results, we introduce neural collapse margin and use it provide a convergence result to the first
|
| 73 |
+
54 order stationary point of the minimum-norm separation problem. Furthermore, we illustrate that the
|
| 74 |
+
55 cross-entropy loss enjoys a benign global landscape where all the critical points are strict saddles
|
| 75 |
+
56 in the tangent space except the only global minimizers which exhibit neural collapse phenomenon.
|
| 76 |
+
57 The analysis provides insights on how gradient descent separates data during the training of neural
|
| 77 |
+
58 networks with neural collapse and the benefit of training after interpolation on generalization and
|
| 78 |
+
robustness. We verify our insights via empirical experiments.
|
| 79 |
+
5960 Besides, [26] and a concurrent paper [43] also provide landscape and optimization analysis to study
|
| 80 |
+
61 neural collapse phenomenon, we summarize the connection and difference with our paper in Table 1.
|
| 81 |
+
62 Our result doesn’t introduce any extra feature norm constraint or feature norm regularization, which
|
| 82 |
+
63 are not commonly used in the realistic deep learning. We put the detailed discussion in Section 5.2.
|
| 83 |
+
|
| 84 |
+
<table><tr><td rowspan=1 colspan=1>Reference</td><td rowspan=1 colspan=1>Contribution</td><td rowspan=1 colspan=1>Feature NormConstraint</td><td rowspan=1 colspan=1>Feature NormRegularization</td><td rowspan=1 colspan=1>Loss Function</td></tr><tr><td rowspan=1 colspan=1>[28]</td><td rowspan=1 colspan=1>Empirical Results</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>[9]</td><td rowspan=1 colspan=1>Global Optimum</td><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>[39]</td><td rowspan=1 colspan=1>Global Optimum</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>[24]</td><td rowspan=1 colspan=1>Global Optimum</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>[26]</td><td rowspan=1 colspan=1>Training Dynamics</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>l2Loss</td></tr><tr><td rowspan=1 colspan=1>[43]</td><td rowspan=1 colspan=1>Landscape Analysis</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>This paper</td><td rowspan=1 colspan=1>Training Dynamics+Landscape Analysis</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr></table>
|
| 85 |
+
|
| 86 |
+
Table 1: Comparison of Recent Analysis for Neural Collapse. We provide strongest theoretical results with minimum modification on the training objective function.
|
| 87 |
+
|
| 88 |
+
# 64 1.1 Contribution
|
| 89 |
+
|
| 90 |
+
65 We summarize our contribution as follows.
|
| 91 |
+
|
| 92 |
+
• We build a relationship between the max-margin analysis [33, 27, 25] with the neural collapse and provide the inductive bias analysis to the feature rather than the output function. • Previous works only prove that Gradient Descent on homogeneous neural networks will converge to the KKT point of the corresponding minimum-norm separation problem. However, the minimum-norm separation problem is still a highly non-convex problem. In this paper, we prove that the ULPM cases enjoys a benign landscape and characterize the neural collapse property of the global minimizer.
|
| 93 |
+
|
| 94 |
+
• We show that although the gradient descent on cross entropy loss will push the parameters to infinity, the landscape in the tangent space has no spurious minimum thus many optimization algorithms will converge only along the neural collapse directions .
|
| 95 |
+
|
| 96 |
+
# 76 1.2 Related Work
|
| 97 |
+
|
| 98 |
+
Inductive Bias of Gradient Descent: To understand how gradient or its variants descent helps deep learning to find solutions with good generalization performance on the test set. A recent line of research have studied the implicit bias of gradient descent in different settings. As example, gradient descent is biased towards model have smaller weight [21, 1, 37] and will converge to large margin solution [33, 27, 25, 7, 14] while using logistic loss. For linear networks, [3, 31, 12] have shown that gradient descent will find out a low rank approximation.
|
| 99 |
+
|
| 100 |
+
Loss Landscape Analysis: Although the practical optimization problems encountered in machine learning are often nonconvex, recent works have shown that critical points other than the good ones always lies in the balanced superpositions of symmetric copies of the ground truth according to the hidden symmetries in the objective function [34, 42] which leads to a benign global landscape. In particular, these landscapes do not exhibit spurious local minimizers or flat saddles and can be optimized easily via gradient based methods [10]. The examples including phase retrieval [36], low-rank matrix recovery [11, 10], dictionary learning [35, 30, 19], blind deconvolution [18].
|
| 101 |
+
|
| 102 |
+
# 2 Preliminaries and Problem Setup
|
| 103 |
+
|
| 104 |
+
# 2.1 Preliminaries
|
| 105 |
+
|
| 106 |
+
We considerbalanced, i.e. $K$ sses: . A st $\textstyle \bigcup _ { k = 1 } ^ { K } \{ \pmb { x } _ { k , i } \} _ { i = 1 } ^ { n _ { k } }$ . For simplicity, we assume the dataset isnected neural network can be represented as: $n _ { 1 } = \cdot \cdot \cdot = n _ { K } = n$
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
f \left( x ; W _ { f u l l } \right) = b _ { L } + W _ { L } \sigma \left( b _ { L - 1 } + W _ { L - 1 } \sigma \left( \cdot \cdot \cdot \sigma \left( b _ { 1 } + W _ { 1 } x \right) \right) \right) .
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
5 Here $W _ { f u l l } = \left( W _ { 1 } , W _ { 2 } , \cdot \cdot \cdot , W _ { L } \right)$ denote the weight matrices in each layer and $( b _ { 1 } , b _ { 2 } , \cdots , b _ { L } )$ are the bias terms, $\sigma ( \cdot )$ stands for the nonlinear activation function, for example, ReLU or sigmoid. Let ${ \bf { x } } _ { k , i }$ $\begin{array} { r } { \pmb { h } _ { k , i } = \sigma \left( \pmb { b } _ { L - 1 } + \pmb { W } _ { L - 1 } \sigma \left( \cdots \sigma \left( \pmb { b } _ { 1 } + \pmb { W } _ { 1 } \pmb { x } _ { k , i } \right) \right) \right) \in \mathbb { R } ^ { d } } \end{array}$ and $\begin{array} { r } { \bar { \pmb { h } } _ { k } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } { \pmb { h } } _ { k , i } } \end{array}$ the feature mean within in the k-th class. Without loss of generality, we denote the last layer feature for data can absorb the bias term into the weight matrix by adding a scalar into each feature vectors, so we will ignore the bias term in the following analysis. Let $\begin{array} { r } { \tilde { \pmb { W } } \in \mathbb { R } ^ { K \times d } = \pmb { W } _ { L } = [ \pmb { w } _ { 1 } , \pmb { w } _ { 2 } , \cdots , \pmb { w } _ { K } ] ^ { \top } } \end{array}$ be the weight of the final linear classifier. Neural collapse is the phenomenon that the final layer feature will convergence to a simplex equiangular tight frame (ETF):
|
| 113 |
+
|
| 114 |
+
Definition 2.1. A symmetric matrix 03 $M \in \mathbb { R } ^ { K \times K }$ is said to be simplex equiangular tight frame 04 (ETF) if
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
M = \sqrt { \frac { K } { K - 1 } } { \cal Q } ( { \cal I } _ { K } - \frac { 1 } { K } { \bf 1 } _ { K } { \bf 1 } _ { K } ^ { \top } ) .
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
Where 105 $Q \in \mathbb { R } ^ { K \times K }$ is an orthogonal matrix.
|
| 121 |
+
|
| 122 |
+
106 The four criteria of neural collapse can be formulated precisely as
|
| 123 |
+
|
| 124 |
+
• (NC1) Variability collapse: As training progresses, the within-class variation of the activation becomes negligible as these activation collapse to their class-means $\begin{array} { r } { \bar { \pmb { h } } _ { k } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } { \pmb { h } } _ { k , i } } \end{array}$
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
| | h _ { k , i } - \bar { h } _ { k } | | = 0 , \quad \forall 1 \leq k \leq K
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
• (NC2) Convergence to Simplex ETF: The vectors of the class-means (after centering by their global-mean converge to having equal length, forming equal-sized angles between any given pair, and being the maximally pairwise-distanced configuration constrained to the previous two properties.
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
c o s ( \bar { h } _ { k } , \bar { h } _ { j } ) = - \frac { 1 } { K - 1 } , \quad | | \bar { h } _ { k } | | = | | \bar { h } _ { j } | | , \quad \forall k \neq j
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
• (NC3) Convergence to self-duality: The linear classifiers and class-means will converge to each other, up to rescaling.
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\exists C \ \mathrm { s . t . } \ w _ { k } = C \bar { h } _ { k } , \quad \forall 1 \leq k \leq K
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
• (NC4) Simplification to Nearest Class-Center For a given deepnet activation $\boldsymbol { h } \quad =$ $\sigma \left( b _ { L - 1 } + \bar { W } _ { L - 1 } \sigma \left( \cdot \cdot \cdot \sigma \left( b _ { 1 } + W _ { 1 } x \right) \right) \right) \in \mathbb { R } ^ { d }$ , the network classifier converges to choose whichever class has the nearest train class-mean
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\underset { k } { \arg \operatorname* { m i n } } \pmb { w } _ { k } , \pmb { h } \underset { k } { \arg \operatorname* { m i n } } \| \pmb { h } - \bar { \pmb { h } } _ { k } \| ,
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
In this paper, we say a point 07 $\pmb { W } \in \mathbb { R } ^ { K \times d } , \pmb { H } \in \mathbb { R } ^ { d \times n K }$ satisfies neural collapse conditions or is 08 neural collapse solution if these four criteria are all satisfied for $( W , H )$ .
|
| 149 |
+
|
| 150 |
+
# 2.2 Problem Setup
|
| 151 |
+
|
| 152 |
+
110 In this paper, we mainly focus on the neural collapse phenomenon, which is only related to the
|
| 153 |
+
111 classifiers and features in the last layer. Since general analysis on the highly non-smooth and non
|
| 154 |
+
112 convex neural network is difficult, here we peel down the last layer of neural network and propose
|
| 155 |
+
113 the following Unconstrained Layer-Peeled Model (ULPM) as a simplification to capture the main
|
| 156 |
+
114 characteristic related to neural collapse during the training dynamics. Similar simplification is
|
| 157 |
+
115 common used in previous theoretical works [24, 9, 39, 43], but ours don’t have any constraint or
|
| 158 |
+
116 regularization on features and stands closer to realistic neural network models. We need to mention
|
| 159 |
+
117 that although [26] also study the unconstrained model, their analysis is highly dependent on the $\ell _ { 2 }$
|
| 160 |
+
118 loss function which is rarely used in classification task while ours can address the most popular cross
|
| 161 |
+
119 entropy loss.
|
| 162 |
+
120 Let $\ b { W } = [ \ b { w } _ { 1 } , \ b { w } _ { 2 } , \ b { \cdot } \ b { \cdot } \ b { \cdot } , \ b { w } _ { K } ] ^ { \top } \in \mathbb { R } ^ { K \times d }$ and $H = [ h _ { 1 , 1 } , \cdot \cdot \cdot , h _ { 1 , N } , h _ { 2 , 1 } , \cdot \cdot \cdot , h _ { K , N } ] \in \mathbb { R } ^ { d \times K N }$
|
| 163 |
+
121 be the matrices of classifiers and features in the last layer, where $K$ is the number of classes and $N$
|
| 164 |
+
122 is the number of data points in each classes. The Unconstrained Layer-Peeled Model is defined as
|
| 165 |
+
123 following:
|
| 166 |
+
|
| 167 |
+
$$
|
| 168 |
+
\operatorname* { m i n } _ { W , H } \mathcal { L } ( W , H ) = - \sum _ { k = 1 } ^ { K } \sum _ { i = 1 } ^ { n } \log \left( \frac { \exp ( w _ { k } ^ { \top } h _ { k , i } ) } { \sum _ { j = 1 } ^ { K } \exp ( w _ { j } ^ { \top } h _ { k , i } ) } \right)
|
| 169 |
+
$$
|
| 170 |
+
|
| 171 |
+
124 Here we do not have any constrain or regularization on features, which corresponds to the absence
|
| 172 |
+
125 of weight decay in deep learning training. The objective function (4) is generally non-convex on
|
| 173 |
+
126 $( W , H )$ and we aim to study the landscape of the objective function (4). Furthermore, we consider
|
| 174 |
+
127 the gradient flow of the the objective function
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\frac { d \pmb { W } ( t ) } { d t } = \frac { \partial \pmb { \mathcal { L } } ( \pmb { W } ( t ) , \pmb { H } ( t ) ) } { \partial \pmb { W } } , \frac { d \pmb { H } } { d t } = \frac { \partial \pmb { \mathcal { L } } ( \pmb { W } ( t ) , \pmb { H } ( t ) ) } { \partial \pmb { H } } .
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
128 We also trace the the dynamic of the loss function $\mathcal { L } ( t ) : = \mathcal { L } ( W ( t ) , H ( t ) )$ and study the convergence
|
| 181 |
+
129 of $( W ( t ) , H ( t ) )$ .
|
| 182 |
+
130 Notations. We denote $| | \cdot | | _ { F }$ the Frobenius norm, $\| \cdot \| _ { 2 }$ the matrix spectral norm, $\| \cdot \| _ { * }$ the nuclear
|
| 183 |
+
131 norm, $\| \cdot \|$ the vector $l _ { 2 }$ norm and $t r ( \cdot )$ the trace of matrices. We use $[ K ] : = \{ 1 , 2 , \cdots , K \}$ to denote
|
| 184 |
+
132 the set of indices up to $K$ .
|
| 185 |
+
|
| 186 |
+
# 33 3 Main Results
|
| 187 |
+
|
| 188 |
+
134 In this section, we present our main results about the training dynamics and landscape analysis about
|
| 189 |
+
135 (4). We organize the section as follows: First in Section 3.1.1, we show the relationship between
|
| 190 |
+
136 margin and neural collapse in our surrogate model. Inspired by this relationship, we propose a
|
| 191 |
+
137 minimum-norm separation problem (5) and show the connection between the convergence direction
|
| 192 |
+
138 of gradient flow and the KKT point of (5). In addition, we explicitly solve the global optimum of
|
| 193 |
+
139 (5) and show it must satisfy neural collapse conditions. However, due to the non-convexity, we find
|
| 194 |
+
140 an Example 3.1 in Section 3.2 which shows that there exist some bad KKT points such that simple
|
| 195 |
+
141 gradient flow will get stuck in them and not converge to neural collapse solution which is proved
|
| 196 |
+
142 to be optimal in Theorem 3.3. Then we present our second–order analysis result in Theorem 3.4 to
|
| 197 |
+
143 show that those bad points will exhibit decreasing directions in the tangent space thus if we add some
|
| 198 |
+
144 noise in the training algorithm (e.g. use stochastic gradient descent), our algorithm can escape from
|
| 199 |
+
145 those directions and can only converge to the neural collapse solutions.
|
| 200 |
+
|
| 201 |
+
# 3.1.1 Neural Collapse Margin
|
| 202 |
+
|
| 203 |
+
Before we state our convergence result, let’s first discuss the relationship between margin and neural collapse. By building the relationship between them we can have a better intuition about why gradient flow can converge to neural collapse solution since the convergence to max-margin solutions has been studied in many literature [21, 25, 1, 37]. Recall the margin of a single data point ${ \bf { x } } _ { k , i }$ and associated feature $h _ { k , i }$ as $\begin{array} { r } { q _ { k , i } ( W , H ) : = w _ { k } ^ { \top } h _ { k , i } - \operatorname* { m a x } _ { j \neq k } w _ { j } ^ { \top } h _ { k , i } . } \end{array}$ . [5, 4]. To bridge the margin theory with neural collapse phenomenon, we define the following neural collapse margin:
|
| 204 |
+
|
| 205 |
+
Definition 3.1. We define the the Neural Collapse Margin for the entire dataset as $q _ { \operatorname* { m i n } } ( W , H ) =$ $\begin{array} { r } { \operatorname* { m i n } _ { k \in [ 1 , K ] , i \in [ 1 , n ] } q _ { k , i } ( W , H ) } \end{array}$ .
|
| 206 |
+
|
| 207 |
+
56 The following lemma shows that the neural collapse margin is an indicator of the neural collapse
|
| 208 |
+
57 phenomenon in the sense that collapsed margin minimize the neural collapse margin. Thus we can
|
| 209 |
+
58 trace the neural collapse margin to study the convergence to the neural collapse solution.
|
| 210 |
+
|
| 211 |
+
Lemma 3.1 (Neural Collapse Margin as an Indicator of Neural Collapse). The neural collapse margin always smaller than
|
| 212 |
+
|
| 213 |
+
$$
|
| 214 |
+
q _ { \operatorname* { m i n } } ( W , H ) \leq \frac { \| W \| _ { F } ^ { 2 } + \| H \| _ { F } ^ { 2 } } { 2 ( K - 1 ) \sqrt { n } }
|
| 215 |
+
$$
|
| 216 |
+
|
| 217 |
+
159 and $( W , H )$ must satisfies the neural collapse conditions when the inequality above is reduced to an
|
| 218 |
+
160 equality.
|
| 219 |
+
|
| 220 |
+
# 3.1.2 Convergence Results
|
| 221 |
+
|
| 222 |
+
Now we present our result about the convergence of gradient flow on the ULPM (4). Following [25], we link gradient flow on cross-entropy loss with a minimum-norm separation problem.
|
| 223 |
+
|
| 224 |
+
Theorem 3.1. For problem (4), let $( W ( t ) , H ( t ) )$ be the path of gradient flow at time t, if there exist a time $t _ { 0 }$ such that $\mathcal { L } _ { C E } ( \boldsymbol { W } ( t _ { 0 } ) , H ( t _ { 0 } ) ) < \log 2 ,$ , then any limit point of $\{ ( \hat { H } ( t ) , \hat { W } ( t ) ) : =$ $( \frac { H ( t ) } { \sqrt { \| \boldsymbol { W } ( t ) \| _ { 2 } ^ { 2 } + \| \boldsymbol { H } ( t ) \| _ { 2 } ^ { 2 } } } , \frac { W ( t ) } { \sqrt { \| \boldsymbol { W } ( t ) \| _ { 2 } ^ { 2 } + \| \boldsymbol { H } ( t ) \| _ { 2 } ^ { 2 } } } ) \big \}$ is along the direction of an Karush-Kuhn-Tucker (KKT) point of the following minimum-norm separation problem:
|
| 225 |
+
|
| 226 |
+
$$
|
| 227 |
+
\begin{array} { r l r } & { \underset { W , H } { \operatorname* { m i n } } \frac { 1 } { 2 } | | W | | _ { F } ^ { 2 } + \frac { 1 } { 2 } | | H | | _ { F } ^ { 2 } } & \\ & { s . t . } & { \forall k \neq j \in [ K ] , i \in [ n ] , \quad w _ { k } ^ { \top } h _ { k , i } - w _ { j } ^ { \top } h _ { k , i } \geq 1 . } & \end{array}
|
| 228 |
+
$$
|
| 229 |
+
|
| 230 |
+
168 Remark 3.1. Indeed, the problem (5) can be reorganized to maximize neural collapse margin such
|
| 231 |
+
169 that the norm is constrained to be lower than a certain value. The proof is as follows, for all feasible
|
| 232 |
+
170 solutions $( W , H )$ , we can find that $\forall \alpha \ge q _ { m i n } ( W , H ) ^ { - 1 / 2 } , \alpha ( W , H )$ are still feasible thus the
|
| 233 |
+
171 minimum objective value is $\frac { \frac { 1 } { 2 } | | \boldsymbol { W } | | _ { F } ^ { 2 } + \frac { 1 } { 2 } | | \boldsymbol { H } | | _ { F } ^ { 2 } } { q _ { m i n } ( \boldsymbol { W } , \boldsymbol { H } ) ^ { 1 / 2 } }$ along the direction of $( W , H )$ . Then take minimum
|
| 234 |
+
172 among all the directions we can find the minimum is attained if and only if $( W , H )$ attains the
|
| 235 |
+
173 maximum neural collapse margin on the sphere $\{ ( W , H ) : | | W | | _ { F } ^ { 2 } + | | H | | _ { F } ^ { 2 } \le C \}$
|
| 236 |
+
174 The Theorem 3.1 indicates that the convergent direction of gradient flow is restricted to those
|
| 237 |
+
175 max-margin directions, which usually enjoy some good properties on robustness or generalization
|
| 238 |
+
176 performance. Generally speaking, the KKT conditions are not sufficient to obtain global optimality
|
| 239 |
+
177 since the minimum-norm separation problem (5) is non-convex. Moreover, in some certain occasions,
|
| 240 |
+
178 KKT conditions may be even not necessary for global optimum. However, we can have a precise
|
| 241 |
+
179 characterization about the optimum from another perspective, the following result shows that the
|
| 242 |
+
180 global optimum of this problem satisfies neural collapse conditions.
|
| 243 |
+
81 Theorem 3.2. Every global optimum of the minimum-norm separation problem (5) is also a KKT
|
| 244 |
+
82 point and it satisfies the neural collapse conditions.
|
| 245 |
+
183 To illustrate how does (5) related to (4) and gain insight about Theorem 3.1, we provided the following
|
| 246 |
+
184 lemmas to show that when t is sufficient large, the $( \mathbf { \bar { W } } ( t ) , \mathbf { \cal { H } } ( t ) )$ is an $( \epsilon , \delta )$ approximate KKT point
|
| 247 |
+
185 after appropriate scaling, where the $( \epsilon , \delta )$ converges to zero when $t \to \infty$ . Then as shown in [8] we
|
| 248 |
+
186 know that the limit of these $( \epsilon , \delta )$ approximate KKT point is exact KKT point. Detailed definition of
|
| 249 |
+
187 KKT points and approximate KKT points can be found in appendix.
|
| 250 |
+
|
| 251 |
+
Lemma 3.2. If there exist a time $t _ { 0 }$ such that $\mathcal { L } ( W ( t _ { 0 } ) , H ( t _ { 0 } ) ) < \log 2$ , then for any $t > t _ { 0 }$ $( \tilde { W ( t ) } , \tilde { H ( t ) } ) : = ( W ( t ) , H ( t ) ) / q _ { \mathrm { m i n } } ( W ( t ) , H ( t ) ) ^ { 1 / 2 }$ is a $( \epsilon , \delta )$ - approximate KKT point of the following minimum-norm separation problem. More precisely, we have
|
| 252 |
+
|
| 253 |
+
$$
|
| 254 |
+
\epsilon = \sqrt { \frac { 2 ( 1 - \beta ( t ) ) } { C } } , \delta = \frac { K } { 2 C q _ { m i n } ( t ) }
|
| 255 |
+
$$
|
| 256 |
+
|
| 257 |
+
where:
|
| 258 |
+
|
| 259 |
+
$$
|
| 260 |
+
\beta = \frac { t r ( W ^ { \top } \nabla _ { W } \mathcal { L } ( W , H ) ) + t r ( H ^ { \top } \nabla _ { H } \mathcal { L } ( W , H ) ) } { \sqrt { | | W | | _ { F } ^ { 2 } | | + | | H | | _ { F } ^ { 2 } } \sqrt { | | \nabla _ { W } \mathcal { L } ( W , H ) | | _ { F } ^ { 2 } | | + | | \nabla _ { H } \mathcal { L } ( W , H ) | | _ { F } ^ { 2 } } }
|
| 261 |
+
$$
|
| 262 |
+
|
| 263 |
+
is the angle between $( W , H )$ and its corresponding gradient and $C$ is a positive constant.
|
| 264 |
+
|
| 265 |
+
9 Lemma 3.3. If there exist a time $t _ { 0 }$ such that $\mathcal { L } _ { C E } ( \boldsymbol { W } ( t _ { 0 } ) , H ( t _ { 0 } ) ) < \log 2 ,$ , then we have:
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
\beta ( t ) \to 1 , \quad q _ { m i n } ( t ) \to \infty a s t \to \infty
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
which implies that $\epsilon 0$ and $\delta 0$ when time $t$ goes to infinity.
|
| 272 |
+
|
| 273 |
+
# 3.2 Second–Order Landscape Analysis
|
| 274 |
+
|
| 275 |
+
Due to the non-convex nature of the objective (4), we can’t achieve such global solution efficiently. The global optimality condition shown in Theorem 3.2 still can’t guarantee convergence to neural collapse. In this section, we aim to show that this non-convex optimization problem is actually not scary.
|
| 276 |
+
|
| 277 |
+
Different from previous landscape analysis of non-convex problem, where people aim to show that the objective has a negative directional curvature around any stationary point [34, 42], once features can be perfectly separated, the ULPM objective (4) will always decrease along the direction of the current point and the optimum is attained only in infinity. Although growing along all of those perfectly separation directions can let the loss function decreasing to 0, the speed of decreasing are quite different and there exists an optimal direction with fastest decreasing speed. However, simple first–order analysis may fail to interpret how does gradient flow move among these directions and we need second–order analysis to help us fully characterize the realistic training dynamics. Here is an example illustrating our motivation.
|
| 278 |
+
|
| 279 |
+
Example 3.1 (A Motivating Example). Consider the case when $K = 4 , n = 1$ , let $( W , H )$ be the following point:
|
| 280 |
+
|
| 281 |
+
$$
|
| 282 |
+
W = H = C \left[ \begin{array} { c c c c } { { 1 } } & { { - 1 } } & { { 0 } } & { { 0 } } \\ { { - 1 } } & { { 1 } } & { { 0 } } & { { 0 } } \\ { { 0 } } & { { 0 } } & { { 1 } } & { { - 1 } } \\ { { 0 } } & { { 0 } } & { { - 1 } } & { { 1 } } \end{array} \right]
|
| 283 |
+
$$
|
| 284 |
+
|
| 285 |
+
207 One can easily verify that this $( W , H )$ enables our model to classify all of the features perfectly.
|
| 286 |
+
208 209 Further more, we can show it is along the direction problem (5) by construct the Lagrangian multiplier $\Lambda = ( \lambda _ { i j } ) _ { i , j = 1 } ^ { K }$ of the minimum-norm separationas following:
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
\Lambda = { \left[ \begin{array} { l l l l } { 0 } & { 0 } & { { \frac { 1 } { 2 } } } & { { \frac { 1 } { 2 } } } \\ { 0 } & { 0 } & { { \frac { 1 } { 2 } } } & { { \frac { 1 } { 2 } } } \\ { { \frac { 1 } { 2 } } } & { { \frac { 1 } { 2 } } } & { 0 } & { 0 } \\ { { \frac { 1 } { 2 } } } & { { \frac { 1 } { 2 } } } & { 0 } & { 0 } \end{array} \right] }
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
210 And the gradient of $( W , H )$ is
|
| 293 |
+
|
| 294 |
+
$$
|
| 295 |
+
\nabla _ { W } \mathcal { L } ( W , H ) = \nabla _ { H } \mathcal { L } ( W , H ) = - C \frac { 2 + 2 e ^ { - 2 C ^ { 2 } } } { 2 + 2 e ^ { - 2 C ^ { 2 } } + 2 e ^ { 2 C ^ { 2 } } } \left[ \begin{array} { c c c c } { 1 } & { - 1 } & { 0 } & { 0 } \\ { - 1 } & { 1 } & { 0 } & { 0 } \\ { 0 } & { 0 } & { 1 } & { - 1 } \\ { 0 } & { 0 } & { - 1 } & { 1 } \end{array} \right]
|
| 296 |
+
$$
|
| 297 |
+
|
| 298 |
+
211 We can find that the directions of gradient and the parameter align with each other (i.e.
|
| 299 |
+
212 $W / / \nabla _ { W } \mathcal { L } ( W , H ) , H / / \nabla _ { H } \mathcal { L } ( W , \bar { H } ) )$ , which implies simple gradient descent get stuck in this
|
| 300 |
+
213 direction and only grow the parameter norm. However, if we construct:
|
| 301 |
+
|
| 302 |
+
$$
|
| 303 |
+
W ^ { \prime } = \pmb { H } ^ { \prime } = C \left[ \begin{array} { l l l l } { 1 } & { \alpha } & { \beta } & { \beta } \\ { \alpha } & { 1 } & { \beta } & { \beta } \\ { \beta } & { \beta } & { 1 } & { \alpha } \\ { \beta } & { \beta } & { \alpha } & { 1 } \end{array} \right] , \quad \alpha ^ { 2 } + 2 \beta ^ { 2 } = 1 , \alpha < 0 , \beta < 0
|
| 304 |
+
$$
|
| 305 |
+
|
| 306 |
+
214 Then $\forall \epsilon > 0$ , we can choose appropriate $\alpha , \beta$ such that (see detailed computation in Appendix):
|
| 307 |
+
|
| 308 |
+
$$
|
| 309 |
+
\begin{array} { r l } & { | | W ^ { \prime } | | _ { F } ^ { 2 } = | | W | | _ { F } ^ { 2 } , | | H ^ { \prime } | | _ { F } ^ { 2 } = | | H | | _ { F } ^ { 2 } , } \\ & { | | W ^ { \prime } - W | | _ { F } ^ { 2 } + | | H ^ { \prime } - H | | _ { F } ^ { 2 } < \epsilon , \mathcal { L } ( W ^ { \prime } , H ^ { \prime } ) \leq \mathcal { L } ( W , H ) } \end{array}
|
| 310 |
+
$$
|
| 311 |
+
|
| 312 |
+
215 The results in (11) indicate that $( W ^ { \prime } , H ^ { \prime } )$ is a saddle point on the sphere and there exists many better
|
| 313 |
+
216 direction $( W ^ { \prime } , H ^ { \prime } )$ staying very close to the original direction $( W , H )$ . Although simple gradient
|
| 314 |
+
217 descent will always move along the original direction, once we add some noise in the training (e.g.
|
| 315 |
+
218 stochastic gradient descent), the optimization algorithm can find this better direction and escape the
|
| 316 |
+
219 original bad direction.
|
| 317 |
+
220 In Example 3.1, we show that there does exist some suboptimal KKT point of the minimum-norm
|
| 318 |
+
221 separation problem (5), but there also exist some better points close to it thus stochastic gradient
|
| 319 |
+
222 method can easily escape form them. In the following theorem, we will show that the best directions
|
| 320 |
+
223 are neural collapse solutions in the sense that the loss function is lowest among all the growing
|
| 321 |
+
224 directions.
|
| 322 |
+
|
| 323 |
+
Theorem 3.3. The optimal value of loss function (4) on a sphere is attained (i.e. $\begin{array} { r } { \mathcal { L } ( W , H ) \le } \end{array}$ $\mathcal { L } ( W ^ { \prime } , H ^ { \prime } ) , \forall | | W ^ { \prime } | | _ { F } ^ { 2 } + | | H ^ { \prime } | | _ { F } ^ { 2 } = | | W | | _ { F } ^ { 2 } + | | H | | _ { F } ^ { 2 } )$ if only if the $( W , H )$ satisfies neural collapse conditions and $| | \boldsymbol { W } | | _ { F } = | | \boldsymbol { H } | | _ { F }$ .
|
| 324 |
+
|
| 325 |
+
Remark 3.2. Note that the second conditions is necessary since neural collapse conditions don’t specify the norm ratio of $W$ and $\pmb { H }$ . That is, if $( W , H )$ satisfies neural collapse conditions, $( \alpha W , \beta H ) , \forall \alpha , \beta \in \mathbb { R }$ will also satisfies them but only some certain $\alpha , \beta$ are optimal.
|
| 326 |
+
|
| 327 |
+
31 Now we turns to those points that don’t satisfy neural collapse conditions. To formalize our discussion
|
| 328 |
+
32 in the motivating Example 3.1, we first introduce the tangent space:
|
| 329 |
+
233 Definition 3.2 (tangent space). The tangent space of $( W , H )$ is defined to be a set of directions that
|
| 330 |
+
234 are orthogonal to $( W , H )$ :
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
\mathcal { T } ( W , H ) = \left\{ \Delta W \in \mathbb { R } ^ { K \times d } , \Delta H \in \mathbb { R } ^ { d \times n K } \right\} : t r ( W ^ { \top } \Delta W ) + t r ( H ^ { \top } \Delta H ) = 0 \}
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
235 Our next result justify our observation in the Example 3.1 that for every suboptimal points, there exist
|
| 337 |
+
236 a direction in the tangent space such that move along this direction will leads to a lower objective
|
| 338 |
+
237 value.
|
| 339 |
+
38 Theorem 3.4. If $( W , H )$ is not the optimal solutions in Theorem 3.3, then $\exists ( \Delta W , \Delta H ) \ \in$
|
| 340 |
+
39 $\mathcal { T } ( W , H ) , M > 0$ such that
|
| 341 |
+
|
| 342 |
+
$$
|
| 343 |
+
\forall 0 < \delta < M , \mathcal { L } ( W + \delta \Delta W , H + \delta \Delta H ) \le \mathcal { L } ( W , H )
|
| 344 |
+
$$
|
| 345 |
+
|
| 346 |
+
. Further more, it implies that 240 $\forall \epsilon > 0 , \exists ( W ^ { \prime } , H ^ { \prime } )$ such that:
|
| 347 |
+
|
| 348 |
+
$$
|
| 349 |
+
\begin{array} { r l } & { | | W ^ { \prime } | | _ { F } ^ { 2 } + | | H ^ { \prime } | | _ { F } ^ { 2 } = | | W | | _ { F } ^ { 2 } + | | H | | _ { F } ^ { 2 } , } \\ & { | | W ^ { \prime } - W | | _ { F } ^ { 2 } + | | H ^ { \prime } - H | | _ { F } ^ { 2 } < \epsilon , \mathcal { L } ( W ^ { \prime } , H ^ { \prime } ) \leq \mathcal { L } ( W , H ) } \end{array}
|
| 350 |
+
$$
|
| 351 |
+
|
| 352 |
+
241 Remark 3.3. The result in (13) give us a decreasing direction orthogonal to the direction of $( W , H )$ ,
|
| 353 |
+
242 as shown in Example 3.1, the gradient might be parallel to $( W , H )$ , the decreasing direction must be
|
| 354 |
+
243 obtained by analyze the Hessian matrices and it further indicates that these points are exactly saddle
|
| 355 |
+
244 points in the tangent space, a formal statement and definition can be found in appendix. For a large
|
| 356 |
+
245 family of stochastic optimization algorithm , the projection of noise onto this decreasing direction
|
| 357 |
+
246 is not zero with probability 1, so its those algorithms will escape the bad point and no longer move
|
| 358 |
+
247 along this direction within a small number of iterations.
|
| 359 |
+
|
| 360 |
+
# 4 Empirical Results
|
| 361 |
+
|
| 362 |
+
Gradient Descent on the ULPM Objective. We first conduct experiments on the ULPM objective (4) to support the results of convergence towards Neural Collapse in our theories. We set $N = 1 0$ , $K = 5$ , $d = 2 0$ and use gradient descent with learning rate 5 to run $1 0 ^ { 5 }$ epochs. We characterize the dynamics of the training procedure in Figure 2, through four aspects: (1) variation of the centered class-mean features’ norms (i.e., $\mathrm { S t d } ( \| \bar { \boldsymbol { h } } _ { k } - \bar { \boldsymbol { h } } \| ) / \mathrm { A v g } ( \| \bar { \boldsymbol { h } } _ { k } - \bar { \boldsymbol { h } } \| ) )$ and the variation of the classifier’s norms (i.e., $\mathrm { S t d } ( \| \bar { \boldsymbol { w } } _ { k } \| ) / \mathrm { A v g } ( \| \bar { \boldsymbol { w } } _ { k } \| ) )$ . (2) Within-class variation of last layer features (i.e., $\mathrm { A v g } ( \| h _ { k , i } - h _ { k } \| ) / \mathrm { A v g } ( \| h _ { k , i } - \bar { h } \| ) )$ . (3) The cosines between pairs of last layer features (i.e.,
|
| 363 |
+
|
| 364 |
+
256 $\mathrm { A v g } ( | \cos ( \bar { h } _ { k } , \bar { h } _ { k ^ { \prime } } ) + 1 / ( K - 1 ) | ) )$ and that of the classifiers (i.e., $\mathrm { A v g } ( | \cos ( \bar { w } _ { k } , \bar { w } _ { k ^ { \prime } } ) + 1 / ( K - 1 ) | ) \}$ .
|
| 365 |
+
257 (4) The distance between normalized centered classifier and normalized last layer feature (i.e.,
|
| 366 |
+
258 $\mathrm { A v g } ( | ( \bar { h } _ { k } - \bar { h } ) / \| \bar { h } _ { k } - \bar { h } \| - \bar { w } _ { k } / \| \bar { w } _ { k } \| | ) )$ . Empirically we observe that logarithm of the two
|
| 367 |
+
259 variations of norms (in the first aspect) decrease approximately at rate $O ( 1 / ( \log ( t ) ) )$ , and the
|
| 368 |
+
260 remaining quantities decrease approximately at rate ${ \bar { O } } { \bar { ( } } 1 / ( \log ( t ) ) { \bar { ) } }$ .
|
| 369 |
+
261 Realistic Training. We also extend our theory to realistic neural network training on benchmark
|
| 370 |
+
262 dataset. To evaluate our theory, we train the VGG-13 [32] on FashionMNIST [40] without weight
|
| 371 |
+
263 decay and track the convergence speed of the last layer feature to the neural collapse solution every few
|
| 372 |
+
264 epochs to see how it changes during the terminal phase training. Observe that all the aforementioned
|
| 373 |
+
265 quantities either decrease or stay in small values during the training process, providing implications
|
| 374 |
+
266 that neural collapse can occur with sufficient training epochs.
|
| 375 |
+
|
| 376 |
+

|
| 377 |
+
Figure 2: Training dynamics in ULPM. The $_ x$ -axis in the figures are set to have $\log ( \log ( t ) )$ scales and the $_ y$ -axis in the figures are set to have log scales. (a) The dynamics of the variation of the centered class-mean features’ norms (shown in blue) and the variation of the classifier’s norms (shown in red). We observe that the logarithm of both terms decrease at rate $O ( 1 / ( \log ( t ) ) )$ . (b) The dynamics of the within-class variation of last layer features. Logarithm of the variation converge approximately at rate $O ( 1 / \log ( t ) ) )$ . (c) The dynamics of the cosines between pairs of last layer features (shown in blue) and that of the classifiers (shown in red). Logarithm of both terms converge approximately at rate $O ( 1 / \log ( t ) ) )$ . (d) The dynamics of the distance between normalized centered classifier and normalized last layer feature. Logarithm of the quantity converge approximately at rate $O ( 1 / \log ( t ) ) ,$ to the point of self-duality.
|
| 378 |
+
|
| 379 |
+

|
| 380 |
+
Figure 3: Training VGG-13 without weight decay on FashionMNIST. The $x$ -axis in the figures are set to have $\log ( \log ( t ) )$ scales and the $_ y$ -axis in the figures are set to have log scales. (a) Variation of the centered class-mean features’ norms and that of the classifier’s norms are below 0.1 after 500 epochs. (b) Logarithm of the within-class variation of last layer features decreases approximately linearly with respect to $\log ( \log ( t ) )$ after 100 epochs. (c) The cosines between pairs of last layer features and that of the classifiers decrease and are below 0.1 after 500 epochs. (d) The distance between normalized centered classifier and normalized last layer feature decreases during training towards self-duality.
|
| 381 |
+
|
| 382 |
+
# 5 Conclusion and Discussion
|
| 383 |
+
|
| 384 |
+
# 5.1 Conclusion
|
| 385 |
+
|
| 386 |
+
270 To understand the inductive bias of neural feature from gradient descent training, we build a connection
|
| 387 |
+
271 between large margin inductive bias with neural collapse phenomenon and study a unconstrained
|
| 388 |
+
272 layer-peeled model in this paper. We proved that the gradient flow of the ULPM convergences
|
| 389 |
+
273 to KKT point of a minimum-norm separation problem where the global optimum satisfies neural
|
| 390 |
+
274 collapse conditions. Although the ULPM is nonconvex, we show that ULPM have a nice landscape
|
| 391 |
+
275 where all the stationary point is a strict saddle point in the tangent space except the global neural
|
| 392 |
+
276 collapse solution. Our study helps to demystify the neural collapse phenomenon, which shed light on
|
| 393 |
+
277 the generalization and robustness properties during the terminal phase of training deep networks in
|
| 394 |
+
278 classification problems.
|
| 395 |
+
|
| 396 |
+
# 5.2 Relationship with Other Results
|
| 397 |
+
|
| 398 |
+
Theoretical analysis of neural collapse are first provided by [24, 39, 9], they show that the neural collapse solution is the only global minimum of the simplified non-convex objective function. In particular, [39, 24] study a continuous integral form of the loss function and show that the feature learnt should be a uniform distribution on sphere. A more realistic discrete setting are studied in [9], where the constraint is on the whole feature matrix rather than individual features. All these results only relies on Jensen inequality on output logits thus can be generalized to other convex in logit losses. Our result utilize the implicit bias of the exponential like loss function to remove the feature norm constraint which is not practicable in real applications.
|
| 399 |
+
|
| 400 |
+
288 Though the global optimum shares good property [9], the ULPM objective is still highly non-convex.
|
| 401 |
+
289 Regards optimization, [26, 29] analyze the unconstrained feature model with $\ell _ { 2 }$ loss and establish
|
| 402 |
+
290 convergence results to collapsed feature for gradient descent. However they fail to generalize on
|
| 403 |
+
291 other more practical loss functions used in classification tasks. The analysis highly relies on the $\ell _ { 2 }$
|
| 404 |
+
292 loss which turns the training dynamic to an ODE in eigenvalues.
|
| 405 |
+
293 The most relevant paper is a concurrent breakthrough work [43], which provide a landscape analysis
|
| 406 |
+
294 about the regularized unconstrained feature model. [43] turns the feature norm constraint in [9] into
|
| 407 |
+
295 feature norm regularization and still preserves the neural collapse global optimum. At the same
|
| 408 |
+
296 time, [43] also show that the modified regularized objective shares a benign landscape, where all
|
| 409 |
+
297 the critical points are strict saddles except the global one. Although our paper and [43] discover
|
| 410 |
+
298 similar landscape results, we believe our characterization stays closer to the real algorithms used in
|
| 411 |
+
299 the following two ways
|
| 412 |
+
|
| 413 |
+
• The same as [24, 39, 9], [43] only utilize the convexity in logits of the loss function. However, our analysis also explores the exponential-like property of the cross-entropy loss which will enlarge the norm of the feature. The large feature will provide better approximation to the true neural collapse problem of the normalized feature via approximating the max function via gradually scaled exponential function.
|
| 414 |
+
We doesn’t introduce any constraints or regularization on the feature norm, which is not applied in the realist training. Regularization on feature introduce in [43] is still different from the weight decay regularization [17]. However weight decay on homogeneous neural network is equivalent to gradient descent with scaling step size on unregularized objective [22, 41].
|
| 415 |
+
|
| 416 |
+
We summarize analysis of neural collapse in Table 1.
|
| 417 |
+
|
| 418 |
+
# 5.3 Limitation and Future Work
|
| 419 |
+
|
| 420 |
+
The convergence to neural collapse is super slow. [15] provide a loss dependent learning rate schedule and leads to $O ( 1 / t )$ convergence rate for linear regression. It’s interesting to investigate can this methodology being generalized to our setting. On the other hand, although we have shown that the ULPM have a nice landscape, we still leave the global convergence of (stochastic) gradient descent as future work for we want to provide global convergence of gradient descent combined with a plug in feature extractor.
|
| 421 |
+
|
| 422 |
+
# References
|
| 423 |
+
|
| 424 |
+
[1] Shun-ichi Amari, Jimmy Ba, Roger Grosse, Xuechen Li, Atsushi Nitanda, Taiji Suzuki, Denny Wu, and Ji Xu. When does preconditioning help or hurt generalization? arXiv preprint arXiv:2006.10732, 2020.
|
| 425 |
+
[2] Raman Arora, Sanjeev Arora, Joan Bruna, Nadav Cohen, Rong Ge, Suriya Gunasekar, Chi Jin, Jason Lee, Tengyu Ma, Behnam Neyshabua, and Zhao Song. Theory of deep learning. https://www.cs.princeton.edu/courses/archive/fall19/cos597B/ lecnotes/bookdraft.pdf/.
|
| 426 |
+
[3] Sanjeev Arora, Nadav Cohen, Wei Hu, and Yuping Luo. Implicit regularization in deep matrix factorization. arXiv preprint arXiv:1905.13655, 2019.
|
| 427 |
+
[4] Peter Bartlett, Dylan J Foster, and Matus Telgarsky. Spectrally-normalized margin bounds for neural networks. arXiv preprint arXiv:1706.08498, 2017.
|
| 428 |
+
[5] Peter Bartlett, Yoav Freund, Wee Sun Lee, and Robert E Schapire. Boosting the margin: A new explanation for the effectiveness of voting methods. The annals of statistics, 26(5):1651–1686, 1998.
|
| 429 |
+
[6] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
|
| 430 |
+
[7] Lenaic Chizat and Francis Bach. Implicit bias of gradient descent for wide two-layer neural networks trained with the logistic loss. In Conference on Learning Theory, pages 1305–1338. PMLR, 2020.
|
| 431 |
+
[8] J. Dutta, K. Deb, Rupesh Tulshyan, and Ramnik Arora. Approximate kkt points and a proximity measure for termination. Journal of Global Optimization, 56:1463–1499, 2013.
|
| 432 |
+
[9] Cong Fang, Hangfeng He, Qi Long, and Weijie J Su. Layer-peeled model: Toward understanding well-trained deep neural networks. arXiv preprint arXiv:2101.12699, 2021.
|
| 433 |
+
[10] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points—online stochastic gradient for tensor decomposition. In Conference on learning theory, pages 797–842. PMLR, 2015.
|
| 434 |
+
[11] Rong Ge, Jason D Lee, and Tengyu Ma. Matrix completion has no spurious local minimum. arXiv preprint arXiv:1605.07272, 2016.
|
| 435 |
+
[12] Gauthier Gidel, Francis Bach, and Simon Lacoste-Julien. Implicit regularization of discrete gradient dynamics in linear neural networks. arXiv preprint arXiv:1904.13262, 2019.
|
| 436 |
+
[13] Micah Goldblum, Jonas Geiping, Avi Schwarzschild, Michael Moeller, and Tom Goldstein. Truth or backpropaganda? an empirical investigation of deep learning theory. arXiv preprint arXiv:1910.00359, 2019.
|
| 437 |
+
[14] Ziwei Ji, Miroslav Dudík, Robert E Schapire, and Matus Telgarsky. Gradient descent follows the regularization path for general losses. In Conference on Learning Theory, pages 2109–2136. PMLR, 2020.
|
| 438 |
+
[15] Ziwei Ji and Matus Telgarsky. Characterizing the implicit bias via a primal-dual analysis. In Algorithmic Learning Theory, pages 772–804. PMLR, 2021.
|
| 439 |
+
[16] 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.
|
| 440 |
+
[17] Anders Krogh and John A Hertz. A simple weight decay can improve generalization. In Advances in neural information processing systems, pages 950–957, 1992.
|
| 441 |
+
[18] Yenson Lau, Qing Qu, Han-Wen Kuo, Pengcheng Zhou, Yuqian Zhang, and John Wright. Short-and-sparse deconvolution–a geometric approach. arXiv preprint arXiv:1908.10959, 2019.
|
| 442 |
+
|
| 443 |
+
[19] Thomas Laurent and James Brecht. Deep linear networks with arbitrary loss: All local minima are global. In International conference on machine learning, pages 2902–2907. PMLR, 2018. [20] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436–444, 2015. [21] Yuanzhi Li, Tengyu Ma, and Hongyang Zhang. Algorithmic regularization in over-parameterized matrix sensing and neural networks with quadratic activations. In Conference On Learning Theory, pages 2–47. PMLR, 2018. [22] Zhiyuan Li and Sanjeev Arora. An exponential learning rate schedule for deep learning. arXiv preprint arXiv:1910.07454, 2019. [23] Zichao Long, Yiping Lu, Xianzhong Ma, and Bin Dong. Pde-net: Learning pdes from data. In International Conference on Machine Learning, pages 3208–3216. PMLR, 2018. [24] Jianfeng Lu and Stefan Steinerberger. Neural collapse with cross-entropy loss. arXiv preprint arXiv:2012.08465, 2020. [25] Kaifeng Lyu and Jian Li. Gradient descent maximizes the margin of homogeneous neural networks. arXiv preprint arXiv:1906.05890, 2019. [26] Dustin G Mixon, Hans Parshall, and Jianzong Pi. Neural collapse with unconstrained features. arXiv preprint arXiv:2011.11619, 2020. [27] Mor Shpigel Nacson, Jason Lee, Suriya Gunasekar, Pedro Henrique Pamplona Savarese, Nathan Srebro, and Daniel Soudry. Convergence of gradient descent on separable data. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 3420–3428. PMLR, 2019. [28] Vardan Papyan, XY Han, and David L Donoho. Prevalence of neural collapse during the terminal phase of deep learning training. Proceedings of the National Academy of Sciences, 117(40):24652–24663, 2020. [29] Tomaso Poggio and Qianli Liao. Explicit regularization and implicit bias in deep network classifiers trained with the square loss. arXiv preprint arXiv:2101.00072, 2020. [30] Qing Qu, Yuexiang Zhai, Xiao Li, Yuqian Zhang, and Zhihui Zhu. Analysis of the optimization landscapes for overcomplete representation learning. arXiv preprint arXiv:1912.02427, 2019. [31] Noam Razin and Nadav Cohen. Implicit regularization in deep learning may not be explainable by norms. arXiv preprint arXiv:2005.06398, 2020. [32] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [33] Daniel Soudry, Elad Hoffer, Mor Shpigel Nacson, Suriya Gunasekar, and Nathan Srebro. The implicit bias of gradient descent on separable data. The Journal of Machine Learning Research, 19(1):2822–2878, 2018. [34] Ju Sun, Qing Qu, and John Wright. When are nonconvex problems not scary? arXiv preprint arXiv:1510.06096, 2015. [35] Ju Sun, Qing Qu, and John Wright. Complete dictionary recovery over the sphere i: Overview and the geometric picture. IEEE Transactions on Information Theory, 63(2):853–884, 2016. [36] Ju Sun, Qing Qu, and John Wright. A geometric analysis of phase retrieval. Foundations of Computational Mathematics, 18(5):1131–1198, 2018. [37] Sharan Vaswani, Reza Babanezhad, Jose Gallego, Aaron Mishkin, Simon Lacoste-Julien, and Nicolas Le Roux. To each optimizer a norm, to each norm its generalization. arXiv preprint arXiv:2006.06821, 2020. 09 [38] Colin Wei, Jason Lee, Qiang Liu, and Tengyu Ma. On the margin theory of feedforward neural networks. 2018.
|
| 444 |
+
|
| 445 |
+
11 [39] Stephan Wojtowytsch and Weinan E. On the emergence of tetrahedral symmetry in the final and penultimate layers of neural network classifiers. arXiv preprint arXiv:2012.05420, 2020. [40] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017. [41] Linfeng Zhang, Jiequn Han, Han Wang, Roberto Car, and Weinan E. Deep potential molecular dynamics: a scalable model with the accuracy of quantum mechanics. Physical Review Letters, 120(14):143001, 2018. [42] Yuqian Zhang, Qing Qu, and John Wright. From symmetry to geometry: Tractable nonconvex problems. arXiv preprint arXiv:2007.06753, 2020. [43] Zhihui Zhu, Tianyu Ding, Jinxin Zhou, Xiao Li, Chong You, Jeremias Sulam, and Qing Qu. A geometric analysis of neural collapse with unconstrained features. arXiv preprint arXiv:2105.02375, 2021.
|
| 446 |
+
|
| 447 |
+
1. For all authors...
|
| 448 |
+
|
| 449 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 450 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 451 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
|
| 452 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 453 |
+
|
| 454 |
+
2. If you are including theoretical results...
|
| 455 |
+
|
| 456 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes]
|
| 457 |
+
|
| 458 |
+
3. If you ran experiments...
|
| 459 |
+
|
| 460 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes]
|
| 461 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they are chosen)? [Yes]
|
| 462 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No]
|
| 463 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [No]
|
| 464 |
+
|
| 465 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 466 |
+
|
| 467 |
+
(a) If your work uses existing assets, did you cite the creators? [N/A]
|
| 468 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 469 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 470 |
+
(d) Did you discuss whether and how consent is obtained from people whose data you’re using/curating? [N/A]
|
| 471 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 472 |
+
|
| 473 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 474 |
+
|
| 475 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 476 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 477 |
+
(c) Did you include the estimated hourly wage pa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Separates Data with Neural Collapse: A Layer-Peeled Perspective ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
191,
|
| 8 |
+
122,
|
| 9 |
+
808,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
423,
|
| 19 |
+
223,
|
| 20 |
+
580,
|
| 21 |
+
279
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
318,
|
| 32 |
+
535,
|
| 33 |
+
334
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "1 In this paper, we study the inductive bias of the neural features and parameters \n2 from neural networks with cross-entropy loss. We study a surrogate model named \n3 unconstrained layer peeled model (ULPM), which helps us to illustrate that the \n4 features and classifiers in the last layer of the neural network will converge to \n5 a certain neural collapse structure [28], where the cross-example within-class \n6 variability of the last-layer features collapse to zero and the class-means converge \n7 to a Simplex Equiangular Tight Frame (ETF). We illustrate that the ULPM with \n8 cross-entropy loss enjoys a benign global landscape on this model where all the \n9 critical points are strict saddle points except the only global minimizers which \n10 exhibit neural collapse phenomenon. Empirically we show that our results also \n11 hold during the training of neural networks in real world tasks when explicit \n12 regularization or weight decay is not included. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
148,
|
| 42 |
+
349,
|
| 43 |
+
766,
|
| 44 |
+
516
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "13 1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
148,
|
| 54 |
+
536,
|
| 55 |
+
312,
|
| 56 |
+
553
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "14 Deep learning has achieved state-of-the-art per \n15 formances in various applications [20], from \n16 computer vision [16], to natural language \n17 processing[6] and even scientific discovery [23, \n18 41]. Despite the empirical successes achieved, \n19 how gradient descent or its variants leads deep \n20 neural networks to be biased towards solutions \n21 with good generalization performance on the \n22 test set is still a major open question. To de \n23 velop a theoretical foundation for deep learn \n24 ing, many works have studied the implicit \n25 bias of gradient descent in different settings \n26 [21, 1, 37, 33, 25, 3]. \n27 It is well-acknowledged that well-trained end \n28 to-end deep architectures have the ability to ef \n29 fectively extract features relevant to the given label. Although theoretical analysis of deep learning \n30 has several achievements in recent years [2, 13], most of the works that aim to analyze properties \n31 of the final output function fail to understand the feature learned. Recently in [28], authors observe \n32 that the within-class cross-sample features will collapse to the mean and the mean will converge \n33 to an Equiangular Tight Frame (ETF) during the terminal phase of training, i.e. after achieving \n34 zero training error and interpolating the in-sample training data. Such phenomenon, namely Neural \n35 Collapse (NC) [28], provides a clear view of how the last layer features in the neural network involve \n36 after interpolation and enables us to understand the benefit of training after achieving zero training \n37 error to achieve better properties in generalization and robustness. To theoretically analyze the neuron \n38 collapse phenomenon, [9, 24, 39] propose the Layer-Peeled Model (LPM) as a simplification for \n39 neural networks, where the last-layer features are modeled as free optimization variables. In particular, \n40 in a $K$ -class classification problem using a neural network with $d$ neurons in the last hidden layer, a \n41 corresponding class of LPMs can be defined through the form ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
147,
|
| 65 |
+
561,
|
| 66 |
+
485,
|
| 67 |
+
741
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "",
|
| 74 |
+
"bbox": [
|
| 75 |
+
147,
|
| 76 |
+
747,
|
| 77 |
+
486,
|
| 78 |
+
775
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "image",
|
| 84 |
+
"img_path": "images/c904696a60caaca8b8406d497a2bdd5ff09e73db893b4084744a773f9e515f8d.jpg",
|
| 85 |
+
"image_caption": [
|
| 86 |
+
"Figure 1: Illustration of Neural Collapse [28]. "
|
| 87 |
+
],
|
| 88 |
+
"image_footnote": [],
|
| 89 |
+
"bbox": [
|
| 90 |
+
566,
|
| 91 |
+
560,
|
| 92 |
+
738,
|
| 93 |
+
718
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 0
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "text",
|
| 99 |
+
"text": "",
|
| 100 |
+
"bbox": [
|
| 101 |
+
145,
|
| 102 |
+
775,
|
| 103 |
+
825,
|
| 104 |
+
900
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 0
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "",
|
| 111 |
+
"bbox": [
|
| 112 |
+
145,
|
| 113 |
+
90,
|
| 114 |
+
826,
|
| 115 |
+
147
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "equation",
|
| 121 |
+
"img_path": "images/483ee88ad89ec49f193b475b6fe1517623e1427f5ad9fcdde01c0449e6ad55ac.jpg",
|
| 122 |
+
"text": "$$\n\\begin{array} { r l } & { \\displaystyle \\operatorname* { m i n } _ { W , H } \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\mathcal { L } \\left( W h _ { i } , y _ { i } \\right) } \\\\ & { \\displaystyle \\quad \\mathrm { s . t . } \\ \\frac { 1 } { 2 } | | W | | _ { F } ^ { 2 } \\leq C _ { 1 } , \\frac { 1 } { 2 } | | H | | _ { F } ^ { 2 } \\leq C _ { 2 } } \\end{array}\n$$",
|
| 123 |
+
"text_format": "latex",
|
| 124 |
+
"bbox": [
|
| 125 |
+
374,
|
| 126 |
+
148,
|
| 127 |
+
622,
|
| 128 |
+
223
|
| 129 |
+
],
|
| 130 |
+
"page_idx": 1
|
| 131 |
+
},
|
| 132 |
+
{
|
| 133 |
+
"type": "text",
|
| 134 |
+
"text": "42 for some positive constant $C _ { 1 } , C _ { 2 }$ . Here $\\ b { W } = [ \\ b { w } _ { 1 } , \\ b { w } _ { 2 } , \\ b { \\cdot } \\ b { \\cdot } \\ b { \\cdot } \\ , \\ b { w } _ { K } ] ^ { \\top } \\in \\mathbb { R } ^ { K \\times d }$ is the weight of the \n43 final linear classifier, $\\pmb { H } = [ h _ { 1 } , h _ { 2 } , \\cdot \\cdot \\cdot , h _ { N } ] \\in \\mathbb { R } ^ { d \\times N }$ is the feature of the last layer and $y _ { i }$ is the \n44 corresponding label. The intuition behind LPM is that the modern deep networks are often highly \n45 over-parameterized, with the capacity to learn any representations of the input data. It has been shown \n46 that equiangular tight frame (ETF), i.e. feature with neural collapse, is the only global optimum \n47 of the LPM objective (1) [9, 24, 39]. However, even for this simplified model, the non-convexity \n48 nature of it makes the analysis highly non-trivial. In this paper we aim to understand how gradient \n49 descent separates data with neural collapse. To do this, we build a connection between the neural \n50 collapse with the recently proposed normalized margin [25, 38]. In [25], the authors shows that, using \n51 gradient descent, the direction of the weight converges to the direction that maximizes the $\\ell _ { 2 }$ -margin \n52 of the data while the norm of the weight diverges to $+ \\infty$ in homogeneous neural networks. Based on \n53 these results, we introduce neural collapse margin and use it provide a convergence result to the first \n54 order stationary point of the minimum-norm separation problem. Furthermore, we illustrate that the \n55 cross-entropy loss enjoys a benign global landscape where all the critical points are strict saddles \n56 in the tangent space except the only global minimizers which exhibit neural collapse phenomenon. \n57 The analysis provides insights on how gradient descent separates data during the training of neural \n58 networks with neural collapse and the benefit of training after interpolation on generalization and \nrobustness. We verify our insights via empirical experiments. \n5960 Besides, [26] and a concurrent paper [43] also provide landscape and optimization analysis to study \n61 neural collapse phenomenon, we summarize the connection and difference with our paper in Table 1. \n62 Our result doesn’t introduce any extra feature norm constraint or feature norm regularization, which \n63 are not commonly used in the realistic deep learning. We put the detailed discussion in Section 5.2. ",
|
| 135 |
+
"bbox": [
|
| 136 |
+
143,
|
| 137 |
+
224,
|
| 138 |
+
825,
|
| 139 |
+
476
|
| 140 |
+
],
|
| 141 |
+
"page_idx": 1
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"type": "table",
|
| 145 |
+
"img_path": "images/5c106d9b0468b703da22194a6ba98126c125e5f8f951da2771840b0d4eb99051.jpg",
|
| 146 |
+
"table_caption": [],
|
| 147 |
+
"table_footnote": [
|
| 148 |
+
"Table 1: Comparison of Recent Analysis for Neural Collapse. We provide strongest theoretical results with minimum modification on the training objective function. "
|
| 149 |
+
],
|
| 150 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Reference</td><td rowspan=1 colspan=1>Contribution</td><td rowspan=1 colspan=1>Feature NormConstraint</td><td rowspan=1 colspan=1>Feature NormRegularization</td><td rowspan=1 colspan=1>Loss Function</td></tr><tr><td rowspan=1 colspan=1>[28]</td><td rowspan=1 colspan=1>Empirical Results</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>[9]</td><td rowspan=1 colspan=1>Global Optimum</td><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>[39]</td><td rowspan=1 colspan=1>Global Optimum</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>[24]</td><td rowspan=1 colspan=1>Global Optimum</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>[26]</td><td rowspan=1 colspan=1>Training Dynamics</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>l2Loss</td></tr><tr><td rowspan=1 colspan=1>[43]</td><td rowspan=1 colspan=1>Landscape Analysis</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr><tr><td rowspan=1 colspan=1>This paper</td><td rowspan=1 colspan=1>Training Dynamics+Landscape Analysis</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>Cross-Entropy Loss</td></tr></table>",
|
| 151 |
+
"bbox": [
|
| 152 |
+
186,
|
| 153 |
+
486,
|
| 154 |
+
812,
|
| 155 |
+
662
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 1
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "text",
|
| 161 |
+
"text": "",
|
| 162 |
+
"bbox": [
|
| 163 |
+
147,
|
| 164 |
+
704,
|
| 165 |
+
826,
|
| 166 |
+
761
|
| 167 |
+
],
|
| 168 |
+
"page_idx": 1
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "text",
|
| 172 |
+
"text": "64 1.1 Contribution ",
|
| 173 |
+
"text_level": 1,
|
| 174 |
+
"bbox": [
|
| 175 |
+
148,
|
| 176 |
+
768,
|
| 177 |
+
303,
|
| 178 |
+
784
|
| 179 |
+
],
|
| 180 |
+
"page_idx": 1
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"type": "text",
|
| 184 |
+
"text": "65 We summarize our contribution as follows. ",
|
| 185 |
+
"bbox": [
|
| 186 |
+
155,
|
| 187 |
+
794,
|
| 188 |
+
455,
|
| 189 |
+
809
|
| 190 |
+
],
|
| 191 |
+
"page_idx": 1
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"type": "text",
|
| 195 |
+
"text": "• We build a relationship between the max-margin analysis [33, 27, 25] with the neural collapse and provide the inductive bias analysis to the feature rather than the output function. • Previous works only prove that Gradient Descent on homogeneous neural networks will converge to the KKT point of the corresponding minimum-norm separation problem. However, the minimum-norm separation problem is still a highly non-convex problem. In this paper, we prove that the ULPM cases enjoys a benign landscape and characterize the neural collapse property of the global minimizer. ",
|
| 196 |
+
"bbox": [
|
| 197 |
+
204,
|
| 198 |
+
810,
|
| 199 |
+
826,
|
| 200 |
+
911
|
| 201 |
+
],
|
| 202 |
+
"page_idx": 1
|
| 203 |
+
},
|
| 204 |
+
{
|
| 205 |
+
"type": "text",
|
| 206 |
+
"text": "• We show that although the gradient descent on cross entropy loss will push the parameters to infinity, the landscape in the tangent space has no spurious minimum thus many optimization algorithms will converge only along the neural collapse directions . ",
|
| 207 |
+
"bbox": [
|
| 208 |
+
217,
|
| 209 |
+
92,
|
| 210 |
+
825,
|
| 211 |
+
133
|
| 212 |
+
],
|
| 213 |
+
"page_idx": 2
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"type": "text",
|
| 217 |
+
"text": "76 1.2 Related Work ",
|
| 218 |
+
"text_level": 1,
|
| 219 |
+
"bbox": [
|
| 220 |
+
148,
|
| 221 |
+
147,
|
| 222 |
+
310,
|
| 223 |
+
161
|
| 224 |
+
],
|
| 225 |
+
"page_idx": 2
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"type": "text",
|
| 229 |
+
"text": "Inductive Bias of Gradient Descent: To understand how gradient or its variants descent helps deep learning to find solutions with good generalization performance on the test set. A recent line of research have studied the implicit bias of gradient descent in different settings. As example, gradient descent is biased towards model have smaller weight [21, 1, 37] and will converge to large margin solution [33, 27, 25, 7, 14] while using logistic loss. For linear networks, [3, 31, 12] have shown that gradient descent will find out a low rank approximation. ",
|
| 230 |
+
"bbox": [
|
| 231 |
+
169,
|
| 232 |
+
166,
|
| 233 |
+
825,
|
| 234 |
+
250
|
| 235 |
+
],
|
| 236 |
+
"page_idx": 2
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"type": "text",
|
| 240 |
+
"text": "Loss Landscape Analysis: Although the practical optimization problems encountered in machine learning are often nonconvex, recent works have shown that critical points other than the good ones always lies in the balanced superpositions of symmetric copies of the ground truth according to the hidden symmetries in the objective function [34, 42] which leads to a benign global landscape. In particular, these landscapes do not exhibit spurious local minimizers or flat saddles and can be optimized easily via gradient based methods [10]. The examples including phase retrieval [36], low-rank matrix recovery [11, 10], dictionary learning [35, 30, 19], blind deconvolution [18]. ",
|
| 241 |
+
"bbox": [
|
| 242 |
+
173,
|
| 243 |
+
256,
|
| 244 |
+
826,
|
| 245 |
+
354
|
| 246 |
+
],
|
| 247 |
+
"page_idx": 2
|
| 248 |
+
},
|
| 249 |
+
{
|
| 250 |
+
"type": "text",
|
| 251 |
+
"text": "2 Preliminaries and Problem Setup ",
|
| 252 |
+
"text_level": 1,
|
| 253 |
+
"bbox": [
|
| 254 |
+
173,
|
| 255 |
+
358,
|
| 256 |
+
485,
|
| 257 |
+
376
|
| 258 |
+
],
|
| 259 |
+
"page_idx": 2
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"type": "text",
|
| 263 |
+
"text": "2.1 Preliminaries ",
|
| 264 |
+
"text_level": 1,
|
| 265 |
+
"bbox": [
|
| 266 |
+
176,
|
| 267 |
+
382,
|
| 268 |
+
307,
|
| 269 |
+
396
|
| 270 |
+
],
|
| 271 |
+
"page_idx": 2
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"type": "text",
|
| 275 |
+
"text": "We considerbalanced, i.e. $K$ sses: . A st $\\textstyle \\bigcup _ { k = 1 } ^ { K } \\{ \\pmb { x } _ { k , i } \\} _ { i = 1 } ^ { n _ { k } }$ . For simplicity, we assume the dataset isnected neural network can be represented as: $n _ { 1 } = \\cdot \\cdot \\cdot = n _ { K } = n$ ",
|
| 276 |
+
"bbox": [
|
| 277 |
+
171,
|
| 278 |
+
398,
|
| 279 |
+
823,
|
| 280 |
+
429
|
| 281 |
+
],
|
| 282 |
+
"page_idx": 2
|
| 283 |
+
},
|
| 284 |
+
{
|
| 285 |
+
"type": "equation",
|
| 286 |
+
"img_path": "images/30ab88673e171f672d68e869b146a3c5843ed2a198cd0e052558dec7bba6dd8d.jpg",
|
| 287 |
+
"text": "$$\nf \\left( x ; W _ { f u l l } \\right) = b _ { L } + W _ { L } \\sigma \\left( b _ { L - 1 } + W _ { L - 1 } \\sigma \\left( \\cdot \\cdot \\cdot \\sigma \\left( b _ { 1 } + W _ { 1 } x \\right) \\right) \\right) .\n$$",
|
| 288 |
+
"text_format": "latex",
|
| 289 |
+
"bbox": [
|
| 290 |
+
266,
|
| 291 |
+
440,
|
| 292 |
+
730,
|
| 293 |
+
458
|
| 294 |
+
],
|
| 295 |
+
"page_idx": 2
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"type": "text",
|
| 299 |
+
"text": "5 Here $W _ { f u l l } = \\left( W _ { 1 } , W _ { 2 } , \\cdot \\cdot \\cdot , W _ { L } \\right)$ denote the weight matrices in each layer and $( b _ { 1 } , b _ { 2 } , \\cdots , b _ { L } )$ are the bias terms, $\\sigma ( \\cdot )$ stands for the nonlinear activation function, for example, ReLU or sigmoid. Let ${ \\bf { x } } _ { k , i }$ $\\begin{array} { r } { \\pmb { h } _ { k , i } = \\sigma \\left( \\pmb { b } _ { L - 1 } + \\pmb { W } _ { L - 1 } \\sigma \\left( \\cdots \\sigma \\left( \\pmb { b } _ { 1 } + \\pmb { W } _ { 1 } \\pmb { x } _ { k , i } \\right) \\right) \\right) \\in \\mathbb { R } ^ { d } } \\end{array}$ and $\\begin{array} { r } { \\bar { \\pmb { h } } _ { k } = \\frac { 1 } { n } \\sum _ { i = 1 } ^ { n } { \\pmb { h } } _ { k , i } } \\end{array}$ the feature mean within in the k-th class. Without loss of generality, we denote the last layer feature for data can absorb the bias term into the weight matrix by adding a scalar into each feature vectors, so we will ignore the bias term in the following analysis. Let $\\begin{array} { r } { \\tilde { \\pmb { W } } \\in \\mathbb { R } ^ { K \\times d } = \\pmb { W } _ { L } = [ \\pmb { w } _ { 1 } , \\pmb { w } _ { 2 } , \\cdots , \\pmb { w } _ { K } ] ^ { \\top } } \\end{array}$ be the weight of the final linear classifier. Neural collapse is the phenomenon that the final layer feature will convergence to a simplex equiangular tight frame (ETF): ",
|
| 300 |
+
"bbox": [
|
| 301 |
+
158,
|
| 302 |
+
460,
|
| 303 |
+
825,
|
| 304 |
+
574
|
| 305 |
+
],
|
| 306 |
+
"page_idx": 2
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"type": "text",
|
| 310 |
+
"text": "Definition 2.1. A symmetric matrix 03 $M \\in \\mathbb { R } ^ { K \\times K }$ is said to be simplex equiangular tight frame 04 (ETF) if ",
|
| 311 |
+
"bbox": [
|
| 312 |
+
156,
|
| 313 |
+
577,
|
| 314 |
+
823,
|
| 315 |
+
606
|
| 316 |
+
],
|
| 317 |
+
"page_idx": 2
|
| 318 |
+
},
|
| 319 |
+
{
|
| 320 |
+
"type": "equation",
|
| 321 |
+
"img_path": "images/43d70f0fa2e79ccb958f32972d553dbfa3e765a5fb84f1091d5cd70e0bd41de7.jpg",
|
| 322 |
+
"text": "$$\nM = \\sqrt { \\frac { K } { K - 1 } } { \\cal Q } ( { \\cal I } _ { K } - \\frac { 1 } { K } { \\bf 1 } _ { K } { \\bf 1 } _ { K } ^ { \\top } ) .\n$$",
|
| 323 |
+
"text_format": "latex",
|
| 324 |
+
"bbox": [
|
| 325 |
+
375,
|
| 326 |
+
604,
|
| 327 |
+
622,
|
| 328 |
+
640
|
| 329 |
+
],
|
| 330 |
+
"page_idx": 2
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"type": "text",
|
| 334 |
+
"text": "Where 105 $Q \\in \\mathbb { R } ^ { K \\times K }$ is an orthogonal matrix. ",
|
| 335 |
+
"bbox": [
|
| 336 |
+
150,
|
| 337 |
+
642,
|
| 338 |
+
462,
|
| 339 |
+
659
|
| 340 |
+
],
|
| 341 |
+
"page_idx": 2
|
| 342 |
+
},
|
| 343 |
+
{
|
| 344 |
+
"type": "text",
|
| 345 |
+
"text": "106 The four criteria of neural collapse can be formulated precisely as ",
|
| 346 |
+
"bbox": [
|
| 347 |
+
143,
|
| 348 |
+
669,
|
| 349 |
+
606,
|
| 350 |
+
684
|
| 351 |
+
],
|
| 352 |
+
"page_idx": 2
|
| 353 |
+
},
|
| 354 |
+
{
|
| 355 |
+
"type": "text",
|
| 356 |
+
"text": "• (NC1) Variability collapse: As training progresses, the within-class variation of the activation becomes negligible as these activation collapse to their class-means $\\begin{array} { r } { \\bar { \\pmb { h } } _ { k } = \\frac { 1 } { n } \\sum _ { i = 1 } ^ { n } { \\pmb { h } } _ { k , i } } \\end{array}$ ",
|
| 357 |
+
"bbox": [
|
| 358 |
+
218,
|
| 359 |
+
695,
|
| 360 |
+
826,
|
| 361 |
+
726
|
| 362 |
+
],
|
| 363 |
+
"page_idx": 2
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"type": "equation",
|
| 367 |
+
"img_path": "images/a8cc6da3e495a0f721a1d6f2010522db85214c315ccee06762e673177faec365.jpg",
|
| 368 |
+
"text": "$$\n| | h _ { k , i } - \\bar { h } _ { k } | | = 0 , \\quad \\forall 1 \\leq k \\leq K\n$$",
|
| 369 |
+
"text_format": "latex",
|
| 370 |
+
"bbox": [
|
| 371 |
+
415,
|
| 372 |
+
731,
|
| 373 |
+
642,
|
| 374 |
+
751
|
| 375 |
+
],
|
| 376 |
+
"page_idx": 2
|
| 377 |
+
},
|
| 378 |
+
{
|
| 379 |
+
"type": "text",
|
| 380 |
+
"text": "• (NC2) Convergence to Simplex ETF: The vectors of the class-means (after centering by their global-mean converge to having equal length, forming equal-sized angles between any given pair, and being the maximally pairwise-distanced configuration constrained to the previous two properties. ",
|
| 381 |
+
"bbox": [
|
| 382 |
+
218,
|
| 383 |
+
758,
|
| 384 |
+
825,
|
| 385 |
+
815
|
| 386 |
+
],
|
| 387 |
+
"page_idx": 2
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"type": "equation",
|
| 391 |
+
"img_path": "images/a632e8d6e56a73462789b6cd4eda5fadd50bb04f31fcb66a0a9bac45b717891d.jpg",
|
| 392 |
+
"text": "$$\nc o s ( \\bar { h } _ { k } , \\bar { h } _ { j } ) = - \\frac { 1 } { K - 1 } , \\quad | | \\bar { h } _ { k } | | = | | \\bar { h } _ { j } | | , \\quad \\forall k \\neq j\n$$",
|
| 393 |
+
"text_format": "latex",
|
| 394 |
+
"bbox": [
|
| 395 |
+
351,
|
| 396 |
+
820,
|
| 397 |
+
705,
|
| 398 |
+
853
|
| 399 |
+
],
|
| 400 |
+
"page_idx": 2
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"type": "text",
|
| 404 |
+
"text": "• (NC3) Convergence to self-duality: The linear classifiers and class-means will converge to each other, up to rescaling. ",
|
| 405 |
+
"bbox": [
|
| 406 |
+
218,
|
| 407 |
+
859,
|
| 408 |
+
825,
|
| 409 |
+
890
|
| 410 |
+
],
|
| 411 |
+
"page_idx": 2
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "equation",
|
| 415 |
+
"img_path": "images/064e7e8fdf2cb5e0a1909a29626f0f944bf279c448829017fadc70a327e173da.jpg",
|
| 416 |
+
"text": "$$\n\\exists C \\ \\mathrm { s . t . } \\ w _ { k } = C \\bar { h } _ { k } , \\quad \\forall 1 \\leq k \\leq K\n$$",
|
| 417 |
+
"text_format": "latex",
|
| 418 |
+
"bbox": [
|
| 419 |
+
406,
|
| 420 |
+
895,
|
| 421 |
+
647,
|
| 422 |
+
912
|
| 423 |
+
],
|
| 424 |
+
"page_idx": 2
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"type": "text",
|
| 428 |
+
"text": "• (NC4) Simplification to Nearest Class-Center For a given deepnet activation $\\boldsymbol { h } \\quad =$ $\\sigma \\left( b _ { L - 1 } + \\bar { W } _ { L - 1 } \\sigma \\left( \\cdot \\cdot \\cdot \\sigma \\left( b _ { 1 } + W _ { 1 } x \\right) \\right) \\right) \\in \\mathbb { R } ^ { d }$ , the network classifier converges to choose whichever class has the nearest train class-mean ",
|
| 429 |
+
"bbox": [
|
| 430 |
+
220,
|
| 431 |
+
90,
|
| 432 |
+
823,
|
| 433 |
+
133
|
| 434 |
+
],
|
| 435 |
+
"page_idx": 3
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"type": "equation",
|
| 439 |
+
"img_path": "images/0a6f4747452b13b03c53cda19dc051c2957d15cd60a73f58fc29a69e3a872073.jpg",
|
| 440 |
+
"text": "$$\n\\underset { k } { \\arg \\operatorname* { m i n } } \\pmb { w } _ { k } , \\pmb { h } \\underset { k } { \\arg \\operatorname* { m i n } } \\| \\pmb { h } - \\bar { \\pmb { h } } _ { k } \\| ,\n$$",
|
| 441 |
+
"text_format": "latex",
|
| 442 |
+
"bbox": [
|
| 443 |
+
392,
|
| 444 |
+
142,
|
| 445 |
+
661,
|
| 446 |
+
170
|
| 447 |
+
],
|
| 448 |
+
"page_idx": 3
|
| 449 |
+
},
|
| 450 |
+
{
|
| 451 |
+
"type": "text",
|
| 452 |
+
"text": "In this paper, we say a point 07 $\\pmb { W } \\in \\mathbb { R } ^ { K \\times d } , \\pmb { H } \\in \\mathbb { R } ^ { d \\times n K }$ satisfies neural collapse conditions or is 08 neural collapse solution if these four criteria are all satisfied for $( W , H )$ . ",
|
| 453 |
+
"bbox": [
|
| 454 |
+
156,
|
| 455 |
+
185,
|
| 456 |
+
825,
|
| 457 |
+
215
|
| 458 |
+
],
|
| 459 |
+
"page_idx": 3
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"type": "text",
|
| 463 |
+
"text": "2.2 Problem Setup ",
|
| 464 |
+
"text_level": 1,
|
| 465 |
+
"bbox": [
|
| 466 |
+
173,
|
| 467 |
+
222,
|
| 468 |
+
316,
|
| 469 |
+
237
|
| 470 |
+
],
|
| 471 |
+
"page_idx": 3
|
| 472 |
+
},
|
| 473 |
+
{
|
| 474 |
+
"type": "text",
|
| 475 |
+
"text": "110 In this paper, we mainly focus on the neural collapse phenomenon, which is only related to the \n111 classifiers and features in the last layer. Since general analysis on the highly non-smooth and non \n112 convex neural network is difficult, here we peel down the last layer of neural network and propose \n113 the following Unconstrained Layer-Peeled Model (ULPM) as a simplification to capture the main \n114 characteristic related to neural collapse during the training dynamics. Similar simplification is \n115 common used in previous theoretical works [24, 9, 39, 43], but ours don’t have any constraint or \n116 regularization on features and stands closer to realistic neural network models. We need to mention \n117 that although [26] also study the unconstrained model, their analysis is highly dependent on the $\\ell _ { 2 }$ \n118 loss function which is rarely used in classification task while ours can address the most popular cross \n119 entropy loss. \n120 Let $\\ b { W } = [ \\ b { w } _ { 1 } , \\ b { w } _ { 2 } , \\ b { \\cdot } \\ b { \\cdot } \\ b { \\cdot } , \\ b { w } _ { K } ] ^ { \\top } \\in \\mathbb { R } ^ { K \\times d }$ and $H = [ h _ { 1 , 1 } , \\cdot \\cdot \\cdot , h _ { 1 , N } , h _ { 2 , 1 } , \\cdot \\cdot \\cdot , h _ { K , N } ] \\in \\mathbb { R } ^ { d \\times K N }$ \n121 be the matrices of classifiers and features in the last layer, where $K$ is the number of classes and $N$ \n122 is the number of data points in each classes. The Unconstrained Layer-Peeled Model is defined as \n123 following: ",
|
| 476 |
+
"bbox": [
|
| 477 |
+
140,
|
| 478 |
+
242,
|
| 479 |
+
826,
|
| 480 |
+
381
|
| 481 |
+
],
|
| 482 |
+
"page_idx": 3
|
| 483 |
+
},
|
| 484 |
+
{
|
| 485 |
+
"type": "text",
|
| 486 |
+
"text": "",
|
| 487 |
+
"bbox": [
|
| 488 |
+
142,
|
| 489 |
+
385,
|
| 490 |
+
825,
|
| 491 |
+
444
|
| 492 |
+
],
|
| 493 |
+
"page_idx": 3
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"type": "equation",
|
| 497 |
+
"img_path": "images/32f7a27112ce4a5b0c73a7c72121ba646e7c75798d64e242bcea7995ab0ff161.jpg",
|
| 498 |
+
"text": "$$\n\\operatorname* { m i n } _ { W , H } \\mathcal { L } ( W , H ) = - \\sum _ { k = 1 } ^ { K } \\sum _ { i = 1 } ^ { n } \\log \\left( \\frac { \\exp ( w _ { k } ^ { \\top } h _ { k , i } ) } { \\sum _ { j = 1 } ^ { K } \\exp ( w _ { j } ^ { \\top } h _ { k , i } ) } \\right)\n$$",
|
| 499 |
+
"text_format": "latex",
|
| 500 |
+
"bbox": [
|
| 501 |
+
302,
|
| 502 |
+
448,
|
| 503 |
+
692,
|
| 504 |
+
492
|
| 505 |
+
],
|
| 506 |
+
"page_idx": 3
|
| 507 |
+
},
|
| 508 |
+
{
|
| 509 |
+
"type": "text",
|
| 510 |
+
"text": "124 Here we do not have any constrain or regularization on features, which corresponds to the absence \n125 of weight decay in deep learning training. The objective function (4) is generally non-convex on \n126 $( W , H )$ and we aim to study the landscape of the objective function (4). Furthermore, we consider \n127 the gradient flow of the the objective function ",
|
| 511 |
+
"bbox": [
|
| 512 |
+
142,
|
| 513 |
+
507,
|
| 514 |
+
825,
|
| 515 |
+
564
|
| 516 |
+
],
|
| 517 |
+
"page_idx": 3
|
| 518 |
+
},
|
| 519 |
+
{
|
| 520 |
+
"type": "equation",
|
| 521 |
+
"img_path": "images/6157860f6dc0f3ef33145b909eb070ef4e0b01a17545f0130d979f71123b3071.jpg",
|
| 522 |
+
"text": "$$\n\\frac { d \\pmb { W } ( t ) } { d t } = \\frac { \\partial \\pmb { \\mathcal { L } } ( \\pmb { W } ( t ) , \\pmb { H } ( t ) ) } { \\partial \\pmb { W } } , \\frac { d \\pmb { H } } { d t } = \\frac { \\partial \\pmb { \\mathcal { L } } ( \\pmb { W } ( t ) , \\pmb { H } ( t ) ) } { \\partial \\pmb { H } } .\n$$",
|
| 523 |
+
"text_format": "latex",
|
| 524 |
+
"bbox": [
|
| 525 |
+
308,
|
| 526 |
+
574,
|
| 527 |
+
689,
|
| 528 |
+
607
|
| 529 |
+
],
|
| 530 |
+
"page_idx": 3
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"type": "text",
|
| 534 |
+
"text": "128 We also trace the the dynamic of the loss function $\\mathcal { L } ( t ) : = \\mathcal { L } ( W ( t ) , H ( t ) )$ and study the convergence \n129 of $( W ( t ) , H ( t ) )$ . \n130 Notations. We denote $| | \\cdot | | _ { F }$ the Frobenius norm, $\\| \\cdot \\| _ { 2 }$ the matrix spectral norm, $\\| \\cdot \\| _ { * }$ the nuclear \n131 norm, $\\| \\cdot \\|$ the vector $l _ { 2 }$ norm and $t r ( \\cdot )$ the trace of matrices. We use $[ K ] : = \\{ 1 , 2 , \\cdots , K \\}$ to denote \n132 the set of indices up to $K$ . ",
|
| 535 |
+
"bbox": [
|
| 536 |
+
143,
|
| 537 |
+
623,
|
| 538 |
+
826,
|
| 539 |
+
655
|
| 540 |
+
],
|
| 541 |
+
"page_idx": 3
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"type": "text",
|
| 545 |
+
"text": "",
|
| 546 |
+
"bbox": [
|
| 547 |
+
142,
|
| 548 |
+
664,
|
| 549 |
+
825,
|
| 550 |
+
708
|
| 551 |
+
],
|
| 552 |
+
"page_idx": 3
|
| 553 |
+
},
|
| 554 |
+
{
|
| 555 |
+
"type": "text",
|
| 556 |
+
"text": "33 3 Main Results ",
|
| 557 |
+
"text_level": 1,
|
| 558 |
+
"bbox": [
|
| 559 |
+
153,
|
| 560 |
+
718,
|
| 561 |
+
316,
|
| 562 |
+
734
|
| 563 |
+
],
|
| 564 |
+
"page_idx": 3
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"type": "text",
|
| 568 |
+
"text": "134 In this section, we present our main results about the training dynamics and landscape analysis about \n135 (4). We organize the section as follows: First in Section 3.1.1, we show the relationship between \n136 margin and neural collapse in our surrogate model. Inspired by this relationship, we propose a \n137 minimum-norm separation problem (5) and show the connection between the convergence direction \n138 of gradient flow and the KKT point of (5). In addition, we explicitly solve the global optimum of \n139 (5) and show it must satisfy neural collapse conditions. However, due to the non-convexity, we find \n140 an Example 3.1 in Section 3.2 which shows that there exist some bad KKT points such that simple \n141 gradient flow will get stuck in them and not converge to neural collapse solution which is proved \n142 to be optimal in Theorem 3.3. Then we present our second–order analysis result in Theorem 3.4 to \n143 show that those bad points will exhibit decreasing directions in the tangent space thus if we add some \n144 noise in the training algorithm (e.g. use stochastic gradient descent), our algorithm can escape from \n145 those directions and can only converge to the neural collapse solutions. ",
|
| 569 |
+
"bbox": [
|
| 570 |
+
140,
|
| 571 |
+
744,
|
| 572 |
+
825,
|
| 573 |
+
911
|
| 574 |
+
],
|
| 575 |
+
"page_idx": 3
|
| 576 |
+
},
|
| 577 |
+
{
|
| 578 |
+
"type": "text",
|
| 579 |
+
"text": "3.1.1 Neural Collapse Margin ",
|
| 580 |
+
"text_level": 1,
|
| 581 |
+
"bbox": [
|
| 582 |
+
173,
|
| 583 |
+
116,
|
| 584 |
+
393,
|
| 585 |
+
131
|
| 586 |
+
],
|
| 587 |
+
"page_idx": 4
|
| 588 |
+
},
|
| 589 |
+
{
|
| 590 |
+
"type": "text",
|
| 591 |
+
"text": "Before we state our convergence result, let’s first discuss the relationship between margin and neural collapse. By building the relationship between them we can have a better intuition about why gradient flow can converge to neural collapse solution since the convergence to max-margin solutions has been studied in many literature [21, 25, 1, 37]. Recall the margin of a single data point ${ \\bf { x } } _ { k , i }$ and associated feature $h _ { k , i }$ as $\\begin{array} { r } { q _ { k , i } ( W , H ) : = w _ { k } ^ { \\top } h _ { k , i } - \\operatorname* { m a x } _ { j \\neq k } w _ { j } ^ { \\top } h _ { k , i } . } \\end{array}$ . [5, 4]. To bridge the margin theory with neural collapse phenomenon, we define the following neural collapse margin: ",
|
| 592 |
+
"bbox": [
|
| 593 |
+
169,
|
| 594 |
+
140,
|
| 595 |
+
825,
|
| 596 |
+
226
|
| 597 |
+
],
|
| 598 |
+
"page_idx": 4
|
| 599 |
+
},
|
| 600 |
+
{
|
| 601 |
+
"type": "text",
|
| 602 |
+
"text": "Definition 3.1. We define the the Neural Collapse Margin for the entire dataset as $q _ { \\operatorname* { m i n } } ( W , H ) =$ $\\begin{array} { r } { \\operatorname* { m i n } _ { k \\in [ 1 , K ] , i \\in [ 1 , n ] } q _ { k , i } ( W , H ) } \\end{array}$ . ",
|
| 603 |
+
"bbox": [
|
| 604 |
+
158,
|
| 605 |
+
228,
|
| 606 |
+
823,
|
| 607 |
+
257
|
| 608 |
+
],
|
| 609 |
+
"page_idx": 4
|
| 610 |
+
},
|
| 611 |
+
{
|
| 612 |
+
"type": "text",
|
| 613 |
+
"text": "56 The following lemma shows that the neural collapse margin is an indicator of the neural collapse \n57 phenomenon in the sense that collapsed margin minimize the neural collapse margin. Thus we can \n58 trace the neural collapse margin to study the convergence to the neural collapse solution. ",
|
| 614 |
+
"bbox": [
|
| 615 |
+
148,
|
| 616 |
+
266,
|
| 617 |
+
826,
|
| 618 |
+
309
|
| 619 |
+
],
|
| 620 |
+
"page_idx": 4
|
| 621 |
+
},
|
| 622 |
+
{
|
| 623 |
+
"type": "text",
|
| 624 |
+
"text": "Lemma 3.1 (Neural Collapse Margin as an Indicator of Neural Collapse). The neural collapse margin always smaller than ",
|
| 625 |
+
"bbox": [
|
| 626 |
+
169,
|
| 627 |
+
310,
|
| 628 |
+
823,
|
| 629 |
+
339
|
| 630 |
+
],
|
| 631 |
+
"page_idx": 4
|
| 632 |
+
},
|
| 633 |
+
{
|
| 634 |
+
"type": "equation",
|
| 635 |
+
"img_path": "images/6d38684d538a7caf7f83cc8b5e70591960dcd4e4e5168527d7d7d83c3ef4a5e2.jpg",
|
| 636 |
+
"text": "$$\nq _ { \\operatorname* { m i n } } ( W , H ) \\leq \\frac { \\| W \\| _ { F } ^ { 2 } + \\| H \\| _ { F } ^ { 2 } } { 2 ( K - 1 ) \\sqrt { n } }\n$$",
|
| 637 |
+
"text_format": "latex",
|
| 638 |
+
"bbox": [
|
| 639 |
+
383,
|
| 640 |
+
342,
|
| 641 |
+
612,
|
| 642 |
+
377
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 4
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "159 and $( W , H )$ must satisfies the neural collapse conditions when the inequality above is reduced to an \n160 equality. ",
|
| 649 |
+
"bbox": [
|
| 650 |
+
147,
|
| 651 |
+
387,
|
| 652 |
+
826,
|
| 653 |
+
416
|
| 654 |
+
],
|
| 655 |
+
"page_idx": 4
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"type": "text",
|
| 659 |
+
"text": "3.1.2 Convergence Results ",
|
| 660 |
+
"text_level": 1,
|
| 661 |
+
"bbox": [
|
| 662 |
+
174,
|
| 663 |
+
426,
|
| 664 |
+
370,
|
| 665 |
+
440
|
| 666 |
+
],
|
| 667 |
+
"page_idx": 4
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "text",
|
| 671 |
+
"text": "Now we present our result about the convergence of gradient flow on the ULPM (4). Following [25], we link gradient flow on cross-entropy loss with a minimum-norm separation problem. ",
|
| 672 |
+
"bbox": [
|
| 673 |
+
160,
|
| 674 |
+
443,
|
| 675 |
+
825,
|
| 676 |
+
472
|
| 677 |
+
],
|
| 678 |
+
"page_idx": 4
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "text",
|
| 682 |
+
"text": "Theorem 3.1. For problem (4), let $( W ( t ) , H ( t ) )$ be the path of gradient flow at time t, if there exist a time $t _ { 0 }$ such that $\\mathcal { L } _ { C E } ( \\boldsymbol { W } ( t _ { 0 } ) , H ( t _ { 0 } ) ) < \\log 2 ,$ , then any limit point of $\\{ ( \\hat { H } ( t ) , \\hat { W } ( t ) ) : =$ $( \\frac { H ( t ) } { \\sqrt { \\| \\boldsymbol { W } ( t ) \\| _ { 2 } ^ { 2 } + \\| \\boldsymbol { H } ( t ) \\| _ { 2 } ^ { 2 } } } , \\frac { W ( t ) } { \\sqrt { \\| \\boldsymbol { W } ( t ) \\| _ { 2 } ^ { 2 } + \\| \\boldsymbol { H } ( t ) \\| _ { 2 } ^ { 2 } } } ) \\big \\}$ is along the direction of an Karush-Kuhn-Tucker (KKT) point of the following minimum-norm separation problem: ",
|
| 683 |
+
"bbox": [
|
| 684 |
+
173,
|
| 685 |
+
473,
|
| 686 |
+
825,
|
| 687 |
+
542
|
| 688 |
+
],
|
| 689 |
+
"page_idx": 4
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"type": "equation",
|
| 693 |
+
"img_path": "images/8a58e2861165a365da59b68c5702e4a1bff377db15027bc312f948fdd16c851d.jpg",
|
| 694 |
+
"text": "$$\n\\begin{array} { r l r } & { \\underset { W , H } { \\operatorname* { m i n } } \\frac { 1 } { 2 } | | W | | _ { F } ^ { 2 } + \\frac { 1 } { 2 } | | H | | _ { F } ^ { 2 } } & \\\\ & { s . t . } & { \\forall k \\neq j \\in [ K ] , i \\in [ n ] , \\quad w _ { k } ^ { \\top } h _ { k , i } - w _ { j } ^ { \\top } h _ { k , i } \\geq 1 . } & \\end{array}\n$$",
|
| 695 |
+
"text_format": "latex",
|
| 696 |
+
"bbox": [
|
| 697 |
+
318,
|
| 698 |
+
545,
|
| 699 |
+
683,
|
| 700 |
+
599
|
| 701 |
+
],
|
| 702 |
+
"page_idx": 4
|
| 703 |
+
},
|
| 704 |
+
{
|
| 705 |
+
"type": "text",
|
| 706 |
+
"text": "168 Remark 3.1. Indeed, the problem (5) can be reorganized to maximize neural collapse margin such \n169 that the norm is constrained to be lower than a certain value. The proof is as follows, for all feasible \n170 solutions $( W , H )$ , we can find that $\\forall \\alpha \\ge q _ { m i n } ( W , H ) ^ { - 1 / 2 } , \\alpha ( W , H )$ are still feasible thus the \n171 minimum objective value is $\\frac { \\frac { 1 } { 2 } | | \\boldsymbol { W } | | _ { F } ^ { 2 } + \\frac { 1 } { 2 } | | \\boldsymbol { H } | | _ { F } ^ { 2 } } { q _ { m i n } ( \\boldsymbol { W } , \\boldsymbol { H } ) ^ { 1 / 2 } }$ along the direction of $( W , H )$ . Then take minimum \n172 among all the directions we can find the minimum is attained if and only if $( W , H )$ attains the \n173 maximum neural collapse margin on the sphere $\\{ ( W , H ) : | | W | | _ { F } ^ { 2 } + | | H | | _ { F } ^ { 2 } \\le C \\}$ \n174 The Theorem 3.1 indicates that the convergent direction of gradient flow is restricted to those \n175 max-margin directions, which usually enjoy some good properties on robustness or generalization \n176 performance. Generally speaking, the KKT conditions are not sufficient to obtain global optimality \n177 since the minimum-norm separation problem (5) is non-convex. Moreover, in some certain occasions, \n178 KKT conditions may be even not necessary for global optimum. However, we can have a precise \n179 characterization about the optimum from another perspective, the following result shows that the \n180 global optimum of this problem satisfies neural collapse conditions. \n81 Theorem 3.2. Every global optimum of the minimum-norm separation problem (5) is also a KKT \n82 point and it satisfies the neural collapse conditions. \n183 To illustrate how does (5) related to (4) and gain insight about Theorem 3.1, we provided the following \n184 lemmas to show that when t is sufficient large, the $( \\mathbf { \\bar { W } } ( t ) , \\mathbf { \\cal { H } } ( t ) )$ is an $( \\epsilon , \\delta )$ approximate KKT point \n185 after appropriate scaling, where the $( \\epsilon , \\delta )$ converges to zero when $t \\to \\infty$ . Then as shown in [8] we \n186 know that the limit of these $( \\epsilon , \\delta )$ approximate KKT point is exact KKT point. Detailed definition of \n187 KKT points and approximate KKT points can be found in appendix. ",
|
| 707 |
+
"bbox": [
|
| 708 |
+
140,
|
| 709 |
+
601,
|
| 710 |
+
825,
|
| 711 |
+
696
|
| 712 |
+
],
|
| 713 |
+
"page_idx": 4
|
| 714 |
+
},
|
| 715 |
+
{
|
| 716 |
+
"type": "text",
|
| 717 |
+
"text": "",
|
| 718 |
+
"bbox": [
|
| 719 |
+
140,
|
| 720 |
+
703,
|
| 721 |
+
825,
|
| 722 |
+
801
|
| 723 |
+
],
|
| 724 |
+
"page_idx": 4
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"type": "text",
|
| 728 |
+
"text": "",
|
| 729 |
+
"bbox": [
|
| 730 |
+
156,
|
| 731 |
+
804,
|
| 732 |
+
825,
|
| 733 |
+
832
|
| 734 |
+
],
|
| 735 |
+
"page_idx": 4
|
| 736 |
+
},
|
| 737 |
+
{
|
| 738 |
+
"type": "text",
|
| 739 |
+
"text": "",
|
| 740 |
+
"bbox": [
|
| 741 |
+
142,
|
| 742 |
+
842,
|
| 743 |
+
825,
|
| 744 |
+
912
|
| 745 |
+
],
|
| 746 |
+
"page_idx": 4
|
| 747 |
+
},
|
| 748 |
+
{
|
| 749 |
+
"type": "text",
|
| 750 |
+
"text": "Lemma 3.2. If there exist a time $t _ { 0 }$ such that $\\mathcal { L } ( W ( t _ { 0 } ) , H ( t _ { 0 } ) ) < \\log 2$ , then for any $t > t _ { 0 }$ $( \\tilde { W ( t ) } , \\tilde { H ( t ) } ) : = ( W ( t ) , H ( t ) ) / q _ { \\mathrm { m i n } } ( W ( t ) , H ( t ) ) ^ { 1 / 2 }$ is a $( \\epsilon , \\delta )$ - approximate KKT point of the following minimum-norm separation problem. More precisely, we have ",
|
| 751 |
+
"bbox": [
|
| 752 |
+
171,
|
| 753 |
+
90,
|
| 754 |
+
825,
|
| 755 |
+
137
|
| 756 |
+
],
|
| 757 |
+
"page_idx": 5
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"type": "equation",
|
| 761 |
+
"img_path": "images/f9163255cfe30e124ff08b213b9f5656e8a6a733e08cd890a8995bf359e8f058.jpg",
|
| 762 |
+
"text": "$$\n\\epsilon = \\sqrt { \\frac { 2 ( 1 - \\beta ( t ) ) } { C } } , \\delta = \\frac { K } { 2 C q _ { m i n } ( t ) }\n$$",
|
| 763 |
+
"text_format": "latex",
|
| 764 |
+
"bbox": [
|
| 765 |
+
377,
|
| 766 |
+
141,
|
| 767 |
+
620,
|
| 768 |
+
178
|
| 769 |
+
],
|
| 770 |
+
"page_idx": 5
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"type": "text",
|
| 774 |
+
"text": "where: ",
|
| 775 |
+
"bbox": [
|
| 776 |
+
173,
|
| 777 |
+
180,
|
| 778 |
+
220,
|
| 779 |
+
194
|
| 780 |
+
],
|
| 781 |
+
"page_idx": 5
|
| 782 |
+
},
|
| 783 |
+
{
|
| 784 |
+
"type": "equation",
|
| 785 |
+
"img_path": "images/dc20b6d66f46b643548773f240ed64af3b3faa7534a3b8349fa20002584f985f.jpg",
|
| 786 |
+
"text": "$$\n\\beta = \\frac { t r ( W ^ { \\top } \\nabla _ { W } \\mathcal { L } ( W , H ) ) + t r ( H ^ { \\top } \\nabla _ { H } \\mathcal { L } ( W , H ) ) } { \\sqrt { | | W | | _ { F } ^ { 2 } | | + | | H | | _ { F } ^ { 2 } } \\sqrt { | | \\nabla _ { W } \\mathcal { L } ( W , H ) | | _ { F } ^ { 2 } | | + | | \\nabla _ { H } \\mathcal { L } ( W , H ) | | _ { F } ^ { 2 } } }\n$$",
|
| 787 |
+
"text_format": "latex",
|
| 788 |
+
"bbox": [
|
| 789 |
+
259,
|
| 790 |
+
189,
|
| 791 |
+
738,
|
| 792 |
+
228
|
| 793 |
+
],
|
| 794 |
+
"page_idx": 5
|
| 795 |
+
},
|
| 796 |
+
{
|
| 797 |
+
"type": "text",
|
| 798 |
+
"text": "is the angle between $( W , H )$ and its corresponding gradient and $C$ is a positive constant. ",
|
| 799 |
+
"bbox": [
|
| 800 |
+
158,
|
| 801 |
+
229,
|
| 802 |
+
766,
|
| 803 |
+
244
|
| 804 |
+
],
|
| 805 |
+
"page_idx": 5
|
| 806 |
+
},
|
| 807 |
+
{
|
| 808 |
+
"type": "text",
|
| 809 |
+
"text": "9 Lemma 3.3. If there exist a time $t _ { 0 }$ such that $\\mathcal { L } _ { C E } ( \\boldsymbol { W } ( t _ { 0 } ) , H ( t _ { 0 } ) ) < \\log 2 ,$ , then we have: ",
|
| 810 |
+
"bbox": [
|
| 811 |
+
158,
|
| 812 |
+
246,
|
| 813 |
+
767,
|
| 814 |
+
262
|
| 815 |
+
],
|
| 816 |
+
"page_idx": 5
|
| 817 |
+
},
|
| 818 |
+
{
|
| 819 |
+
"type": "equation",
|
| 820 |
+
"img_path": "images/8c778605a1f4a0f1604d383e3403234438887ef955410611e3d08adb6b4e0e5f.jpg",
|
| 821 |
+
"text": "$$\n\\beta ( t ) \\to 1 , \\quad q _ { m i n } ( t ) \\to \\infty a s t \\to \\infty\n$$",
|
| 822 |
+
"text_format": "latex",
|
| 823 |
+
"bbox": [
|
| 824 |
+
372,
|
| 825 |
+
265,
|
| 826 |
+
625,
|
| 827 |
+
282
|
| 828 |
+
],
|
| 829 |
+
"page_idx": 5
|
| 830 |
+
},
|
| 831 |
+
{
|
| 832 |
+
"type": "text",
|
| 833 |
+
"text": "which implies that $\\epsilon 0$ and $\\delta 0$ when time $t$ goes to infinity. ",
|
| 834 |
+
"bbox": [
|
| 835 |
+
165,
|
| 836 |
+
285,
|
| 837 |
+
596,
|
| 838 |
+
301
|
| 839 |
+
],
|
| 840 |
+
"page_idx": 5
|
| 841 |
+
},
|
| 842 |
+
{
|
| 843 |
+
"type": "text",
|
| 844 |
+
"text": "3.2 Second–Order Landscape Analysis ",
|
| 845 |
+
"text_level": 1,
|
| 846 |
+
"bbox": [
|
| 847 |
+
171,
|
| 848 |
+
313,
|
| 849 |
+
457,
|
| 850 |
+
328
|
| 851 |
+
],
|
| 852 |
+
"page_idx": 5
|
| 853 |
+
},
|
| 854 |
+
{
|
| 855 |
+
"type": "text",
|
| 856 |
+
"text": "Due to the non-convex nature of the objective (4), we can’t achieve such global solution efficiently. The global optimality condition shown in Theorem 3.2 still can’t guarantee convergence to neural collapse. In this section, we aim to show that this non-convex optimization problem is actually not scary. ",
|
| 857 |
+
"bbox": [
|
| 858 |
+
173,
|
| 859 |
+
330,
|
| 860 |
+
825,
|
| 861 |
+
387
|
| 862 |
+
],
|
| 863 |
+
"page_idx": 5
|
| 864 |
+
},
|
| 865 |
+
{
|
| 866 |
+
"type": "text",
|
| 867 |
+
"text": "Different from previous landscape analysis of non-convex problem, where people aim to show that the objective has a negative directional curvature around any stationary point [34, 42], once features can be perfectly separated, the ULPM objective (4) will always decrease along the direction of the current point and the optimum is attained only in infinity. Although growing along all of those perfectly separation directions can let the loss function decreasing to 0, the speed of decreasing are quite different and there exists an optimal direction with fastest decreasing speed. However, simple first–order analysis may fail to interpret how does gradient flow move among these directions and we need second–order analysis to help us fully characterize the realistic training dynamics. Here is an example illustrating our motivation. ",
|
| 868 |
+
"bbox": [
|
| 869 |
+
169,
|
| 870 |
+
392,
|
| 871 |
+
825,
|
| 872 |
+
517
|
| 873 |
+
],
|
| 874 |
+
"page_idx": 5
|
| 875 |
+
},
|
| 876 |
+
{
|
| 877 |
+
"type": "text",
|
| 878 |
+
"text": "Example 3.1 (A Motivating Example). Consider the case when $K = 4 , n = 1$ , let $( W , H )$ be the following point: ",
|
| 879 |
+
"bbox": [
|
| 880 |
+
165,
|
| 881 |
+
520,
|
| 882 |
+
825,
|
| 883 |
+
549
|
| 884 |
+
],
|
| 885 |
+
"page_idx": 5
|
| 886 |
+
},
|
| 887 |
+
{
|
| 888 |
+
"type": "equation",
|
| 889 |
+
"img_path": "images/b63deb74c3ec7baa85255fffd9bba4d3c37ae707fdaa8734ce63bb1a962b5ea6.jpg",
|
| 890 |
+
"text": "$$\nW = H = C \\left[ \\begin{array} { c c c c } { { 1 } } & { { - 1 } } & { { 0 } } & { { 0 } } \\\\ { { - 1 } } & { { 1 } } & { { 0 } } & { { 0 } } \\\\ { { 0 } } & { { 0 } } & { { 1 } } & { { - 1 } } \\\\ { { 0 } } & { { 0 } } & { { - 1 } } & { { 1 } } \\end{array} \\right]\n$$",
|
| 891 |
+
"text_format": "latex",
|
| 892 |
+
"bbox": [
|
| 893 |
+
362,
|
| 894 |
+
546,
|
| 895 |
+
633,
|
| 896 |
+
606
|
| 897 |
+
],
|
| 898 |
+
"page_idx": 5
|
| 899 |
+
},
|
| 900 |
+
{
|
| 901 |
+
"type": "text",
|
| 902 |
+
"text": "207 One can easily verify that this $( W , H )$ enables our model to classify all of the features perfectly. \n208 209 Further more, we can show it is along the direction problem (5) by construct the Lagrangian multiplier $\\Lambda = ( \\lambda _ { i j } ) _ { i , j = 1 } ^ { K }$ of the minimum-norm separationas following: ",
|
| 903 |
+
"bbox": [
|
| 904 |
+
140,
|
| 905 |
+
607,
|
| 906 |
+
825,
|
| 907 |
+
651
|
| 908 |
+
],
|
| 909 |
+
"page_idx": 5
|
| 910 |
+
},
|
| 911 |
+
{
|
| 912 |
+
"type": "equation",
|
| 913 |
+
"img_path": "images/a06f16244a492c835baa5ded9a1fe33c77d4ad720df86fd33493d90f9691fe8b.jpg",
|
| 914 |
+
"text": "$$\n\\Lambda = { \\left[ \\begin{array} { l l l l } { 0 } & { 0 } & { { \\frac { 1 } { 2 } } } & { { \\frac { 1 } { 2 } } } \\\\ { 0 } & { 0 } & { { \\frac { 1 } { 2 } } } & { { \\frac { 1 } { 2 } } } \\\\ { { \\frac { 1 } { 2 } } } & { { \\frac { 1 } { 2 } } } & { 0 } & { 0 } \\\\ { { \\frac { 1 } { 2 } } } & { { \\frac { 1 } { 2 } } } & { 0 } & { 0 } \\end{array} \\right] }\n$$",
|
| 915 |
+
"text_format": "latex",
|
| 916 |
+
"bbox": [
|
| 917 |
+
415,
|
| 918 |
+
655,
|
| 919 |
+
581,
|
| 920 |
+
720
|
| 921 |
+
],
|
| 922 |
+
"page_idx": 5
|
| 923 |
+
},
|
| 924 |
+
{
|
| 925 |
+
"type": "text",
|
| 926 |
+
"text": "210 And the gradient of $( W , H )$ is ",
|
| 927 |
+
"bbox": [
|
| 928 |
+
142,
|
| 929 |
+
729,
|
| 930 |
+
380,
|
| 931 |
+
746
|
| 932 |
+
],
|
| 933 |
+
"page_idx": 5
|
| 934 |
+
},
|
| 935 |
+
{
|
| 936 |
+
"type": "equation",
|
| 937 |
+
"img_path": "images/eff1a2d04bc4cce5468167a605d89a458737a624f850ae95c2c3d26979a35242.jpg",
|
| 938 |
+
"text": "$$\n\\nabla _ { W } \\mathcal { L } ( W , H ) = \\nabla _ { H } \\mathcal { L } ( W , H ) = - C \\frac { 2 + 2 e ^ { - 2 C ^ { 2 } } } { 2 + 2 e ^ { - 2 C ^ { 2 } } + 2 e ^ { 2 C ^ { 2 } } } \\left[ \\begin{array} { c c c c } { 1 } & { - 1 } & { 0 } & { 0 } \\\\ { - 1 } & { 1 } & { 0 } & { 0 } \\\\ { 0 } & { 0 } & { 1 } & { - 1 } \\\\ { 0 } & { 0 } & { - 1 } & { 1 } \\end{array} \\right]\n$$",
|
| 939 |
+
"text_format": "latex",
|
| 940 |
+
"bbox": [
|
| 941 |
+
197,
|
| 942 |
+
750,
|
| 943 |
+
779,
|
| 944 |
+
808
|
| 945 |
+
],
|
| 946 |
+
"page_idx": 5
|
| 947 |
+
},
|
| 948 |
+
{
|
| 949 |
+
"type": "text",
|
| 950 |
+
"text": "211 We can find that the directions of gradient and the parameter align with each other (i.e. \n212 $W / / \\nabla _ { W } \\mathcal { L } ( W , H ) , H / / \\nabla _ { H } \\mathcal { L } ( W , \\bar { H } ) )$ , which implies simple gradient descent get stuck in this \n213 direction and only grow the parameter norm. However, if we construct: ",
|
| 951 |
+
"bbox": [
|
| 952 |
+
142,
|
| 953 |
+
810,
|
| 954 |
+
825,
|
| 955 |
+
853
|
| 956 |
+
],
|
| 957 |
+
"page_idx": 5
|
| 958 |
+
},
|
| 959 |
+
{
|
| 960 |
+
"type": "equation",
|
| 961 |
+
"img_path": "images/4c7f3cb94ffebcec28e9c06ccc3a0a4d1b7695f9ea24c7ccbab3bdd5dfa3356f.jpg",
|
| 962 |
+
"text": "$$\nW ^ { \\prime } = \\pmb { H } ^ { \\prime } = C \\left[ \\begin{array} { l l l l } { 1 } & { \\alpha } & { \\beta } & { \\beta } \\\\ { \\alpha } & { 1 } & { \\beta } & { \\beta } \\\\ { \\beta } & { \\beta } & { 1 } & { \\alpha } \\\\ { \\beta } & { \\beta } & { \\alpha } & { 1 } \\end{array} \\right] , \\quad \\alpha ^ { 2 } + 2 \\beta ^ { 2 } = 1 , \\alpha < 0 , \\beta < 0\n$$",
|
| 963 |
+
"text_format": "latex",
|
| 964 |
+
"bbox": [
|
| 965 |
+
272,
|
| 966 |
+
856,
|
| 967 |
+
725,
|
| 968 |
+
916
|
| 969 |
+
],
|
| 970 |
+
"page_idx": 5
|
| 971 |
+
},
|
| 972 |
+
{
|
| 973 |
+
"type": "text",
|
| 974 |
+
"text": "214 Then $\\forall \\epsilon > 0$ , we can choose appropriate $\\alpha , \\beta$ such that (see detailed computation in Appendix): ",
|
| 975 |
+
"bbox": [
|
| 976 |
+
137,
|
| 977 |
+
90,
|
| 978 |
+
802,
|
| 979 |
+
107
|
| 980 |
+
],
|
| 981 |
+
"page_idx": 6
|
| 982 |
+
},
|
| 983 |
+
{
|
| 984 |
+
"type": "equation",
|
| 985 |
+
"img_path": "images/9628cd235f430bc93b5cea19bc088d0b6b6166be479314cbe7e3db6fd35eaa9c.jpg",
|
| 986 |
+
"text": "$$\n\\begin{array} { r l } & { | | W ^ { \\prime } | | _ { F } ^ { 2 } = | | W | | _ { F } ^ { 2 } , | | H ^ { \\prime } | | _ { F } ^ { 2 } = | | H | | _ { F } ^ { 2 } , } \\\\ & { | | W ^ { \\prime } - W | | _ { F } ^ { 2 } + | | H ^ { \\prime } - H | | _ { F } ^ { 2 } < \\epsilon , \\mathcal { L } ( W ^ { \\prime } , H ^ { \\prime } ) \\leq \\mathcal { L } ( W , H ) } \\end{array}\n$$",
|
| 987 |
+
"text_format": "latex",
|
| 988 |
+
"bbox": [
|
| 989 |
+
292,
|
| 990 |
+
111,
|
| 991 |
+
704,
|
| 992 |
+
154
|
| 993 |
+
],
|
| 994 |
+
"page_idx": 6
|
| 995 |
+
},
|
| 996 |
+
{
|
| 997 |
+
"type": "text",
|
| 998 |
+
"text": "215 The results in (11) indicate that $( W ^ { \\prime } , H ^ { \\prime } )$ is a saddle point on the sphere and there exists many better \n216 direction $( W ^ { \\prime } , H ^ { \\prime } )$ staying very close to the original direction $( W , H )$ . Although simple gradient \n217 descent will always move along the original direction, once we add some noise in the training (e.g. \n218 stochastic gradient descent), the optimization algorithm can find this better direction and escape the \n219 original bad direction. \n220 In Example 3.1, we show that there does exist some suboptimal KKT point of the minimum-norm \n221 separation problem (5), but there also exist some better points close to it thus stochastic gradient \n222 method can easily escape form them. In the following theorem, we will show that the best directions \n223 are neural collapse solutions in the sense that the loss function is lowest among all the growing \n224 directions. ",
|
| 999 |
+
"bbox": [
|
| 1000 |
+
140,
|
| 1001 |
+
156,
|
| 1002 |
+
825,
|
| 1003 |
+
228
|
| 1004 |
+
],
|
| 1005 |
+
"page_idx": 6
|
| 1006 |
+
},
|
| 1007 |
+
{
|
| 1008 |
+
"type": "text",
|
| 1009 |
+
"text": "",
|
| 1010 |
+
"bbox": [
|
| 1011 |
+
142,
|
| 1012 |
+
238,
|
| 1013 |
+
825,
|
| 1014 |
+
308
|
| 1015 |
+
],
|
| 1016 |
+
"page_idx": 6
|
| 1017 |
+
},
|
| 1018 |
+
{
|
| 1019 |
+
"type": "text",
|
| 1020 |
+
"text": "Theorem 3.3. The optimal value of loss function (4) on a sphere is attained (i.e. $\\begin{array} { r } { \\mathcal { L } ( W , H ) \\le } \\end{array}$ $\\mathcal { L } ( W ^ { \\prime } , H ^ { \\prime } ) , \\forall | | W ^ { \\prime } | | _ { F } ^ { 2 } + | | H ^ { \\prime } | | _ { F } ^ { 2 } = | | W | | _ { F } ^ { 2 } + | | H | | _ { F } ^ { 2 } )$ if only if the $( W , H )$ satisfies neural collapse conditions and $| | \\boldsymbol { W } | | _ { F } = | | \\boldsymbol { H } | | _ { F }$ . ",
|
| 1021 |
+
"bbox": [
|
| 1022 |
+
171,
|
| 1023 |
+
311,
|
| 1024 |
+
825,
|
| 1025 |
+
356
|
| 1026 |
+
],
|
| 1027 |
+
"page_idx": 6
|
| 1028 |
+
},
|
| 1029 |
+
{
|
| 1030 |
+
"type": "text",
|
| 1031 |
+
"text": "Remark 3.2. Note that the second conditions is necessary since neural collapse conditions don’t specify the norm ratio of $W$ and $\\pmb { H }$ . That is, if $( W , H )$ satisfies neural collapse conditions, $( \\alpha W , \\beta H ) , \\forall \\alpha , \\beta \\in \\mathbb { R }$ will also satisfies them but only some certain $\\alpha , \\beta$ are optimal. ",
|
| 1032 |
+
"bbox": [
|
| 1033 |
+
171,
|
| 1034 |
+
358,
|
| 1035 |
+
825,
|
| 1036 |
+
401
|
| 1037 |
+
],
|
| 1038 |
+
"page_idx": 6
|
| 1039 |
+
},
|
| 1040 |
+
{
|
| 1041 |
+
"type": "text",
|
| 1042 |
+
"text": "31 Now we turns to those points that don’t satisfy neural collapse conditions. To formalize our discussion \n32 in the motivating Example 3.1, we first introduce the tangent space: \n233 Definition 3.2 (tangent space). The tangent space of $( W , H )$ is defined to be a set of directions that \n234 are orthogonal to $( W , H )$ : ",
|
| 1043 |
+
"bbox": [
|
| 1044 |
+
153,
|
| 1045 |
+
409,
|
| 1046 |
+
826,
|
| 1047 |
+
438
|
| 1048 |
+
],
|
| 1049 |
+
"page_idx": 6
|
| 1050 |
+
},
|
| 1051 |
+
{
|
| 1052 |
+
"type": "text",
|
| 1053 |
+
"text": "",
|
| 1054 |
+
"bbox": [
|
| 1055 |
+
147,
|
| 1056 |
+
440,
|
| 1057 |
+
825,
|
| 1058 |
+
470
|
| 1059 |
+
],
|
| 1060 |
+
"page_idx": 6
|
| 1061 |
+
},
|
| 1062 |
+
{
|
| 1063 |
+
"type": "equation",
|
| 1064 |
+
"img_path": "images/403ec8a7c7e1256a5cf0b5b16381fc37aa9caf173f188007f58efade44abe12b.jpg",
|
| 1065 |
+
"text": "$$\n\\mathcal { T } ( W , H ) = \\left\\{ \\Delta W \\in \\mathbb { R } ^ { K \\times d } , \\Delta H \\in \\mathbb { R } ^ { d \\times n K } \\right\\} : t r ( W ^ { \\top } \\Delta W ) + t r ( H ^ { \\top } \\Delta H ) = 0 \\}\n$$",
|
| 1066 |
+
"text_format": "latex",
|
| 1067 |
+
"bbox": [
|
| 1068 |
+
202,
|
| 1069 |
+
476,
|
| 1070 |
+
767,
|
| 1071 |
+
496
|
| 1072 |
+
],
|
| 1073 |
+
"page_idx": 6
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"type": "text",
|
| 1077 |
+
"text": "235 Our next result justify our observation in the Example 3.1 that for every suboptimal points, there exist \n236 a direction in the tangent space such that move along this direction will leads to a lower objective \n237 value. \n38 Theorem 3.4. If $( W , H )$ is not the optimal solutions in Theorem 3.3, then $\\exists ( \\Delta W , \\Delta H ) \\ \\in$ \n39 $\\mathcal { T } ( W , H ) , M > 0$ such that ",
|
| 1078 |
+
"bbox": [
|
| 1079 |
+
140,
|
| 1080 |
+
507,
|
| 1081 |
+
825,
|
| 1082 |
+
551
|
| 1083 |
+
],
|
| 1084 |
+
"page_idx": 6
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"type": "text",
|
| 1088 |
+
"text": "",
|
| 1089 |
+
"bbox": [
|
| 1090 |
+
150,
|
| 1091 |
+
554,
|
| 1092 |
+
823,
|
| 1093 |
+
583
|
| 1094 |
+
],
|
| 1095 |
+
"page_idx": 6
|
| 1096 |
+
},
|
| 1097 |
+
{
|
| 1098 |
+
"type": "equation",
|
| 1099 |
+
"img_path": "images/22f06d4bfa73799d9d29adc7f32dd2d9134fecf2106508c2ae9dbf31efba6af8.jpg",
|
| 1100 |
+
"text": "$$\n\\forall 0 < \\delta < M , \\mathcal { L } ( W + \\delta \\Delta W , H + \\delta \\Delta H ) \\le \\mathcal { L } ( W , H )\n$$",
|
| 1101 |
+
"text_format": "latex",
|
| 1102 |
+
"bbox": [
|
| 1103 |
+
308,
|
| 1104 |
+
588,
|
| 1105 |
+
687,
|
| 1106 |
+
606
|
| 1107 |
+
],
|
| 1108 |
+
"page_idx": 6
|
| 1109 |
+
},
|
| 1110 |
+
{
|
| 1111 |
+
"type": "text",
|
| 1112 |
+
"text": ". Further more, it implies that 240 $\\forall \\epsilon > 0 , \\exists ( W ^ { \\prime } , H ^ { \\prime } )$ such that: ",
|
| 1113 |
+
"bbox": [
|
| 1114 |
+
140,
|
| 1115 |
+
611,
|
| 1116 |
+
571,
|
| 1117 |
+
627
|
| 1118 |
+
],
|
| 1119 |
+
"page_idx": 6
|
| 1120 |
+
},
|
| 1121 |
+
{
|
| 1122 |
+
"type": "equation",
|
| 1123 |
+
"img_path": "images/0b3607d98a51205b5a15ccaede5cd27df192f902c81d765dfda5db2be0cf3f1f.jpg",
|
| 1124 |
+
"text": "$$\n\\begin{array} { r l } & { | | W ^ { \\prime } | | _ { F } ^ { 2 } + | | H ^ { \\prime } | | _ { F } ^ { 2 } = | | W | | _ { F } ^ { 2 } + | | H | | _ { F } ^ { 2 } , } \\\\ & { | | W ^ { \\prime } - W | | _ { F } ^ { 2 } + | | H ^ { \\prime } - H | | _ { F } ^ { 2 } < \\epsilon , \\mathcal { L } ( W ^ { \\prime } , H ^ { \\prime } ) \\leq \\mathcal { L } ( W , H ) } \\end{array}\n$$",
|
| 1125 |
+
"text_format": "latex",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
292,
|
| 1128 |
+
632,
|
| 1129 |
+
704,
|
| 1130 |
+
674
|
| 1131 |
+
],
|
| 1132 |
+
"page_idx": 6
|
| 1133 |
+
},
|
| 1134 |
+
{
|
| 1135 |
+
"type": "text",
|
| 1136 |
+
"text": "241 Remark 3.3. The result in (13) give us a decreasing direction orthogonal to the direction of $( W , H )$ , \n242 as shown in Example 3.1, the gradient might be parallel to $( W , H )$ , the decreasing direction must be \n243 obtained by analyze the Hessian matrices and it further indicates that these points are exactly saddle \n244 points in the tangent space, a formal statement and definition can be found in appendix. For a large \n245 family of stochastic optimization algorithm , the projection of noise onto this decreasing direction \n246 is not zero with probability 1, so its those algorithms will escape the bad point and no longer move \n247 along this direction within a small number of iterations. ",
|
| 1137 |
+
"bbox": [
|
| 1138 |
+
140,
|
| 1139 |
+
678,
|
| 1140 |
+
825,
|
| 1141 |
+
776
|
| 1142 |
+
],
|
| 1143 |
+
"page_idx": 6
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"type": "text",
|
| 1147 |
+
"text": "4 Empirical Results ",
|
| 1148 |
+
"text_level": 1,
|
| 1149 |
+
"bbox": [
|
| 1150 |
+
165,
|
| 1151 |
+
790,
|
| 1152 |
+
356,
|
| 1153 |
+
808
|
| 1154 |
+
],
|
| 1155 |
+
"page_idx": 6
|
| 1156 |
+
},
|
| 1157 |
+
{
|
| 1158 |
+
"type": "text",
|
| 1159 |
+
"text": "Gradient Descent on the ULPM Objective. We first conduct experiments on the ULPM objective (4) to support the results of convergence towards Neural Collapse in our theories. We set $N = 1 0$ , $K = 5$ , $d = 2 0$ and use gradient descent with learning rate 5 to run $1 0 ^ { 5 }$ epochs. We characterize the dynamics of the training procedure in Figure 2, through four aspects: (1) variation of the centered class-mean features’ norms (i.e., $\\mathrm { S t d } ( \\| \\bar { \\boldsymbol { h } } _ { k } - \\bar { \\boldsymbol { h } } \\| ) / \\mathrm { A v g } ( \\| \\bar { \\boldsymbol { h } } _ { k } - \\bar { \\boldsymbol { h } } \\| ) )$ and the variation of the classifier’s norms (i.e., $\\mathrm { S t d } ( \\| \\bar { \\boldsymbol { w } } _ { k } \\| ) / \\mathrm { A v g } ( \\| \\bar { \\boldsymbol { w } } _ { k } \\| ) )$ . (2) Within-class variation of last layer features (i.e., $\\mathrm { A v g } ( \\| h _ { k , i } - h _ { k } \\| ) / \\mathrm { A v g } ( \\| h _ { k , i } - \\bar { h } \\| ) )$ . (3) The cosines between pairs of last layer features (i.e., ",
|
| 1160 |
+
"bbox": [
|
| 1161 |
+
171,
|
| 1162 |
+
814,
|
| 1163 |
+
825,
|
| 1164 |
+
912
|
| 1165 |
+
],
|
| 1166 |
+
"page_idx": 6
|
| 1167 |
+
},
|
| 1168 |
+
{
|
| 1169 |
+
"type": "text",
|
| 1170 |
+
"text": "256 $\\mathrm { A v g } ( | \\cos ( \\bar { h } _ { k } , \\bar { h } _ { k ^ { \\prime } } ) + 1 / ( K - 1 ) | ) )$ and that of the classifiers (i.e., $\\mathrm { A v g } ( | \\cos ( \\bar { w } _ { k } , \\bar { w } _ { k ^ { \\prime } } ) + 1 / ( K - 1 ) | ) \\}$ . \n257 (4) The distance between normalized centered classifier and normalized last layer feature (i.e., \n258 $\\mathrm { A v g } ( | ( \\bar { h } _ { k } - \\bar { h } ) / \\| \\bar { h } _ { k } - \\bar { h } \\| - \\bar { w } _ { k } / \\| \\bar { w } _ { k } \\| | ) )$ . Empirically we observe that logarithm of the two \n259 variations of norms (in the first aspect) decrease approximately at rate $O ( 1 / ( \\log ( t ) ) )$ , and the \n260 remaining quantities decrease approximately at rate ${ \\bar { O } } { \\bar { ( } } 1 / ( \\log ( t ) ) { \\bar { ) } }$ . \n261 Realistic Training. We also extend our theory to realistic neural network training on benchmark \n262 dataset. To evaluate our theory, we train the VGG-13 [32] on FashionMNIST [40] without weight \n263 decay and track the convergence speed of the last layer feature to the neural collapse solution every few \n264 epochs to see how it changes during the terminal phase training. Observe that all the aforementioned \n265 quantities either decrease or stay in small values during the training process, providing implications \n266 that neural collapse can occur with sufficient training epochs. ",
|
| 1171 |
+
"bbox": [
|
| 1172 |
+
140,
|
| 1173 |
+
90,
|
| 1174 |
+
828,
|
| 1175 |
+
161
|
| 1176 |
+
],
|
| 1177 |
+
"page_idx": 7
|
| 1178 |
+
},
|
| 1179 |
+
{
|
| 1180 |
+
"type": "image",
|
| 1181 |
+
"img_path": "images/af830c77d3e63f6f648748df434f9190f1b90b34c4e93165b436dae024d0aaaa.jpg",
|
| 1182 |
+
"image_caption": [
|
| 1183 |
+
"Figure 2: Training dynamics in ULPM. The $_ x$ -axis in the figures are set to have $\\log ( \\log ( t ) )$ scales and the $_ y$ -axis in the figures are set to have log scales. (a) The dynamics of the variation of the centered class-mean features’ norms (shown in blue) and the variation of the classifier’s norms (shown in red). We observe that the logarithm of both terms decrease at rate $O ( 1 / ( \\log ( t ) ) )$ . (b) The dynamics of the within-class variation of last layer features. Logarithm of the variation converge approximately at rate $O ( 1 / \\log ( t ) ) )$ . (c) The dynamics of the cosines between pairs of last layer features (shown in blue) and that of the classifiers (shown in red). Logarithm of both terms converge approximately at rate $O ( 1 / \\log ( t ) ) )$ . (d) The dynamics of the distance between normalized centered classifier and normalized last layer feature. Logarithm of the quantity converge approximately at rate $O ( 1 / \\log ( t ) ) ,$ to the point of self-duality. "
|
| 1184 |
+
],
|
| 1185 |
+
"image_footnote": [],
|
| 1186 |
+
"bbox": [
|
| 1187 |
+
166,
|
| 1188 |
+
176,
|
| 1189 |
+
834,
|
| 1190 |
+
324
|
| 1191 |
+
],
|
| 1192 |
+
"page_idx": 7
|
| 1193 |
+
},
|
| 1194 |
+
{
|
| 1195 |
+
"type": "text",
|
| 1196 |
+
"text": "",
|
| 1197 |
+
"bbox": [
|
| 1198 |
+
140,
|
| 1199 |
+
467,
|
| 1200 |
+
826,
|
| 1201 |
+
551
|
| 1202 |
+
],
|
| 1203 |
+
"page_idx": 7
|
| 1204 |
+
},
|
| 1205 |
+
{
|
| 1206 |
+
"type": "image",
|
| 1207 |
+
"img_path": "images/550c3f14ea00f64c884da84e01c73c81ad8f20d30899ccf5ecc9097f63542563.jpg",
|
| 1208 |
+
"image_caption": [
|
| 1209 |
+
"Figure 3: Training VGG-13 without weight decay on FashionMNIST. The $x$ -axis in the figures are set to have $\\log ( \\log ( t ) )$ scales and the $_ y$ -axis in the figures are set to have log scales. (a) Variation of the centered class-mean features’ norms and that of the classifier’s norms are below 0.1 after 500 epochs. (b) Logarithm of the within-class variation of last layer features decreases approximately linearly with respect to $\\log ( \\log ( t ) )$ after 100 epochs. (c) The cosines between pairs of last layer features and that of the classifiers decrease and are below 0.1 after 500 epochs. (d) The distance between normalized centered classifier and normalized last layer feature decreases during training towards self-duality. "
|
| 1210 |
+
],
|
| 1211 |
+
"image_footnote": [],
|
| 1212 |
+
"bbox": [
|
| 1213 |
+
166,
|
| 1214 |
+
583,
|
| 1215 |
+
836,
|
| 1216 |
+
737
|
| 1217 |
+
],
|
| 1218 |
+
"page_idx": 7
|
| 1219 |
+
},
|
| 1220 |
+
{
|
| 1221 |
+
"type": "text",
|
| 1222 |
+
"text": "5 Conclusion and Discussion ",
|
| 1223 |
+
"text_level": 1,
|
| 1224 |
+
"bbox": [
|
| 1225 |
+
158,
|
| 1226 |
+
842,
|
| 1227 |
+
428,
|
| 1228 |
+
858
|
| 1229 |
+
],
|
| 1230 |
+
"page_idx": 7
|
| 1231 |
+
},
|
| 1232 |
+
{
|
| 1233 |
+
"type": "text",
|
| 1234 |
+
"text": "5.1 Conclusion ",
|
| 1235 |
+
"text_level": 1,
|
| 1236 |
+
"bbox": [
|
| 1237 |
+
173,
|
| 1238 |
+
864,
|
| 1239 |
+
290,
|
| 1240 |
+
880
|
| 1241 |
+
],
|
| 1242 |
+
"page_idx": 7
|
| 1243 |
+
},
|
| 1244 |
+
{
|
| 1245 |
+
"type": "text",
|
| 1246 |
+
"text": "270 To understand the inductive bias of neural feature from gradient descent training, we build a connection \n271 between large margin inductive bias with neural collapse phenomenon and study a unconstrained \n272 layer-peeled model in this paper. We proved that the gradient flow of the ULPM convergences \n273 to KKT point of a minimum-norm separation problem where the global optimum satisfies neural \n274 collapse conditions. Although the ULPM is nonconvex, we show that ULPM have a nice landscape \n275 where all the stationary point is a strict saddle point in the tangent space except the global neural \n276 collapse solution. Our study helps to demystify the neural collapse phenomenon, which shed light on \n277 the generalization and robustness properties during the terminal phase of training deep networks in \n278 classification problems. ",
|
| 1247 |
+
"bbox": [
|
| 1248 |
+
148,
|
| 1249 |
+
883,
|
| 1250 |
+
826,
|
| 1251 |
+
911
|
| 1252 |
+
],
|
| 1253 |
+
"page_idx": 7
|
| 1254 |
+
},
|
| 1255 |
+
{
|
| 1256 |
+
"type": "text",
|
| 1257 |
+
"text": "",
|
| 1258 |
+
"bbox": [
|
| 1259 |
+
140,
|
| 1260 |
+
92,
|
| 1261 |
+
825,
|
| 1262 |
+
188
|
| 1263 |
+
],
|
| 1264 |
+
"page_idx": 8
|
| 1265 |
+
},
|
| 1266 |
+
{
|
| 1267 |
+
"type": "text",
|
| 1268 |
+
"text": "5.2 Relationship with Other Results ",
|
| 1269 |
+
"text_level": 1,
|
| 1270 |
+
"bbox": [
|
| 1271 |
+
169,
|
| 1272 |
+
204,
|
| 1273 |
+
434,
|
| 1274 |
+
219
|
| 1275 |
+
],
|
| 1276 |
+
"page_idx": 8
|
| 1277 |
+
},
|
| 1278 |
+
{
|
| 1279 |
+
"type": "text",
|
| 1280 |
+
"text": "Theoretical analysis of neural collapse are first provided by [24, 39, 9], they show that the neural collapse solution is the only global minimum of the simplified non-convex objective function. In particular, [39, 24] study a continuous integral form of the loss function and show that the feature learnt should be a uniform distribution on sphere. A more realistic discrete setting are studied in [9], where the constraint is on the whole feature matrix rather than individual features. All these results only relies on Jensen inequality on output logits thus can be generalized to other convex in logit losses. Our result utilize the implicit bias of the exponential like loss function to remove the feature norm constraint which is not practicable in real applications. ",
|
| 1281 |
+
"bbox": [
|
| 1282 |
+
173,
|
| 1283 |
+
223,
|
| 1284 |
+
825,
|
| 1285 |
+
333
|
| 1286 |
+
],
|
| 1287 |
+
"page_idx": 8
|
| 1288 |
+
},
|
| 1289 |
+
{
|
| 1290 |
+
"type": "text",
|
| 1291 |
+
"text": "288 Though the global optimum shares good property [9], the ULPM objective is still highly non-convex. \n289 Regards optimization, [26, 29] analyze the unconstrained feature model with $\\ell _ { 2 }$ loss and establish \n290 convergence results to collapsed feature for gradient descent. However they fail to generalize on \n291 other more practical loss functions used in classification tasks. The analysis highly relies on the $\\ell _ { 2 }$ \n292 loss which turns the training dynamic to an ODE in eigenvalues. \n293 The most relevant paper is a concurrent breakthrough work [43], which provide a landscape analysis \n294 about the regularized unconstrained feature model. [43] turns the feature norm constraint in [9] into \n295 feature norm regularization and still preserves the neural collapse global optimum. At the same \n296 time, [43] also show that the modified regularized objective shares a benign landscape, where all \n297 the critical points are strict saddles except the global one. Although our paper and [43] discover \n298 similar landscape results, we believe our characterization stays closer to the real algorithms used in \n299 the following two ways ",
|
| 1292 |
+
"bbox": [
|
| 1293 |
+
140,
|
| 1294 |
+
340,
|
| 1295 |
+
825,
|
| 1296 |
+
410
|
| 1297 |
+
],
|
| 1298 |
+
"page_idx": 8
|
| 1299 |
+
},
|
| 1300 |
+
{
|
| 1301 |
+
"type": "text",
|
| 1302 |
+
"text": "",
|
| 1303 |
+
"bbox": [
|
| 1304 |
+
145,
|
| 1305 |
+
416,
|
| 1306 |
+
825,
|
| 1307 |
+
513
|
| 1308 |
+
],
|
| 1309 |
+
"page_idx": 8
|
| 1310 |
+
},
|
| 1311 |
+
{
|
| 1312 |
+
"type": "text",
|
| 1313 |
+
"text": "• The same as [24, 39, 9], [43] only utilize the convexity in logits of the loss function. However, our analysis also explores the exponential-like property of the cross-entropy loss which will enlarge the norm of the feature. The large feature will provide better approximation to the true neural collapse problem of the normalized feature via approximating the max function via gradually scaled exponential function. \nWe doesn’t introduce any constraints or regularization on the feature norm, which is not applied in the realist training. Regularization on feature introduce in [43] is still different from the weight decay regularization [17]. However weight decay on homogeneous neural network is equivalent to gradient descent with scaling step size on unregularized objective [22, 41]. ",
|
| 1314 |
+
"bbox": [
|
| 1315 |
+
214,
|
| 1316 |
+
523,
|
| 1317 |
+
825,
|
| 1318 |
+
667
|
| 1319 |
+
],
|
| 1320 |
+
"page_idx": 8
|
| 1321 |
+
},
|
| 1322 |
+
{
|
| 1323 |
+
"type": "text",
|
| 1324 |
+
"text": "We summarize analysis of neural collapse in Table 1. ",
|
| 1325 |
+
"bbox": [
|
| 1326 |
+
158,
|
| 1327 |
+
679,
|
| 1328 |
+
517,
|
| 1329 |
+
693
|
| 1330 |
+
],
|
| 1331 |
+
"page_idx": 8
|
| 1332 |
+
},
|
| 1333 |
+
{
|
| 1334 |
+
"type": "text",
|
| 1335 |
+
"text": "5.3 Limitation and Future Work ",
|
| 1336 |
+
"text_level": 1,
|
| 1337 |
+
"bbox": [
|
| 1338 |
+
174,
|
| 1339 |
+
703,
|
| 1340 |
+
413,
|
| 1341 |
+
717
|
| 1342 |
+
],
|
| 1343 |
+
"page_idx": 8
|
| 1344 |
+
},
|
| 1345 |
+
{
|
| 1346 |
+
"type": "text",
|
| 1347 |
+
"text": "The convergence to neural collapse is super slow. [15] provide a loss dependent learning rate schedule and leads to $O ( 1 / t )$ convergence rate for linear regression. It’s interesting to investigate can this methodology being generalized to our setting. On the other hand, although we have shown that the ULPM have a nice landscape, we still leave the global convergence of (stochastic) gradient descent as future work for we want to provide global convergence of gradient descent combined with a plug in feature extractor. ",
|
| 1348 |
+
"bbox": [
|
| 1349 |
+
173,
|
| 1350 |
+
720,
|
| 1351 |
+
825,
|
| 1352 |
+
804
|
| 1353 |
+
],
|
| 1354 |
+
"page_idx": 8
|
| 1355 |
+
},
|
| 1356 |
+
{
|
| 1357 |
+
"type": "text",
|
| 1358 |
+
"text": "References ",
|
| 1359 |
+
"text_level": 1,
|
| 1360 |
+
"bbox": [
|
| 1361 |
+
147,
|
| 1362 |
+
90,
|
| 1363 |
+
267,
|
| 1364 |
+
106
|
| 1365 |
+
],
|
| 1366 |
+
"page_idx": 9
|
| 1367 |
+
},
|
| 1368 |
+
{
|
| 1369 |
+
"type": "text",
|
| 1370 |
+
"text": "[1] Shun-ichi Amari, Jimmy Ba, Roger Grosse, Xuechen Li, Atsushi Nitanda, Taiji Suzuki, Denny Wu, and Ji Xu. When does preconditioning help or hurt generalization? arXiv preprint arXiv:2006.10732, 2020. \n[2] Raman Arora, Sanjeev Arora, Joan Bruna, Nadav Cohen, Rong Ge, Suriya Gunasekar, Chi Jin, Jason Lee, Tengyu Ma, Behnam Neyshabua, and Zhao Song. Theory of deep learning. https://www.cs.princeton.edu/courses/archive/fall19/cos597B/ lecnotes/bookdraft.pdf/. \n[3] Sanjeev Arora, Nadav Cohen, Wei Hu, and Yuping Luo. Implicit regularization in deep matrix factorization. arXiv preprint arXiv:1905.13655, 2019. \n[4] Peter Bartlett, Dylan J Foster, and Matus Telgarsky. Spectrally-normalized margin bounds for neural networks. arXiv preprint arXiv:1706.08498, 2017. \n[5] Peter Bartlett, Yoav Freund, Wee Sun Lee, and Robert E Schapire. Boosting the margin: A new explanation for the effectiveness of voting methods. The annals of statistics, 26(5):1651–1686, 1998. \n[6] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020. \n[7] Lenaic Chizat and Francis Bach. Implicit bias of gradient descent for wide two-layer neural networks trained with the logistic loss. In Conference on Learning Theory, pages 1305–1338. PMLR, 2020. \n[8] J. Dutta, K. Deb, Rupesh Tulshyan, and Ramnik Arora. Approximate kkt points and a proximity measure for termination. Journal of Global Optimization, 56:1463–1499, 2013. \n[9] Cong Fang, Hangfeng He, Qi Long, and Weijie J Su. Layer-peeled model: Toward understanding well-trained deep neural networks. arXiv preprint arXiv:2101.12699, 2021. \n[10] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points—online stochastic gradient for tensor decomposition. In Conference on learning theory, pages 797–842. PMLR, 2015. \n[11] Rong Ge, Jason D Lee, and Tengyu Ma. Matrix completion has no spurious local minimum. arXiv preprint arXiv:1605.07272, 2016. \n[12] Gauthier Gidel, Francis Bach, and Simon Lacoste-Julien. Implicit regularization of discrete gradient dynamics in linear neural networks. arXiv preprint arXiv:1904.13262, 2019. \n[13] Micah Goldblum, Jonas Geiping, Avi Schwarzschild, Michael Moeller, and Tom Goldstein. Truth or backpropaganda? an empirical investigation of deep learning theory. arXiv preprint arXiv:1910.00359, 2019. \n[14] Ziwei Ji, Miroslav Dudík, Robert E Schapire, and Matus Telgarsky. Gradient descent follows the regularization path for general losses. In Conference on Learning Theory, pages 2109–2136. PMLR, 2020. \n[15] Ziwei Ji and Matus Telgarsky. Characterizing the implicit bias via a primal-dual analysis. In Algorithmic Learning Theory, pages 772–804. PMLR, 2021. \n[16] 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[17] Anders Krogh and John A Hertz. A simple weight decay can improve generalization. In Advances in neural information processing systems, pages 950–957, 1992. \n[18] Yenson Lau, Qing Qu, Han-Wen Kuo, Pengcheng Zhou, Yuqian Zhang, and John Wright. Short-and-sparse deconvolution–a geometric approach. arXiv preprint arXiv:1908.10959, 2019. ",
|
| 1371 |
+
"bbox": [
|
| 1372 |
+
158,
|
| 1373 |
+
95,
|
| 1374 |
+
828,
|
| 1375 |
+
920
|
| 1376 |
+
],
|
| 1377 |
+
"page_idx": 9
|
| 1378 |
+
},
|
| 1379 |
+
{
|
| 1380 |
+
"type": "text",
|
| 1381 |
+
"text": "[19] Thomas Laurent and James Brecht. Deep linear networks with arbitrary loss: All local minima are global. In International conference on machine learning, pages 2902–2907. PMLR, 2018. [20] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436–444, 2015. [21] Yuanzhi Li, Tengyu Ma, and Hongyang Zhang. Algorithmic regularization in over-parameterized matrix sensing and neural networks with quadratic activations. In Conference On Learning Theory, pages 2–47. PMLR, 2018. [22] Zhiyuan Li and Sanjeev Arora. An exponential learning rate schedule for deep learning. arXiv preprint arXiv:1910.07454, 2019. [23] Zichao Long, Yiping Lu, Xianzhong Ma, and Bin Dong. Pde-net: Learning pdes from data. In International Conference on Machine Learning, pages 3208–3216. PMLR, 2018. [24] Jianfeng Lu and Stefan Steinerberger. Neural collapse with cross-entropy loss. arXiv preprint arXiv:2012.08465, 2020. [25] Kaifeng Lyu and Jian Li. Gradient descent maximizes the margin of homogeneous neural networks. arXiv preprint arXiv:1906.05890, 2019. [26] Dustin G Mixon, Hans Parshall, and Jianzong Pi. Neural collapse with unconstrained features. arXiv preprint arXiv:2011.11619, 2020. [27] Mor Shpigel Nacson, Jason Lee, Suriya Gunasekar, Pedro Henrique Pamplona Savarese, Nathan Srebro, and Daniel Soudry. Convergence of gradient descent on separable data. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 3420–3428. PMLR, 2019. [28] Vardan Papyan, XY Han, and David L Donoho. Prevalence of neural collapse during the terminal phase of deep learning training. Proceedings of the National Academy of Sciences, 117(40):24652–24663, 2020. [29] Tomaso Poggio and Qianli Liao. Explicit regularization and implicit bias in deep network classifiers trained with the square loss. arXiv preprint arXiv:2101.00072, 2020. [30] Qing Qu, Yuexiang Zhai, Xiao Li, Yuqian Zhang, and Zhihui Zhu. Analysis of the optimization landscapes for overcomplete representation learning. arXiv preprint arXiv:1912.02427, 2019. [31] Noam Razin and Nadav Cohen. Implicit regularization in deep learning may not be explainable by norms. arXiv preprint arXiv:2005.06398, 2020. [32] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [33] Daniel Soudry, Elad Hoffer, Mor Shpigel Nacson, Suriya Gunasekar, and Nathan Srebro. The implicit bias of gradient descent on separable data. The Journal of Machine Learning Research, 19(1):2822–2878, 2018. [34] Ju Sun, Qing Qu, and John Wright. When are nonconvex problems not scary? arXiv preprint arXiv:1510.06096, 2015. [35] Ju Sun, Qing Qu, and John Wright. Complete dictionary recovery over the sphere i: Overview and the geometric picture. IEEE Transactions on Information Theory, 63(2):853–884, 2016. [36] Ju Sun, Qing Qu, and John Wright. A geometric analysis of phase retrieval. Foundations of Computational Mathematics, 18(5):1131–1198, 2018. [37] Sharan Vaswani, Reza Babanezhad, Jose Gallego, Aaron Mishkin, Simon Lacoste-Julien, and Nicolas Le Roux. To each optimizer a norm, to each norm its generalization. arXiv preprint arXiv:2006.06821, 2020. 09 [38] Colin Wei, Jason Lee, Qiang Liu, and Tengyu Ma. On the margin theory of feedforward neural networks. 2018. ",
|
| 1382 |
+
"bbox": [
|
| 1383 |
+
151,
|
| 1384 |
+
71,
|
| 1385 |
+
828,
|
| 1386 |
+
919
|
| 1387 |
+
],
|
| 1388 |
+
"page_idx": 10
|
| 1389 |
+
},
|
| 1390 |
+
{
|
| 1391 |
+
"type": "text",
|
| 1392 |
+
"text": "11 [39] Stephan Wojtowytsch and Weinan E. On the emergence of tetrahedral symmetry in the final and penultimate layers of neural network classifiers. arXiv preprint arXiv:2012.05420, 2020. [40] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017. [41] Linfeng Zhang, Jiequn Han, Han Wang, Roberto Car, and Weinan E. Deep potential molecular dynamics: a scalable model with the accuracy of quantum mechanics. Physical Review Letters, 120(14):143001, 2018. [42] Yuqian Zhang, Qing Qu, and John Wright. From symmetry to geometry: Tractable nonconvex problems. arXiv preprint arXiv:2007.06753, 2020. [43] Zhihui Zhu, Tianyu Ding, Jinxin Zhou, Xiao Li, Chong You, Jeremias Sulam, and Qing Qu. A geometric analysis of neural collapse with unconstrained features. arXiv preprint arXiv:2105.02375, 2021. ",
|
| 1393 |
+
"bbox": [
|
| 1394 |
+
151,
|
| 1395 |
+
90,
|
| 1396 |
+
828,
|
| 1397 |
+
297
|
| 1398 |
+
],
|
| 1399 |
+
"page_idx": 11
|
| 1400 |
+
},
|
| 1401 |
+
{
|
| 1402 |
+
"type": "text",
|
| 1403 |
+
"text": "1. For all authors... ",
|
| 1404 |
+
"bbox": [
|
| 1405 |
+
214,
|
| 1406 |
+
116,
|
| 1407 |
+
339,
|
| 1408 |
+
131
|
| 1409 |
+
],
|
| 1410 |
+
"page_idx": 12
|
| 1411 |
+
},
|
| 1412 |
+
{
|
| 1413 |
+
"type": "text",
|
| 1414 |
+
"text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] \n(c) Did you discuss any potential negative societal impacts of your work? [N/A] \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
|
| 1415 |
+
"bbox": [
|
| 1416 |
+
238,
|
| 1417 |
+
135,
|
| 1418 |
+
825,
|
| 1419 |
+
227
|
| 1420 |
+
],
|
| 1421 |
+
"page_idx": 12
|
| 1422 |
+
},
|
| 1423 |
+
{
|
| 1424 |
+
"type": "text",
|
| 1425 |
+
"text": "2. If you are including theoretical results... ",
|
| 1426 |
+
"bbox": [
|
| 1427 |
+
214,
|
| 1428 |
+
231,
|
| 1429 |
+
493,
|
| 1430 |
+
244
|
| 1431 |
+
],
|
| 1432 |
+
"page_idx": 12
|
| 1433 |
+
},
|
| 1434 |
+
{
|
| 1435 |
+
"type": "text",
|
| 1436 |
+
"text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes] ",
|
| 1437 |
+
"bbox": [
|
| 1438 |
+
236,
|
| 1439 |
+
248,
|
| 1440 |
+
735,
|
| 1441 |
+
280
|
| 1442 |
+
],
|
| 1443 |
+
"page_idx": 12
|
| 1444 |
+
},
|
| 1445 |
+
{
|
| 1446 |
+
"type": "text",
|
| 1447 |
+
"text": "3. If you ran experiments... ",
|
| 1448 |
+
"bbox": [
|
| 1449 |
+
212,
|
| 1450 |
+
285,
|
| 1451 |
+
393,
|
| 1452 |
+
299
|
| 1453 |
+
],
|
| 1454 |
+
"page_idx": 12
|
| 1455 |
+
},
|
| 1456 |
+
{
|
| 1457 |
+
"type": "text",
|
| 1458 |
+
"text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they are chosen)? [Yes] \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [No] ",
|
| 1459 |
+
"bbox": [
|
| 1460 |
+
238,
|
| 1461 |
+
303,
|
| 1462 |
+
825,
|
| 1463 |
+
421
|
| 1464 |
+
],
|
| 1465 |
+
"page_idx": 12
|
| 1466 |
+
},
|
| 1467 |
+
{
|
| 1468 |
+
"type": "text",
|
| 1469 |
+
"text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
|
| 1470 |
+
"bbox": [
|
| 1471 |
+
215,
|
| 1472 |
+
426,
|
| 1473 |
+
823,
|
| 1474 |
+
440
|
| 1475 |
+
],
|
| 1476 |
+
"page_idx": 12
|
| 1477 |
+
},
|
| 1478 |
+
{
|
| 1479 |
+
"type": "text",
|
| 1480 |
+
"text": "(a) If your work uses existing assets, did you cite the creators? [N/A] \n(b) Did you mention the license of the assets? [N/A] \n(c) Did you include any new assets either in the supplemental material or as a URL? [N/A] \n(d) Did you discuss whether and how consent is obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
|
| 1481 |
+
"bbox": [
|
| 1482 |
+
238,
|
| 1483 |
+
444,
|
| 1484 |
+
825,
|
| 1485 |
+
565
|
| 1486 |
+
],
|
| 1487 |
+
"page_idx": 12
|
| 1488 |
+
},
|
| 1489 |
+
{
|
| 1490 |
+
"type": "text",
|
| 1491 |
+
"text": "5. If you used crowdsourcing or conducted research with human subjects... ",
|
| 1492 |
+
"bbox": [
|
| 1493 |
+
214,
|
| 1494 |
+
569,
|
| 1495 |
+
705,
|
| 1496 |
+
584
|
| 1497 |
+
],
|
| 1498 |
+
"page_idx": 12
|
| 1499 |
+
},
|
| 1500 |
+
{
|
| 1501 |
+
"type": "text",
|
| 1502 |
+
"text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
|
| 1503 |
+
"bbox": [
|
| 1504 |
+
238,
|
| 1505 |
+
588,
|
| 1506 |
+
825,
|
| 1507 |
+
678
|
| 1508 |
+
],
|
| 1509 |
+
"page_idx": 12
|
| 1510 |
+
}
|
| 1511 |
+
]
|
parse/train/DKabt9MFnT/DKabt9MFnT_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/DKabt9MFnT/DKabt9MFnT_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rJiaRbk0-/rJiaRbk0-.md
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TOWARDS BINARY-VALUED GATES FOR ROBUST LSTM TRAINING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Long Short-Term Memory (LSTM) is one of the most widely used recurrent structures in sequence modeling. Its goal is to use gates to control the information flow (e.g., whether to skip some information/transformation or not) in the recurrent computations, although its practical implementation based on soft gates only partially achieves this goal and is easy to overfit. In this paper, we propose a new way for LSTM training, which pushes the values of the gates towards 0 or 1. By doing so, we can (1) better control the information flow: the gates are mostly open or closed, instead of in a middle state; and (2) avoid overfitting to certain extent: the gates operate at their flat regions, which is shown to correspond to better generalization ability. However, learning towards discrete values of the gates is generally difficult. To tackle this challenge, we leverage the recently developed GumbelSoftmax trick from the field of variational methods, and make the model trainable with standard backpropagation. Experimental results on language modeling and machine translation show that (1) the values of the gates generated by our method are more reasonable and intuitively interpretable, and (2) our proposed method generalizes better and achieves better accuracy on test sets in all tasks. Moreover, the learnt models are not sensitive to low-precision approximation and low-rank approximation of the gate parameters due to the flat loss surface.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Recurrent neural networks (RNN) (Hochreiter, 1998) are widely used in sequence modeling tasks, such as language modeling (Kim et al., 2016; Jozefowicz et al., 2016), speech recognition (Zhang et al., 2016), time series prediction (Xingjian et al., 2015), machine translation (Wu et al., 2016; Britz et al., 2017), image captioning (Vinyals et al., 2015; Xu et al., 2015), and image generation (Villegas et al., 2017).
|
| 12 |
+
|
| 13 |
+
To address the long-term dependency and gradient vanishing problem of conventional RNN, long short-term memory (LSTM) (Gers et al., 1999; Hochreiter & Schmidhuber, 1997b) was proposed, which introduces gate functions to control the information in a recurrent unit: a forget gate function to determine how much previous information should be excluded for the current step, an input gate function to find relevant signals to be absorbed into the hidden context, and an output gate function for prediction and decision making. For ease of optimization, in practical implementation, one usually uses element-wise sigmoid function to mimic the gates, whose outputs are soft values between 0 and 1. By using such gates, LSTM usually performs much better than conventional RNN. However, the benefits come with the cost of introducing many more parameters in the gates, which makes the training of a LSTM model inefficient and easy to overfit (Krueger et al., 2016; Zaremba et al., 2014; Semeniuta et al., 2016).
|
| 14 |
+
|
| 15 |
+
In this paper, we explore a new way to train LSTM by pushing the values of the gates to the boundary of their ranges $( 0 , \bar { 1 } )$ 1. Pushing the values of the gates to 0/1 has certain advantages. First, it well aligns with the original purpose of the development of gates: to get the information in or skip by “opening” or “closing” the gates during the recurrent computation. Second, training LSTM towards binary-valued gates can make the learnt model generalize better. According to (Hochreiter & Schmidhuber, 1997a; Haussler et al., 1997; Keskar et al., 2016; Chaudhari et al., 2016), a model lying in a flat region of the loss surface is likely to generalize well, since any small perturbation to the model makes little fluctuation to the loss. Training LSTM towards binary-valued gates means seeking a set of parameters to make the values of the gates approaching zero or one, namely residing in the flat region of the sigmoid function. Simple deductions show that this also corresponds to the flat region of the overall loss surface.
|
| 16 |
+
|
| 17 |
+
Technically, pushing the outputs of the gates towards such discrete values is challenging. A straightforward approach is to sharpen the sigmoid function by a smaller temperature. However, this is equivalent to rescaling the input and cannot guarantee the values of the learnt gates to be close to 0 or 1. To tackle this challenge, in this paper, we leverage the Gumbel-Softmax trick that Jang et al. (2016) and Maddison et al. (2016) recently develop for variantional methods. The trick aims to generate approximated samples for categorical latent variables in a stochastic computational graph, e.g., variational autoencoder, brings convenience to using reparametrization tricks, and thus leads to efficient learning. Specifically, during training, we apply the Gumbel-Softmax trick to the gates to approximate the values sampled from the Bernoulli distribution given by the parameters, and train the LSTM model with standard backpropagation methods. We call this method Gumbel-Gate LSTM $G ^ { 2 }$ -LSTM). We conduct three experiments on two tasks (language modeling and machine translation) to verify our proposed method. We have the following observations from experimental results:
|
| 18 |
+
|
| 19 |
+
• Our model generalizes well: In all tasks, we achieve superior performance to baseline algorithms on the test sets, and the gap between training and test is effectively reduced. Our model is not sensitive due to its flat loss surface: We apply several model compression algorithms to the parameters in the gates, including low-precision approximation and lowrank approximation, and all results show that our learnt models are better. • The gates in our learnt model are meaningful and intuitively interpretable after visualization. Furthermore, our model can automatically learn the boundaries inside the sentences.
|
| 20 |
+
|
| 21 |
+
The organization of the paper is as follows. We introduce related work in Section 2 and propose our learning algorithm in Section 3. Experiments are reported in Section 4 and future work is discussed in the last section.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
# 2.1 LOSS SURFACE AND GENERALIZATION
|
| 26 |
+
|
| 27 |
+
The concept of sharp and flat minima has been first discussed in (Hochreiter & Schmidhuber, 1997a; Haussler et al., 1997) . Intuitively, a flat minimum $x$ of a loss $f ( \cdot )$ corresponds to the point for which the function $f$ varies slowly in a relatively large neighborhood of $x$ . In contrast, a sharp minimum $x$ is such that the function $f$ increases rapidly in a small neighborhood of $x$ . The sensitivity of the loss function at sharp minima negatively impacts the generalization ability of a trained model on new data. Recently, several papers discuss how to modify the training process and to learn a model in a flat region so as to obtain better generalization ability. Keskar et al. (2016) show by using smallbatch training, the learnt model is more likely to converge to a flat region rather than a sharp one. Chaudhari et al. (2016) propose a new objective function considering the local entropy and push the model to be optimized towards a wide valley.
|
| 28 |
+
|
| 29 |
+
# 2.2 DROPOUT IN RECURRENT NEURAL NETWORK
|
| 30 |
+
|
| 31 |
+
Dropout is one of the most standard tricks used in deep learning to improve generalization ability. For recurrent neural networks, Zaremba et al. (2014) and Semeniuta et al. (2016) apply dropout to feed-forward connections and recurrent units of RNNs. In Zoneout (Krueger et al., 2016), the values of the hidden states and memory cells are randomly either maintained by their previous value or updated as usual, which introduces stochastic identity connections between subsequent time steps.
|
| 32 |
+
|
| 33 |
+
Different from dropout, which is to regularize the training of a deep neural network by randomly dropping nodes/edges to prevent co-adaptations, our method is to bias the optimization process and ensure to find a model in a flat region to avoid overfitting. Therefore, our method is complementary to dropout in RNNs, and actually in our experiments our method is well combined with dropout.
|
| 34 |
+
|
| 35 |
+
# 2.3 GUMBEL-SOFTMAX TRICK
|
| 36 |
+
|
| 37 |
+
Jang et al. (2016) and Maddison et al. (2016) develop a continuous relaxation of discrete random variables in stochastic computational graphs. The main idea of the method is that the multinomial distribution can be represented according to Gumbel-Max trick, thus can be approximated by Gumbel-Softmax distribution. In detail, given a probability distribution over $k$ categories with parameter $\pi _ { 1 } , \pi _ { 2 } , \ldots , \pi _ { k }$ , the Gumbel-Softmax trick approximately samples the categorical variable according to:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
y _ { i } = { \frac { \exp ( ( \log \pi _ { i } + q _ { i } ) / \tau ) } { \sum _ { j = 1 } ^ { k } \exp ( ( \log \pi _ { j } + q _ { j } ) / \tau ) } } \qquad { \mathrm { f o r ~ } } i = 1 , \dots , k ,
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $\tau$ is the temperature and $q _ { i }$ is independently sampled from Gumbel distribution: $q _ { i } =$ $- \log ( - \log U _ { i } ) , U _ { i } \sim \mathrm { U n i f o r m } ( 0 , 1 )$ .
|
| 44 |
+
|
| 45 |
+
By using the Gumbel-Softmax trick, we can generate sample $y = ( y _ { 1 } , . . . , y _ { k } )$ to approximate the categorical distribution. Furthermore, as the randomness $q$ is independent of $\pi$ (which is usually defined by a set of parameters), we can use reparameterization trick to optimize the model parameters using standard backpropagation algorithms. Gumbel-Softmax trick has been adopted in several applications such as variation autoencoder (Jang et al., 2016), generative adversarial net (Kusner & Hernandez-Lobato, 2016), and language generation (Subramanian et al., 2017). To the best of our ´ knowledge, this is the first work to introduce the Gumbel-Softmax trick in LSTM for robust training purpose.
|
| 46 |
+
|
| 47 |
+
# 3 THE PROPOSED TRAINING ALGORITHM
|
| 48 |
+
|
| 49 |
+
In this section, we present a new and robust training algorithm for LSTM by learning towards binaryvalued gates.
|
| 50 |
+
|
| 51 |
+
# 3.1 BACKGROUND
|
| 52 |
+
|
| 53 |
+
Recurrent neural networks process an input sequence $\{ x _ { 1 } , x _ { 2 } , \dots , x _ { T } \}$ sequentially and construct a corresponding sequence of hidden states/representations $\{ h _ { 1 } , h _ { 2 } , \ldots , h _ { T } \}$ . In single-layer recurrent neural networks, the hidden states $\{ h _ { 1 } , h _ { 2 } , \ldots , h _ { T } \}$ are used for prediction or decision making. In deep (stacked) recurrent neural networks, the hidden states in layer $k$ are used as inputs to layer $k + 1$ .
|
| 54 |
+
|
| 55 |
+
In recurrent neural networks, each hidden state is trained (implicitly) to remember and emphasize task-relevant aspects of the preceding inputs, and to incorporate new inputs via a recurrent operator, $T$ , which converts the previous hidden state and presents input into a new hidden state, e.g.,
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
h _ { t } = T ( h _ { t - 1 } , x _ { t } ) = \operatorname { t a n h } ( W _ { h } h _ { t - 1 } + W _ { x } x _ { t } + b ) ,
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where $W _ { h }$ , $W _ { x }$ and $b$ are parameters.
|
| 62 |
+
|
| 63 |
+
Long short-term memory RNN (LSTM) (Hochreiter & Schmidhuber, 1997b) is a carefully designed recurrent structure. In addition to the hidden state $h _ { t }$ used as a transient representation of state at timestep $t$ , LSTM introduces a memory cell $c _ { t }$ , intended for internal long-term storage. $c _ { t }$ and $h _ { t }$ are computed via three gate functions. The forget gate function $f _ { t }$ directly connects $c _ { t }$ to the memory cell $c _ { t - 1 }$ of the previous timestep via an element-wise multiplication. Large values of the forget gates cause the cell to remember most (if not all) of its previous values. The other gates control the flow of information in input $( i _ { t } )$ and output $\left( o _ { t } \right)$ of the cell. Each gate function has a weight matrix and a bias vector; we use subscripts $f$ , $i$ and $o$ to denote parameters for the forget gate function, the input gate function and the output gate function respectively, e.g., the parameters for the forget gate function are denoted by $W _ { x f } , W _ { h f }$ , and $b _ { f }$ .
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
Figure 1: The orange parts correspond to the saturation area of the sigmoid function.
|
| 67 |
+
|
| 68 |
+
With the above notations, an LSTM is formally defined as follows:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\begin{array} { r c l } { \displaystyle i _ { t } } & { = } & { \sigma \big ( W _ { x i } x _ { t } + W _ { h i } h _ { t - 1 } + b _ { i } \big ) } \\ { \displaystyle f _ { t } } & { = } & { \sigma \big ( W _ { x f } x _ { t } + W _ { h f } h _ { t - 1 } + b _ { f } \big ) } \\ { \displaystyle o _ { t } } & { = } & { \sigma \big ( W _ { x o } x _ { t } + W _ { h o } h _ { t - 1 } + b _ { o } \big ) } \\ { \displaystyle g _ { t } } & { = } & { \operatorname { t a n h } \big ( W _ { x g } x _ { t } + W _ { h g } h _ { t - 1 } + b _ { g } \big ) } \\ { \displaystyle c _ { t } } & { = } & { f _ { t } \odot c _ { t - 1 } + i _ { t } \odot g _ { t } } \\ { \displaystyle h _ { t } } & { = } & { o _ { t } \odot \operatorname { t a n h } \big ( c _ { t } \big ) , } \end{array}
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $\sigma ( \cdot )$ represents the sigmoid function and $\odot$ is the element-wise product.
|
| 75 |
+
|
| 76 |
+
# 3.2 TRAINING LSTM GATES TOWARDS BINARY VALUES
|
| 77 |
+
|
| 78 |
+
The LSTM unit requires much more parameters than the simple RNN unit, and makes it hard to generalize. As we can see from Eqn (2) - (7), a large percentage of the parameters are used to compute the gate (sigmoid) functions. If we can push the outputs of the gates to the saturation area of the sigmoid function (i.e., towards 0 or 1), the loss function with respect to the parameters in the gates will be flat: if the parameters in the gates perturb, the change to the output of the gates is small due to the sigmoid operator (see Figure 1), and then the change to the loss is little, which means the flat region of the loss. As discussed in (Chaudhari et al., 2016), minima in a flat region is more likely to generalize better, and thus toward binary-valued gates will lead to better generalization.
|
| 79 |
+
|
| 80 |
+
However, the task of training towards binary-valued gates is quite challenging. One straightforward idea is to sharpen sigmoid function by using a smaller temperature, i.e., $\bar { f _ { W , b } ( x ) } = \sigma ( ( \bar { W x } + b ) / \tau )$ , where $\tau < 1$ is the temperature. However, it is computationally equivalent to $f _ { W ^ { \prime } , b ^ { \prime } } ( x ) = \sigma ( W ^ { \prime } x +$ $b ^ { \prime }$ ) by setting $W ^ { \prime } = W \bar { / } \tau$ and $b ^ { \prime } = b / \tau$ . Then using a small temperature is equivalent to rescale the initial parameters as well as the gradients to a larger range. Usually, using an initial point in a large range with a large learning rate will harm the optimization process, and apparently cannot guarantee the outputs to be close to the boundary after training.
|
| 81 |
+
|
| 82 |
+
In this work, we leverage the recently developed Gumbel-Softmax trick. This trick is efficient in approximating discrete distributions, and is one of the widely used methods to learn discrete random variables in stochastic computational graphs. We first provide a proposition about the approximation ability of this trick for Bernoulli distribution, which will be used in our proposed algorithm.
|
| 83 |
+
|
| 84 |
+
Proposition 1. Assume $\sigma ( \cdot )$ is the sigmoid function. Given $\alpha \in \mathbb { R }$ and temperature $\tau > 0$ , we define random variable $D _ { \alpha } \sim B ( \sigma ( \alpha ) )$ where $B ( \sigma ( \alpha ) )$ is the Bernoulli distribution with parameter $\sigma ( \alpha )$ , and define $\begin{array} { r } { G ( \alpha , \tau ) = \sigma ( \frac { \alpha + \log U - \log ( 1 - U ) } { \tau } ) } \end{array}$ where $U \sim U n i f o r m ( 0 , 1 )$ . Then the following inequalities hold for arbitrary $\epsilon \in ( 0 , \frac { 1 } { 2 } )$ ,
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\begin{array} { r l } { P ( D _ { \alpha } = 1 ) - \displaystyle \frac { \tau } { 4 } \log ( \frac { 1 } { \epsilon } ) \leq } & { P ( G ( \alpha , \tau ) \geq 1 - \epsilon ) \leq P ( D _ { \alpha } = 1 ) , } \\ { P ( D _ { \alpha } = 0 ) - \displaystyle \frac { \tau } { 4 } \log ( \frac { 1 } { \epsilon } ) \leq } & { P ( G ( \alpha , \tau ) \leq \epsilon ) \leq P ( D _ { \alpha } = 0 ) . } \end{array}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
$\begin{array} { r } { \sigma ^ { - 1 } ( x ) = \log ( \frac { x } { 1 - x } ) } \end{array}$ $\begin{array} { r } { P ( G ( \alpha , \tau ) \geq 1 - \epsilon ) = P ( \frac { \alpha + \log U - \log ( 1 - U ) } { \tau } \geq \log ( \frac { 1 } { \epsilon } - } \end{array}$ $\begin{array} { r } { 1 ) ) = P ( e ^ { \alpha - \tau \log ( \frac { 1 } { \epsilon } - 1 ) } \geq \frac { 1 - U } { U } ) = P ( U \geq \frac { 1 } { 1 + e ^ { \alpha - \tau \log ( \frac { 1 } { \epsilon } - 1 ) } } ) = \sigma ( \alpha - \tau \log ( \frac { 1 } { \epsilon } - 1 ) ) } \end{array}$ 11+eα−τ log( 1 −1) ) = σ(α − τ log( 1 − 1)). Considering that sigmoid function is monotonically increasing and $\textstyle { \frac { 1 } { 4 } }$ -Lipschitz continuous, we have $P ( D _ { \alpha } =$ $\begin{array} { r } { \mathrm { 1 ) } - P ( G ( \alpha , \tau ) \geq 1 - \epsilon ) = \sigma ( \alpha ) - \sigma ( \alpha - \tau \log ( \frac { 1 } { \epsilon } - 1 ) ) \geq 0 } \end{array}$ and $P ( D _ { \alpha } = 1 ) - P ( G ( \alpha , \tau ) \geq$ $\begin{array} { r } { 1 ^ { ' } - \epsilon ) = \sigma ( \alpha ) - \sigma ( \alpha - \tau \log ( \frac { 1 } { \epsilon } - 1 ) ) \leq \frac { \tau } { 4 } \log ( \frac { 1 } { \epsilon } - 1 ) \leq \frac { \tau } { 4 } \log ( \frac { 1 } { \epsilon } } \end{array}$ ). We omit the proof for (9) as it is almost identical to the proof of (8). □
|
| 91 |
+
|
| 92 |
+
We can see from the above proposition, the distribution of $G ( \alpha , \tau )$ can be considered as an approximation of Bernoulli distribution $B ( \sigma ( \alpha ) )$ . The rate of convergence is characterized by (8) and (9). When the temperature $\tau$ approaches positive zero, we directly obtain the following property which is also proved by Maddison et al. (2016),
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
P ( \operatorname* { l i m } _ { \tau \to 0 ^ { + } } G ( \alpha , \tau ) = 1 ) = P ( D _ { \alpha } = 1 ) , P ( \operatorname* { l i m } _ { \tau \to 0 ^ { + } } G ( \alpha , \tau ) ) = P ( D _ { \alpha } = 0 ) .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
We apply this method into the computation of the gates. Imagine an one-dimensional gate $\sigma ( \alpha ( \theta ) )$ where $\alpha$ is a scalar parameterized by $\theta$ , and assume the model will produce a larger loss if the output of the gate is close to one, and produce a smaller loss if the gate value is close to zero. If we can repeatedly sample the output of the gate using $\begin{array} { r } { G ( \alpha ( \theta ) , \tau ) = \sigma ( \frac { \alpha ( \theta ) + \log U - \log ( 1 - U ) } { \tau } ) } \end{array}$ and estimate the loss, any gradient-based algorithm will push the parameter $\theta$ such that the output value of the gate is close to zero in order to minimize the expected loss. By this way, we can optimize towards the binary-valued gates.
|
| 99 |
+
|
| 100 |
+
As the gate function is usually a vector-valued function, we extend the notations into a general form: Given $\boldsymbol { \alpha } \in \mathbb { R } ^ { d }$ and $\tau > 0$ , we define $\begin{array} { r } { G ( \alpha , \tau ) = \sigma ( \frac { \alpha + \log U - \log ( 1 - U ) } { \tau } ) } \end{array}$ , where $U$ is a vector and each element $u _ { i }$ in $U$ is independently sampled from Uniform(0, 1), $i = 1 , 2 , \dots , d$ . In particular, we only push the outputs of input gates and forget gates towards binary values as the output gates usually need fine-granularity information for decision making which makes binary values less desirable (to justify this, we conducted similar experiments and observed a performance drop when pushing the output gates to $_ { 0 / 1 }$ together with the input gates and the forget gates).
|
| 101 |
+
|
| 102 |
+
We call our proposed learning method Gumbel-Gate LSTM ( $G ^ { 2 }$ -LSTM), which works as follows during training:
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\begin{array} { r c l } { \boldsymbol { i } _ { t } } & { = } & { G \big ( { \boldsymbol { W } } _ { x i } { \boldsymbol { x } } _ { t } + { \boldsymbol { W } } _ { h i } { \boldsymbol { h } } _ { t - 1 } + { \boldsymbol { b } } _ { i } , \tau \big ) } \\ { \boldsymbol { f } _ { t } } & { = } & { G \big ( { \boldsymbol { W } } _ { x f } { \boldsymbol { x } } _ { t } + { \boldsymbol { W } } _ { h f } { \boldsymbol { h } } _ { t - 1 } + { \boldsymbol { b } } _ { f } , \tau \big ) } \\ { \boldsymbol { o } _ { t } } & { = } & { \sigma \big ( { \boldsymbol { W } } _ { x o } { \boldsymbol { x } } _ { t } + { \boldsymbol { W } } _ { h o } { \boldsymbol { h } } _ { t - 1 } + { \boldsymbol { b } } _ { o } \big ) } \\ { \boldsymbol { g } _ { t } } & { = } & { \operatorname { t a n h } \big ( { \boldsymbol { W } } _ { x g } { \boldsymbol { x } } _ { t } + { \boldsymbol { W } } _ { h g } { \boldsymbol { h } } _ { t - 1 } + { \boldsymbol { b } } _ { g } \big ) } \\ { \boldsymbol { c } _ { t } } & { = } & { { \boldsymbol { f } } _ { t } \odot { \boldsymbol { c } } _ { t - 1 } + i _ { t } \odot { \boldsymbol { g } } _ { t } } \\ { \boldsymbol { h } _ { t } } & { = } & { { \boldsymbol { o } } _ { t } \odot \operatorname { t a n h } \big ( { \boldsymbol { c } } _ { t } \big ) . } \end{array}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
In the forward pass, we first independently sample values for $U$ in each time step, then update LSTM units using Eqn (11) - (16) and calculate the loss, e.g., negative log likelihood loss. In the backward pass, as $G$ is continuous and differentiable with respect to the parameters and the loss is continuous and differentiable with respect to $G$ , we can use any standard gradient-based method to update the model parameters.
|
| 109 |
+
|
| 110 |
+
# 4 EXPERIMENTS
|
| 111 |
+
|
| 112 |
+
# 4.1 SETTINGS
|
| 113 |
+
|
| 114 |
+
We tested the proposed training algorithm on two tasks – language modeling and machine translation.
|
| 115 |
+
|
| 116 |
+
# 4.1.1 LANGUAGE MODELING
|
| 117 |
+
|
| 118 |
+
Language modeling is a very basic task for LSTM. We used the Penn Treebank corpus which contains about 1 million words. The task is to train an LSTM model to correctly predict the next word conditioned on previous words. A model is evaluated by the prediction perplexity: smaller the perplexity, better the prediction.
|
| 119 |
+
|
| 120 |
+
Table 1: Performance comparison on language model (perplexity)
|
| 121 |
+
|
| 122 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Size</td><td rowspan=1 colspan=2>Valid</td><td rowspan=1 colspan=1>Test</td></tr><tr><td rowspan=1 colspan=5>Existing results</td></tr><tr><td rowspan=8 colspan=1>Unregularzed LSTMNR-dropout (Zaremba et al., 2014)Zoneout (Krueger et al., 2016)Variational LSTM (Gal & Ghahramani,2016)CharCNN (Kim et al.,2016)Pointer Sentinel-LSTM (Merity et al.,2016)LSTM + continuous cache pointer (Grave et al., 2016)Variational LSTM+ augmented loss (Inan et al.,2016)Variational RHN (Zilly et al., 2016)NAS Cell (Zoph & Le,2016)4-layer skip connection LSTM (Melis et al., 2017)AWD-LSTM w/o finetune (Merity et al., 2017)AWD-LSTM (Baseline) (Merity et al.,2017)</td><td rowspan=1 colspan=1>7M</td><td rowspan=1 colspan=2>120.7</td><td rowspan=1 colspan=1>114.5</td></tr><tr><td rowspan=1 colspan=1>66M</td><td rowspan=2 colspan=2>82.2=</td><td rowspan=2 colspan=1>78.477.473.4</td></tr><tr><td rowspan=1 colspan=1>66M19M</td></tr><tr><td rowspan=1 colspan=1>21M</td><td rowspan=1 colspan=2>72.4</td><td rowspan=1 colspan=1>78.9</td></tr><tr><td rowspan=1 colspan=1>51M=51M</td><td rowspan=1 colspan=2>1171.1</td><td rowspan=2 colspan=1>70.972.168.565.4</td></tr><tr><td rowspan=1 colspan=1>23M</td><td rowspan=1 colspan=2>67.9</td><td rowspan=1 colspan=1>9</td></tr><tr><td rowspan=1 colspan=1>54M24M</td><td rowspan=1 colspan=2>160.9</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>62.458.3</td></tr><tr><td rowspan=1 colspan=1>24M24M</td><td rowspan=1 colspan=2>60.760.0</td><td rowspan=1 colspan=1>58.857.3</td></tr><tr><td rowspan=1 colspan=5>Our system</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid AWD-LSTMw/o finetuneSharpened Sigmoid AWD-LSTMG²-LSTM w/o finetuneG²-LSTM</td><td rowspan=1 colspan=1>24M24M24M24M</td><td rowspan=1 colspan=2>61.659.960.458.5</td><td rowspan=1 colspan=1>59.457.558.256.1</td></tr><tr><td rowspan=1 colspan=5>+continuouscache pointerAWD-LSTM + continuous cache pointer (Merity et al.,2017) 24M 53.9 52.8Sharpened Sigmoid AWD-LSTM + continuous cache pointer 24M 53.9 53.2G2-LSTM + continuous cache pointer 24M 52.9 52.1</td></tr></table>
|
| 123 |
+
|
| 124 |
+
Table 2: Performance comparison on machine translation (BLEU)
|
| 125 |
+
|
| 126 |
+
<table><tr><td rowspan=1 colspan=1>English→German task</td><td rowspan=1 colspan=1>BLEU</td><td rowspan=1 colspan=1>German→English task</td><td rowspan=1 colspan=1>BLEU</td></tr><tr><td rowspan=1 colspan=4>Existing end-to-end system</td></tr><tr><td rowspan=1 colspan=1>RNNSearch-LV (Jean et al., 2015)MRT (Shen et al., 2015)Global-att (Luong et al., 2015)GNMT (Wu et al., 2016)</td><td rowspan=1 colspan=1>19.4020.4520.9024.61</td><td rowspan=1 colspan=1>BSO(Wiseman & Rush,2016b)NMPT (Huang et al.)NMPT+LM (Huang et al.)ActorCritic (Bahdanau et al., 2016)</td><td rowspan=1 colspan=1>26.3628.9629.1628.53</td></tr><tr><td rowspan=1 colspan=4>Our end-to-end system</td></tr><tr><td rowspan=1 colspan=1>BaselineSharpened SigmoidG²-LSTM</td><td rowspan=1 colspan=1>21.8921.6422.43</td><td rowspan=1 colspan=1>11</td><td rowspan=1 colspan=1>31.0029.7331.95</td></tr></table>
|
| 127 |
+
|
| 128 |
+
We followed the practice in (Merity et al., 2017) to set up the model architecture for LSTM: a stacked three-layer LSTM with drop-connect (Wan et al., 2013) on recurrent weights and a variant of averaged stochastic gradient descent (ASGD) (Polyak & Juditsky, 1992) for optimization. Our training code for $G ^ { 2 }$ -LSTM was also based on the code released by Merity et al. $( 2 0 1 7 ) ^ { 2 }$ . We found the temperature $\tau$ used in $G ^ { 2 }$ -LSTM is not very sensitive. We set the temperature to 0.9 and followed all configurations in Merity et al. (2017). We added neural cache model (Grave et al., 2016) on the top of our trained language model to further improve the perplexity.
|
| 129 |
+
|
| 130 |
+
# 4.1.2 MACHINE TRANSLATION
|
| 131 |
+
|
| 132 |
+
We used two datasets for experiments on neural machine translation (NMT): (1) IWSLT2014 German English translation dataset (Cettolo et al., 2014), widely adopted in machine learning community (Bahdanau et al., 2016; Wiseman & Rush, 2016a; Ranzato et al., 2015). The training/validation/test sets contains about $1 5 3 k / 7 k / 7 k$ sentence pairs respectively, with words preprocessed into sub-word units using byte pair encoding (BPE) (Sennrich et al., 2016). We chose $2 5 k$ most frequent sub-word units as vocabulary for both German and English. (2) English German translation dataset in WMT’14, which is also commonly used as a benchmark task to evaluate different NMT models (Bahdanau et al., 2014; Wu et al., 2016; Gehring et al., 2017). The training set contains 4.5M English German sentence pairs, Newstest 2014 is used as the test set, and the concatenation of Newstest 2012 and Newstest2013 is used as the validation set. Similarly, BPE was used to form a vocabulary of most frequent $3 0 k$ sub-word units for both language. In both datasets, we removed the sentences with more than 64 sub-word units in training.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 2: Training/validation loss curves of language modeling and machine translation tasks.
|
| 136 |
+
|
| 137 |
+
For German English dataset, we adopted a stacked two-layer encoder-decoder framework. We set the size of word embedding and hidden state to 256. As amount of data in the English German dataset is much larger, we adopted a stacked three-layer encoder-decoder framework and set the size of word embedding and hidden state to 512 and 1024 respectively. The first layer of the encoder was bi-directional. We also used dropout in training stacked LSTM as in (Zaremba et al., 2014), with dropout value determined via validation set performance. For both experiments, we set the temperature $\tau$ for $G ^ { 2 }$ -LSTM to 0.9, which was the same as in the language model task. The minibatch size was 32/64 for German English/English German respectively. All models were trained with AdaDelta (Zeiler, 2012) on one M40 GPU. Both gradient clipping norms were set to 2.0. We used tokenized case-sensitive BLEU (Papineni et al., $2 \bar { 0 } 0 2 ) ^ { 3 }$ as evaluation measure. The beam size is set to 5 during the inference step.
|
| 138 |
+
|
| 139 |
+
# 4.2 EXPERIMENTAL RESULTS
|
| 140 |
+
|
| 141 |
+
The experimental results are shown in Table 1 and 2.
|
| 142 |
+
|
| 143 |
+
First, we compare our training method with two algorithms. For the first algorithm (we call it Baseline), we remove the Gumble-Softmax trick and train the model using standard optimization methods. For the second algorithm (we call it Sharpened Sigmoid), we use a sharpened sigmoid function as described in Section 3.2 by setting $\tau = 0 . 2$ and check whether such trick can bring better generalization. From the results, we can see that our learnt models are better than all baseline models. In language modeling task, we outperform the baseline algorithms for $0 . 7 / 1 . 1$ points (1.2/1.4 points without continuous cache pointer) in terms of test perplexity. For machine translation, we outperform the baselines for $0 . 9 5 / 2 . 2 2$ and $0 . 5 4 / 0 . 7 9$ points in terms of BLEU score for German English and English German dataset respectively. Note that the only difference between $G ^ { 2 }$ -LSTM and the baselines is the training algorithm, while they adopt the same model structure. Thus, better results of $G ^ { 2 }$ -LSTM demonstrate the effectiveness of our proposed training method.
|
| 144 |
+
|
| 145 |
+
Second, training and validation loss curves of the baseline and $G ^ { 2 }$ -LSTM are shown in Fig. 2 for the two small tasks. Both curves show that the gap between training and validation is effectively reduced using our algorithm. As shown in Fig. 2(b), the baseline LSTM achieves its lowest validation loss around the 18th epoch and begins to overfit after that, while the validation loss of $G ^ { 2 }$ -LSTM still drops even in the 30th epoch. This clearly shows that $G ^ { 2 }$ -LSTM generalizes better.
|
| 146 |
+
|
| 147 |
+
Third, we also list the performance of previous works in literature, which may adopt different model architectures or settings. For language modeling, we obtain the best performance as far as we know. For German English translation, the two-layer stacked encoder-decoder model we learnt outperforms all previous works and achieves state-of-the-art performance. For English German translation, our result is worse than GNMT (Wu et al., 2016) as they used a stacked eight-layer LSTM encoder-decoder model while we only used a three-layer one.
|
| 148 |
+
|
| 149 |
+
Table 3: Model compression results on Penn Tree Bank dataset
|
| 150 |
+
|
| 151 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>Round</td><td rowspan=1 colspan=1>Round & clip</td><td rowspan=1 colspan=1>SVD (rank = 128)</td><td rowspan=1 colspan=1>SVD (rank = 64)</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>52.8</td><td rowspan=1 colspan=1>53.2 (+0.4)</td><td rowspan=1 colspan=1>53.6 (+0.8)</td><td rowspan=1 colspan=1>56.6(+3.8)</td><td rowspan=1 colspan=1>65.5 (+12.7)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>53.2</td><td rowspan=1 colspan=1>53.5 (+0.3)</td><td rowspan=1 colspan=1>53.6 (+0.4)</td><td rowspan=1 colspan=1>54.6 (+1.4)</td><td rowspan=1 colspan=1>60.0 (+6.8)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>52.1</td><td rowspan=1 colspan=1>52.2 (+0.1)</td><td rowspan=1 colspan=1>52.8 (+0.7)</td><td rowspan=1 colspan=1>53.3 (+1.2)</td><td rowspan=1 colspan=1>56.0 (+3.9)</td></tr></table>
|
| 152 |
+
|
| 153 |
+
Table 4: Model compression results on IWSLT German English dataset
|
| 154 |
+
|
| 155 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>Round</td><td rowspan=1 colspan=1>Round & clip</td><td rowspan=1 colspan=1>SVD (rank = 32)</td><td rowspan=1 colspan=1>SVD (rank = 16)</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>31.00</td><td rowspan=1 colspan=1>28.65 (-2.35)</td><td rowspan=1 colspan=1>21.97 (-9.03)</td><td rowspan=1 colspan=1>30.52 (-0.48)</td><td rowspan=1 colspan=1>29.56 (-1.44)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>29.73</td><td rowspan=1 colspan=1>27.08 (-2.65)</td><td rowspan=1 colspan=1>25.14 (-4.59)</td><td rowspan=1 colspan=1>29.17 (-0.53)</td><td rowspan=1 colspan=1>28.82 (-0.91)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>31.95</td><td rowspan=1 colspan=1>31.44 (-0.51)</td><td rowspan=1 colspan=1>31.44 (-0.51)</td><td rowspan=1 colspan=1>31.62 (-0.33)</td><td rowspan=1 colspan=1>31.28 (-0.67)</td></tr></table>
|
| 156 |
+
|
| 157 |
+
Table 5: Model compression results on WMT English German dataset
|
| 158 |
+
|
| 159 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>Round</td><td rowspan=1 colspan=1>Round & clip</td><td rowspan=1 colspan=1>SVD (rank = 32)</td><td rowspan=1 colspan=1>SVD (rank = 16)</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>21.89</td><td rowspan=1 colspan=1>16.22 (-5.67)</td><td rowspan=1 colspan=1>16.03 (-5.86)</td><td rowspan=1 colspan=1>21.15 (-0.74)</td><td rowspan=1 colspan=1>19.99 (-1.90)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>21.64</td><td rowspan=1 colspan=1>16.85 (-4.79)</td><td rowspan=1 colspan=1>16.72 (-4.92)</td><td rowspan=1 colspan=1>20.98 (-0.66)</td><td rowspan=1 colspan=1>19.87 (-1.77)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>22.43</td><td rowspan=1 colspan=1>20.15 (-2.28)</td><td rowspan=1 colspan=1>20.29 (-2.14)</td><td rowspan=1 colspan=1>22.16 (-0.27)</td><td rowspan=1 colspan=1>21.84 (-0.51)</td></tr></table>
|
| 160 |
+
|
| 161 |
+
# 4.3 SENSITIVITY ANALYSIS
|
| 162 |
+
|
| 163 |
+
We conducted a set of experiments to test how sensitive our learnt models were if their gate parameters were compressed. We considered two ways of parameter compression.
|
| 164 |
+
|
| 165 |
+
Low-Precision Compression We compressed parameters in the input and forget gates to lower precision. Doing so the model can be compressed to a relatively small size. In particular, we applied round and clip operations to the parameters of the input and forget gates.
|
| 166 |
+
|
| 167 |
+
$$
|
| 168 |
+
\begin{array} { r c l } { { \mathrm { r o u n d } _ { r } ( x ) } } & { { = } } & { { \mathrm { r o u n d } ( x / r ) * r } } \\ { { \mathrm { c l i p } _ { c } ( x ) } } & { { = } } & { { \mathrm { c l i p } ( x , - c , c ) . } } \end{array}
|
| 169 |
+
$$
|
| 170 |
+
|
| 171 |
+
We tested two settings of low-precision compression. In the first setting (named as Round), we rounded the parameters using Eqn (17). In this way, we reduced the support set of the parameters in the gates. In the second setting (named as Round & Clip), we further clipped the rounded value to a fixed range using Eqn (18) and thus restricted the number of different values. As the two tasks are far different, we set the round parameter $r = 0 . 2$ and the clip parameter $c = 0 . 4$ for the task of language modeling, and set $c = 1 . 0$ and $r = 0 . 5$ for neural machine translation. As a result, parameters of input gates and forget gates in language modeling can only take values from $( 0 . 0 , \pm 0 . 2 , \pm 0 . 4 )$ , and $( 0 . 0 , \pm 0 . 5 , \pm 1 . 0 )$ for machine translation. More comprehensive results on different choices of hyperparameters can be found in Appendix A.
|
| 172 |
+
|
| 173 |
+
Low-Rank Compression We compressed parameter matrices of the input/forget gates to lowerrank matrices through single value decomposition. Doing so can reduce model size and lead to faster matrix multiplication. Given that the hidden states of the task of language modeling were of much larger dimension than that of neural machine translation, we set $r a n k = 6 4 / 1 2 8$ for language modeling and $r a n k = 1 6 / 3 2$ for neural machine translation.
|
| 174 |
+
|
| 175 |
+
We summarize the results in Table 3-5. From Table 3, we can see that for language modeling both the baseline and our learnt model are quite robust to low-precision compression, but our model is much more robust and significantly outperforms the baseline with low-rank approximation. Even setting $r a n k = 6 4$ (roughly $1 2 \mathbf { x }$ compression rate of the gates), we still get 56.0 perplexity, while the perplexity of the baseline model increases from 52.8 to 65.5, i.e., becoming $24 \%$ worse. For machine translation, our proposed method is always better than the baseline model, no matter for low-precision or low-rank compression. Even if setting $r a n k = 1 6$ (roughly $8 \mathrm { x } / 3 2 \mathrm { x }$ compression rate of the gates for German English and English German respectively), we still get roughly comparable translation accuracy to the baseline model with full parameters. All results show that the models trained with our proposed method are less sensitive to parameter compression.
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
Figure 3: Distributions of gate values in LSTM.
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 4: Distributions of gate values in $G ^ { 2 }$ -LSTM.
|
| 182 |
+
|
| 183 |
+
# 4.4 VISUALIZATION OF THE GATES
|
| 184 |
+
|
| 185 |
+
In addition to compare the final accuracy in previous two subsections, we further look inside the learnt models and check the values of the gates.
|
| 186 |
+
|
| 187 |
+
To well verify the effectiveness of our proposed $G ^ { 2 }$ -LSTM, we did a set of experiments to show the values of gates we have learnt are near the boundary and are reasonable, based on the model learnt from German English translation task. We show the value distribution of the gates trained using classic LSTM and $\bar { G } ^ { 2 }$ -LSTM. To achieve this, we sampled 10000 sentence pairs from the training set of German English and fed them into the learnt models. We got the output value vectors of the input/forget gates in both the encoder and decoder. We recorded the value of each element in the output vectors and plotted the value distributions in Figure 3 and Figure 4.
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
Figure 5: Visualization of gate values.
|
| 191 |
+
|
| 192 |
+
From the figures, we can see that although both LSTM and $G ^ { 2 }$ -LSTM work reasonably well in practice, the output values of the gates are very different. In LSTM, the distributions of the gate values are relatively uniform and have no clear concentration. In contrast, the values of the input gates of $G ^ { 2 }$ -LSTM are concentrated in the region close to 1, which suggests that our learnt model tries to keep most information from the input words; the values of the forget gates are concentrated in the boundary regions (i.e., either the region close to 0 or the region close to 1). This observation shows that our training algorithm meets our expectation and successfully pushes the gates to $_ { 0 / 1 }$ .
|
| 193 |
+
|
| 194 |
+
Besides the overall distribution of gate values over a sampled set of training data, here we provide a case study for a sampled sentence. As it is hard to go deep into individual dimensions of a hidden state, we just calculated the average value of the output vector of the input and forget gate functions for each word. In particular, for each word, we focused on the average value of input/forget gate functions in the first layer and check whether the average is reasonable. We plot the heatmap of the English sentence part in Figure 5. More visualizations can be found in Appendix B. First, we can see that our $G ^ { 2 }$ -LSTM does not drop information in the input gate function, since the average values are relatively large for all words. In contrast, the average values of the input gates of LSTM are sometimes small (less than 0.5), even for the meaningful word like “data”. As those words are not included into LSTM, they cannot be effectively encoded and decoded, thus lead to bad translation result. Second, for $G ^ { 2 }$ -LSTM, most of the words with small values for forget gates are function words (e.g., conjunctions and punctuations) or the boundaries in clauses. That is, our training algorithm indeed ensures the model to forget information on the boundaries inside the sentences, and reset the hidden states with new inputs.
|
| 195 |
+
|
| 196 |
+
# 5 CONCLUSION AND FUTURE WORK
|
| 197 |
+
|
| 198 |
+
In this paper, we have designed a new training algorithm for LSTM by leveraging the recently developed Gumbel-Softmax trick. Our training algorithm can push the values of the input and forget gates to 0 or 1, leading to robust LSTM models. Experiments on language modeling and machine translation have demonstrated the effectiveness of the proposed training algorithm.
|
| 199 |
+
|
| 200 |
+
We will explore following directions in the future. First, we have only tested with shallow LSTM models in this paper. We will apply our algorithm to deeper models (e.g., $^ { 8 + }$ layers) and test on larger datasets. Second, we have considered the tasks of language modeling and machine translation. We will study more applications such as question answering and text summarization. Third, we are cleaning and refactoring the code and will release the training code to public soon.
|
| 201 |
+
|
| 202 |
+
# REFERENCES
|
| 203 |
+
|
| 204 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
|
| 205 |
+
|
| 206 |
+
Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron Courville, and Yoshua Bengio. An actor-critic algorithm for sequence prediction. arXiv preprint arXiv:1607.07086, 2016.
|
| 207 |
+
|
| 208 |
+
Denny Britz, Anna Goldie, Thang Luong, and Quoc Le. Massive exploration of neural machine translation architectures. arXiv preprint arXiv:1703.03906, 2017.
|
| 209 |
+
|
| 210 |
+
Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, and Marcello Federico. Report on ¨ the 11th iwslt evaluation campaign, iwslt 2014. In Proceedings of the International Workshop on Spoken Language Translation, Hanoi, Vietnam, 2014.
|
| 211 |
+
|
| 212 |
+
Pratik Chaudhari, Anna Choromanska, Stefano Soatto, and Yann LeCun. Entropy-sgd: Biasing gradient descent into wide valleys. arXiv preprint arXiv:1611.01838, 2016.
|
| 213 |
+
|
| 214 |
+
Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in neural information processing systems, pp. 1019–1027, 2016.
|
| 215 |
+
|
| 216 |
+
Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional sequence to sequence learning. arXiv preprint arXiv:1705.03122, 2017.
|
| 217 |
+
|
| 218 |
+
Felix A Gers, Jurgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction ¨ with lstm. 1999.
|
| 219 |
+
|
| 220 |
+
Edouard Grave, Armand Joulin, and Nicolas Usunier. Improving neural language models with a continuous cache. arXiv preprint arXiv:1612.04426, 2016.
|
| 221 |
+
|
| 222 |
+
David Haussler, Manfred Opper, et al. Mutual information, metric entropy and cumulative relative entropy risk. The Annals of Statistics, 25(6):2451–2492, 1997.
|
| 223 |
+
|
| 224 |
+
Sepp Hochreiter. The vanishing gradient problem during learning recurrent neural nets and problem solutions. International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, 6(02): 107–116, 1998.
|
| 225 |
+
|
| 226 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Flat minima. ¨ Neural Computation, 9(1):1–42, 1997a.
|
| 227 |
+
|
| 228 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997b.
|
| 229 |
+
|
| 230 |
+
Po-Sen Huang, Chong Wang, Dengyong Zhou, and Li Deng. Toward neural phrase-based machine translation.
|
| 231 |
+
|
| 232 |
+
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.
|
| 233 |
+
|
| 234 |
+
Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016.
|
| 235 |
+
|
| 236 |
+
Sebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On using very large ´ target vocabulary for neural machine translation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1–10, Beijing, China, July 2015. Association for Computational Linguistics. URL http://www.aclweb.org/anthology/ P15-1001.
|
| 237 |
+
|
| 238 |
+
Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016.
|
| 239 |
+
|
| 240 |
+
Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv preprint arXiv:1609.04836, 2016.
|
| 241 |
+
|
| 242 |
+
Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. Character-aware neural language models. In AAAI, pp. 2741–2749, 2016.
|
| 243 |
+
|
| 244 |
+
David Krueger, Tegan Maharaj, Janos Kramar, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary Ke, Anirudh Goyal, Yoshua Bengio, Aaron Courville, and Christopher Pal. Zoneout: Regularizing rnns by randomly preserving hidden activations. 2016.
|
| 245 |
+
|
| 246 |
+
Matt J Kusner and Jose Miguel Hern ´ andez-Lobato. Gans for sequences of discrete elements with ´ the gumbel-softmax distribution. arXiv preprint arXiv:1611.04051, 2016.
|
| 247 |
+
|
| 248 |
+
Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. arXiv preprint arXiv:1508.04025, 2015.
|
| 249 |
+
|
| 250 |
+
Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016.
|
| 251 |
+
|
| 252 |
+
Gabor Melis, Chris Dyer, and Phil Blunsom. On the state of the art of evaluation in neural language ´ models. arXiv preprint arXiv:1707.05589, 2017.
|
| 253 |
+
|
| 254 |
+
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
|
| 255 |
+
|
| 256 |
+
Stephen Merity, Nitish Shirish Keskar, and Richard Socher. Regularizing and optimizing lstm language models. arXiv preprint arXiv:1708.02182, 2017.
|
| 257 |
+
|
| 258 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pp. 311–318. Association for Computational Linguistics, 2002.
|
| 259 |
+
|
| 260 |
+
Boris T Polyak and Anatoli B Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992.
|
| 261 |
+
|
| 262 |
+
Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015.
|
| 263 |
+
|
| 264 |
+
Stanislau Semeniuta, Aliaksei Severyn, and Erhardt Barth. Recurrent dropout without memory loss. arXiv preprint arXiv:1603.05118, 2016.
|
| 265 |
+
|
| 266 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In ACL, 2016.
|
| 267 |
+
|
| 268 |
+
Shiqi Shen, Yong Cheng, Zhongjun He, Wei He, Hua Wu, Maosong Sun, and Yang Liu. Minimum risk training for neural machine translation. arXiv preprint arXiv:1512.02433, 2015.
|
| 269 |
+
|
| 270 |
+
Sandeep Subramanian, Sai Rajeswar, Francis Dutil, Christopher Pal, and Aaron Courville. Adversarial generation of natural language. ACL 2017, pp. 241, 2017.
|
| 271 |
+
|
| 272 |
+
Ruben Villegas, Jimei Yang, Yuliang Zou, Sungryull Sohn, Xunyu Lin, and Honglak Lee. Learning to generate long-term future via hierarchical prediction. arXiv preprint arXiv:1704.05831, 2017.
|
| 273 |
+
|
| 274 |
+
Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3156–3164, 2015.
|
| 275 |
+
|
| 276 |
+
Li Wan, Matthew Zeiler, Sixin Zhang, Yann Le Cun, and Rob Fergus. Regularization of neural networks using dropconnect. In International Conference on Machine Learning, pp. 1058–1066, 2013.
|
| 277 |
+
|
| 278 |
+
Sam Wiseman and Alexander M. Rush. Sequence-to-sequence learning as beam-search optimization. In EMNLP, November 2016a.
|
| 279 |
+
|
| 280 |
+
Sam Wiseman and Alexander M Rush. Sequence-to-sequence learning as beam-search optimization. arXiv preprint arXiv:1606.02960, 2016b.
|
| 281 |
+
|
| 282 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
|
| 283 |
+
|
| 284 |
+
Shi Xingjian, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Convolutional lstm network: A machine learning approach for precipitation nowcasting. In Advances in neural information processing systems, pp. 802–810, 2015.
|
| 285 |
+
|
| 286 |
+
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International Conference on Machine Learning, pp. 2048–2057, 2015.
|
| 287 |
+
|
| 288 |
+
Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014.
|
| 289 |
+
|
| 290 |
+
Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012.
|
| 291 |
+
|
| 292 |
+
Yu Zhang, Guoguo Chen, Dong Yu, Kaisheng Yaco, Sanjeev Khudanpur, and James Glass. Highway long short-term memory rnns for distant speech recognition. In Acoustics, Speech and Signal Processing (ICASSP), 2016 IEEE International Conference on, pp. 5755–5759. IEEE, 2016.
|
| 293 |
+
|
| 294 |
+
Julian Georg Zilly, Rupesh Kumar Srivastava, Jan Koutn´ık, and Jurgen Schmidhuber. Recurrent ¨ highway networks. arXiv preprint arXiv:1607.03474, 2016.
|
| 295 |
+
|
| 296 |
+
Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.
|
| 297 |
+
|
| 298 |
+
# A EXTRA EXPERIMENTS ON SENSITIVITY
|
| 299 |
+
|
| 300 |
+
We did an extra set of experiments on language modeling to show our model is less sensitive than the baseline model, no matter what the hyperparameters $( c , r$ in low-precision compression, rank in low-rank compression) are. The results are shown in Table 6 and Table 7.
|
| 301 |
+
|
| 302 |
+
Table 6: Low precision compression results on Penn Tree Bank dataset
|
| 303 |
+
|
| 304 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>c = 0.20,r =0.10</td><td rowspan=1 colspan=1>c = 0.40,r = 0.20</td><td rowspan=1 colspan=1>c = 0.60,r = 0.30</td><td rowspan=1 colspan=1>c = 0.80,r = 0.40</td></tr><tr><td rowspan=1 colspan=1>LSTM</td><td rowspan=1 colspan=1>52.8</td><td rowspan=1 colspan=1>58.5 (+5.7)</td><td rowspan=1 colspan=1>53.6 (+0.8)</td><td rowspan=1 colspan=1>54.2 (+1.4)</td><td rowspan=1 colspan=1>57.7 (+4.9)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>53.2</td><td rowspan=1 colspan=1>54.6 (+1.4)</td><td rowspan=1 colspan=1>53.6 (+0.4)</td><td rowspan=1 colspan=1>54.1 (+0.9)</td><td rowspan=1 colspan=1>57.8 (+4.6)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>52.1</td><td rowspan=1 colspan=1>54.5 (+2.4)</td><td rowspan=1 colspan=1>52.8 (+0.7)</td><td rowspan=1 colspan=1>53.2 (+1.1)</td><td rowspan=1 colspan=1>55.0 (+2.9)</td></tr></table>
|
| 305 |
+
|
| 306 |
+
Table 7: Low rank compression results on Penn Tree Bank dataset
|
| 307 |
+
|
| 308 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>rank =128</td><td rowspan=1 colspan=1>rank =64</td><td rowspan=1 colspan=1>rank =32</td><td rowspan=1 colspan=1>rank=16</td></tr><tr><td rowspan=1 colspan=1>LSTM</td><td rowspan=1 colspan=1>52.8</td><td rowspan=1 colspan=1>56.6(+3.8)</td><td rowspan=1 colspan=1>65.5 (+12.7)</td><td rowspan=1 colspan=1>83.1 (+30.3)</td><td rowspan=1 colspan=1>111.6 (+58.8)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>53.2</td><td rowspan=1 colspan=1>54.6 (+1.4)</td><td rowspan=1 colspan=1>60.0 (+6.8)</td><td rowspan=1 colspan=1>72.8 (+19.6)</td><td rowspan=1 colspan=1>100.9 (+47.7)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>52.1</td><td rowspan=1 colspan=1>53.3 (+1.2)</td><td rowspan=1 colspan=1>56.0 (+3.9)</td><td rowspan=1 colspan=1>62.8 (+10.7)</td><td rowspan=1 colspan=1>75.9 (+23.8)</td></tr></table>
|
| 309 |
+
|
| 310 |
+
# B EXAMPLES
|
| 311 |
+
|
| 312 |
+

|
| 313 |
+
|
| 314 |
+

|
| 315 |
+
|
| 316 |
+

|
| 317 |
+
|
| 318 |
+

|
| 319 |
+
|
| 320 |
+

|
| 321 |
+
Figure 6: The gate value visualization in German English task.
|
parse/train/rJiaRbk0-/rJiaRbk0-_content_list.json
ADDED
|
@@ -0,0 +1,1754 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "TOWARDS BINARY-VALUED GATES FOR ROBUST LSTM TRAINING ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
174,
|
| 8 |
+
99,
|
| 9 |
+
596,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
171,
|
| 20 |
+
398,
|
| 21 |
+
198
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
234,
|
| 32 |
+
544,
|
| 33 |
+
251
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Long Short-Term Memory (LSTM) is one of the most widely used recurrent structures in sequence modeling. Its goal is to use gates to control the information flow (e.g., whether to skip some information/transformation or not) in the recurrent computations, although its practical implementation based on soft gates only partially achieves this goal and is easy to overfit. In this paper, we propose a new way for LSTM training, which pushes the values of the gates towards 0 or 1. By doing so, we can (1) better control the information flow: the gates are mostly open or closed, instead of in a middle state; and (2) avoid overfitting to certain extent: the gates operate at their flat regions, which is shown to correspond to better generalization ability. However, learning towards discrete values of the gates is generally difficult. To tackle this challenge, we leverage the recently developed GumbelSoftmax trick from the field of variational methods, and make the model trainable with standard backpropagation. Experimental results on language modeling and machine translation show that (1) the values of the gates generated by our method are more reasonable and intuitively interpretable, and (2) our proposed method generalizes better and achieves better accuracy on test sets in all tasks. Moreover, the learnt models are not sensitive to low-precision approximation and low-rank approximation of the gate parameters due to the flat loss surface. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
263,
|
| 43 |
+
764,
|
| 44 |
+
515
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
540,
|
| 55 |
+
336,
|
| 56 |
+
555
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Recurrent neural networks (RNN) (Hochreiter, 1998) are widely used in sequence modeling tasks, such as language modeling (Kim et al., 2016; Jozefowicz et al., 2016), speech recognition (Zhang et al., 2016), time series prediction (Xingjian et al., 2015), machine translation (Wu et al., 2016; Britz et al., 2017), image captioning (Vinyals et al., 2015; Xu et al., 2015), and image generation (Villegas et al., 2017). ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
570,
|
| 66 |
+
825,
|
| 67 |
+
640
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "To address the long-term dependency and gradient vanishing problem of conventional RNN, long short-term memory (LSTM) (Gers et al., 1999; Hochreiter & Schmidhuber, 1997b) was proposed, which introduces gate functions to control the information in a recurrent unit: a forget gate function to determine how much previous information should be excluded for the current step, an input gate function to find relevant signals to be absorbed into the hidden context, and an output gate function for prediction and decision making. For ease of optimization, in practical implementation, one usually uses element-wise sigmoid function to mimic the gates, whose outputs are soft values between 0 and 1. By using such gates, LSTM usually performs much better than conventional RNN. However, the benefits come with the cost of introducing many more parameters in the gates, which makes the training of a LSTM model inefficient and easy to overfit (Krueger et al., 2016; Zaremba et al., 2014; Semeniuta et al., 2016). ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
647,
|
| 77 |
+
825,
|
| 78 |
+
800
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "In this paper, we explore a new way to train LSTM by pushing the values of the gates to the boundary of their ranges $( 0 , \\bar { 1 } )$ 1. Pushing the values of the gates to 0/1 has certain advantages. First, it well aligns with the original purpose of the development of gates: to get the information in or skip by “opening” or “closing” the gates during the recurrent computation. Second, training LSTM towards binary-valued gates can make the learnt model generalize better. According to (Hochreiter & Schmidhuber, 1997a; Haussler et al., 1997; Keskar et al., 2016; Chaudhari et al., 2016), a model lying in a flat region of the loss surface is likely to generalize well, since any small perturbation to the model makes little fluctuation to the loss. Training LSTM towards binary-valued gates means seeking a set of parameters to make the values of the gates approaching zero or one, namely residing in the flat region of the sigmoid function. Simple deductions show that this also corresponds to the flat region of the overall loss surface. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
808,
|
| 88 |
+
823,
|
| 89 |
+
863
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
103,
|
| 99 |
+
825,
|
| 100 |
+
200
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Technically, pushing the outputs of the gates towards such discrete values is challenging. A straightforward approach is to sharpen the sigmoid function by a smaller temperature. However, this is equivalent to rescaling the input and cannot guarantee the values of the learnt gates to be close to 0 or 1. To tackle this challenge, in this paper, we leverage the Gumbel-Softmax trick that Jang et al. (2016) and Maddison et al. (2016) recently develop for variantional methods. The trick aims to generate approximated samples for categorical latent variables in a stochastic computational graph, e.g., variational autoencoder, brings convenience to using reparametrization tricks, and thus leads to efficient learning. Specifically, during training, we apply the Gumbel-Softmax trick to the gates to approximate the values sampled from the Bernoulli distribution given by the parameters, and train the LSTM model with standard backpropagation methods. We call this method Gumbel-Gate LSTM $G ^ { 2 }$ -LSTM). We conduct three experiments on two tasks (language modeling and machine translation) to verify our proposed method. We have the following observations from experimental results: ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
208,
|
| 110 |
+
825,
|
| 111 |
+
388
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "• Our model generalizes well: In all tasks, we achieve superior performance to baseline algorithms on the test sets, and the gap between training and test is effectively reduced. Our model is not sensitive due to its flat loss surface: We apply several model compression algorithms to the parameters in the gates, including low-precision approximation and lowrank approximation, and all results show that our learnt models are better. • The gates in our learnt model are meaningful and intuitively interpretable after visualization. Furthermore, our model can automatically learn the boundaries inside the sentences. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
215,
|
| 120 |
+
400,
|
| 121 |
+
823,
|
| 122 |
+
507
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "The organization of the paper is as follows. We introduce related work in Section 2 and propose our learning algorithm in Section 3. Experiments are reported in Section 4 and future work is discussed in the last section. ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
178,
|
| 131 |
+
517,
|
| 132 |
+
825,
|
| 133 |
+
559
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "2 RELATED WORK ",
|
| 140 |
+
"text_level": 1,
|
| 141 |
+
"bbox": [
|
| 142 |
+
176,
|
| 143 |
+
579,
|
| 144 |
+
344,
|
| 145 |
+
595
|
| 146 |
+
],
|
| 147 |
+
"page_idx": 1
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"type": "text",
|
| 151 |
+
"text": "2.1 LOSS SURFACE AND GENERALIZATION ",
|
| 152 |
+
"text_level": 1,
|
| 153 |
+
"bbox": [
|
| 154 |
+
176,
|
| 155 |
+
611,
|
| 156 |
+
480,
|
| 157 |
+
626
|
| 158 |
+
],
|
| 159 |
+
"page_idx": 1
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"type": "text",
|
| 163 |
+
"text": "The concept of sharp and flat minima has been first discussed in (Hochreiter & Schmidhuber, 1997a; Haussler et al., 1997) . Intuitively, a flat minimum $x$ of a loss $f ( \\cdot )$ corresponds to the point for which the function $f$ varies slowly in a relatively large neighborhood of $x$ . In contrast, a sharp minimum $x$ is such that the function $f$ increases rapidly in a small neighborhood of $x$ . The sensitivity of the loss function at sharp minima negatively impacts the generalization ability of a trained model on new data. Recently, several papers discuss how to modify the training process and to learn a model in a flat region so as to obtain better generalization ability. Keskar et al. (2016) show by using smallbatch training, the learnt model is more likely to converge to a flat region rather than a sharp one. Chaudhari et al. (2016) propose a new objective function considering the local entropy and push the model to be optimized towards a wide valley. ",
|
| 164 |
+
"bbox": [
|
| 165 |
+
174,
|
| 166 |
+
637,
|
| 167 |
+
825,
|
| 168 |
+
775
|
| 169 |
+
],
|
| 170 |
+
"page_idx": 1
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"type": "text",
|
| 174 |
+
"text": "2.2 DROPOUT IN RECURRENT NEURAL NETWORK",
|
| 175 |
+
"text_level": 1,
|
| 176 |
+
"bbox": [
|
| 177 |
+
174,
|
| 178 |
+
792,
|
| 179 |
+
535,
|
| 180 |
+
808
|
| 181 |
+
],
|
| 182 |
+
"page_idx": 1
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"type": "text",
|
| 186 |
+
"text": "Dropout is one of the most standard tricks used in deep learning to improve generalization ability. For recurrent neural networks, Zaremba et al. (2014) and Semeniuta et al. (2016) apply dropout to feed-forward connections and recurrent units of RNNs. In Zoneout (Krueger et al., 2016), the values of the hidden states and memory cells are randomly either maintained by their previous value or updated as usual, which introduces stochastic identity connections between subsequent time steps. ",
|
| 187 |
+
"bbox": [
|
| 188 |
+
174,
|
| 189 |
+
819,
|
| 190 |
+
823,
|
| 191 |
+
888
|
| 192 |
+
],
|
| 193 |
+
"page_idx": 1
|
| 194 |
+
},
|
| 195 |
+
{
|
| 196 |
+
"type": "text",
|
| 197 |
+
"text": "Different from dropout, which is to regularize the training of a deep neural network by randomly dropping nodes/edges to prevent co-adaptations, our method is to bias the optimization process and ensure to find a model in a flat region to avoid overfitting. Therefore, our method is complementary to dropout in RNNs, and actually in our experiments our method is well combined with dropout. ",
|
| 198 |
+
"bbox": [
|
| 199 |
+
174,
|
| 200 |
+
895,
|
| 201 |
+
823,
|
| 202 |
+
924
|
| 203 |
+
],
|
| 204 |
+
"page_idx": 1
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"type": "text",
|
| 208 |
+
"text": "",
|
| 209 |
+
"bbox": [
|
| 210 |
+
171,
|
| 211 |
+
103,
|
| 212 |
+
823,
|
| 213 |
+
132
|
| 214 |
+
],
|
| 215 |
+
"page_idx": 2
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"type": "text",
|
| 219 |
+
"text": "2.3 GUMBEL-SOFTMAX TRICK ",
|
| 220 |
+
"text_level": 1,
|
| 221 |
+
"bbox": [
|
| 222 |
+
176,
|
| 223 |
+
152,
|
| 224 |
+
401,
|
| 225 |
+
167
|
| 226 |
+
],
|
| 227 |
+
"page_idx": 2
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"type": "text",
|
| 231 |
+
"text": "Jang et al. (2016) and Maddison et al. (2016) develop a continuous relaxation of discrete random variables in stochastic computational graphs. The main idea of the method is that the multinomial distribution can be represented according to Gumbel-Max trick, thus can be approximated by Gumbel-Softmax distribution. In detail, given a probability distribution over $k$ categories with parameter $\\pi _ { 1 } , \\pi _ { 2 } , \\ldots , \\pi _ { k }$ , the Gumbel-Softmax trick approximately samples the categorical variable according to: ",
|
| 232 |
+
"bbox": [
|
| 233 |
+
174,
|
| 234 |
+
180,
|
| 235 |
+
825,
|
| 236 |
+
265
|
| 237 |
+
],
|
| 238 |
+
"page_idx": 2
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"type": "equation",
|
| 242 |
+
"img_path": "images/693a769827dbf35056713ac40fa2542b8476808c0eb3bac6a04340f5954c0c9b.jpg",
|
| 243 |
+
"text": "$$\ny _ { i } = { \\frac { \\exp ( ( \\log \\pi _ { i } + q _ { i } ) / \\tau ) } { \\sum _ { j = 1 } ^ { k } \\exp ( ( \\log \\pi _ { j } + q _ { j } ) / \\tau ) } } \\qquad { \\mathrm { f o r ~ } } i = 1 , \\dots , k ,\n$$",
|
| 244 |
+
"text_format": "latex",
|
| 245 |
+
"bbox": [
|
| 246 |
+
297,
|
| 247 |
+
273,
|
| 248 |
+
666,
|
| 249 |
+
314
|
| 250 |
+
],
|
| 251 |
+
"page_idx": 2
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"type": "text",
|
| 255 |
+
"text": "where $\\tau$ is the temperature and $q _ { i }$ is independently sampled from Gumbel distribution: $q _ { i } =$ $- \\log ( - \\log U _ { i } ) , U _ { i } \\sim \\mathrm { U n i f o r m } ( 0 , 1 )$ . ",
|
| 256 |
+
"bbox": [
|
| 257 |
+
173,
|
| 258 |
+
324,
|
| 259 |
+
825,
|
| 260 |
+
352
|
| 261 |
+
],
|
| 262 |
+
"page_idx": 2
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"type": "text",
|
| 266 |
+
"text": "By using the Gumbel-Softmax trick, we can generate sample $y = ( y _ { 1 } , . . . , y _ { k } )$ to approximate the categorical distribution. Furthermore, as the randomness $q$ is independent of $\\pi$ (which is usually defined by a set of parameters), we can use reparameterization trick to optimize the model parameters using standard backpropagation algorithms. Gumbel-Softmax trick has been adopted in several applications such as variation autoencoder (Jang et al., 2016), generative adversarial net (Kusner & Hernandez-Lobato, 2016), and language generation (Subramanian et al., 2017). To the best of our ´ knowledge, this is the first work to introduce the Gumbel-Softmax trick in LSTM for robust training purpose. ",
|
| 267 |
+
"bbox": [
|
| 268 |
+
173,
|
| 269 |
+
358,
|
| 270 |
+
825,
|
| 271 |
+
470
|
| 272 |
+
],
|
| 273 |
+
"page_idx": 2
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "text",
|
| 277 |
+
"text": "3 THE PROPOSED TRAINING ALGORITHM ",
|
| 278 |
+
"text_level": 1,
|
| 279 |
+
"bbox": [
|
| 280 |
+
174,
|
| 281 |
+
494,
|
| 282 |
+
537,
|
| 283 |
+
511
|
| 284 |
+
],
|
| 285 |
+
"page_idx": 2
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"type": "text",
|
| 289 |
+
"text": "In this section, we present a new and robust training algorithm for LSTM by learning towards binaryvalued gates. ",
|
| 290 |
+
"bbox": [
|
| 291 |
+
171,
|
| 292 |
+
527,
|
| 293 |
+
821,
|
| 294 |
+
558
|
| 295 |
+
],
|
| 296 |
+
"page_idx": 2
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"type": "text",
|
| 300 |
+
"text": "3.1 BACKGROUND ",
|
| 301 |
+
"text_level": 1,
|
| 302 |
+
"bbox": [
|
| 303 |
+
174,
|
| 304 |
+
578,
|
| 305 |
+
316,
|
| 306 |
+
593
|
| 307 |
+
],
|
| 308 |
+
"page_idx": 2
|
| 309 |
+
},
|
| 310 |
+
{
|
| 311 |
+
"type": "text",
|
| 312 |
+
"text": "Recurrent neural networks process an input sequence $\\{ x _ { 1 } , x _ { 2 } , \\dots , x _ { T } \\}$ sequentially and construct a corresponding sequence of hidden states/representations $\\{ h _ { 1 } , h _ { 2 } , \\ldots , h _ { T } \\}$ . In single-layer recurrent neural networks, the hidden states $\\{ h _ { 1 } , h _ { 2 } , \\ldots , h _ { T } \\}$ are used for prediction or decision making. In deep (stacked) recurrent neural networks, the hidden states in layer $k$ are used as inputs to layer $k + 1$ . ",
|
| 313 |
+
"bbox": [
|
| 314 |
+
174,
|
| 315 |
+
606,
|
| 316 |
+
825,
|
| 317 |
+
675
|
| 318 |
+
],
|
| 319 |
+
"page_idx": 2
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"type": "text",
|
| 323 |
+
"text": "In recurrent neural networks, each hidden state is trained (implicitly) to remember and emphasize task-relevant aspects of the preceding inputs, and to incorporate new inputs via a recurrent operator, $T$ , which converts the previous hidden state and presents input into a new hidden state, e.g., ",
|
| 324 |
+
"bbox": [
|
| 325 |
+
174,
|
| 326 |
+
683,
|
| 327 |
+
825,
|
| 328 |
+
726
|
| 329 |
+
],
|
| 330 |
+
"page_idx": 2
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"type": "equation",
|
| 334 |
+
"img_path": "images/16509d035e7f42b5b5b5186618e3b948322b18a9cee40af8e451fc906b508c4c.jpg",
|
| 335 |
+
"text": "$$\nh _ { t } = T ( h _ { t - 1 } , x _ { t } ) = \\operatorname { t a n h } ( W _ { h } h _ { t - 1 } + W _ { x } x _ { t } + b ) ,\n$$",
|
| 336 |
+
"text_format": "latex",
|
| 337 |
+
"bbox": [
|
| 338 |
+
318,
|
| 339 |
+
736,
|
| 340 |
+
647,
|
| 341 |
+
752
|
| 342 |
+
],
|
| 343 |
+
"page_idx": 2
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"type": "text",
|
| 347 |
+
"text": "where $W _ { h }$ , $W _ { x }$ and $b$ are parameters. ",
|
| 348 |
+
"bbox": [
|
| 349 |
+
174,
|
| 350 |
+
762,
|
| 351 |
+
416,
|
| 352 |
+
779
|
| 353 |
+
],
|
| 354 |
+
"page_idx": 2
|
| 355 |
+
},
|
| 356 |
+
{
|
| 357 |
+
"type": "text",
|
| 358 |
+
"text": "Long short-term memory RNN (LSTM) (Hochreiter & Schmidhuber, 1997b) is a carefully designed recurrent structure. In addition to the hidden state $h _ { t }$ used as a transient representation of state at timestep $t$ , LSTM introduces a memory cell $c _ { t }$ , intended for internal long-term storage. $c _ { t }$ and $h _ { t }$ are computed via three gate functions. The forget gate function $f _ { t }$ directly connects $c _ { t }$ to the memory cell $c _ { t - 1 }$ of the previous timestep via an element-wise multiplication. Large values of the forget gates cause the cell to remember most (if not all) of its previous values. The other gates control the flow of information in input $( i _ { t } )$ and output $\\left( o _ { t } \\right)$ of the cell. Each gate function has a weight matrix and a bias vector; we use subscripts $f$ , $i$ and $o$ to denote parameters for the forget gate function, the input gate function and the output gate function respectively, e.g., the parameters for the forget gate function are denoted by $W _ { x f } , W _ { h f }$ , and $b _ { f }$ . ",
|
| 359 |
+
"bbox": [
|
| 360 |
+
173,
|
| 361 |
+
784,
|
| 362 |
+
825,
|
| 363 |
+
925
|
| 364 |
+
],
|
| 365 |
+
"page_idx": 2
|
| 366 |
+
},
|
| 367 |
+
{
|
| 368 |
+
"type": "image",
|
| 369 |
+
"img_path": "images/79de53fcc9591725161e0e3c56d950d12067f4009a635940b5003bf3e60477e4.jpg",
|
| 370 |
+
"image_caption": [
|
| 371 |
+
"Figure 1: The orange parts correspond to the saturation area of the sigmoid function. "
|
| 372 |
+
],
|
| 373 |
+
"image_footnote": [],
|
| 374 |
+
"bbox": [
|
| 375 |
+
225,
|
| 376 |
+
118,
|
| 377 |
+
772,
|
| 378 |
+
267
|
| 379 |
+
],
|
| 380 |
+
"page_idx": 3
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"type": "text",
|
| 384 |
+
"text": "With the above notations, an LSTM is formally defined as follows: ",
|
| 385 |
+
"bbox": [
|
| 386 |
+
173,
|
| 387 |
+
342,
|
| 388 |
+
611,
|
| 389 |
+
357
|
| 390 |
+
],
|
| 391 |
+
"page_idx": 3
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"type": "equation",
|
| 395 |
+
"img_path": "images/c77ae4fa662fa3bb7169d6ce89317e55b676126296379cfece42c7b993eeb5d2.jpg",
|
| 396 |
+
"text": "$$\n\\begin{array} { r c l } { \\displaystyle i _ { t } } & { = } & { \\sigma \\big ( W _ { x i } x _ { t } + W _ { h i } h _ { t - 1 } + b _ { i } \\big ) } \\\\ { \\displaystyle f _ { t } } & { = } & { \\sigma \\big ( W _ { x f } x _ { t } + W _ { h f } h _ { t - 1 } + b _ { f } \\big ) } \\\\ { \\displaystyle o _ { t } } & { = } & { \\sigma \\big ( W _ { x o } x _ { t } + W _ { h o } h _ { t - 1 } + b _ { o } \\big ) } \\\\ { \\displaystyle g _ { t } } & { = } & { \\operatorname { t a n h } \\big ( W _ { x g } x _ { t } + W _ { h g } h _ { t - 1 } + b _ { g } \\big ) } \\\\ { \\displaystyle c _ { t } } & { = } & { f _ { t } \\odot c _ { t - 1 } + i _ { t } \\odot g _ { t } } \\\\ { \\displaystyle h _ { t } } & { = } & { o _ { t } \\odot \\operatorname { t a n h } \\big ( c _ { t } \\big ) , } \\end{array}\n$$",
|
| 397 |
+
"text_format": "latex",
|
| 398 |
+
"bbox": [
|
| 399 |
+
362,
|
| 400 |
+
358,
|
| 401 |
+
635,
|
| 402 |
+
464
|
| 403 |
+
],
|
| 404 |
+
"page_idx": 3
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"type": "text",
|
| 408 |
+
"text": "where $\\sigma ( \\cdot )$ represents the sigmoid function and $\\odot$ is the element-wise product. ",
|
| 409 |
+
"bbox": [
|
| 410 |
+
173,
|
| 411 |
+
465,
|
| 412 |
+
683,
|
| 413 |
+
481
|
| 414 |
+
],
|
| 415 |
+
"page_idx": 3
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"type": "text",
|
| 419 |
+
"text": "3.2 TRAINING LSTM GATES TOWARDS BINARY VALUES ",
|
| 420 |
+
"text_level": 1,
|
| 421 |
+
"bbox": [
|
| 422 |
+
174,
|
| 423 |
+
496,
|
| 424 |
+
583,
|
| 425 |
+
511
|
| 426 |
+
],
|
| 427 |
+
"page_idx": 3
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"type": "text",
|
| 431 |
+
"text": "The LSTM unit requires much more parameters than the simple RNN unit, and makes it hard to generalize. As we can see from Eqn (2) - (7), a large percentage of the parameters are used to compute the gate (sigmoid) functions. If we can push the outputs of the gates to the saturation area of the sigmoid function (i.e., towards 0 or 1), the loss function with respect to the parameters in the gates will be flat: if the parameters in the gates perturb, the change to the output of the gates is small due to the sigmoid operator (see Figure 1), and then the change to the loss is little, which means the flat region of the loss. As discussed in (Chaudhari et al., 2016), minima in a flat region is more likely to generalize better, and thus toward binary-valued gates will lead to better generalization. ",
|
| 432 |
+
"bbox": [
|
| 433 |
+
173,
|
| 434 |
+
522,
|
| 435 |
+
825,
|
| 436 |
+
635
|
| 437 |
+
],
|
| 438 |
+
"page_idx": 3
|
| 439 |
+
},
|
| 440 |
+
{
|
| 441 |
+
"type": "text",
|
| 442 |
+
"text": "However, the task of training towards binary-valued gates is quite challenging. One straightforward idea is to sharpen sigmoid function by using a smaller temperature, i.e., $\\bar { f _ { W , b } ( x ) } = \\sigma ( ( \\bar { W x } + b ) / \\tau )$ , where $\\tau < 1$ is the temperature. However, it is computationally equivalent to $f _ { W ^ { \\prime } , b ^ { \\prime } } ( x ) = \\sigma ( W ^ { \\prime } x +$ $b ^ { \\prime }$ ) by setting $W ^ { \\prime } = W \\bar { / } \\tau$ and $b ^ { \\prime } = b / \\tau$ . Then using a small temperature is equivalent to rescale the initial parameters as well as the gradients to a larger range. Usually, using an initial point in a large range with a large learning rate will harm the optimization process, and apparently cannot guarantee the outputs to be close to the boundary after training. ",
|
| 443 |
+
"bbox": [
|
| 444 |
+
173,
|
| 445 |
+
640,
|
| 446 |
+
825,
|
| 447 |
+
739
|
| 448 |
+
],
|
| 449 |
+
"page_idx": 3
|
| 450 |
+
},
|
| 451 |
+
{
|
| 452 |
+
"type": "text",
|
| 453 |
+
"text": "In this work, we leverage the recently developed Gumbel-Softmax trick. This trick is efficient in approximating discrete distributions, and is one of the widely used methods to learn discrete random variables in stochastic computational graphs. We first provide a proposition about the approximation ability of this trick for Bernoulli distribution, which will be used in our proposed algorithm. ",
|
| 454 |
+
"bbox": [
|
| 455 |
+
174,
|
| 456 |
+
744,
|
| 457 |
+
825,
|
| 458 |
+
801
|
| 459 |
+
],
|
| 460 |
+
"page_idx": 3
|
| 461 |
+
},
|
| 462 |
+
{
|
| 463 |
+
"type": "text",
|
| 464 |
+
"text": "Proposition 1. Assume $\\sigma ( \\cdot )$ is the sigmoid function. Given $\\alpha \\in \\mathbb { R }$ and temperature $\\tau > 0$ , we define random variable $D _ { \\alpha } \\sim B ( \\sigma ( \\alpha ) )$ where $B ( \\sigma ( \\alpha ) )$ is the Bernoulli distribution with parameter $\\sigma ( \\alpha )$ , and define $\\begin{array} { r } { G ( \\alpha , \\tau ) = \\sigma ( \\frac { \\alpha + \\log U - \\log ( 1 - U ) } { \\tau } ) } \\end{array}$ where $U \\sim U n i f o r m ( 0 , 1 )$ . Then the following inequalities hold for arbitrary $\\epsilon \\in ( 0 , \\frac { 1 } { 2 } )$ , ",
|
| 465 |
+
"bbox": [
|
| 466 |
+
174,
|
| 467 |
+
803,
|
| 468 |
+
825,
|
| 469 |
+
867
|
| 470 |
+
],
|
| 471 |
+
"page_idx": 3
|
| 472 |
+
},
|
| 473 |
+
{
|
| 474 |
+
"type": "equation",
|
| 475 |
+
"img_path": "images/36a008f90e9955dc17c70bad9bfb4e50f5211bccff92450e4d5f6e598d54ac0b.jpg",
|
| 476 |
+
"text": "$$\n\\begin{array} { r l } { P ( D _ { \\alpha } = 1 ) - \\displaystyle \\frac { \\tau } { 4 } \\log ( \\frac { 1 } { \\epsilon } ) \\leq } & { P ( G ( \\alpha , \\tau ) \\geq 1 - \\epsilon ) \\leq P ( D _ { \\alpha } = 1 ) , } \\\\ { P ( D _ { \\alpha } = 0 ) - \\displaystyle \\frac { \\tau } { 4 } \\log ( \\frac { 1 } { \\epsilon } ) \\leq } & { P ( G ( \\alpha , \\tau ) \\leq \\epsilon ) \\leq P ( D _ { \\alpha } = 0 ) . } \\end{array}\n$$",
|
| 477 |
+
"text_format": "latex",
|
| 478 |
+
"bbox": [
|
| 479 |
+
274,
|
| 480 |
+
869,
|
| 481 |
+
722,
|
| 482 |
+
931
|
| 483 |
+
],
|
| 484 |
+
"page_idx": 3
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"type": "text",
|
| 488 |
+
"text": "$\\begin{array} { r } { \\sigma ^ { - 1 } ( x ) = \\log ( \\frac { x } { 1 - x } ) } \\end{array}$ $\\begin{array} { r } { P ( G ( \\alpha , \\tau ) \\geq 1 - \\epsilon ) = P ( \\frac { \\alpha + \\log U - \\log ( 1 - U ) } { \\tau } \\geq \\log ( \\frac { 1 } { \\epsilon } - } \\end{array}$ $\\begin{array} { r } { 1 ) ) = P ( e ^ { \\alpha - \\tau \\log ( \\frac { 1 } { \\epsilon } - 1 ) } \\geq \\frac { 1 - U } { U } ) = P ( U \\geq \\frac { 1 } { 1 + e ^ { \\alpha - \\tau \\log ( \\frac { 1 } { \\epsilon } - 1 ) } } ) = \\sigma ( \\alpha - \\tau \\log ( \\frac { 1 } { \\epsilon } - 1 ) ) } \\end{array}$ 11+eα−τ log( 1\u000f −1) ) = σ(α − τ log( 1\u000f − 1)). Considering that sigmoid function is monotonically increasing and $\\textstyle { \\frac { 1 } { 4 } }$ -Lipschitz continuous, we have $P ( D _ { \\alpha } =$ $\\begin{array} { r } { \\mathrm { 1 ) } - P ( G ( \\alpha , \\tau ) \\geq 1 - \\epsilon ) = \\sigma ( \\alpha ) - \\sigma ( \\alpha - \\tau \\log ( \\frac { 1 } { \\epsilon } - 1 ) ) \\geq 0 } \\end{array}$ and $P ( D _ { \\alpha } = 1 ) - P ( G ( \\alpha , \\tau ) \\geq$ $\\begin{array} { r } { 1 ^ { ' } - \\epsilon ) = \\sigma ( \\alpha ) - \\sigma ( \\alpha - \\tau \\log ( \\frac { 1 } { \\epsilon } - 1 ) ) \\leq \\frac { \\tau } { 4 } \\log ( \\frac { 1 } { \\epsilon } - 1 ) \\leq \\frac { \\tau } { 4 } \\log ( \\frac { 1 } { \\epsilon } } \\end{array}$ ). We omit the proof for (9) as it is almost identical to the proof of (8). □ ",
|
| 489 |
+
"bbox": [
|
| 490 |
+
173,
|
| 491 |
+
99,
|
| 492 |
+
825,
|
| 493 |
+
205
|
| 494 |
+
],
|
| 495 |
+
"page_idx": 4
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"type": "text",
|
| 499 |
+
"text": "We can see from the above proposition, the distribution of $G ( \\alpha , \\tau )$ can be considered as an approximation of Bernoulli distribution $B ( \\sigma ( \\alpha ) )$ . The rate of convergence is characterized by (8) and (9). When the temperature $\\tau$ approaches positive zero, we directly obtain the following property which is also proved by Maddison et al. (2016), ",
|
| 500 |
+
"bbox": [
|
| 501 |
+
173,
|
| 502 |
+
219,
|
| 503 |
+
825,
|
| 504 |
+
276
|
| 505 |
+
],
|
| 506 |
+
"page_idx": 4
|
| 507 |
+
},
|
| 508 |
+
{
|
| 509 |
+
"type": "equation",
|
| 510 |
+
"img_path": "images/cba3ba8d3390d014dab65c82f2323e633a043a18509d013a1d6d623642953e70.jpg",
|
| 511 |
+
"text": "$$\nP ( \\operatorname* { l i m } _ { \\tau \\to 0 ^ { + } } G ( \\alpha , \\tau ) = 1 ) = P ( D _ { \\alpha } = 1 ) , P ( \\operatorname* { l i m } _ { \\tau \\to 0 ^ { + } } G ( \\alpha , \\tau ) ) = P ( D _ { \\alpha } = 0 ) .\n$$",
|
| 512 |
+
"text_format": "latex",
|
| 513 |
+
"bbox": [
|
| 514 |
+
243,
|
| 515 |
+
281,
|
| 516 |
+
720,
|
| 517 |
+
306
|
| 518 |
+
],
|
| 519 |
+
"page_idx": 4
|
| 520 |
+
},
|
| 521 |
+
{
|
| 522 |
+
"type": "text",
|
| 523 |
+
"text": "We apply this method into the computation of the gates. Imagine an one-dimensional gate $\\sigma ( \\alpha ( \\theta ) )$ where $\\alpha$ is a scalar parameterized by $\\theta$ , and assume the model will produce a larger loss if the output of the gate is close to one, and produce a smaller loss if the gate value is close to zero. If we can repeatedly sample the output of the gate using $\\begin{array} { r } { G ( \\alpha ( \\theta ) , \\tau ) = \\sigma ( \\frac { \\alpha ( \\theta ) + \\log U - \\log ( 1 - U ) } { \\tau } ) } \\end{array}$ and estimate the loss, any gradient-based algorithm will push the parameter $\\theta$ such that the output value of the gate is close to zero in order to minimize the expected loss. By this way, we can optimize towards the binary-valued gates. ",
|
| 524 |
+
"bbox": [
|
| 525 |
+
173,
|
| 526 |
+
311,
|
| 527 |
+
825,
|
| 528 |
+
412
|
| 529 |
+
],
|
| 530 |
+
"page_idx": 4
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"type": "text",
|
| 534 |
+
"text": "As the gate function is usually a vector-valued function, we extend the notations into a general form: Given $\\boldsymbol { \\alpha } \\in \\mathbb { R } ^ { d }$ and $\\tau > 0$ , we define $\\begin{array} { r } { G ( \\alpha , \\tau ) = \\sigma ( \\frac { \\alpha + \\log U - \\log ( 1 - U ) } { \\tau } ) } \\end{array}$ , where $U$ is a vector and each element $u _ { i }$ in $U$ is independently sampled from Uniform(0, 1), $i = 1 , 2 , \\dots , d$ . In particular, we only push the outputs of input gates and forget gates towards binary values as the output gates usually need fine-granularity information for decision making which makes binary values less desirable (to justify this, we conducted similar experiments and observed a performance drop when pushing the output gates to $_ { 0 / 1 }$ together with the input gates and the forget gates). ",
|
| 535 |
+
"bbox": [
|
| 536 |
+
173,
|
| 537 |
+
419,
|
| 538 |
+
825,
|
| 539 |
+
521
|
| 540 |
+
],
|
| 541 |
+
"page_idx": 4
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"type": "text",
|
| 545 |
+
"text": "We call our proposed learning method Gumbel-Gate LSTM ( $G ^ { 2 }$ -LSTM), which works as follows during training: ",
|
| 546 |
+
"bbox": [
|
| 547 |
+
171,
|
| 548 |
+
526,
|
| 549 |
+
823,
|
| 550 |
+
556
|
| 551 |
+
],
|
| 552 |
+
"page_idx": 4
|
| 553 |
+
},
|
| 554 |
+
{
|
| 555 |
+
"type": "equation",
|
| 556 |
+
"img_path": "images/c009128165e15e95c6842d7b3c8e861239f36718342d2ff7b4c25b7c9ba24caa.jpg",
|
| 557 |
+
"text": "$$\n\\begin{array} { r c l } { \\boldsymbol { i } _ { t } } & { = } & { G \\big ( { \\boldsymbol { W } } _ { x i } { \\boldsymbol { x } } _ { t } + { \\boldsymbol { W } } _ { h i } { \\boldsymbol { h } } _ { t - 1 } + { \\boldsymbol { b } } _ { i } , \\tau \\big ) } \\\\ { \\boldsymbol { f } _ { t } } & { = } & { G \\big ( { \\boldsymbol { W } } _ { x f } { \\boldsymbol { x } } _ { t } + { \\boldsymbol { W } } _ { h f } { \\boldsymbol { h } } _ { t - 1 } + { \\boldsymbol { b } } _ { f } , \\tau \\big ) } \\\\ { \\boldsymbol { o } _ { t } } & { = } & { \\sigma \\big ( { \\boldsymbol { W } } _ { x o } { \\boldsymbol { x } } _ { t } + { \\boldsymbol { W } } _ { h o } { \\boldsymbol { h } } _ { t - 1 } + { \\boldsymbol { b } } _ { o } \\big ) } \\\\ { \\boldsymbol { g } _ { t } } & { = } & { \\operatorname { t a n h } \\big ( { \\boldsymbol { W } } _ { x g } { \\boldsymbol { x } } _ { t } + { \\boldsymbol { W } } _ { h g } { \\boldsymbol { h } } _ { t - 1 } + { \\boldsymbol { b } } _ { g } \\big ) } \\\\ { \\boldsymbol { c } _ { t } } & { = } & { { \\boldsymbol { f } } _ { t } \\odot { \\boldsymbol { c } } _ { t - 1 } + i _ { t } \\odot { \\boldsymbol { g } } _ { t } } \\\\ { \\boldsymbol { h } _ { t } } & { = } & { { \\boldsymbol { o } } _ { t } \\odot \\operatorname { t a n h } \\big ( { \\boldsymbol { c } } _ { t } \\big ) . } \\end{array}\n$$",
|
| 558 |
+
"text_format": "latex",
|
| 559 |
+
"bbox": [
|
| 560 |
+
362,
|
| 561 |
+
560,
|
| 562 |
+
635,
|
| 563 |
+
669
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 4
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "text",
|
| 569 |
+
"text": "In the forward pass, we first independently sample values for $U$ in each time step, then update LSTM units using Eqn (11) - (16) and calculate the loss, e.g., negative log likelihood loss. In the backward pass, as $G$ is continuous and differentiable with respect to the parameters and the loss is continuous and differentiable with respect to $G$ , we can use any standard gradient-based method to update the model parameters. ",
|
| 570 |
+
"bbox": [
|
| 571 |
+
174,
|
| 572 |
+
679,
|
| 573 |
+
825,
|
| 574 |
+
750
|
| 575 |
+
],
|
| 576 |
+
"page_idx": 4
|
| 577 |
+
},
|
| 578 |
+
{
|
| 579 |
+
"type": "text",
|
| 580 |
+
"text": "4 EXPERIMENTS ",
|
| 581 |
+
"text_level": 1,
|
| 582 |
+
"bbox": [
|
| 583 |
+
176,
|
| 584 |
+
770,
|
| 585 |
+
326,
|
| 586 |
+
786
|
| 587 |
+
],
|
| 588 |
+
"page_idx": 4
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "text",
|
| 592 |
+
"text": "4.1 SETTINGS ",
|
| 593 |
+
"text_level": 1,
|
| 594 |
+
"bbox": [
|
| 595 |
+
174,
|
| 596 |
+
801,
|
| 597 |
+
285,
|
| 598 |
+
815
|
| 599 |
+
],
|
| 600 |
+
"page_idx": 4
|
| 601 |
+
},
|
| 602 |
+
{
|
| 603 |
+
"type": "text",
|
| 604 |
+
"text": "We tested the proposed training algorithm on two tasks – language modeling and machine translation. ",
|
| 605 |
+
"bbox": [
|
| 606 |
+
173,
|
| 607 |
+
827,
|
| 608 |
+
825,
|
| 609 |
+
856
|
| 610 |
+
],
|
| 611 |
+
"page_idx": 4
|
| 612 |
+
},
|
| 613 |
+
{
|
| 614 |
+
"type": "text",
|
| 615 |
+
"text": "4.1.1 LANGUAGE MODELING ",
|
| 616 |
+
"text_level": 1,
|
| 617 |
+
"bbox": [
|
| 618 |
+
174,
|
| 619 |
+
871,
|
| 620 |
+
392,
|
| 621 |
+
886
|
| 622 |
+
],
|
| 623 |
+
"page_idx": 4
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "text",
|
| 627 |
+
"text": "Language modeling is a very basic task for LSTM. We used the Penn Treebank corpus which contains about 1 million words. The task is to train an LSTM model to correctly predict the next word conditioned on previous words. A model is evaluated by the prediction perplexity: smaller the perplexity, better the prediction. ",
|
| 628 |
+
"bbox": [
|
| 629 |
+
174,
|
| 630 |
+
895,
|
| 631 |
+
823,
|
| 632 |
+
924
|
| 633 |
+
],
|
| 634 |
+
"page_idx": 4
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "table",
|
| 638 |
+
"img_path": "images/56284ee0379b0b0f154ebc3f9401eff0a3e4c312a82b751873faf206349801ad.jpg",
|
| 639 |
+
"table_caption": [
|
| 640 |
+
"Table 1: Performance comparison on language model (perplexity) "
|
| 641 |
+
],
|
| 642 |
+
"table_footnote": [],
|
| 643 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Size</td><td rowspan=1 colspan=2>Valid</td><td rowspan=1 colspan=1>Test</td></tr><tr><td rowspan=1 colspan=5>Existing results</td></tr><tr><td rowspan=8 colspan=1>Unregularzed LSTMNR-dropout (Zaremba et al., 2014)Zoneout (Krueger et al., 2016)Variational LSTM (Gal & Ghahramani,2016)CharCNN (Kim et al.,2016)Pointer Sentinel-LSTM (Merity et al.,2016)LSTM + continuous cache pointer (Grave et al., 2016)Variational LSTM+ augmented loss (Inan et al.,2016)Variational RHN (Zilly et al., 2016)NAS Cell (Zoph & Le,2016)4-layer skip connection LSTM (Melis et al., 2017)AWD-LSTM w/o finetune (Merity et al., 2017)AWD-LSTM (Baseline) (Merity et al.,2017)</td><td rowspan=1 colspan=1>7M</td><td rowspan=1 colspan=2>120.7</td><td rowspan=1 colspan=1>114.5</td></tr><tr><td rowspan=1 colspan=1>66M</td><td rowspan=2 colspan=2>82.2=</td><td rowspan=2 colspan=1>78.477.473.4</td></tr><tr><td rowspan=1 colspan=1>66M19M</td></tr><tr><td rowspan=1 colspan=1>21M</td><td rowspan=1 colspan=2>72.4</td><td rowspan=1 colspan=1>78.9</td></tr><tr><td rowspan=1 colspan=1>51M=51M</td><td rowspan=1 colspan=2>1171.1</td><td rowspan=2 colspan=1>70.972.168.565.4</td></tr><tr><td rowspan=1 colspan=1>23M</td><td rowspan=1 colspan=2>67.9</td><td rowspan=1 colspan=1>9</td></tr><tr><td rowspan=1 colspan=1>54M24M</td><td rowspan=1 colspan=2>160.9</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>62.458.3</td></tr><tr><td rowspan=1 colspan=1>24M24M</td><td rowspan=1 colspan=2>60.760.0</td><td rowspan=1 colspan=1>58.857.3</td></tr><tr><td rowspan=1 colspan=5>Our system</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid AWD-LSTMw/o finetuneSharpened Sigmoid AWD-LSTMG²-LSTM w/o finetuneG²-LSTM</td><td rowspan=1 colspan=1>24M24M24M24M</td><td rowspan=1 colspan=2>61.659.960.458.5</td><td rowspan=1 colspan=1>59.457.558.256.1</td></tr><tr><td rowspan=1 colspan=5>+continuouscache pointerAWD-LSTM + continuous cache pointer (Merity et al.,2017) 24M 53.9 52.8Sharpened Sigmoid AWD-LSTM + continuous cache pointer 24M 53.9 53.2G2-LSTM + continuous cache pointer 24M 52.9 52.1</td></tr></table>",
|
| 644 |
+
"bbox": [
|
| 645 |
+
204,
|
| 646 |
+
127,
|
| 647 |
+
794,
|
| 648 |
+
474
|
| 649 |
+
],
|
| 650 |
+
"page_idx": 5
|
| 651 |
+
},
|
| 652 |
+
{
|
| 653 |
+
"type": "table",
|
| 654 |
+
"img_path": "images/e1f205f3ac4e8a9b876f643d8c808767308e36bd6df417bb2214f24a492d8f32.jpg",
|
| 655 |
+
"table_caption": [
|
| 656 |
+
"Table 2: Performance comparison on machine translation (BLEU) "
|
| 657 |
+
],
|
| 658 |
+
"table_footnote": [],
|
| 659 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>English→German task</td><td rowspan=1 colspan=1>BLEU</td><td rowspan=1 colspan=1>German→English task</td><td rowspan=1 colspan=1>BLEU</td></tr><tr><td rowspan=1 colspan=4>Existing end-to-end system</td></tr><tr><td rowspan=1 colspan=1>RNNSearch-LV (Jean et al., 2015)MRT (Shen et al., 2015)Global-att (Luong et al., 2015)GNMT (Wu et al., 2016)</td><td rowspan=1 colspan=1>19.4020.4520.9024.61</td><td rowspan=1 colspan=1>BSO(Wiseman & Rush,2016b)NMPT (Huang et al.)NMPT+LM (Huang et al.)ActorCritic (Bahdanau et al., 2016)</td><td rowspan=1 colspan=1>26.3628.9629.1628.53</td></tr><tr><td rowspan=1 colspan=4>Our end-to-end system</td></tr><tr><td rowspan=1 colspan=1>BaselineSharpened SigmoidG²-LSTM</td><td rowspan=1 colspan=1>21.8921.6422.43</td><td rowspan=1 colspan=1>11</td><td rowspan=1 colspan=1>31.0029.7331.95</td></tr></table>",
|
| 660 |
+
"bbox": [
|
| 661 |
+
186,
|
| 662 |
+
511,
|
| 663 |
+
812,
|
| 664 |
+
661
|
| 665 |
+
],
|
| 666 |
+
"page_idx": 5
|
| 667 |
+
},
|
| 668 |
+
{
|
| 669 |
+
"type": "text",
|
| 670 |
+
"text": "",
|
| 671 |
+
"bbox": [
|
| 672 |
+
176,
|
| 673 |
+
685,
|
| 674 |
+
821,
|
| 675 |
+
713
|
| 676 |
+
],
|
| 677 |
+
"page_idx": 5
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "text",
|
| 681 |
+
"text": "We followed the practice in (Merity et al., 2017) to set up the model architecture for LSTM: a stacked three-layer LSTM with drop-connect (Wan et al., 2013) on recurrent weights and a variant of averaged stochastic gradient descent (ASGD) (Polyak & Juditsky, 1992) for optimization. Our training code for $G ^ { 2 }$ -LSTM was also based on the code released by Merity et al. $( 2 0 1 7 ) ^ { 2 }$ . We found the temperature $\\tau$ used in $G ^ { 2 }$ -LSTM is not very sensitive. We set the temperature to 0.9 and followed all configurations in Merity et al. (2017). We added neural cache model (Grave et al., 2016) on the top of our trained language model to further improve the perplexity. ",
|
| 682 |
+
"bbox": [
|
| 683 |
+
174,
|
| 684 |
+
720,
|
| 685 |
+
825,
|
| 686 |
+
819
|
| 687 |
+
],
|
| 688 |
+
"page_idx": 5
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "text",
|
| 692 |
+
"text": "4.1.2 MACHINE TRANSLATION ",
|
| 693 |
+
"text_level": 1,
|
| 694 |
+
"bbox": [
|
| 695 |
+
176,
|
| 696 |
+
833,
|
| 697 |
+
401,
|
| 698 |
+
848
|
| 699 |
+
],
|
| 700 |
+
"page_idx": 5
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "text",
|
| 704 |
+
"text": "We used two datasets for experiments on neural machine translation (NMT): (1) IWSLT2014 German English translation dataset (Cettolo et al., 2014), widely adopted in machine learning community (Bahdanau et al., 2016; Wiseman & Rush, 2016a; Ranzato et al., 2015). The training/validation/test sets contains about $1 5 3 k / 7 k / 7 k$ sentence pairs respectively, with words preprocessed into sub-word units using byte pair encoding (BPE) (Sennrich et al., 2016). We chose $2 5 k$ most frequent sub-word units as vocabulary for both German and English. (2) English German translation dataset in WMT’14, which is also commonly used as a benchmark task to evaluate different NMT models (Bahdanau et al., 2014; Wu et al., 2016; Gehring et al., 2017). The training set contains 4.5M English German sentence pairs, Newstest 2014 is used as the test set, and the concatenation of Newstest 2012 and Newstest2013 is used as the validation set. Similarly, BPE was used to form a vocabulary of most frequent $3 0 k$ sub-word units for both language. In both datasets, we removed the sentences with more than 64 sub-word units in training. ",
|
| 705 |
+
"bbox": [
|
| 706 |
+
176,
|
| 707 |
+
858,
|
| 708 |
+
825,
|
| 709 |
+
900
|
| 710 |
+
],
|
| 711 |
+
"page_idx": 5
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "image",
|
| 715 |
+
"img_path": "images/8c00b72b96653a6f327dccfb1689261b52083211efe07c8094a5e1e7f9a72c64.jpg",
|
| 716 |
+
"image_caption": [
|
| 717 |
+
"Figure 2: Training/validation loss curves of language modeling and machine translation tasks. "
|
| 718 |
+
],
|
| 719 |
+
"image_footnote": [],
|
| 720 |
+
"bbox": [
|
| 721 |
+
194,
|
| 722 |
+
122,
|
| 723 |
+
800,
|
| 724 |
+
306
|
| 725 |
+
],
|
| 726 |
+
"page_idx": 6
|
| 727 |
+
},
|
| 728 |
+
{
|
| 729 |
+
"type": "text",
|
| 730 |
+
"text": "",
|
| 731 |
+
"bbox": [
|
| 732 |
+
173,
|
| 733 |
+
367,
|
| 734 |
+
825,
|
| 735 |
+
492
|
| 736 |
+
],
|
| 737 |
+
"page_idx": 6
|
| 738 |
+
},
|
| 739 |
+
{
|
| 740 |
+
"type": "text",
|
| 741 |
+
"text": "For German English dataset, we adopted a stacked two-layer encoder-decoder framework. We set the size of word embedding and hidden state to 256. As amount of data in the English German dataset is much larger, we adopted a stacked three-layer encoder-decoder framework and set the size of word embedding and hidden state to 512 and 1024 respectively. The first layer of the encoder was bi-directional. We also used dropout in training stacked LSTM as in (Zaremba et al., 2014), with dropout value determined via validation set performance. For both experiments, we set the temperature $\\tau$ for $G ^ { 2 }$ -LSTM to 0.9, which was the same as in the language model task. The minibatch size was 32/64 for German English/English German respectively. All models were trained with AdaDelta (Zeiler, 2012) on one M40 GPU. Both gradient clipping norms were set to 2.0. We used tokenized case-sensitive BLEU (Papineni et al., $2 \\bar { 0 } 0 2 ) ^ { 3 }$ as evaluation measure. The beam size is set to 5 during the inference step. ",
|
| 742 |
+
"bbox": [
|
| 743 |
+
173,
|
| 744 |
+
500,
|
| 745 |
+
825,
|
| 746 |
+
652
|
| 747 |
+
],
|
| 748 |
+
"page_idx": 6
|
| 749 |
+
},
|
| 750 |
+
{
|
| 751 |
+
"type": "text",
|
| 752 |
+
"text": "4.2 EXPERIMENTAL RESULTS ",
|
| 753 |
+
"text_level": 1,
|
| 754 |
+
"bbox": [
|
| 755 |
+
176,
|
| 756 |
+
675,
|
| 757 |
+
392,
|
| 758 |
+
689
|
| 759 |
+
],
|
| 760 |
+
"page_idx": 6
|
| 761 |
+
},
|
| 762 |
+
{
|
| 763 |
+
"type": "text",
|
| 764 |
+
"text": "The experimental results are shown in Table 1 and 2. ",
|
| 765 |
+
"bbox": [
|
| 766 |
+
176,
|
| 767 |
+
704,
|
| 768 |
+
516,
|
| 769 |
+
718
|
| 770 |
+
],
|
| 771 |
+
"page_idx": 6
|
| 772 |
+
},
|
| 773 |
+
{
|
| 774 |
+
"type": "text",
|
| 775 |
+
"text": "First, we compare our training method with two algorithms. For the first algorithm (we call it Baseline), we remove the Gumble-Softmax trick and train the model using standard optimization methods. For the second algorithm (we call it Sharpened Sigmoid), we use a sharpened sigmoid function as described in Section 3.2 by setting $\\tau = 0 . 2$ and check whether such trick can bring better generalization. From the results, we can see that our learnt models are better than all baseline models. In language modeling task, we outperform the baseline algorithms for $0 . 7 / 1 . 1$ points (1.2/1.4 points without continuous cache pointer) in terms of test perplexity. For machine translation, we outperform the baselines for $0 . 9 5 / 2 . 2 2$ and $0 . 5 4 / 0 . 7 9$ points in terms of BLEU score for German English and English German dataset respectively. Note that the only difference between $G ^ { 2 }$ -LSTM and the baselines is the training algorithm, while they adopt the same model structure. Thus, better results of $G ^ { 2 }$ -LSTM demonstrate the effectiveness of our proposed training method. ",
|
| 776 |
+
"bbox": [
|
| 777 |
+
174,
|
| 778 |
+
724,
|
| 779 |
+
825,
|
| 780 |
+
877
|
| 781 |
+
],
|
| 782 |
+
"page_idx": 6
|
| 783 |
+
},
|
| 784 |
+
{
|
| 785 |
+
"type": "text",
|
| 786 |
+
"text": "Second, training and validation loss curves of the baseline and $G ^ { 2 }$ -LSTM are shown in Fig. 2 for the two small tasks. Both curves show that the gap between training and validation is effectively reduced using our algorithm. As shown in Fig. 2(b), the baseline LSTM achieves its lowest validation loss around the 18th epoch and begins to overfit after that, while the validation loss of $G ^ { 2 }$ -LSTM still drops even in the 30th epoch. This clearly shows that $G ^ { 2 }$ -LSTM generalizes better. ",
|
| 787 |
+
"bbox": [
|
| 788 |
+
173,
|
| 789 |
+
103,
|
| 790 |
+
825,
|
| 791 |
+
174
|
| 792 |
+
],
|
| 793 |
+
"page_idx": 7
|
| 794 |
+
},
|
| 795 |
+
{
|
| 796 |
+
"type": "text",
|
| 797 |
+
"text": "Third, we also list the performance of previous works in literature, which may adopt different model architectures or settings. For language modeling, we obtain the best performance as far as we know. For German English translation, the two-layer stacked encoder-decoder model we learnt outperforms all previous works and achieves state-of-the-art performance. For English German translation, our result is worse than GNMT (Wu et al., 2016) as they used a stacked eight-layer LSTM encoder-decoder model while we only used a three-layer one. ",
|
| 798 |
+
"bbox": [
|
| 799 |
+
173,
|
| 800 |
+
180,
|
| 801 |
+
825,
|
| 802 |
+
265
|
| 803 |
+
],
|
| 804 |
+
"page_idx": 7
|
| 805 |
+
},
|
| 806 |
+
{
|
| 807 |
+
"type": "table",
|
| 808 |
+
"img_path": "images/64839d6329e36be1871e0db633756292b491c5476a27ff0037ca8ea6023cf9d2.jpg",
|
| 809 |
+
"table_caption": [
|
| 810 |
+
"Table 3: Model compression results on Penn Tree Bank dataset "
|
| 811 |
+
],
|
| 812 |
+
"table_footnote": [],
|
| 813 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>Round</td><td rowspan=1 colspan=1>Round & clip</td><td rowspan=1 colspan=1>SVD (rank = 128)</td><td rowspan=1 colspan=1>SVD (rank = 64)</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>52.8</td><td rowspan=1 colspan=1>53.2 (+0.4)</td><td rowspan=1 colspan=1>53.6 (+0.8)</td><td rowspan=1 colspan=1>56.6(+3.8)</td><td rowspan=1 colspan=1>65.5 (+12.7)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>53.2</td><td rowspan=1 colspan=1>53.5 (+0.3)</td><td rowspan=1 colspan=1>53.6 (+0.4)</td><td rowspan=1 colspan=1>54.6 (+1.4)</td><td rowspan=1 colspan=1>60.0 (+6.8)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>52.1</td><td rowspan=1 colspan=1>52.2 (+0.1)</td><td rowspan=1 colspan=1>52.8 (+0.7)</td><td rowspan=1 colspan=1>53.3 (+1.2)</td><td rowspan=1 colspan=1>56.0 (+3.9)</td></tr></table>",
|
| 814 |
+
"bbox": [
|
| 815 |
+
142,
|
| 816 |
+
303,
|
| 817 |
+
856,
|
| 818 |
+
366
|
| 819 |
+
],
|
| 820 |
+
"page_idx": 7
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
"type": "table",
|
| 824 |
+
"img_path": "images/2a694d1007a5d5dc0843a2a56c206cc6e64880925e277bb24070e7471089004d.jpg",
|
| 825 |
+
"table_caption": [
|
| 826 |
+
"Table 4: Model compression results on IWSLT German English dataset "
|
| 827 |
+
],
|
| 828 |
+
"table_footnote": [],
|
| 829 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>Round</td><td rowspan=1 colspan=1>Round & clip</td><td rowspan=1 colspan=1>SVD (rank = 32)</td><td rowspan=1 colspan=1>SVD (rank = 16)</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>31.00</td><td rowspan=1 colspan=1>28.65 (-2.35)</td><td rowspan=1 colspan=1>21.97 (-9.03)</td><td rowspan=1 colspan=1>30.52 (-0.48)</td><td rowspan=1 colspan=1>29.56 (-1.44)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>29.73</td><td rowspan=1 colspan=1>27.08 (-2.65)</td><td rowspan=1 colspan=1>25.14 (-4.59)</td><td rowspan=1 colspan=1>29.17 (-0.53)</td><td rowspan=1 colspan=1>28.82 (-0.91)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>31.95</td><td rowspan=1 colspan=1>31.44 (-0.51)</td><td rowspan=1 colspan=1>31.44 (-0.51)</td><td rowspan=1 colspan=1>31.62 (-0.33)</td><td rowspan=1 colspan=1>31.28 (-0.67)</td></tr></table>",
|
| 830 |
+
"bbox": [
|
| 831 |
+
142,
|
| 832 |
+
411,
|
| 833 |
+
857,
|
| 834 |
+
474
|
| 835 |
+
],
|
| 836 |
+
"page_idx": 7
|
| 837 |
+
},
|
| 838 |
+
{
|
| 839 |
+
"type": "table",
|
| 840 |
+
"img_path": "images/a84c327bc38c53f946f885c4184373f38d4ac32ff7a2e7e502e4aa0f1172440c.jpg",
|
| 841 |
+
"table_caption": [
|
| 842 |
+
"Table 5: Model compression results on WMT English German dataset "
|
| 843 |
+
],
|
| 844 |
+
"table_footnote": [],
|
| 845 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>Round</td><td rowspan=1 colspan=1>Round & clip</td><td rowspan=1 colspan=1>SVD (rank = 32)</td><td rowspan=1 colspan=1>SVD (rank = 16)</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>21.89</td><td rowspan=1 colspan=1>16.22 (-5.67)</td><td rowspan=1 colspan=1>16.03 (-5.86)</td><td rowspan=1 colspan=1>21.15 (-0.74)</td><td rowspan=1 colspan=1>19.99 (-1.90)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>21.64</td><td rowspan=1 colspan=1>16.85 (-4.79)</td><td rowspan=1 colspan=1>16.72 (-4.92)</td><td rowspan=1 colspan=1>20.98 (-0.66)</td><td rowspan=1 colspan=1>19.87 (-1.77)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>22.43</td><td rowspan=1 colspan=1>20.15 (-2.28)</td><td rowspan=1 colspan=1>20.29 (-2.14)</td><td rowspan=1 colspan=1>22.16 (-0.27)</td><td rowspan=1 colspan=1>21.84 (-0.51)</td></tr></table>",
|
| 846 |
+
"bbox": [
|
| 847 |
+
142,
|
| 848 |
+
520,
|
| 849 |
+
857,
|
| 850 |
+
583
|
| 851 |
+
],
|
| 852 |
+
"page_idx": 7
|
| 853 |
+
},
|
| 854 |
+
{
|
| 855 |
+
"type": "text",
|
| 856 |
+
"text": "4.3 SENSITIVITY ANALYSIS ",
|
| 857 |
+
"text_level": 1,
|
| 858 |
+
"bbox": [
|
| 859 |
+
174,
|
| 860 |
+
608,
|
| 861 |
+
382,
|
| 862 |
+
622
|
| 863 |
+
],
|
| 864 |
+
"page_idx": 7
|
| 865 |
+
},
|
| 866 |
+
{
|
| 867 |
+
"type": "text",
|
| 868 |
+
"text": "We conducted a set of experiments to test how sensitive our learnt models were if their gate parameters were compressed. We considered two ways of parameter compression. ",
|
| 869 |
+
"bbox": [
|
| 870 |
+
174,
|
| 871 |
+
633,
|
| 872 |
+
823,
|
| 873 |
+
661
|
| 874 |
+
],
|
| 875 |
+
"page_idx": 7
|
| 876 |
+
},
|
| 877 |
+
{
|
| 878 |
+
"type": "text",
|
| 879 |
+
"text": "Low-Precision Compression We compressed parameters in the input and forget gates to lower precision. Doing so the model can be compressed to a relatively small size. In particular, we applied round and clip operations to the parameters of the input and forget gates. ",
|
| 880 |
+
"bbox": [
|
| 881 |
+
173,
|
| 882 |
+
674,
|
| 883 |
+
825,
|
| 884 |
+
717
|
| 885 |
+
],
|
| 886 |
+
"page_idx": 7
|
| 887 |
+
},
|
| 888 |
+
{
|
| 889 |
+
"type": "equation",
|
| 890 |
+
"img_path": "images/e9eb7f3a538f7f01a6d74a60d5a179282ff561484c6c744f2bc303873e8c6e8d.jpg",
|
| 891 |
+
"text": "$$\n\\begin{array} { r c l } { { \\mathrm { r o u n d } _ { r } ( x ) } } & { { = } } & { { \\mathrm { r o u n d } ( x / r ) * r } } \\\\ { { \\mathrm { c l i p } _ { c } ( x ) } } & { { = } } & { { \\mathrm { c l i p } ( x , - c , c ) . } } \\end{array}\n$$",
|
| 892 |
+
"text_format": "latex",
|
| 893 |
+
"bbox": [
|
| 894 |
+
390,
|
| 895 |
+
723,
|
| 896 |
+
606,
|
| 897 |
+
761
|
| 898 |
+
],
|
| 899 |
+
"page_idx": 7
|
| 900 |
+
},
|
| 901 |
+
{
|
| 902 |
+
"type": "text",
|
| 903 |
+
"text": "We tested two settings of low-precision compression. In the first setting (named as Round), we rounded the parameters using Eqn (17). In this way, we reduced the support set of the parameters in the gates. In the second setting (named as Round & Clip), we further clipped the rounded value to a fixed range using Eqn (18) and thus restricted the number of different values. As the two tasks are far different, we set the round parameter $r = 0 . 2$ and the clip parameter $c = 0 . 4$ for the task of language modeling, and set $c = 1 . 0$ and $r = 0 . 5$ for neural machine translation. As a result, parameters of input gates and forget gates in language modeling can only take values from $( 0 . 0 , \\pm 0 . 2 , \\pm 0 . 4 )$ , and $( 0 . 0 , \\pm 0 . 5 , \\pm 1 . 0 )$ for machine translation. More comprehensive results on different choices of hyperparameters can be found in Appendix A. ",
|
| 904 |
+
"bbox": [
|
| 905 |
+
173,
|
| 906 |
+
765,
|
| 907 |
+
825,
|
| 908 |
+
891
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 7
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "Low-Rank Compression We compressed parameter matrices of the input/forget gates to lowerrank matrices through single value decomposition. Doing so can reduce model size and lead to faster matrix multiplication. Given that the hidden states of the task of language modeling were of much larger dimension than that of neural machine translation, we set $r a n k = 6 4 / 1 2 8$ for language modeling and $r a n k = 1 6 / 3 2$ for neural machine translation. ",
|
| 915 |
+
"bbox": [
|
| 916 |
+
173,
|
| 917 |
+
895,
|
| 918 |
+
823,
|
| 919 |
+
924
|
| 920 |
+
],
|
| 921 |
+
"page_idx": 7
|
| 922 |
+
},
|
| 923 |
+
{
|
| 924 |
+
"type": "text",
|
| 925 |
+
"text": "",
|
| 926 |
+
"bbox": [
|
| 927 |
+
176,
|
| 928 |
+
103,
|
| 929 |
+
825,
|
| 930 |
+
146
|
| 931 |
+
],
|
| 932 |
+
"page_idx": 8
|
| 933 |
+
},
|
| 934 |
+
{
|
| 935 |
+
"type": "text",
|
| 936 |
+
"text": "We summarize the results in Table 3-5. From Table 3, we can see that for language modeling both the baseline and our learnt model are quite robust to low-precision compression, but our model is much more robust and significantly outperforms the baseline with low-rank approximation. Even setting $r a n k = 6 4$ (roughly $1 2 \\mathbf { x }$ compression rate of the gates), we still get 56.0 perplexity, while the perplexity of the baseline model increases from 52.8 to 65.5, i.e., becoming $24 \\%$ worse. For machine translation, our proposed method is always better than the baseline model, no matter for low-precision or low-rank compression. Even if setting $r a n k = 1 6$ (roughly $8 \\mathrm { x } / 3 2 \\mathrm { x }$ compression rate of the gates for German English and English German respectively), we still get roughly comparable translation accuracy to the baseline model with full parameters. All results show that the models trained with our proposed method are less sensitive to parameter compression. ",
|
| 937 |
+
"bbox": [
|
| 938 |
+
173,
|
| 939 |
+
156,
|
| 940 |
+
825,
|
| 941 |
+
296
|
| 942 |
+
],
|
| 943 |
+
"page_idx": 8
|
| 944 |
+
},
|
| 945 |
+
{
|
| 946 |
+
"type": "image",
|
| 947 |
+
"img_path": "images/827cbcec5a440cfbb88ce86ffba58d5d4055d7e1c021ad9850e45f1387e41fad.jpg",
|
| 948 |
+
"image_caption": [
|
| 949 |
+
"Figure 3: Distributions of gate values in LSTM. "
|
| 950 |
+
],
|
| 951 |
+
"image_footnote": [],
|
| 952 |
+
"bbox": [
|
| 953 |
+
183,
|
| 954 |
+
310,
|
| 955 |
+
825,
|
| 956 |
+
513
|
| 957 |
+
],
|
| 958 |
+
"page_idx": 8
|
| 959 |
+
},
|
| 960 |
+
{
|
| 961 |
+
"type": "image",
|
| 962 |
+
"img_path": "images/cac0b177bbd347dc9773534615083c24ee67c90ed855c51349e3b6a6d4dfd6be.jpg",
|
| 963 |
+
"image_caption": [
|
| 964 |
+
"Figure 4: Distributions of gate values in $G ^ { 2 }$ -LSTM. "
|
| 965 |
+
],
|
| 966 |
+
"image_footnote": [],
|
| 967 |
+
"bbox": [
|
| 968 |
+
184,
|
| 969 |
+
570,
|
| 970 |
+
823,
|
| 971 |
+
775
|
| 972 |
+
],
|
| 973 |
+
"page_idx": 8
|
| 974 |
+
},
|
| 975 |
+
{
|
| 976 |
+
"type": "text",
|
| 977 |
+
"text": "4.4 VISUALIZATION OF THE GATES ",
|
| 978 |
+
"text_level": 1,
|
| 979 |
+
"bbox": [
|
| 980 |
+
176,
|
| 981 |
+
834,
|
| 982 |
+
431,
|
| 983 |
+
848
|
| 984 |
+
],
|
| 985 |
+
"page_idx": 8
|
| 986 |
+
},
|
| 987 |
+
{
|
| 988 |
+
"type": "text",
|
| 989 |
+
"text": "In addition to compare the final accuracy in previous two subsections, we further look inside the learnt models and check the values of the gates. ",
|
| 990 |
+
"bbox": [
|
| 991 |
+
173,
|
| 992 |
+
859,
|
| 993 |
+
825,
|
| 994 |
+
888
|
| 995 |
+
],
|
| 996 |
+
"page_idx": 8
|
| 997 |
+
},
|
| 998 |
+
{
|
| 999 |
+
"type": "text",
|
| 1000 |
+
"text": "To well verify the effectiveness of our proposed $G ^ { 2 }$ -LSTM, we did a set of experiments to show the values of gates we have learnt are near the boundary and are reasonable, based on the model learnt from German English translation task. We show the value distribution of the gates trained using classic LSTM and $\\bar { G } ^ { 2 }$ -LSTM. To achieve this, we sampled 10000 sentence pairs from the training set of German English and fed them into the learnt models. We got the output value vectors of the input/forget gates in both the encoder and decoder. We recorded the value of each element in the output vectors and plotted the value distributions in Figure 3 and Figure 4. ",
|
| 1001 |
+
"bbox": [
|
| 1002 |
+
174,
|
| 1003 |
+
895,
|
| 1004 |
+
823,
|
| 1005 |
+
924
|
| 1006 |
+
],
|
| 1007 |
+
"page_idx": 8
|
| 1008 |
+
},
|
| 1009 |
+
{
|
| 1010 |
+
"type": "image",
|
| 1011 |
+
"img_path": "images/04f4cc9312847141e9ebb45844cfb2dfcb66a67bbfa7d354ec0b87316d8f6a5f.jpg",
|
| 1012 |
+
"image_caption": [
|
| 1013 |
+
"Figure 5: Visualization of gate values. "
|
| 1014 |
+
],
|
| 1015 |
+
"image_footnote": [],
|
| 1016 |
+
"bbox": [
|
| 1017 |
+
204,
|
| 1018 |
+
114,
|
| 1019 |
+
767,
|
| 1020 |
+
273
|
| 1021 |
+
],
|
| 1022 |
+
"page_idx": 9
|
| 1023 |
+
},
|
| 1024 |
+
{
|
| 1025 |
+
"type": "text",
|
| 1026 |
+
"text": "",
|
| 1027 |
+
"bbox": [
|
| 1028 |
+
174,
|
| 1029 |
+
353,
|
| 1030 |
+
825,
|
| 1031 |
+
424
|
| 1032 |
+
],
|
| 1033 |
+
"page_idx": 9
|
| 1034 |
+
},
|
| 1035 |
+
{
|
| 1036 |
+
"type": "text",
|
| 1037 |
+
"text": "From the figures, we can see that although both LSTM and $G ^ { 2 }$ -LSTM work reasonably well in practice, the output values of the gates are very different. In LSTM, the distributions of the gate values are relatively uniform and have no clear concentration. In contrast, the values of the input gates of $G ^ { 2 }$ -LSTM are concentrated in the region close to 1, which suggests that our learnt model tries to keep most information from the input words; the values of the forget gates are concentrated in the boundary regions (i.e., either the region close to 0 or the region close to 1). This observation shows that our training algorithm meets our expectation and successfully pushes the gates to $_ { 0 / 1 }$ . ",
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
174,
|
| 1040 |
+
431,
|
| 1041 |
+
825,
|
| 1042 |
+
529
|
| 1043 |
+
],
|
| 1044 |
+
"page_idx": 9
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "text",
|
| 1048 |
+
"text": "Besides the overall distribution of gate values over a sampled set of training data, here we provide a case study for a sampled sentence. As it is hard to go deep into individual dimensions of a hidden state, we just calculated the average value of the output vector of the input and forget gate functions for each word. In particular, for each word, we focused on the average value of input/forget gate functions in the first layer and check whether the average is reasonable. We plot the heatmap of the English sentence part in Figure 5. More visualizations can be found in Appendix B. First, we can see that our $G ^ { 2 }$ -LSTM does not drop information in the input gate function, since the average values are relatively large for all words. In contrast, the average values of the input gates of LSTM are sometimes small (less than 0.5), even for the meaningful word like “data”. As those words are not included into LSTM, they cannot be effectively encoded and decoded, thus lead to bad translation result. Second, for $G ^ { 2 }$ -LSTM, most of the words with small values for forget gates are function words (e.g., conjunctions and punctuations) or the boundaries in clauses. That is, our training algorithm indeed ensures the model to forget information on the boundaries inside the sentences, and reset the hidden states with new inputs. ",
|
| 1049 |
+
"bbox": [
|
| 1050 |
+
174,
|
| 1051 |
+
535,
|
| 1052 |
+
825,
|
| 1053 |
+
728
|
| 1054 |
+
],
|
| 1055 |
+
"page_idx": 9
|
| 1056 |
+
},
|
| 1057 |
+
{
|
| 1058 |
+
"type": "text",
|
| 1059 |
+
"text": "5 CONCLUSION AND FUTURE WORK ",
|
| 1060 |
+
"text_level": 1,
|
| 1061 |
+
"bbox": [
|
| 1062 |
+
176,
|
| 1063 |
+
756,
|
| 1064 |
+
495,
|
| 1065 |
+
772
|
| 1066 |
+
],
|
| 1067 |
+
"page_idx": 9
|
| 1068 |
+
},
|
| 1069 |
+
{
|
| 1070 |
+
"type": "text",
|
| 1071 |
+
"text": "In this paper, we have designed a new training algorithm for LSTM by leveraging the recently developed Gumbel-Softmax trick. Our training algorithm can push the values of the input and forget gates to 0 or 1, leading to robust LSTM models. Experiments on language modeling and machine translation have demonstrated the effectiveness of the proposed training algorithm. ",
|
| 1072 |
+
"bbox": [
|
| 1073 |
+
174,
|
| 1074 |
+
791,
|
| 1075 |
+
823,
|
| 1076 |
+
847
|
| 1077 |
+
],
|
| 1078 |
+
"page_idx": 9
|
| 1079 |
+
},
|
| 1080 |
+
{
|
| 1081 |
+
"type": "text",
|
| 1082 |
+
"text": "We will explore following directions in the future. First, we have only tested with shallow LSTM models in this paper. We will apply our algorithm to deeper models (e.g., $^ { 8 + }$ layers) and test on larger datasets. Second, we have considered the tasks of language modeling and machine translation. We will study more applications such as question answering and text summarization. Third, we are cleaning and refactoring the code and will release the training code to public soon. ",
|
| 1083 |
+
"bbox": [
|
| 1084 |
+
176,
|
| 1085 |
+
854,
|
| 1086 |
+
823,
|
| 1087 |
+
924
|
| 1088 |
+
],
|
| 1089 |
+
"page_idx": 9
|
| 1090 |
+
},
|
| 1091 |
+
{
|
| 1092 |
+
"type": "text",
|
| 1093 |
+
"text": "REFERENCES ",
|
| 1094 |
+
"text_level": 1,
|
| 1095 |
+
"bbox": [
|
| 1096 |
+
174,
|
| 1097 |
+
103,
|
| 1098 |
+
287,
|
| 1099 |
+
118
|
| 1100 |
+
],
|
| 1101 |
+
"page_idx": 10
|
| 1102 |
+
},
|
| 1103 |
+
{
|
| 1104 |
+
"type": "text",
|
| 1105 |
+
"text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. ",
|
| 1106 |
+
"bbox": [
|
| 1107 |
+
174,
|
| 1108 |
+
126,
|
| 1109 |
+
823,
|
| 1110 |
+
155
|
| 1111 |
+
],
|
| 1112 |
+
"page_idx": 10
|
| 1113 |
+
},
|
| 1114 |
+
{
|
| 1115 |
+
"type": "text",
|
| 1116 |
+
"text": "Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron Courville, and Yoshua Bengio. An actor-critic algorithm for sequence prediction. arXiv preprint arXiv:1607.07086, 2016. ",
|
| 1117 |
+
"bbox": [
|
| 1118 |
+
176,
|
| 1119 |
+
162,
|
| 1120 |
+
823,
|
| 1121 |
+
205
|
| 1122 |
+
],
|
| 1123 |
+
"page_idx": 10
|
| 1124 |
+
},
|
| 1125 |
+
{
|
| 1126 |
+
"type": "text",
|
| 1127 |
+
"text": "Denny Britz, Anna Goldie, Thang Luong, and Quoc Le. Massive exploration of neural machine translation architectures. arXiv preprint arXiv:1703.03906, 2017. ",
|
| 1128 |
+
"bbox": [
|
| 1129 |
+
169,
|
| 1130 |
+
213,
|
| 1131 |
+
823,
|
| 1132 |
+
243
|
| 1133 |
+
],
|
| 1134 |
+
"page_idx": 10
|
| 1135 |
+
},
|
| 1136 |
+
{
|
| 1137 |
+
"type": "text",
|
| 1138 |
+
"text": "Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, and Marcello Federico. Report on ¨ the 11th iwslt evaluation campaign, iwslt 2014. In Proceedings of the International Workshop on Spoken Language Translation, Hanoi, Vietnam, 2014. ",
|
| 1139 |
+
"bbox": [
|
| 1140 |
+
176,
|
| 1141 |
+
251,
|
| 1142 |
+
821,
|
| 1143 |
+
295
|
| 1144 |
+
],
|
| 1145 |
+
"page_idx": 10
|
| 1146 |
+
},
|
| 1147 |
+
{
|
| 1148 |
+
"type": "text",
|
| 1149 |
+
"text": "Pratik Chaudhari, Anna Choromanska, Stefano Soatto, and Yann LeCun. Entropy-sgd: Biasing gradient descent into wide valleys. arXiv preprint arXiv:1611.01838, 2016. ",
|
| 1150 |
+
"bbox": [
|
| 1151 |
+
173,
|
| 1152 |
+
303,
|
| 1153 |
+
823,
|
| 1154 |
+
332
|
| 1155 |
+
],
|
| 1156 |
+
"page_idx": 10
|
| 1157 |
+
},
|
| 1158 |
+
{
|
| 1159 |
+
"type": "text",
|
| 1160 |
+
"text": "Yarin Gal and Zoubin Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in neural information processing systems, pp. 1019–1027, 2016. ",
|
| 1161 |
+
"bbox": [
|
| 1162 |
+
171,
|
| 1163 |
+
339,
|
| 1164 |
+
821,
|
| 1165 |
+
369
|
| 1166 |
+
],
|
| 1167 |
+
"page_idx": 10
|
| 1168 |
+
},
|
| 1169 |
+
{
|
| 1170 |
+
"type": "text",
|
| 1171 |
+
"text": "Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional sequence to sequence learning. arXiv preprint arXiv:1705.03122, 2017. ",
|
| 1172 |
+
"bbox": [
|
| 1173 |
+
171,
|
| 1174 |
+
377,
|
| 1175 |
+
823,
|
| 1176 |
+
406
|
| 1177 |
+
],
|
| 1178 |
+
"page_idx": 10
|
| 1179 |
+
},
|
| 1180 |
+
{
|
| 1181 |
+
"type": "text",
|
| 1182 |
+
"text": "Felix A Gers, Jurgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction ¨ with lstm. 1999. ",
|
| 1183 |
+
"bbox": [
|
| 1184 |
+
173,
|
| 1185 |
+
415,
|
| 1186 |
+
823,
|
| 1187 |
+
444
|
| 1188 |
+
],
|
| 1189 |
+
"page_idx": 10
|
| 1190 |
+
},
|
| 1191 |
+
{
|
| 1192 |
+
"type": "text",
|
| 1193 |
+
"text": "Edouard Grave, Armand Joulin, and Nicolas Usunier. Improving neural language models with a continuous cache. arXiv preprint arXiv:1612.04426, 2016. ",
|
| 1194 |
+
"bbox": [
|
| 1195 |
+
171,
|
| 1196 |
+
452,
|
| 1197 |
+
823,
|
| 1198 |
+
481
|
| 1199 |
+
],
|
| 1200 |
+
"page_idx": 10
|
| 1201 |
+
},
|
| 1202 |
+
{
|
| 1203 |
+
"type": "text",
|
| 1204 |
+
"text": "David Haussler, Manfred Opper, et al. Mutual information, metric entropy and cumulative relative entropy risk. The Annals of Statistics, 25(6):2451–2492, 1997. ",
|
| 1205 |
+
"bbox": [
|
| 1206 |
+
173,
|
| 1207 |
+
489,
|
| 1208 |
+
823,
|
| 1209 |
+
518
|
| 1210 |
+
],
|
| 1211 |
+
"page_idx": 10
|
| 1212 |
+
},
|
| 1213 |
+
{
|
| 1214 |
+
"type": "text",
|
| 1215 |
+
"text": "Sepp Hochreiter. The vanishing gradient problem during learning recurrent neural nets and problem solutions. International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, 6(02): 107–116, 1998. ",
|
| 1216 |
+
"bbox": [
|
| 1217 |
+
176,
|
| 1218 |
+
526,
|
| 1219 |
+
821,
|
| 1220 |
+
569
|
| 1221 |
+
],
|
| 1222 |
+
"page_idx": 10
|
| 1223 |
+
},
|
| 1224 |
+
{
|
| 1225 |
+
"type": "text",
|
| 1226 |
+
"text": "Sepp Hochreiter and Jurgen Schmidhuber. Flat minima. ¨ Neural Computation, 9(1):1–42, 1997a. ",
|
| 1227 |
+
"bbox": [
|
| 1228 |
+
173,
|
| 1229 |
+
578,
|
| 1230 |
+
805,
|
| 1231 |
+
593
|
| 1232 |
+
],
|
| 1233 |
+
"page_idx": 10
|
| 1234 |
+
},
|
| 1235 |
+
{
|
| 1236 |
+
"type": "text",
|
| 1237 |
+
"text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997b. ",
|
| 1238 |
+
"bbox": [
|
| 1239 |
+
171,
|
| 1240 |
+
602,
|
| 1241 |
+
823,
|
| 1242 |
+
631
|
| 1243 |
+
],
|
| 1244 |
+
"page_idx": 10
|
| 1245 |
+
},
|
| 1246 |
+
{
|
| 1247 |
+
"type": "text",
|
| 1248 |
+
"text": "Po-Sen Huang, Chong Wang, Dengyong Zhou, and Li Deng. Toward neural phrase-based machine translation. ",
|
| 1249 |
+
"bbox": [
|
| 1250 |
+
173,
|
| 1251 |
+
638,
|
| 1252 |
+
823,
|
| 1253 |
+
667
|
| 1254 |
+
],
|
| 1255 |
+
"page_idx": 10
|
| 1256 |
+
},
|
| 1257 |
+
{
|
| 1258 |
+
"type": "text",
|
| 1259 |
+
"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. ",
|
| 1260 |
+
"bbox": [
|
| 1261 |
+
169,
|
| 1262 |
+
676,
|
| 1263 |
+
823,
|
| 1264 |
+
705
|
| 1265 |
+
],
|
| 1266 |
+
"page_idx": 10
|
| 1267 |
+
},
|
| 1268 |
+
{
|
| 1269 |
+
"type": "text",
|
| 1270 |
+
"text": "Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. ",
|
| 1271 |
+
"bbox": [
|
| 1272 |
+
171,
|
| 1273 |
+
713,
|
| 1274 |
+
823,
|
| 1275 |
+
743
|
| 1276 |
+
],
|
| 1277 |
+
"page_idx": 10
|
| 1278 |
+
},
|
| 1279 |
+
{
|
| 1280 |
+
"type": "text",
|
| 1281 |
+
"text": "Sebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On using very large ´ target vocabulary for neural machine translation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1–10, Beijing, China, July 2015. Association for Computational Linguistics. URL http://www.aclweb.org/anthology/ P15-1001. ",
|
| 1282 |
+
"bbox": [
|
| 1283 |
+
174,
|
| 1284 |
+
751,
|
| 1285 |
+
825,
|
| 1286 |
+
835
|
| 1287 |
+
],
|
| 1288 |
+
"page_idx": 10
|
| 1289 |
+
},
|
| 1290 |
+
{
|
| 1291 |
+
"type": "text",
|
| 1292 |
+
"text": "Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016. ",
|
| 1293 |
+
"bbox": [
|
| 1294 |
+
174,
|
| 1295 |
+
843,
|
| 1296 |
+
821,
|
| 1297 |
+
873
|
| 1298 |
+
],
|
| 1299 |
+
"page_idx": 10
|
| 1300 |
+
},
|
| 1301 |
+
{
|
| 1302 |
+
"type": "text",
|
| 1303 |
+
"text": "Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv preprint arXiv:1609.04836, 2016. ",
|
| 1304 |
+
"bbox": [
|
| 1305 |
+
176,
|
| 1306 |
+
881,
|
| 1307 |
+
823,
|
| 1308 |
+
924
|
| 1309 |
+
],
|
| 1310 |
+
"page_idx": 10
|
| 1311 |
+
},
|
| 1312 |
+
{
|
| 1313 |
+
"type": "text",
|
| 1314 |
+
"text": "Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. Character-aware neural language models. In AAAI, pp. 2741–2749, 2016. ",
|
| 1315 |
+
"bbox": [
|
| 1316 |
+
171,
|
| 1317 |
+
103,
|
| 1318 |
+
823,
|
| 1319 |
+
132
|
| 1320 |
+
],
|
| 1321 |
+
"page_idx": 11
|
| 1322 |
+
},
|
| 1323 |
+
{
|
| 1324 |
+
"type": "text",
|
| 1325 |
+
"text": "David Krueger, Tegan Maharaj, Janos Kramar, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary Ke, Anirudh Goyal, Yoshua Bengio, Aaron Courville, and Christopher Pal. Zoneout: Regularizing rnns by randomly preserving hidden activations. 2016. ",
|
| 1326 |
+
"bbox": [
|
| 1327 |
+
176,
|
| 1328 |
+
141,
|
| 1329 |
+
821,
|
| 1330 |
+
185
|
| 1331 |
+
],
|
| 1332 |
+
"page_idx": 11
|
| 1333 |
+
},
|
| 1334 |
+
{
|
| 1335 |
+
"type": "text",
|
| 1336 |
+
"text": "Matt J Kusner and Jose Miguel Hern ´ andez-Lobato. Gans for sequences of discrete elements with ´ the gumbel-softmax distribution. arXiv preprint arXiv:1611.04051, 2016. ",
|
| 1337 |
+
"bbox": [
|
| 1338 |
+
173,
|
| 1339 |
+
194,
|
| 1340 |
+
823,
|
| 1341 |
+
223
|
| 1342 |
+
],
|
| 1343 |
+
"page_idx": 11
|
| 1344 |
+
},
|
| 1345 |
+
{
|
| 1346 |
+
"type": "text",
|
| 1347 |
+
"text": "Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. arXiv preprint arXiv:1508.04025, 2015. ",
|
| 1348 |
+
"bbox": [
|
| 1349 |
+
174,
|
| 1350 |
+
233,
|
| 1351 |
+
821,
|
| 1352 |
+
262
|
| 1353 |
+
],
|
| 1354 |
+
"page_idx": 11
|
| 1355 |
+
},
|
| 1356 |
+
{
|
| 1357 |
+
"type": "text",
|
| 1358 |
+
"text": "Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016. ",
|
| 1359 |
+
"bbox": [
|
| 1360 |
+
173,
|
| 1361 |
+
272,
|
| 1362 |
+
821,
|
| 1363 |
+
301
|
| 1364 |
+
],
|
| 1365 |
+
"page_idx": 11
|
| 1366 |
+
},
|
| 1367 |
+
{
|
| 1368 |
+
"type": "text",
|
| 1369 |
+
"text": "Gabor Melis, Chris Dyer, and Phil Blunsom. On the state of the art of evaluation in neural language ´ models. arXiv preprint arXiv:1707.05589, 2017. ",
|
| 1370 |
+
"bbox": [
|
| 1371 |
+
174,
|
| 1372 |
+
310,
|
| 1373 |
+
823,
|
| 1374 |
+
340
|
| 1375 |
+
],
|
| 1376 |
+
"page_idx": 11
|
| 1377 |
+
},
|
| 1378 |
+
{
|
| 1379 |
+
"type": "text",
|
| 1380 |
+
"text": "Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016. ",
|
| 1381 |
+
"bbox": [
|
| 1382 |
+
176,
|
| 1383 |
+
349,
|
| 1384 |
+
823,
|
| 1385 |
+
378
|
| 1386 |
+
],
|
| 1387 |
+
"page_idx": 11
|
| 1388 |
+
},
|
| 1389 |
+
{
|
| 1390 |
+
"type": "text",
|
| 1391 |
+
"text": "Stephen Merity, Nitish Shirish Keskar, and Richard Socher. Regularizing and optimizing lstm language models. arXiv preprint arXiv:1708.02182, 2017. ",
|
| 1392 |
+
"bbox": [
|
| 1393 |
+
173,
|
| 1394 |
+
387,
|
| 1395 |
+
823,
|
| 1396 |
+
417
|
| 1397 |
+
],
|
| 1398 |
+
"page_idx": 11
|
| 1399 |
+
},
|
| 1400 |
+
{
|
| 1401 |
+
"type": "text",
|
| 1402 |
+
"text": "Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pp. 311–318. Association for Computational Linguistics, 2002. ",
|
| 1403 |
+
"bbox": [
|
| 1404 |
+
176,
|
| 1405 |
+
426,
|
| 1406 |
+
823,
|
| 1407 |
+
470
|
| 1408 |
+
],
|
| 1409 |
+
"page_idx": 11
|
| 1410 |
+
},
|
| 1411 |
+
{
|
| 1412 |
+
"type": "text",
|
| 1413 |
+
"text": "Boris T Polyak and Anatoli B Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992. ",
|
| 1414 |
+
"bbox": [
|
| 1415 |
+
171,
|
| 1416 |
+
479,
|
| 1417 |
+
821,
|
| 1418 |
+
508
|
| 1419 |
+
],
|
| 1420 |
+
"page_idx": 11
|
| 1421 |
+
},
|
| 1422 |
+
{
|
| 1423 |
+
"type": "text",
|
| 1424 |
+
"text": "Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015. ",
|
| 1425 |
+
"bbox": [
|
| 1426 |
+
171,
|
| 1427 |
+
518,
|
| 1428 |
+
823,
|
| 1429 |
+
547
|
| 1430 |
+
],
|
| 1431 |
+
"page_idx": 11
|
| 1432 |
+
},
|
| 1433 |
+
{
|
| 1434 |
+
"type": "text",
|
| 1435 |
+
"text": "Stanislau Semeniuta, Aliaksei Severyn, and Erhardt Barth. Recurrent dropout without memory loss. arXiv preprint arXiv:1603.05118, 2016. ",
|
| 1436 |
+
"bbox": [
|
| 1437 |
+
173,
|
| 1438 |
+
556,
|
| 1439 |
+
820,
|
| 1440 |
+
587
|
| 1441 |
+
],
|
| 1442 |
+
"page_idx": 11
|
| 1443 |
+
},
|
| 1444 |
+
{
|
| 1445 |
+
"type": "text",
|
| 1446 |
+
"text": "Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In ACL, 2016. ",
|
| 1447 |
+
"bbox": [
|
| 1448 |
+
173,
|
| 1449 |
+
595,
|
| 1450 |
+
821,
|
| 1451 |
+
626
|
| 1452 |
+
],
|
| 1453 |
+
"page_idx": 11
|
| 1454 |
+
},
|
| 1455 |
+
{
|
| 1456 |
+
"type": "text",
|
| 1457 |
+
"text": "Shiqi Shen, Yong Cheng, Zhongjun He, Wei He, Hua Wu, Maosong Sun, and Yang Liu. Minimum risk training for neural machine translation. arXiv preprint arXiv:1512.02433, 2015. ",
|
| 1458 |
+
"bbox": [
|
| 1459 |
+
173,
|
| 1460 |
+
633,
|
| 1461 |
+
821,
|
| 1462 |
+
664
|
| 1463 |
+
],
|
| 1464 |
+
"page_idx": 11
|
| 1465 |
+
},
|
| 1466 |
+
{
|
| 1467 |
+
"type": "text",
|
| 1468 |
+
"text": "Sandeep Subramanian, Sai Rajeswar, Francis Dutil, Christopher Pal, and Aaron Courville. Adversarial generation of natural language. ACL 2017, pp. 241, 2017. ",
|
| 1469 |
+
"bbox": [
|
| 1470 |
+
173,
|
| 1471 |
+
672,
|
| 1472 |
+
821,
|
| 1473 |
+
703
|
| 1474 |
+
],
|
| 1475 |
+
"page_idx": 11
|
| 1476 |
+
},
|
| 1477 |
+
{
|
| 1478 |
+
"type": "text",
|
| 1479 |
+
"text": "Ruben Villegas, Jimei Yang, Yuliang Zou, Sungryull Sohn, Xunyu Lin, and Honglak Lee. Learning to generate long-term future via hierarchical prediction. arXiv preprint arXiv:1704.05831, 2017. ",
|
| 1480 |
+
"bbox": [
|
| 1481 |
+
173,
|
| 1482 |
+
712,
|
| 1483 |
+
823,
|
| 1484 |
+
742
|
| 1485 |
+
],
|
| 1486 |
+
"page_idx": 11
|
| 1487 |
+
},
|
| 1488 |
+
{
|
| 1489 |
+
"type": "text",
|
| 1490 |
+
"text": "Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3156–3164, 2015. ",
|
| 1491 |
+
"bbox": [
|
| 1492 |
+
176,
|
| 1493 |
+
751,
|
| 1494 |
+
823,
|
| 1495 |
+
794
|
| 1496 |
+
],
|
| 1497 |
+
"page_idx": 11
|
| 1498 |
+
},
|
| 1499 |
+
{
|
| 1500 |
+
"type": "text",
|
| 1501 |
+
"text": "Li Wan, Matthew Zeiler, Sixin Zhang, Yann Le Cun, and Rob Fergus. Regularization of neural networks using dropconnect. In International Conference on Machine Learning, pp. 1058–1066, 2013. ",
|
| 1502 |
+
"bbox": [
|
| 1503 |
+
174,
|
| 1504 |
+
803,
|
| 1505 |
+
823,
|
| 1506 |
+
847
|
| 1507 |
+
],
|
| 1508 |
+
"page_idx": 11
|
| 1509 |
+
},
|
| 1510 |
+
{
|
| 1511 |
+
"type": "text",
|
| 1512 |
+
"text": "Sam Wiseman and Alexander M. Rush. Sequence-to-sequence learning as beam-search optimization. In EMNLP, November 2016a. ",
|
| 1513 |
+
"bbox": [
|
| 1514 |
+
171,
|
| 1515 |
+
856,
|
| 1516 |
+
823,
|
| 1517 |
+
886
|
| 1518 |
+
],
|
| 1519 |
+
"page_idx": 11
|
| 1520 |
+
},
|
| 1521 |
+
{
|
| 1522 |
+
"type": "text",
|
| 1523 |
+
"text": "Sam Wiseman and Alexander M Rush. Sequence-to-sequence learning as beam-search optimization. arXiv preprint arXiv:1606.02960, 2016b. ",
|
| 1524 |
+
"bbox": [
|
| 1525 |
+
176,
|
| 1526 |
+
895,
|
| 1527 |
+
820,
|
| 1528 |
+
924
|
| 1529 |
+
],
|
| 1530 |
+
"page_idx": 11
|
| 1531 |
+
},
|
| 1532 |
+
{
|
| 1533 |
+
"type": "text",
|
| 1534 |
+
"text": "Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. ",
|
| 1535 |
+
"bbox": [
|
| 1536 |
+
174,
|
| 1537 |
+
103,
|
| 1538 |
+
825,
|
| 1539 |
+
160
|
| 1540 |
+
],
|
| 1541 |
+
"page_idx": 12
|
| 1542 |
+
},
|
| 1543 |
+
{
|
| 1544 |
+
"type": "text",
|
| 1545 |
+
"text": "Shi Xingjian, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Convolutional lstm network: A machine learning approach for precipitation nowcasting. In Advances in neural information processing systems, pp. 802–810, 2015. ",
|
| 1546 |
+
"bbox": [
|
| 1547 |
+
176,
|
| 1548 |
+
167,
|
| 1549 |
+
821,
|
| 1550 |
+
212
|
| 1551 |
+
],
|
| 1552 |
+
"page_idx": 12
|
| 1553 |
+
},
|
| 1554 |
+
{
|
| 1555 |
+
"type": "text",
|
| 1556 |
+
"text": "Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International Conference on Machine Learning, pp. 2048–2057, 2015. ",
|
| 1557 |
+
"bbox": [
|
| 1558 |
+
174,
|
| 1559 |
+
219,
|
| 1560 |
+
823,
|
| 1561 |
+
263
|
| 1562 |
+
],
|
| 1563 |
+
"page_idx": 12
|
| 1564 |
+
},
|
| 1565 |
+
{
|
| 1566 |
+
"type": "text",
|
| 1567 |
+
"text": "Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. ",
|
| 1568 |
+
"bbox": [
|
| 1569 |
+
173,
|
| 1570 |
+
271,
|
| 1571 |
+
821,
|
| 1572 |
+
300
|
| 1573 |
+
],
|
| 1574 |
+
"page_idx": 12
|
| 1575 |
+
},
|
| 1576 |
+
{
|
| 1577 |
+
"type": "text",
|
| 1578 |
+
"text": "Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. ",
|
| 1579 |
+
"bbox": [
|
| 1580 |
+
173,
|
| 1581 |
+
309,
|
| 1582 |
+
821,
|
| 1583 |
+
338
|
| 1584 |
+
],
|
| 1585 |
+
"page_idx": 12
|
| 1586 |
+
},
|
| 1587 |
+
{
|
| 1588 |
+
"type": "text",
|
| 1589 |
+
"text": "Yu Zhang, Guoguo Chen, Dong Yu, Kaisheng Yaco, Sanjeev Khudanpur, and James Glass. Highway long short-term memory rnns for distant speech recognition. In Acoustics, Speech and Signal Processing (ICASSP), 2016 IEEE International Conference on, pp. 5755–5759. IEEE, 2016. ",
|
| 1590 |
+
"bbox": [
|
| 1591 |
+
174,
|
| 1592 |
+
347,
|
| 1593 |
+
823,
|
| 1594 |
+
390
|
| 1595 |
+
],
|
| 1596 |
+
"page_idx": 12
|
| 1597 |
+
},
|
| 1598 |
+
{
|
| 1599 |
+
"type": "text",
|
| 1600 |
+
"text": "Julian Georg Zilly, Rupesh Kumar Srivastava, Jan Koutn´ık, and Jurgen Schmidhuber. Recurrent ¨ highway networks. arXiv preprint arXiv:1607.03474, 2016. ",
|
| 1601 |
+
"bbox": [
|
| 1602 |
+
171,
|
| 1603 |
+
398,
|
| 1604 |
+
823,
|
| 1605 |
+
428
|
| 1606 |
+
],
|
| 1607 |
+
"page_idx": 12
|
| 1608 |
+
},
|
| 1609 |
+
{
|
| 1610 |
+
"type": "text",
|
| 1611 |
+
"text": "Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. ",
|
| 1612 |
+
"bbox": [
|
| 1613 |
+
173,
|
| 1614 |
+
436,
|
| 1615 |
+
823,
|
| 1616 |
+
465
|
| 1617 |
+
],
|
| 1618 |
+
"page_idx": 12
|
| 1619 |
+
},
|
| 1620 |
+
{
|
| 1621 |
+
"type": "text",
|
| 1622 |
+
"text": "A EXTRA EXPERIMENTS ON SENSITIVITY ",
|
| 1623 |
+
"text_level": 1,
|
| 1624 |
+
"bbox": [
|
| 1625 |
+
176,
|
| 1626 |
+
102,
|
| 1627 |
+
537,
|
| 1628 |
+
118
|
| 1629 |
+
],
|
| 1630 |
+
"page_idx": 13
|
| 1631 |
+
},
|
| 1632 |
+
{
|
| 1633 |
+
"type": "text",
|
| 1634 |
+
"text": "We did an extra set of experiments on language modeling to show our model is less sensitive than the baseline model, no matter what the hyperparameters $( c , r$ in low-precision compression, rank in low-rank compression) are. The results are shown in Table 6 and Table 7. ",
|
| 1635 |
+
"bbox": [
|
| 1636 |
+
174,
|
| 1637 |
+
137,
|
| 1638 |
+
825,
|
| 1639 |
+
180
|
| 1640 |
+
],
|
| 1641 |
+
"page_idx": 13
|
| 1642 |
+
},
|
| 1643 |
+
{
|
| 1644 |
+
"type": "table",
|
| 1645 |
+
"img_path": "images/2d83ba9ba868878867f06d94cab48b8aa818c4d5017a4375738000af8f16d273.jpg",
|
| 1646 |
+
"table_caption": [
|
| 1647 |
+
"Table 6: Low precision compression results on Penn Tree Bank dataset "
|
| 1648 |
+
],
|
| 1649 |
+
"table_footnote": [],
|
| 1650 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>c = 0.20,r =0.10</td><td rowspan=1 colspan=1>c = 0.40,r = 0.20</td><td rowspan=1 colspan=1>c = 0.60,r = 0.30</td><td rowspan=1 colspan=1>c = 0.80,r = 0.40</td></tr><tr><td rowspan=1 colspan=1>LSTM</td><td rowspan=1 colspan=1>52.8</td><td rowspan=1 colspan=1>58.5 (+5.7)</td><td rowspan=1 colspan=1>53.6 (+0.8)</td><td rowspan=1 colspan=1>54.2 (+1.4)</td><td rowspan=1 colspan=1>57.7 (+4.9)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>53.2</td><td rowspan=1 colspan=1>54.6 (+1.4)</td><td rowspan=1 colspan=1>53.6 (+0.4)</td><td rowspan=1 colspan=1>54.1 (+0.9)</td><td rowspan=1 colspan=1>57.8 (+4.6)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>52.1</td><td rowspan=1 colspan=1>54.5 (+2.4)</td><td rowspan=1 colspan=1>52.8 (+0.7)</td><td rowspan=1 colspan=1>53.2 (+1.1)</td><td rowspan=1 colspan=1>55.0 (+2.9)</td></tr></table>",
|
| 1651 |
+
"bbox": [
|
| 1652 |
+
99,
|
| 1653 |
+
226,
|
| 1654 |
+
898,
|
| 1655 |
+
287
|
| 1656 |
+
],
|
| 1657 |
+
"page_idx": 13
|
| 1658 |
+
},
|
| 1659 |
+
{
|
| 1660 |
+
"type": "table",
|
| 1661 |
+
"img_path": "images/1cc19ec0d04db12fc9f29dc804ace5a8251db3f2e4bd080f1bebd60962e1ead9.jpg",
|
| 1662 |
+
"table_caption": [
|
| 1663 |
+
"Table 7: Low rank compression results on Penn Tree Bank dataset "
|
| 1664 |
+
],
|
| 1665 |
+
"table_footnote": [],
|
| 1666 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>rank =128</td><td rowspan=1 colspan=1>rank =64</td><td rowspan=1 colspan=1>rank =32</td><td rowspan=1 colspan=1>rank=16</td></tr><tr><td rowspan=1 colspan=1>LSTM</td><td rowspan=1 colspan=1>52.8</td><td rowspan=1 colspan=1>56.6(+3.8)</td><td rowspan=1 colspan=1>65.5 (+12.7)</td><td rowspan=1 colspan=1>83.1 (+30.3)</td><td rowspan=1 colspan=1>111.6 (+58.8)</td></tr><tr><td rowspan=1 colspan=1>Sharpened Sigmoid</td><td rowspan=1 colspan=1>53.2</td><td rowspan=1 colspan=1>54.6 (+1.4)</td><td rowspan=1 colspan=1>60.0 (+6.8)</td><td rowspan=1 colspan=1>72.8 (+19.6)</td><td rowspan=1 colspan=1>100.9 (+47.7)</td></tr><tr><td rowspan=1 colspan=1>G²-LSTM</td><td rowspan=1 colspan=1>52.1</td><td rowspan=1 colspan=1>53.3 (+1.2)</td><td rowspan=1 colspan=1>56.0 (+3.9)</td><td rowspan=1 colspan=1>62.8 (+10.7)</td><td rowspan=1 colspan=1>75.9 (+23.8)</td></tr></table>",
|
| 1667 |
+
"bbox": [
|
| 1668 |
+
181,
|
| 1669 |
+
354,
|
| 1670 |
+
816,
|
| 1671 |
+
416
|
| 1672 |
+
],
|
| 1673 |
+
"page_idx": 13
|
| 1674 |
+
},
|
| 1675 |
+
{
|
| 1676 |
+
"type": "text",
|
| 1677 |
+
"text": "B EXAMPLES ",
|
| 1678 |
+
"text_level": 1,
|
| 1679 |
+
"bbox": [
|
| 1680 |
+
174,
|
| 1681 |
+
449,
|
| 1682 |
+
302,
|
| 1683 |
+
465
|
| 1684 |
+
],
|
| 1685 |
+
"page_idx": 13
|
| 1686 |
+
},
|
| 1687 |
+
{
|
| 1688 |
+
"type": "image",
|
| 1689 |
+
"img_path": "images/4e1a85b295d3c652a8ce4007aa6dd3001252ac4c590d0381ef80f7f8b0d68540.jpg",
|
| 1690 |
+
"image_caption": [],
|
| 1691 |
+
"image_footnote": [],
|
| 1692 |
+
"bbox": [
|
| 1693 |
+
233,
|
| 1694 |
+
510,
|
| 1695 |
+
767,
|
| 1696 |
+
676
|
| 1697 |
+
],
|
| 1698 |
+
"page_idx": 13
|
| 1699 |
+
},
|
| 1700 |
+
{
|
| 1701 |
+
"type": "image",
|
| 1702 |
+
"img_path": "images/b9839125a20cce47bea9305416225d3c893c0658cae961f302c2f3565d01f2a6.jpg",
|
| 1703 |
+
"image_caption": [],
|
| 1704 |
+
"image_footnote": [],
|
| 1705 |
+
"bbox": [
|
| 1706 |
+
214,
|
| 1707 |
+
755,
|
| 1708 |
+
766,
|
| 1709 |
+
900
|
| 1710 |
+
],
|
| 1711 |
+
"page_idx": 13
|
| 1712 |
+
},
|
| 1713 |
+
{
|
| 1714 |
+
"type": "image",
|
| 1715 |
+
"img_path": "images/c7a644ca3e647fdd0e8e68e3cb491284df9b262fe3fc5381915cf82bc2baa680.jpg",
|
| 1716 |
+
"image_caption": [],
|
| 1717 |
+
"image_footnote": [],
|
| 1718 |
+
"bbox": [
|
| 1719 |
+
207,
|
| 1720 |
+
117,
|
| 1721 |
+
766,
|
| 1722 |
+
299
|
| 1723 |
+
],
|
| 1724 |
+
"page_idx": 14
|
| 1725 |
+
},
|
| 1726 |
+
{
|
| 1727 |
+
"type": "image",
|
| 1728 |
+
"img_path": "images/4a1adff5322e6925bfe1e76e5239f0722a1c51eb319eff9fa649390b985ba5fd.jpg",
|
| 1729 |
+
"image_caption": [],
|
| 1730 |
+
"image_footnote": [],
|
| 1731 |
+
"bbox": [
|
| 1732 |
+
238,
|
| 1733 |
+
368,
|
| 1734 |
+
761,
|
| 1735 |
+
508
|
| 1736 |
+
],
|
| 1737 |
+
"page_idx": 14
|
| 1738 |
+
},
|
| 1739 |
+
{
|
| 1740 |
+
"type": "image",
|
| 1741 |
+
"img_path": "images/d136982d0788ec95a5878da13055f65a7b1becf5e39d71cb77c05cec971b9d08.jpg",
|
| 1742 |
+
"image_caption": [
|
| 1743 |
+
"Figure 6: The gate value visualization in German English task. "
|
| 1744 |
+
],
|
| 1745 |
+
"image_footnote": [],
|
| 1746 |
+
"bbox": [
|
| 1747 |
+
246,
|
| 1748 |
+
573,
|
| 1749 |
+
767,
|
| 1750 |
+
744
|
| 1751 |
+
],
|
| 1752 |
+
"page_idx": 14
|
| 1753 |
+
}
|
| 1754 |
+
]
|
parse/train/rJiaRbk0-/rJiaRbk0-_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rJiaRbk0-/rJiaRbk0-_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ypJS_nyu-I/ypJS_nyu-I.md
ADDED
|
@@ -0,0 +1,518 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A DEEPER LOOK AT DISCOUNTING MISMATCH IN ACTOR-CRITIC ALGORITHMS
|
| 2 |
+
|
| 3 |
+
# ABSTRACT
|
| 4 |
+
|
| 5 |
+
We investigate the discounting mismatch in actor-critic algorithm implementations from a representation learning perspective. Theoretically, actor-critic algorithms usually have discounting for both actor and critic, i.e., there is a $\gamma ^ { t }$ term in the actor update for the transition observed at time $t$ in a trajectory and the critic is a discounted value function. Practitioners, however, usually ignore the discounting $( \gamma ^ { t } )$ for the actor while using a discounted critic. We investigate this mismatch in two scenarios. In the first scenario, we consider optimizing an undiscounted objective $( \gamma = 1 )$ ) where $\gamma ^ { t }$ disappears naturally $\cdot ^ { 1 ^ { t } } = 1 ^ { \cdot }$ ). We then propose to interpret the discounting in critic in terms of a bias-variance-representation tradeoff and provide supporting empirical results. In the second scenario, we consider optimizing a discounted objective $( \gamma < 1 )$ ) and propose to interpret the omission of the discounting in the actor update from an auxiliary task perspective and provide supporting empirical results.
|
| 6 |
+
|
| 7 |
+
# 1 INTRODUCTION
|
| 8 |
+
|
| 9 |
+
Actor-critic algorithms have enjoyed great success both theoretically (Williams, 1992; Sutton et al., 2000; Konda, 2002; Schulman et al., 2015a) and empirically (Mnih et al., 2016; Silver et al., 2016; Schulman et al., 2017; OpenAI, 2018). There is, however, a longstanding gap between the theory behind actor-critic algorithms and how practitioners implement them. Let $\gamma , \gamma _ { \mathrm { A } }$ , and $\gamma _ { \mathrm { c } }$ be the discount factors for defining the objective, updating the actor, and updating the critic respectively. Theoretically, no matter whether $\gamma = 1$ or $\gamma < 1$ , we should always use $\gamma _ { \mathrm { { A } } } = \gamma _ { \mathrm { { C } } } = \gamma$ (Sutton et al., 2000; Schulman et al., 2015a) or at least keep $\gamma _ { \mathrm { A } } = \gamma _ { \mathrm { C } }$ if Blackwell optimality (Veinott, 1969; Weitzman, 2001) 1 is considered. Practitioners, however, usually use $\gamma _ { \mathrm { { A } } } = 1$ and $\gamma _ { \mathrm { c } } < 1$ in their implementations (Dhariwal et al., 2017; Caspi et al., 2017; Zhang, 2018; Kostrikov, 2018; Achiam, 2018; Liang et al., 2018; Stooke & Abbeel, 2019). Although this mismatch and its theoretical disadvantage have been recognized by Thomas (2014); Nota & Thomas (2020), whether and why it yields benefits in practice has not been systematically studied. In this paper, we empirically investigate this mismatch from a representation learning perspective. We consider two scenarios separately.
|
| 10 |
+
|
| 11 |
+
Scenario 1: The true objective is undiscounted $( \gamma = 1 ,$ ). The theory prescribes to use $\gamma _ { \mathrm { { A } } } = \gamma _ { \mathrm { { C } } } =$ $\gamma = 1$ . Practitioners, however, usually use $\gamma _ { \mathrm { { A } } } = \gamma = 1$ but $\gamma _ { \mathrm { c } } < 1$ , introducing bias. We explain this mismatch with the following hypothesis:
|
| 12 |
+
|
| 13 |
+
Hypothesis 1. $\gamma _ { \mathrm { c } } < 1$ optimizes a bias-variance-representation trade-off.
|
| 14 |
+
|
| 15 |
+
It is easy to see that $\gamma _ { \mathrm { c } } < 1$ reduces the variance in bootstrapping targets. Besides this, we further provide empirical evidence showing that when $\gamma _ { \mathrm { c } } < 1$ , it may become easier to find a good representation compared to $\gamma _ { \mathrm { c } } = 1$ . Consequently, although using $\gamma _ { \mathrm { c } } < 1$ introduces bias, it can facilitate representation learning. For our empirical study, we make use of recently introduced techniques, such fixed horizon temporal different learning (De Asis et al., 2019) and distributional reinforcement learning (Bellemare et al., 2017) to disentangle the various effects the discount factor has on the learning process.
|
| 16 |
+
|
| 17 |
+
Scenario 2: The true objective function is discounted $( \gamma < 1 ,$ ). Theoretically, there is a $\gamma ^ { t }$ term for the actor update on a transition observed at time $t$ in a trajectory (Sutton et al., 2000; Schulman et al., 2015a). Practitioners, however, usually ignore this term while using a discounted critic, i.e., $\gamma _ { \mathrm { { A } } } = 1$ and $\gamma _ { \mathrm { c } } = \gamma < 1$ are used. We explain this mismatch with the following hypothesis:
|
| 18 |
+
|
| 19 |
+
Hypothesis 2. Using $\gamma _ { \mathrm { c } } = \gamma < 1$ and $\gamma _ { \mathrm { { A } } } = 1$ is effectively similar to using $\gamma _ { \mathrm { c } } = \gamma _ { \mathrm { A } } = \gamma < 1 _ { \ / }$ plus an auxiliary loss that sometimes facilitates representation learning.
|
| 20 |
+
|
| 21 |
+
Our empirical study involves implementing the auxiliary task explicitly by using an additional policy for optimizing the difference term between the loss of $\gamma _ { \mathrm { { A } } } = 1$ and the loss of $\gamma _ { \mathrm { { A } } } < 1$ . We also design new benchmarking environments where the sign of the reward function is flipped after a certain time step such that later transitions differ from earlier ones. In that setting, $\gamma _ { \mathrm { { A } } } = 1$ becomes harmful.
|
| 22 |
+
|
| 23 |
+
# 2 BACKGROUND
|
| 24 |
+
|
| 25 |
+
Markov Decision Processes: We consider an infinite horizon MDP with a finite state space $s$ , a finite action space $\mathcal { A }$ , a bounded reward function $r : \mathcal { S } \mathbb { R }$ , a transition kernel $p : \mathcal { S } \times \mathcal { S } \times \mathcal { A } [ 0 , 1 ]$ , an initial state distribution $\mu _ { 0 }$ , and a discount factor $\gamma \in [ 0 , 1 ]$ .2 The initial state $S _ { 0 }$ is sampled from $\mu _ { 0 }$ . At time step $t .$ , an agent in state $S _ { t }$ takes action $A _ { t } \sim \bar { \pi } ( \cdot | S _ { t } )$ , where $\pi : \mathcal { A } \times \mathcal { S } [ 0 , 1 ]$ is the policy it follows. The agent then gets a reward $R _ { t + 1 } \doteq r ( S _ { t } )$ and proceeds to the next state $S _ { t + 1 } \sim p ( \cdot | S _ { t } , A _ { t } )$ . The return of the policy $\pi$ at time step $t$ is defined as $\begin{array} { r } { \bar { G } _ { t } \doteq \sum _ { i = 1 } ^ { \infty } \gamma ^ { i - 1 } R _ { t + i } } \end{array}$ , which allows us to define the state value function $v _ { \pi } ^ { \gamma } ( \bar { S } ) \dot { = } \mathbb { E } [ G _ { t } | S _ { t } = s ]$ and the state-action value function $q _ { \pi } ^ { \gamma } ( s , a ) \dot { = }$ $\mathbb { E } [ G _ { t } | S _ { t } = s , A _ { t } = a ]$ . We consider episodic tasks where we assume there is an absorbing state $s ^ { \infty } \in S$ such that $r ( s ^ { \infty } ) = 0$ and $p ( s ^ { \infty } | s ^ { \infty } , a ) = 1$ holds for any $a \in { \mathcal { A } }$ . When $\gamma < 1$ , $v _ { \pi } ^ { \gamma }$ and $q _ { \pi } ^ { \gamma }$ are always well defined. When $\gamma = 1$ , to ensure $v _ { \pi } ^ { \gamma }$ and $q _ { \pi } ^ { \gamma }$ are well defined, we further assume finite expected episode length. Let $T _ { s } ^ { \pi }$ be a random variable denoting the first time step that an agent hits $s ^ { \infty }$ when following $\pi$ given $S _ { 0 } = s$ . We assume $\begin{array} { r } { T _ { \operatorname* { m a x } } \doteq \operatorname* { s u p } _ { \pi \in \Pi } \operatorname* { m a x } _ { s } \mathbb { E } [ T _ { s } ^ { \pi } ] < \infty , } \end{array}$ , where $\pi$ is parameterized by $\theta$ and $\Pi$ is the corresponding function class. Similar assumptions are also used in stochastic shortest path problems (e.g., Section 2.2 of Bertsekas & Tsitsiklis (1996)). In our experiments, all the environments have a hard time limit of 1000, i.e., $T _ { \mathrm { m a x } } = 1 0 0 0$ . This is standard practice, classic RL environments also have an upper limit on their episode lengths (e.g. $2 7 \mathrm { k }$ in Bellemare et al. (2013, ALE)). Following Pardo et al. (2018), we add the (normalized) time step $t$ in the state to keep the environment Markovian. We measure the performance of a policy $\pi$ with $J _ { \gamma } ( \pi ) \doteq \mathbb { E } _ { S _ { 0 } \sim \mu _ { 0 } } [ \bar { v _ { \pi } ^ { \gamma } } ( S _ { 0 } ) ]$ .
|
| 26 |
+
|
| 27 |
+
Table 1: Roles of the different discount factors
|
| 28 |
+
|
| 29 |
+
<table><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>define the objective</td></tr><tr><td rowspan=1 colspan=1>YA</td><td rowspan=1 colspan=1>update the actor</td></tr><tr><td rowspan=1 colspan=1>Yc</td><td rowspan=1 colspan=1>update the critic</td></tr></table>
|
| 30 |
+
|
| 31 |
+
Vanilla Policy Gradient: Sutton et al. (2000) compute $\nabla _ { \boldsymbol { \theta } } J _ { \gamma } ( \pi )$ as
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\begin{array} { r } { \nabla _ { \theta } J _ { \gamma } ( \pi ) \doteq \sum _ { s } d _ { \pi } ^ { \gamma } ( s ) \sum _ { a } q _ { \pi } ^ { \gamma } ( s , a ) \nabla _ { \theta } \pi ( a | s ) , } \end{array}
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
where $\begin{array} { r } { d _ { \pi } ^ { \gamma } ( s ) \doteq \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \operatorname* { P r } ( S _ { t } = s | \mu _ { 0 } , p , \pi ) } \end{array}$ for $\gamma < 1$ and $\begin{array} { r } { d _ { \pi } ^ { \gamma } ( s ) \doteq \mathbb { E } [ \sum _ { t = 0 } ^ { T _ { S _ { 0 } } ^ { \pi } } \operatorname* { P r } ( S _ { t } = s | S _ { 0 } , p , \pi ) ] } \end{array}$ for $\gamma = 1$ .3 Note $d _ { \pi } ^ { \gamma }$ remains well-defined for $\gamma = 1$ when $T _ { \mathrm { m a x } } < \infty$ . In order to optimize the policy performance $J _ { \gamma } ( \pi )$ , one can follow (1) and, at time step $t$ , update $\theta _ { t }$ as
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { r } { \theta _ { t + 1 } \theta _ { t } + \alpha \gamma _ { \mathrm { A } } ^ { t } q _ { \pi } ^ { \gamma _ { \mathrm { c } } } ( S _ { t } , A _ { t } ) \nabla _ { \theta } \log \pi ( A _ { t } | S _ { t } ) , } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $\alpha$ is a learning rate. If we replace $q _ { \pi } ^ { \gamma _ { \mathrm { c } } }$ with a learned value function, the update rule (2) becomes an actor-critic algorithm, where the actor refers to $\pi$ and the critic refers to the learned approximation of $q _ { \pi } ^ { \gamma _ { \mathrm { c } } }$ . In practice, an estimate for $v _ { \pi } ^ { \gamma _ { \mathrm { c } } }$ instead of $q _ { \pi } ^ { \gamma _ { \mathrm { c } } }$ is usually learned. Theoretically, we should have $\gamma _ { \mathrm { { A } } } = \gamma _ { \mathrm { { C } } } = \gamma$ . Practitioners, however, usually ignore the $\gamma _ { \mathrm { A } } ^ { t }$ term in (2), and use $\gamma _ { \mathrm { c } } < \gamma _ { \mathrm { A } } = 1$ . What this update truly optimizes remains an open problem (Nota & Thomas, 2020).
|
| 44 |
+
|
| 45 |
+
TRPO and PPO: To improve the stability of actor-critic algorithms, Schulman et al. (2015a) propose Trust Region Policy Optimization (TRPO), based on the performance improvement lemma:
|
| 46 |
+
|
| 47 |
+
Lemma 1. (Theorem $I$ in Schulman et al. (2015a)) For $\gamma < 1$ and any two policies $\pi$ and $\pi ^ { \prime }$ ,
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\begin{array} { r } { J _ { \gamma } ( \pi ^ { \prime } ) \geq J _ { \gamma } ( \pi ) + \Big ( \sum _ { s } d _ { \pi } ^ { \gamma } ( s ) \sum _ { a } \pi ^ { \prime } ( a | s ) A d \nu _ { \pi } ^ { \gamma } ( s , a ) \Big ) - \frac { 4 \operatorname* { m a x } _ { s , a } | A d \nu _ { \pi } ^ { \gamma } ( s , a ) | \gamma \epsilon ( \pi , \pi ^ { \prime } ) } { ( 1 - \gamma ) ^ { 2 } } , } \end{array}
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $A d \nu _ { \pi } ^ { \gamma } ( s , a ) ~ \doteq ~ \mathbb { E } _ { s ^ { \prime } \sim p ( \cdot \vert s , a ) } [ r ( s ) ~ + ~ \gamma v _ { \pi } ^ { \gamma } ( s ^ { \prime } ) ~ - ~ v _ { \pi } ^ { \gamma } ( s ) ]$ is the advantage, $\begin{array} { r l } { \epsilon ( \pi , \pi ^ { \prime } ) } & { { } \dot { = } } \end{array}$ $\begin{array} { r } { \operatorname* { m a x } _ { s } D _ { K L } ( \pi ( \cdot | s ) | | \pi ^ { \prime } ( \cdot | s ) ) } \end{array}$ , and $D _ { K L }$ refers to the $K L$ divergence.
|
| 54 |
+
|
| 55 |
+
To facilitate our empirical study, we first make a theoretical contribution by extending Lemma 1 to the undiscounted setting. We have the following lemma:
|
| 56 |
+
|
| 57 |
+
Lemma 2. Assuming $T _ { \mathrm { m a x } } < \infty ,$ , for $\gamma = 1$ and any two policies $\pi$ and $\pi ^ { \prime }$ ,
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { r } { J _ { \gamma } ( \pi ^ { \prime } ) \geq J _ { \gamma } ( \pi ) + \Big ( \sum _ { s } d _ { \pi } ^ { \gamma } ( s ) \sum _ { a } \pi ^ { \prime } ( a | s ) A d \nu _ { \pi } ^ { \gamma } ( s , a ) \Big ) - 4 \operatorname* { m a x } _ { s , a } | A d \nu _ { \pi } ^ { \gamma } ( s , a ) | T _ { \operatorname* { m a x } } ^ { 2 } \epsilon ( \pi , \pi ^ { \prime } ) . } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
The proof of Lemma 2 is provided in the appendix. A practical implementation of Lemmas 1 and 2 is to compute a new policy $\theta$ via gradient ascent on the clipped objective:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\begin{array} { r } { L ( \theta ) \doteq \sum _ { t = 0 } ^ { \infty } \gamma _ { \mathrm { A } } ^ { t } \operatorname* { m i n } \Big \{ \frac { \pi _ { \theta } ( A _ { t } | S _ { t } ) } { \pi _ { \theta _ { \mathrm { o d } } } ( A _ { t } | S _ { t } ) } \mathrm { A d } \mathrm { v } _ { \pi _ { \theta _ { \mathrm { o d } } } } ^ { \gamma _ { \mathrm { c } } } ( S _ { t } , A _ { t } ) , \mathrm { c l i p } ( \frac { \pi _ { \theta } ( A _ { t } | S _ { t } ) } { \pi _ { \theta _ { \mathrm { o d } } } ( A _ { t } | S _ { t } ) } ) \mathrm { A d } \mathrm { v } _ { \pi _ { \theta _ { \mathrm { o d } } } } ^ { \gamma _ { \mathrm { c } } } ( S _ { t } , A _ { t } ) \Big \} , } \end{array}
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where $S _ { t }$ and $A _ { t }$ are sampled from $\pi _ { \theta _ { \mathrm { o l d } } }$ , and $\mathrm { c l i p } ( x ) \doteq \operatorname* { m a x } ( \operatorname* { m i n } ( x , 1 + \epsilon ) , 1 - \epsilon )$ with $\epsilon$ a hyperparameter. Theoretically, we should have $\gamma _ { \mathrm { { A } } } = \gamma _ { \mathrm { { C } } }$ , but practical algorithms like Proximal Policy Optimization (Schulman et al., 2017, PPO) usually use $\gamma _ { \mathrm { c } } < \gamma _ { \mathrm { A } } = 1$ .
|
| 70 |
+
|
| 71 |
+
Policy Evaluation: We now introduce several policy evaluation techniques we use in our empirical study. Let $\hat { v }$ be our estimate of $v _ { \pi } ^ { \gamma }$ . At time step $t$ , Temporal Difference learning (TD, Sutton (1988)) updates $\hat { v }$ as $\hat { v } ( S _ { t } ) \gets \hat { v } ( S _ { t } ) + \alpha ( R _ { t + 1 } + \gamma \hat { v } ( S _ { t + 1 } ) - \hat { v } ( S _ { t } ) )$ . Instead of the infinite horizon discounted return $G _ { t }$ , De Asis et al. (2019) propose to consider the $H$ -step return $\begin{array} { r } { G _ { t } ^ { H } \doteq \sum _ { i = 1 } ^ { H } R _ { t + i } } \end{array}$ . Correspondingly, the $H$ -step value function is defined as $v _ { \pi } ^ { H } ( s ) \doteq \mathbb { E } [ G _ { t } ^ { H } | S _ { t } = s ]$ . We let $\hat { v } ^ { H }$ be our estimate of $v _ { \pi } ^ { \widetilde { H } }$ . At time step $t$ , De Asis et al. (2019) use the following update rule to learn $\hat { v } ^ { H }$ :
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\hat { v } ^ { i } ( S _ { t } ) \gets \hat { v } ^ { i } ( S _ { t } ) + \alpha ( R _ { t + 1 } + \hat { v } ^ { i - 1 } ( S _ { t + 1 } ) - \hat { v } ^ { i } ( S _ { t } ) ) \quad ( i = 1 , \dots H ) ,
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where $\hat { v } ^ { 0 } ( s ) \\\\\\\\\\ \stackrel { . } { = } \ 0$ . In other words, to learn $\hat { v } ^ { H }$ , we need to learn $\{ \hat { v } ^ { i } \} _ { i = 1 , \dots , H }$ simultaneously.
|
| 78 |
+
De Asis et al. (2019) call (4) Fixed Horizon Temporal $D$ ifference learning (FHTD).
|
| 79 |
+
|
| 80 |
+
As $G _ { t }$ is a random variable, Bellemare et al. (2017) propose to learn its full distribution instead of its expectation only, yielding the Distributional Reinforcement Learning (RL) paradigm. They use a categorical distribution with 51 atoms uniformly distributed in $[ - V _ { \mathrm { m a x } } , V _ { \mathrm { m a x } } ]$ to approximate the distribution of $G _ { t }$ , where $V _ { \mathrm { m a x } }$ is a hyperparameter. In this paper, we refer to the corresponding policy evaluation algorithm as C51.
|
| 81 |
+
|
| 82 |
+
Methodology: We consider MuJoCo robot simulation tasks from OpenAI gym (Brockman et al., 2016) as our benchmark. Given its popularity in understanding deep RL algorithms (Henderson et al., 2017; Ilyas et al., 2018; Engstrom et al., 2019; Andrychowicz et al., 2020) and designing new deep RL algorithms (Fujimoto et al., 2018; Haarnoja et al., 2018), we believe our empirical results are relevant to most practitioners.
|
| 83 |
+
|
| 84 |
+
We choose PPO, a simple yet effective and widely used algorithm, as the representative actor-critic algorithm for our empirical study. PPO is usually equipped with generalized advantage estimation (Schulman et al., 2015b, GAE), which has a tunable hyperparameter $\hat { \gamma }$ . The roles of $\gamma$ and $\hat { \gamma }$ are similar. To reduce its confounding effect, we do not use GAE in our experiments, $i . e .$ , the advantage estimation for our actor is simply the TD error $R _ { t + 1 } + \gamma _ { \mathrm { c } } \hat { v } ( S _ { t + 1 } ) - \hat { v } ( \bar { S } _ { t } )$ . The PPO pseudocode we follow is provided in Alg. 1 in the appendix and we refer to it as the default PPO implementation.
|
| 85 |
+
|
| 86 |
+
We use the standard architecture and optimizer across all tasks, in particular, the actor and the critic do not share layers. We conduct a thorough learning rate search in $\mathrm { a n t }$ for each algorithmic configuration (i.e., a curve in a figure) and then use the same learning rate for all other tasks. When using FHTD and C51, we also include $H$ and $V _ { \mathrm { m a x } }$ in the grid search. All details are provided in the appendix. We report the average episode return of the ten most recent episodes against the number of interactions with the environment. Curves are averages over ten independent runs with shaded regions indicating standard errors.
|
| 87 |
+
|
| 88 |
+
# 3 OPTIMIZING THE UNDISCOUNTED OBJECTIVE (SCENARIO 1)
|
| 89 |
+
|
| 90 |
+
When our goal is to optimize the undiscounted objective $J _ { \gamma = 1 } ( \pi )$ , one theoretically grounded option is to use $\gamma _ { \mathrm { { A } } } = \gamma _ { \mathrm { { C } } } = \gamma = 1$ . By using $\gamma _ { \mathrm { { A } } } = 1$ and $\gamma _ { \mathrm { c } } < 1$ , practitioners introduce bias. We first empirically confirm that introducing bias in this way indeed has empirical advantages. A simple first hypothesis is that $\gamma _ { \mathrm { c } } < 1$ leads to lower variance in Monte Carlo return bootstrapping targets than $\gamma _ { \mathrm { c } } = 1$ , it thus optimizes a bias-variance trade-off. However, we further show that there are empirical advantages from $\gamma _ { \mathrm { c } } < 1$ that cannot uniquely be explained by this bias-variance trade-off, indicating that there are additional factors beyond variance. We then show empirical evidence identifying representation learning as an additional factor, leading to the bias-variance-representation trade-off from Hypothesis 1. All the experiments in this section use $\gamma _ { \mathrm { { A } } } = 1$ .
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 1: The default PPO implementation with different discount factors.
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 2: Comparison between PPO and PPO-TD when $\gamma _ { \mathrm { c } } = 1$
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
Figure 3: PPO-TD with different discount factors.
|
| 100 |
+
|
| 101 |
+
Bias-variance trade-off: To investigate the advantages of using $\gamma _ { \mathrm { c } } < 1$ , we first test default PPO with $\gamma _ { \mathrm { c } } \in \lbrace 0 . 9 5 , 0 . 9 7 , 0 . 9 9 , 0 . 9 9 5 , 1 \rbrace$ . We find that the best discount factor is always with $\gamma _ { \mathrm { c } } < 1$ and that $\gamma _ { \mathrm { c } } ~ = ~ 1$ usually leads to a performance drop (Figure 1). In default PPO, although the advantage is computed as the one-step TD error, the update target for updating the critic $\hat { v } ( S _ { t } )$ is almost always a Monte Carlo return. As there is no $\gamma _ { \mathrm { A } } ^ { t }$ term in the actor update, we should theoretically use $\gamma _ { \mathrm { c } } = \gamma _ { \mathrm { A } } = 1$ when computing the Monte Carlo return, which usually leads to high variance. Consequently, a simple hypothesis for the empirical advantages of using $\gamma _ { \mathrm { c } } < 1$ is a bias-variance trade-off. We find, however, that there is more at play.
|
| 102 |
+
|
| 103 |
+
Beyond bias-variance trade-off: To reduce the effect of $\gamma _ { \mathrm { c } }$ in controlling the variance, we benchmark PPO-TD (Algorithm 2 in the appendix). PPO-TD is the same as default PPO except that the critic is updated with one-step TD, i.e., the update target for $\hat { v } ( S _ { t } )$ is now $R _ { t + 1 } + \gamma _ { \mathrm { c } } \hat { v } ( \bar { S } _ { t + 1 } )$ . Although Figure 2 shows that PPO-TD $( \gamma _ { \mathrm { c } } = 1 )$ ) outperforms PPO ( $\gamma _ { \mathrm { c } } = 1 $ ) by a large margin, indicating bias-variance may be at play, Figure 3 suggests that for PPO-TD as well, $\gamma _ { \mathrm { c } } < 1$ is still preferable to $\gamma _ { \mathrm { c } } = 1$ . To further study this phenomenon, we benchmark PPO-TD-Ex (Algorithm 3 in the appendix), in which we provide $N$ extra transitions to the critic by sampling multiple actions at any single state and using an averaged bootstrapping target. The update target for $\hat { v } ( S _ { t } )$ in PPO-TD$\operatorname { E x }$ is $\begin{array} { r } { \frac { 1 } { N + 1 } \sum _ { i = 0 } ^ { N } R _ { t + 1 } ^ { i } + \gamma _ { \mathrm { c } } \hat { v } ( S _ { t + 1 } ^ { i } ) } \end{array}$ . Here $R _ { t + 1 } ^ { 0 }$ and $S _ { t + 1 } ^ { 0 }$ refer to the original reward and successor state. To get $R _ { t + 1 } ^ { i }$ and $S _ { t + 1 } ^ { i }$ for $i \in \{ 1 , \ldots , N \}$ , we first sample an action $A _ { t } ^ { i }$ from the sampling policy, then reset the environment to $S _ { t }$ , and finally execute $A _ { t } ^ { i }$ to get $R _ { t + 1 } ^ { i }$ and $S _ { t + 1 } ^ { i }$ . Importantly, we do not count those $N$ extra transitions in the $x$ -axis when plotting. The advantage for the actor update in PPO-TD- $\mathbf { \nabla } \cdot \mathbf { E x }$ is estimated with $R _ { t + 1 } ^ { 0 } + \hat { v } ( S _ { t + 1 } ^ { 0 } ) - \hat { v } ( S _ { t } )$ regardless of $\gamma _ { \mathrm { { C } } }$ to further control the influence of variance. The critic $\hat { v }$ is not trained on the extra successor states $\{ S _ { t + 1 } ^ { i } \} _ { i = 1 , \dots , N }$ .
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 4: PPO-TD-Ex $\langle \gamma _ { \mathrm { c } } = 0 . 9 9 ,$ ).
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 5: PPO-TD-Ex $( \gamma _ { \mathrm { { c } } } = 1 )$ ).
|
| 110 |
+
|
| 111 |
+
So the quality of the prediction $\hat { v } ( S _ { t + 1 } ^ { i } )$ depends mainly on the generalization of $\hat { v }$ . Intuitively, if $\hat { v }$ generalizes well, providing proper amount of transitions this way should improve or maintain the overall performance as they help reduce variance. As shown by Figure 4, PPO-TD- $\mathbf { \nabla } \cdot \mathbf { E x }$ $\langle \gamma _ { \mathrm { c } } = 0 . 9 9 \rangle$ ) roughly follows this intuition. However, surprisingly, providing extra data to PPO-TD-Ex $( \gamma _ { \mathrm { { C } } } = 1 $ ) leads to a significant performance drop (Figure 5). This drop suggests that the larger variance from the randomness of $S _ { t + 1 }$ is not the only issue when using $\gamma _ { \mathrm { c } } = 1$ to train the critic. The quality of the estimate $\hat { v }$ , at least in terms of making prediction on untrained states $\{ S _ { t + 1 } ^ { i } \} _ { 1 , \dots , N }$ , is lower when $\gamma _ { \mathrm { c } } = 1$ is used than $\gamma _ { \mathrm { c } } < 1$ . In other words, the generalization of $\hat { v }$ is poor when $\gamma _ { \mathrm { c } } = 1$ . The curves for PPO-TD-Ex $( \gamma _ { \mathrm { c } } = 0 . 9 9 5 )$ are a mixture of $\gamma _ { \mathrm { c } } = 0 . 9 9$ and $\gamma _ { \mathrm { c } } = 1$ and are provided in Figure 16 in the appendix.
|
| 112 |
+
|
| 113 |
+
In the undiscounted setting, we should theoretically have $R _ { t + 1 } + \hat { v } ( S _ { t + 1 } )$ as the update target for the critic. When $\gamma _ { \mathrm { c } } ~ < ~ 1$ is used instead, the update target becomes $R _ { t + 1 } + \gamma _ { \mathrm { c } } \hat { v } ( S _ { t + 1 } )$ and the variance resulting from the randomness of $S _ { t + 1 }$ becomes less pronounced. So here, $\gamma _ { \mathrm { { C } } }$ trades off bias with variance, similar to that in Monte Carlo return bootstrapping targets in default PPO. We refer to this effect of $\gamma _ { \mathrm { { C } } }$ as variance control. However, $\gamma _ { \mathrm { { C } } }$ can also affect the difficulty of learning a good estimate $\hat { v }$ for $v _ { \pi } ^ { \gamma _ { \mathrm { c } } }$ ; we refer to this effect of $\gamma _ { \mathrm { { C } } }$ as learnability control (Lehnert et al., 2018; Laroche $\&$ van Seijen, 2018; Romoff et al., 2019). Inspired by the poor generalization of $\hat { v }$ when $\gamma _ { \mathrm { c } } = 1$ , we investigate learnability control mainly from the representation learning perspective. By representation learning, we refer to learning the bottom layers (backbone) of a neural network. The last layer of the neural network is then interpreted as a linear function approximator whose features are the output of the backbone. This interpretation of representation learning is widely used in the RL community, see e.g. Jaderberg et al. (2016); Chung et al. (2018); Veeriah et al. (2019).
|
| 114 |
+
|
| 115 |
+
Bias-representation trade-off: To separate variance control and learnability control, ideally we should investigate the update target $R _ { t + 1 } + \gamma _ { \mathrm { c } , 1 } \hat { v } ( S _ { t + 1 } )$ , where $\hat { v }$ is trained to approximate $\dot { v } _ { \pi } ^ { \gamma _ { \mathrm { c } , 2 } }$ and $\gamma _ { \mathrm { c } , 2 } < \gamma _ { \mathrm { c } , 1 } = 1$ . Learning an estimate $\hat { v }$ for $v _ { \pi } ^ { \gamma _ { \mathrm { c } , 2 } }$ , however, implies to use the update target $R _ { t + 1 } + \gamma _ { \mathrm { c } , 2 } \hat { v } ( S _ { t + 1 } )$ : the two effects of $\gamma _ { \mathrm { C } , 2 }$ then get mixed again. To solve this dilemma, we consider the update target $R _ { t + 1 } + \hat { v } ^ { H - 1 } ( S _ { t + 1 } )$ , where $\hat { v } ^ { H - 1 } ( S _ { t + 1 } )$ is trained to approximate $v _ { \pi } ^ { H - 1 }$ , i.e., we use FHTD to train the critic in PPO, which we refer to as PPO-FHTD (Algorithm 4 in the appendix). PPO-FHTD implements $\gamma _ { \mathrm { c } , 1 } = 1$ directly, and manipulating $H$ changes the horizon of the policy evaluation problem, which is also one of the effects of manipulating $\gamma _ { \mathrm { C } , 2 }$ .
|
| 116 |
+
|
| 117 |
+
We test two parameterizations for PPO-FHTD to investigate representation learning. In the first parameterization, to learn $v _ { \pi } ^ { H }$ , we parameterize $\{ v _ { \pi } ^ { i } \} _ { i = 1 , \dots , H }$ as $H$ different heads over the same representation layer (backbone). In the second parameterization, we always learn $\{ v _ { \pi } ^ { i } \} _ { i = 1 , \ldots , 1 0 2 4 }$ as 1024 different heads over the same representation layer, whatever $H$ we are interested in. To approximate $v _ { \pi } ^ { H }$ , we then simply use the output of the $H$ -th head. A diagram (Figure 13) in the appendix further illustrates the difference between the two parameterizations.
|
| 118 |
+
|
| 119 |
+
Figure 6 shows that by tuning $H$ for FHTD, PPO-FHTD with the first parameterization matches or exceeds the performance of PPO-TD $\mathit { \Phi } _ { \mathrm { ( \gamma _ { c } } } < 1 \mathit { \check { ) } } _ { , }$ ) in most tasks, and that the best $H$ is always smaller than 1024. Theoretically, as long as we use an $H \ \geq \ T _ { \mathrm { m a x } } \ = \ 1 0 0 0$ , we always have $v _ { \pi } ^ { H } ( s ) \equiv v _ { \pi } ^ { \gamma = 1 } ( s )$ . Figure 6 shows that the performance of PPO-FHTD $H = 1 0 2 4 )$ ) is very close to PPO-TD $\gamma _ { \mathrm { c } } = 1 _ { . }$ ), indicating that learning $\{ v _ { \pi } ^ { i } \} _ { i = 1 , \ldots , 1 0 2 3 }$ is not an additional overhead for the network in terms of learning $v _ { \pi } ^ { H = 1 0 2 4 }$ , i.e., increasing $H$ does not pose additional challenges in terms of network capacity. However, Figure 7 suggests that for the second parameterization, $H = 1 0 2 4$ is almost always among the best choices of $H$ . Comparing Figures 6 and 7, we conclude that in the tested domains, learning $v _ { \pi } ^ { H }$ with different $H$ requires different representations. This suggests that we can interpret the results in Figure 6 as a bias-representation trade-off. Using a larger $H$ is less biased but representation learning may become harder due to the longer policy evaluation horizon. Consequently, an intermediate $H$ achieves the best performance in Figure 6. As reducing $H$ cannot bring in advantages in representation learning under the second parameterization, the less biased $H$ , i.e., the larger $H$ , usually performs better in Figure 7. Overall, $\gamma _ { \mathrm { { C } } }$ optimizes a bias-representation trade-off by changing the policy evaluation horizon $H$ .
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 6: PPO-FHTD with the first parameterization. The best $H$ and $\gamma _ { \mathrm { c } }$ are used for each game.
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
Figure 7: PPO-FHTD with the second parameterization.
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
Figure 8: A simple MRP.
|
| 129 |
+
|
| 130 |
+
We further conjecture that representation learning may be harder for a longer horizon because good representations can become rarer. We provide a simulated example to support this. Consider policy evaluation on the simple Markov Reward Process (MRP) from Figure 8. We assume the reward for each transition is fixed and is randomly generated in $[ 0 , 1 ]$ . Let $x _ { s } \in \mathbb { R } ^ { K }$ be the feature vector for a state $s$ ; we set its $i$ -th component as $x _ { s } [ i ] \doteq \operatorname { t a n h } ( \xi )$ , where $\xi$ is a random variable uniformly distributed in $[ - 2 , - 2 ]$ . We chose this feature setup as we use tanh as the activation function in our PPO. We use $\hat { \boldsymbol X } \in \mathbb { R } ^ { N \times K }$ to denote the feature matrix. To create state aliasing (McCallum, 1997), which is common under function approximation, we first randomly split the $N$ states into $S _ { 1 }$ and $S _ { 2 }$ such that $| S _ { 1 } | = \alpha N$ and $| S _ { 2 } | = ( 1 - \alpha ) N$ , where $\alpha$ is the proportion of states to be aliased. Then for every $s \in S _ { 1 }$ , we randomly select an $\hat { s } \in S _ { 2 }$ and set $x _ { s } \gets x _ { \hat { s } }$ . Finally, we add Gaussian noise $\mathcal { N } ( 0 , \dot { 0 } . 1 ^ { 2 } )$ to each element of $X$ . We use $N = 1 0 0$ and $K = 3 0$ in our simulation and report the normalized representation error (NRE) as a function of $\gamma$ . For a feature matrix $X$ , the NRE is computed analytically as $\begin{array} { r } { \mathrm { N R E } ( \gamma ) \doteq \frac { \operatorname* { m i n } _ { w } | | X w - v _ { \gamma } | | _ { 2 } } { | | v _ { \gamma } | | _ { 2 } } } \end{array}$ .= minw ||Xw−vγ ||2||v || , where vγ is the analytically computed true value function of the MRP. We report the results in Figure 9, where each data point is averaged over $1 0 ^ { 4 }$ randomly generated feature matrices $( X )$ and reward functions. In this MRP, the average representation error becomes larger as $\gamma$ increases, which suggests that learning a good representation under a large $\gamma$ and state aliasing may be harder than with a smaller $\gamma$ . We report the unnormalized representation error in Figure 17 in the appendix, where the trend is much clearer.
|
| 131 |
+
|
| 132 |
+
Overall, though we do not claim that there is a monotonic relationship between the discount factor and the difficulty of representation learning, our empirical study does suggest that representation learning is a key factor at play in the misuse of the discounting in actor-critic algorithms, beyond the widely recognized bias-variance trade-off. In the appendix, we provide additional experiments involving distributional RL to further support the bias-variance-representation trade-off hypothesis, under the assumption that the benefits of distributional RL comes mainly from the improved representation learning (Bellemare et al., 2017; Munos, 2018; Petroski Such et al., 2019).
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 9: Normalized representation error as a function of the discount factor. Shaded regions indicate one standard derivation. 4
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
4 OPTIMIZING THE DISCOUNTED OBJECTIVE (SCENARIO 2)
|
| 139 |
+
Figure 10: Comparison between PPO and DisPPO with $\gamma = 0 . 9 9 5$
|
| 140 |
+
|
| 141 |
+
When our goal is to optimize the discounted objective $J _ { \gamma < 1 } ( \pi )$ , theoretically we should have the $\gamma _ { \mathrm { A } } ^ { t }$ term in the actor update and use $\gamma _ { \mathrm { c } } ~ < ~ 1$ . Practitioners, however, usually ignore this $\gamma _ { \mathrm { A } } ^ { t }$ (i.e., set $\gamma _ { \mathrm { { A } } } = 1 $ ), introducing bias. Figure 10 shows that even if we use the discounted return as the performance metric, the biased implementation of PPO still outperforms the theoretically grounded implementation DisPPO in the domains we tested. Here PPO refers to the default PPO implementation where $\gamma _ { \mathrm { { A } } } = 1 , \gamma _ { \mathrm { { C } } } = \gamma < 1$ , and DisPPO (Alg. 6 in the appendix) adds the missing $\gamma _ { \mathrm { A } } ^ { t }$ term in PPO by using $\gamma _ { \mathrm { { A } } } = \gamma _ { \mathrm { { C } } } = \gamma < 1$ . We propose to interpret the empirical advantages of PPO over DisPPO with Hypothesis 2. For all experiments in this section, we use $\gamma _ { \mathrm { c } } = \gamma < 1$ .
|
| 142 |
+
|
| 143 |
+
An auxiliary task perspective: The biased policy update implementation of (2) ignoring $\gamma _ { \mathrm { A } } ^ { t }$ can be decomposed into two parts as $\Delta _ { t } = \gamma ^ { t } \Delta _ { t } + \mathsf { \bar { ( } 1 - } \mathsf { \bar { \gamma } } ^ { t } \mathsf { \bar { ) } } \Delta _ { t }$ , where $\Delta _ { t } \doteq q _ { \pi } ^ { \gamma _ { \mathrm { c } } } ( S _ { t } , A _ { t } ) \nabla _ { \theta } \log \pi ( \boldsymbol { A } _ { t } | S _ { t } )$ . We propose to interpret the difference term between the biased implementation $( \Delta _ { t } )$ and the theoretically grounded implementation $( \gamma ^ { t } \Delta _ { t } )$ , i.e., the $( 1 - \gamma ^ { t } ) q _ { \pi } ^ { \gamma _ { \mathrm { c } } } ( S _ { t } , \bar { A _ { t } } ) \nabla _ { \theta } \log \pi ( A _ { t } | S _ { t } )$ term, as the gradient of an auxiliary objective with a dynamic weighting $1 - \gamma ^ { t }$ . Let $\begin{array} { r } { J _ { s , \mu } ( \pi ) \doteq \sum _ { a } \pi ( a | s ) q _ { \mu } ^ { \gamma } ( s , a ) } \end{array}$ ; we have $\nabla _ { \boldsymbol { \theta } } J _ { s , \mu } ( \pi ) | _ { \mu = \pi } = \mathbb { E } _ { a \sim \pi ( \cdot | s ) } [ q _ { \pi } ^ { \gamma } ( s , a ) \nabla _ { \boldsymbol { \theta } } \log \pi ( a | s ) ]$ . This objective changes every time step (through $\mu _ { . }$ ). Inspired by the decomposition, we augment PPO with this auxiliary task, yielding AuxPPO (Algorithm 7 and Figure 13 in the appendix). In AuxPPO, we have two policies $\pi$ and $\pi ^ { \prime }$ parameterized by $\theta$ and $\theta ^ { \prime }$ respectively. The two policies are two heads over the same neural network backbone, where $\pi$ is used for interaction with the environment and $\pi ^ { \prime }$ is the policy for the auxiliary task. AuxPPO optimizes $\theta$ and $\theta ^ { \prime }$ simultaneously by considering the following joint loss
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
\begin{array} { r l } & { L ( \theta , \theta ^ { \prime } ) \doteq \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \operatorname* { m i n } \Big \{ \frac { \pi _ { \theta } ( A _ { t } | S _ { t } ) } { \pi _ { \theta _ { \mathrm { o d d } } } ( A _ { t } | S _ { t } ) } \mathrm { A d } \mathrm { v } _ { \pi _ { \theta _ { \mathrm { o d d } } } } ^ { \gamma _ { c } } ( S _ { t } , A _ { t } ) , \mathrm { c l i p } ( \frac { \pi _ { \theta } ( A _ { t } | S _ { t } ) } { \pi _ { \theta _ { \mathrm { o d d } } } ( A _ { t } | S _ { t } ) } ) \mathrm { A d } \mathrm { v } _ { \pi _ { \theta _ { \mathrm { o d d } } } } ^ { \gamma _ { c } } ( S _ { t } , A _ { t } ) \Big \} + } \\ & { \qquad \sum _ { t = 0 } ^ { \infty } ( 1 - \gamma ^ { t } ) \operatorname* { m i n } \Big \{ \frac { \pi _ { \theta ^ { \prime } } ( A _ { t } | S _ { t } ) } { \pi _ { \theta _ { \mathrm { o d d } } } ( A _ { t } | S _ { t } ) } \mathrm { A d } \mathrm { v } _ { \pi _ { \theta _ { \mathrm { o d d } } } } ^ { \gamma _ { c } } ( S _ { t } , A _ { t } ) , \mathrm { c l i p } ( \frac { \pi _ { \theta ^ { \prime } } ( A _ { t } | S _ { t } ) } { \pi _ { \theta _ { \mathrm { o d d } } } ( A _ { t } | S _ { t } ) } ) \mathrm { A d } \mathrm { v } _ { \pi _ { \theta _ { \mathrm { o d d } } } } ^ { \gamma _ { c } } ( S _ { t } , A _ { t } ) \Big \} , } \end{array}
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
where $S _ { t }$ and $A _ { t }$ are obtained by executing $\theta _ { \mathrm { o l d } }$ . We additionally synchronize $\theta ^ { \prime }$ with $\theta$ periodically to avoid an off-policy learning issue.
|
| 150 |
+
|
| 151 |
+
Flipped rewards: Besides AuxPPO, we also design novel environments with flipped rewards to investigate Hypothesis 2. Recall we include the time step in the state, this allows us to simply create a new environment by defining a new reward function $r ^ { \prime } ( s , t ) \doteq r ( s ) \mathbb { I } _ { t \le t _ { 0 } } - r ( s ) \mathbb { I } _ { t > t _ { 0 } }$ , where $\mathbb { I }$ is the indicator function. During an episode, within the first $t _ { 0 }$ steps, this new environment is the same as the original one. After $t _ { 0 }$ steps, the sign of the reward is flipped. We select $t _ { 0 }$ such that $\gamma ^ { t _ { 0 } }$ is sufficiently small, e.g., we define $t _ { 0 } \doteq \mathrm { m i n } _ { t } \{ \gamma ^ { t } < 0 . 0 5 \}$ . With this criterion for selecting $t _ { 0 }$ , the later transitions (i.e., transitions after $t _ { 0 }$ steps) have little influence on the evaluation objective, the discounted return. Consequently, the later transitions affect the overall learning process mainly through representation learning. DisPPO rarely makes use of the later transitions due to the $\gamma _ { \mathrm { A } } ^ { \dot { t } }$ term in the gradient update. AuxPPO makes use of the later transitions only through representation learning. PPO exploits the later transitions for representation learning and the later transitions also affect the control policy of PPO directly.
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 11: Curves without any marker are obtained in the original Ant $/$ HalfCheetah. Diamond-marked curves are obtained in Ant / HalfCheetah with $r ^ { \prime }$ . 5
|
| 155 |
+
|
| 156 |
+
Results: When we consider the original environments, Figure 11 shows that in 8 out 12 tasks, PPO outperforms DisPPO, even if the performance metric is the discounted episodic return. In all those 8 tasks, by using the difference term as an auxiliary task, AuxPPO is able to improve upon DisPPO. In 6 out of those 8 tasks, AuxPPO is able to roughly match the performance of PPO at the end of training. For $\gamma \in \{ 0 . 9 3 , 0 . 9 \}$ in Ant, the improvement of AuxPPO is not clear and we conjecture that this is because the learning of the $\pi$ -head (the control head) in AuxPPO is much slower than the learning of $\pi$ in PPO due to the $\gamma _ { \mathrm { c } } ^ { t }$ term. Overall, this suggests that the benefit of PPO over DisPPO comes mainly from representation learning.
|
| 157 |
+
|
| 158 |
+
When we consider the environments with flipped rewards, PPO is outperformed by DisPPO and AuxPPO by a large margin in 11 out of 12 tasks. The transitions after $t _ { 0 }$ steps are not directly relevant when the performance metric is the discounted return. However, learning on those transitions may still improve representation learning provided that those transitions are similar to the earlier transitions, which is the case in the original environments. PPO and AuxPPO, therefore, outperform DisPPO. However, when those transitions are much different from the earlier transitions, which is the case in the environments with flipped rewards, learning to control on them directly becomes distracting. PPO, therefore, is outperformed by DisPPO. Different from PPO, AuxPPO does not learn to control on later transitions. Provided that the network has enough capacity, the control head $\pi _ { \theta }$ in AuxPPO will not be affected much by the irrelevant transitions. The performance of AuxPPO is, therefore, similar to DisPPO.
|
| 159 |
+
|
| 160 |
+
To summarize, Figure 11 suggests that using $\gamma _ { \mathrm { { A } } } = 1$ is simply an inductive bias that all transitions are equally important. When this inductive bias is helpful for learning, $\gamma _ { \mathrm { { A } } } = 1$ implicitly implements auxiliary tasks thus improving representation learning and the overall performance. When this inductive bias is detrimental, however, $\gamma _ { \mathrm { { A } } } = 1$ can lead to significant performance drops. AuxPPO appears to be a safe choice that does not depend much on the correctness of this inductive bias.
|
| 161 |
+
|
| 162 |
+
# 5 RELATED WORK
|
| 163 |
+
|
| 164 |
+
The mismatch in actor-critic algorithm implementations has been previously studied. Thomas (2014) focuses on the natural policy gradient setting and shows that the biased implementation ignoring $\gamma _ { \mathrm { A } } ^ { t }$ can be interpreted as the gradient of the average reward objective under a strong assumption that the state distribution is independent of the policy. Nota & Thomas (2020) prove that without this strong assumption, the biased implementation is not the gradient of any stationary objective. This does not contradict our auxiliary task perspective as our objective $J _ { s , \mu } ( \pi )$ changes at every time step. Nota & Thomas (2020) further provide a counterexample showing that following the biased gradient can lead to a policy of poor performance w.r.t. both discounted and undiscounted objectives. Both Thomas (2014) and Nota & Thomas (2020), however, focus on theoretical disadvantages of the biased gradient and regard ignoring $\gamma _ { \mathrm { A } } ^ { t }$ as the source of the bias. We instead regard the introduction of $\gamma _ { \mathrm { c } } < 1$ in the critic as the source of the bias in the undiscounted setting and investigate its empirical advantages, which are more relevant to practitioners. Moreover, our representation learning perspective for investigating this mismatch is to our knowledge novel.
|
| 165 |
+
|
| 166 |
+
Although we propose the bias-variance-representation trade-off, we do not claim that is all that $\gamma$ affects. The discount factor also has many other effects (e.g., Sutton (1995); Jiang et al. (2016); Laroche et al. (2017); Laroche $\&$ van Seijen (2018); Lehnert et al. (2018); Fedus et al. (2019); Van Seijen et al. (2019); Amit et al. (2020)), which we leave for future work. In Scenario 1, using $\gamma _ { \mathrm { c } } < 1$ helps reduce the variance. Variance reduction in RL itself is an active research area (see, e.g., Papini et al. (2018); $\mathrm { X u }$ et al. (2019); Yuan et al. (2020)). Investigating those variance reduction techniques with $\gamma _ { \mathrm { c } } = 1$ is a possibility for future work. Recently, Bengio et al. (2020) study the effect of the bootstrapping parameter $\lambda$ in $\mathrm { T D } ( \lambda )$ in generalization. Our work studies the effect of the discount factor $\gamma$ in representation learning in the context of the misuse of the discounting in actor-critic algorithms, sharing a similar spirit of Bengio et al. (2020).
|
| 167 |
+
|
| 168 |
+
# 6 CONCLUSION
|
| 169 |
+
|
| 170 |
+
In this paper, we investigate the longstanding mismatch between theorists and practitioners in actorcritic algorithms from a representation learning perspective. Although the theoretical understanding of policy gradient algorithms have recently been significantly advanced (Agarwal et al., 2019; Wu et al., 2020), this mismatch has drawn little attention. We hope our empirical study can help practitioners understand actor-critic algorithms better and therefore design more efficient actor-critic algorithms in the setting of deep RL, where representation learning emerges as a major consideration. We hope our empirical study can draw more attention to the mismatch, which could enable the community to finally close this longstanding gap.
|
| 171 |
+
|
| 172 |
+
# REFERENCES
|
| 173 |
+
|
| 174 |
+
Joshua Achiam. Spinning up in deep reinforcement learning. 2018.
|
| 175 |
+
|
| 176 |
+
Alekh Agarwal, Sham M Kakade, Jason D Lee, and Gaurav Mahajan. Optimality and approximation with policy gradient methods in markov decision processes. arXiv preprint arXiv:1908.00261, 2019.
|
| 177 |
+
|
| 178 |
+
Ron Amit, Ron Meir, and Kamil Ciosek. Discount factor as a regularizer in reinforcement learning. arXiv preprint arXiv:2007.02040, 2020.
|
| 179 |
+
|
| 180 |
+
Marcin Andrychowicz, Anton Raichuk, Piotr Stanczyk, Manu Orsini, Sertan Girgin, Raphael ´ Marinier, Leonard Hussenot, Matthieu Geist, Olivier Pietquin, Marcin Michalski, et al. What ´ matters in on-policy reinforcement learning? a large-scale empirical study. arXiv preprint arXiv:2006.05990, 2020.
|
| 181 |
+
|
| 182 |
+
M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279, jun 2013.
|
| 183 |
+
|
| 184 |
+
Marc G Bellemare, Will Dabney, and Remi Munos. A distributional perspective on reinforcement ´ learning. arXiv preprint arXiv:1707.06887, 2017.
|
| 185 |
+
|
| 186 |
+
Emmanuel Bengio, Joelle Pineau, and Doina Precup. Interference and generalization in temporal difference learning. arXiv preprint arXiv:2003.06350, 2020.
|
| 187 |
+
|
| 188 |
+
Dimitri P Bertsekas and John N Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific Belmont, MA, 1996.
|
| 189 |
+
|
| 190 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
|
| 191 |
+
|
| 192 |
+
Itai Caspi, Gal Leibovich, Gal Novik, and Shadi Endrawis. Reinforcement learning coach, December 2017. URL https://doi.org/10.5281/zenodo.1134899.
|
| 193 |
+
|
| 194 |
+
Wesley Chung, Somjit Nath, Ajin Joseph, and Martha White. Two-timescale networks for nonlinear value function approximation. In International Conference on Learning Representations, 2018.
|
| 195 |
+
|
| 196 |
+
Kristopher De Asis, Alan Chan, Silviu Pitis, Richard S Sutton, and Daniel Graves. Fixed-horizon temporal difference methods for stable reinforcement learning. arXiv preprint arXiv:1909.03906, 2019.
|
| 197 |
+
|
| 198 |
+
Prafulla Dhariwal, Christopher Hesse, Oleg Klimov, Alex Nichol, Matthias Plappert, Alec Radford, John Schulman, Szymon Sidor, Yuhuai Wu, and Peter Zhokhov. Openai baselines. https: //github.com/openai/baselines, 2017.
|
| 199 |
+
|
| 200 |
+
Logan Engstrom, Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Firdaus Janoos, Larry Rudolph, and Aleksander Madry. Implementation matters in deep rl: A case study on ppo and trpo. In International Conference on Learning Representations, 2019.
|
| 201 |
+
|
| 202 |
+
William Fedus, Carles Gelada, Yoshua Bengio, Marc G Bellemare, and Hugo Larochelle. Hyperbolic discounting and learning over multiple horizons. arXiv preprint arXiv:1902.06865, 2019.
|
| 203 |
+
|
| 204 |
+
Scott Fujimoto, Herke van Hoof, and David Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
|
| 205 |
+
|
| 206 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018.
|
| 207 |
+
|
| 208 |
+
Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep reinforcement learning that matters. arXiv preprint arXiv:1709.06560, 2017.
|
| 209 |
+
|
| 210 |
+
Andrew Ilyas, Logan Engstrom, Shibani Santurkar, Dimitris Tsipras, Firdaus Janoos, Larry Rudolph, and Aleksander Madry. A closer look at deep policy gradients. arXiv preprint arXiv:1811.02553, 2018.
|
| 211 |
+
|
| 212 |
+
Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. arXiv preprint arXiv:1611.05397, 2016.
|
| 213 |
+
|
| 214 |
+
Nan Jiang, Satinder P Singh, and Ambuj Tewari. On structural properties of mdps that bound loss due to shallow planning. In IJCAI, 2016.
|
| 215 |
+
|
| 216 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 217 |
+
|
| 218 |
+
Vijay R Konda. Actor-critic algorithms. PhD thesis, Massachusetts Institute of Technology, 2002.
|
| 219 |
+
|
| 220 |
+
Ilya Kostrikov. Pytorch implementations of reinforcement learning algorithms. https:// github.com/ikostrikov/pytorch-a2c-ppo-acktr-gail, 2018.
|
| 221 |
+
|
| 222 |
+
Romain Laroche and Harm van Seijen. In reinforcement learning, all objective functions are not equal. 2018.
|
| 223 |
+
|
| 224 |
+
Romain Laroche, Mehdi Fatemi, Joshua Romoff, and Harm van Seijen. Multi-advisor reinforcement learning. arXiv preprint arXiv:1704.00756, 2017.
|
| 225 |
+
|
| 226 |
+
Lucas Lehnert, Romain Laroche, and Harm van Seijen. On value function representation of long horizon problems. In AAAI Conference on Artificial Intelligence, 2018.
|
| 227 |
+
|
| 228 |
+
Eric Liang, Richard Liaw, Robert Nishihara, Philipp Moritz, Roy Fox, Ken Goldberg, Joseph Gonzalez, Michael Jordan, and Ion Stoica. Rllib: Abstractions for distributed reinforcement learning. In International Conference on Machine Learning, 2018.
|
| 229 |
+
|
| 230 |
+
R McCallum. Reinforcement learning with selective perception and hidden state. PhD thesis, 1997.
|
| 231 |
+
|
| 232 |
+
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning, 2016.
|
| 233 |
+
|
| 234 |
+
Remi Munos.´ Distributional reinforcement learning. Invited talk at European Workshop on Reinforcement Learning https://ewrl.files.wordpress.com/2018/10/ distributional_rl.pdf, 2018.
|
| 235 |
+
|
| 236 |
+
Chris Nota and Philip S. Thomas. Is the policy gradient a gradient? In Proceedings of the 19th International Conference on Autonomous Agents and Multiagent Systems, 2020.
|
| 237 |
+
|
| 238 |
+
OpenAI. Openai five. https://openai.com/five/, 2018.
|
| 239 |
+
|
| 240 |
+
Matteo Papini, Damiano Binaghi, Giuseppe Canonaco, Matteo Pirotta, and Marcello Restelli. Stochastic variance-reduced policy gradient. arXiv preprint arXiv:1806.05618, 2018.
|
| 241 |
+
|
| 242 |
+
Fabio Pardo, Arash Tavakoli, Vitaly Levdik, and Petar Kormushev. Time limits in reinforcement learning. In International Conference on Machine Learning, 2018.
|
| 243 |
+
|
| 244 |
+
Felipe Petroski Such, Vashisht Madhavan, Rosanne Liu, Rui Wang, Pablo Samuel Castro, Yulun Li, Jiale Zhi, Ludwig Schubert, Marc G. Bellemare, Jeff Clune, and et al. An atari model zoo for analyzing, visualizing, and comparing deep reinforcement learning agents. Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, Aug 2019. doi: 10. 24963/ijcai.2019/452. URL http://dx.doi.org/10.24963/ijcai.2019/452.
|
| 245 |
+
|
| 246 |
+
Joshua Romoff, Peter Henderson, Ahmed Touati, Emma Brunskill, Joelle Pineau, and Yann Ollivier. Separating value functions across time-scales. arXiv preprint arXiv:1902.01883, 2019.
|
| 247 |
+
|
| 248 |
+
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning, 2015a.
|
| 249 |
+
|
| 250 |
+
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015b.
|
| 251 |
+
|
| 252 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 253 |
+
|
| 254 |
+
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, 2016.
|
| 255 |
+
|
| 256 |
+
Adam Stooke and Pieter Abbeel. rlpyt: A research code base for deep reinforcement learning in pytorch. arXiv preprint arXiv:1909.01500, 2019.
|
| 257 |
+
|
| 258 |
+
Richard S Sutton. Learning to predict by the methods of temporal differences. Machine Learning, 1988.
|
| 259 |
+
|
| 260 |
+
Richard S Sutton. Td models: Modeling the world at a mixture of time scales. In Machine Learning Proceedings 1995. Elsevier, 1995.
|
| 261 |
+
|
| 262 |
+
Richard S Sutton and Andrew G Barto. Reinforcement Learning: An Introduction (2nd Edition). MIT press, 2018.
|
| 263 |
+
|
| 264 |
+
Richard S Sutton, David A McAllester, Satinder P Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In Advances in Neural Information Processing Systems, 2000.
|
| 265 |
+
|
| 266 |
+
Philip Thomas. Bias in natural actor-critic algorithms. In Proceedings of the 31st International Conference on Machine Learning, 2014.
|
| 267 |
+
|
| 268 |
+
Harm Van Seijen, Mehdi Fatemi, and Arash Tavakoli. Using a logarithmic mapping to enable lower discount factors in reinforcement learning. In Advances in Neural Information Processing Systems, 2019.
|
| 269 |
+
|
| 270 |
+
Vivek Veeriah, Matteo Hessel, Zhongwen Xu, Janarthanan Rajendran, Richard L Lewis, Junhyuk Oh, Hado P van Hasselt, David Silver, and Satinder Singh. Discovery of useful questions as auxiliary tasks. In Advances in Neural Information Processing Systems, 2019.
|
| 271 |
+
|
| 272 |
+
Arthur F Veinott. Discrete dynamic programming with sensitive discount optimality criteria. The Annals of Mathematical Statistics, 1969.
|
| 273 |
+
|
| 274 |
+
Martin L Weitzman. Gamma discounting. American Economic Review, 2001.
|
| 275 |
+
|
| 276 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 1992.
|
| 277 |
+
|
| 278 |
+
Yue Wu, Weitong Zhang, Pan Xu, and Quanquan Gu. A finite time analysis of two time-scale actor critic methods. arXiv preprint arXiv:2005.01350, 2020.
|
| 279 |
+
|
| 280 |
+
Pan Xu, Felicia Gao, and Quanquan Gu. Sample efficient policy gradient methods with recursive variance reduction. arXiv preprint arXiv:1909.08610, 2019.
|
| 281 |
+
|
| 282 |
+
Huizhuo Yuan, Xiangru Lian, Ji Liu, and Yuren Zhou. Stochastic recursive momentum for policy gradient methods. arXiv preprint arXiv:2003.04302, 2020.
|
| 283 |
+
|
| 284 |
+
Shangtong Zhang. Modularized implementation of deep rl algorithms in pytorch. https:// github.com/ShangtongZhang/DeepRL, 2018.
|
| 285 |
+
|
| 286 |
+
# A PROOF OF LEMMA 2
|
| 287 |
+
|
| 288 |
+
Proof. The proof is based on Appendix B in Schulman et al. (2015a), where perturbation theory is used to prove the performance improvement bound (Lemma 1). To simplify notation, we use a vector and a function interchangeably, i.e., we also use $r$ and $\mu _ { 0 }$ to denote the reward vector and the initial distribution vector. $\bar { J ( \pi ) }$ and $d _ { \pi } ( s )$ are shorthand for $J _ { \gamma } ( \pi )$ and $d _ { \pi } ^ { \gamma } ( s )$ with $\gamma = 1$ . All vectors are column vectors.
|
| 289 |
+
|
| 290 |
+
Let that $S ^ { + }$ $s ^ { \infty }$ , iet ${ \cal S } ^ { + } \doteq { \cal S } / \{ s ^ { \infty } \}$ , we defineccording to $P _ { \pi } \in \mathbb { R } ^ { | S ^ { + } | \times | S ^ { + } | }$ $\begin{array} { r } { P _ { \pi } ( s , s ^ { \prime } ) \doteq \sum _ { a } \pi ( a | s ) p ( s ^ { \prime } | s , a ) } \end{array}$ $\textstyle G \doteq \sum _ { t = 0 } ^ { \infty } P _ { \pi } ^ { t }$ $G ( s , s ^ { \prime } )$ $s ^ { \prime }$ $s ^ { \infty }$ $S _ { 0 } = s$ $T _ { \mathrm { m a x } } < \infty$ implies that $G$ is well-defined and we have $G = ( I - P _ { \pi } ) ^ { - 1 }$ . Moreover, $T _ { \mathrm { m a x } } < \infty$ also implies $\begin{array} { r } { \forall s , \sum _ { s ^ { \prime } } G ( s , s ^ { \prime } ) \leq T _ { \mathrm { m a x } } } \end{array}$ , i.e., $\lvert \lvert G \rvert \rvert _ { \infty } \leq T _ { \mathrm { m a x } }$ . We have $J ( \pi ) = \mu _ { 0 } ^ { \top } G r$ .
|
| 291 |
+
|
| 292 |
+
Let $G ^ { \prime } \doteq ( I - P _ { \pi ^ { \prime } } ) ^ { - 1 }$ , we have
|
| 293 |
+
|
| 294 |
+
$$
|
| 295 |
+
J ( \pi ^ { \prime } ) - J ( \pi ) = \mu _ { 0 } ^ { \top } ( G ^ { \prime } - G ) r .
|
| 296 |
+
$$
|
| 297 |
+
|
| 298 |
+
Let $\Delta \doteq P _ { \pi ^ { \prime } } - P _ { \pi }$ , we have
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
\begin{array} { r } { G ^ { \prime - 1 } - G ^ { - 1 } = - \Delta , } \end{array}
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
Left multiply by $G ^ { \prime }$ and right multiply by $G$
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\begin{array} { r l } & { G - G ^ { \prime } = - G ^ { \prime } \Delta G , } \\ & { \qquad G ^ { \prime } = G + G ^ { \prime } \Delta G \quad ( \mathrm { E x p a n d i n g ~ } G ^ { \prime } \mathrm { ~ i n ~ R H S ~ r e c u r s i v e l y } } \\ & { \qquad = G + G \Delta G + G ^ { \prime } \Delta G \Delta G . } \end{array}
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
So we have
|
| 311 |
+
|
| 312 |
+
$$
|
| 313 |
+
\begin{array} { r } { J ( \pi ^ { \prime } ) - J ( \pi ) = \mu _ { 0 } ^ { \top } G \Delta G r + \mu _ { 0 } ^ { \top } G ^ { \prime } \Delta G \Delta G r . } \end{array}
|
| 314 |
+
$$
|
| 315 |
+
|
| 316 |
+
It is easy to see $\mu _ { 0 } ^ { \top } G = d _ { \pi } ^ { \top }$ and $G r = v _ { \pi }$ . So
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
\begin{array} { r l } & { \mu _ { 0 } ^ { \top } G \Delta G r = d _ { \pi } ^ { \top } \Delta v _ { \pi } } \\ & { \quad \quad \quad = \displaystyle \sum _ { s } d _ { \pi } ( s ) \sum _ { s ^ { \prime } } \Big ( \sum _ { a } \pi ^ { \prime } ( a | s ) p ( s ^ { \prime } | s , a ) - \sum _ { a } \pi ( a | s ) p ( s ^ { \prime } | s , a ) \Big ) v _ { \pi } ( s ^ { \prime } ) } \\ & { \quad \quad \quad = \displaystyle \sum _ { s } d _ { \pi } ( s ) \sum _ { a } a ^ { \top } ( \pi ^ { \prime } ( a | s ) - \pi ( a | s ) ) \sum _ { s ^ { \prime } } p ( s ^ { \prime } | s , a ) v _ { \pi } ( s ^ { \prime } ) } \\ & { \quad \quad \quad = \displaystyle \sum _ { s } d _ { \pi } ( s ) \sum _ { a } ( \pi ^ { \prime } ( a | s ) - \pi ( a | s ) ) \Big ( r ( s ) + \sum _ { s ^ { \prime } } p ( s ^ { \prime } | s , a ) v _ { \pi } ( s ^ { \prime } ) - v _ { \pi } ( s ) \Big ) } \end{array}
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
$$
|
| 323 |
+
= \sum _ { s } d _ { \pi } ( s ) \sum _ { a } \pi ^ { \prime } ( a | s ) \mathrm { A d v } _ { \pi } ( s , a ) .
|
| 324 |
+
$$
|
| 325 |
+
|
| 326 |
+
$\begin{array} { r } { ( \sum _ { a } \pi ( a | s ) \mathrm { A d v } _ { \pi } ( s , a ) = 0 } \end{array}$ by Bellman equation)
|
| 327 |
+
|
| 328 |
+
We now bound $\mu _ { 0 } ^ { \top } G ^ { \prime } \Delta G \Delta G r$ . First,
|
| 329 |
+
|
| 330 |
+
$$
|
| 331 |
+
\begin{array} { l } { | ( \Delta G r ) ( s ) | = | \displaystyle \sum _ { s ^ { \prime } } \Big ( \displaystyle \sum _ { a } \pi ^ { \prime } ( a | s ) - \pi ( a | s ) \Big ) p ( s ^ { \prime } | s , a ) v _ { \pi } ( s ^ { \prime } ) | } \\ { = | \displaystyle \sum _ { a } \Big ( \pi ^ { \prime } ( a | s ) - \pi ( a | s ) \Big ) \Big ( r ( s ) + \displaystyle \sum _ { s ^ { \prime } } p ( s ^ { \prime } | s , a ) v _ { \pi } ( s ^ { \prime } ) - v _ { \pi } ( s ) \Big ) | } \\ { = | \displaystyle \sum _ { a } \Big ( \pi ^ { \prime } ( a | s ) - \pi ( a | s ) \Big ) \mathrm { A d v } _ { \pi } ( s , a ) | } \\ { \le 2 \operatorname* { m a x } _ { s } \mathbf { D } _ { T V } ( \pi ^ { \prime } ( \cdot | s ) , \pi ( \cdot | s ) ) \operatorname* { m a x } _ { s , a } | \mathrm { A d v } _ { \pi } ( s , a ) | , } \end{array}
|
| 332 |
+
$$
|
| 333 |
+
|
| 334 |
+
where $\mathbf { D } _ { T V }$ is the total variation distance. So
|
| 335 |
+
|
| 336 |
+
$$
|
| 337 |
+
| | \Delta G r | | _ { \infty } \leq 2 \operatorname* { m a x } _ { s } { \mathbf { D } } _ { T V } ( \pi ^ { \prime } ( \cdot | s ) , \pi ( \cdot | s ) ) \operatorname* { m a x } _ { s , a } | { \mathbf { A } } { \mathbf { d } } { \mathbf { v } } _ { \pi } ( s , a ) | .
|
| 338 |
+
$$
|
| 339 |
+
|
| 340 |
+
Moreover, for any vector $x$ ,
|
| 341 |
+
|
| 342 |
+
$$
|
| 343 |
+
\begin{array} { r } { | ( \Delta x ) ( s ) | \leq 2 \underset { s } { \operatorname* { m a x } } \mathbf { D } _ { T V } \big ( \pi ^ { \prime } ( \cdot | s ) , \pi ( \cdot | s ) \big ) | | x | | _ { \infty } , } \\ { | | \Delta x | | _ { \infty } \leq 2 \underset { s } { \operatorname* { m a x } } \mathbf { D } _ { T V } \big ( \pi ^ { \prime } ( \cdot | s ) , \pi ( \cdot | s ) \big ) | | x | | _ { \infty } . } \end{array}
|
| 344 |
+
$$
|
| 345 |
+
|
| 346 |
+
So
|
| 347 |
+
|
| 348 |
+
$$
|
| 349 |
+
\begin{array} { r l } & { \qquad | | \Delta | | _ { \infty } \leq 2 \operatorname* { m a x } _ { s } \mathrm { D } _ { T V } ( \pi ^ { \prime } ( \cdot | s ) , \pi ( \cdot | s ) ) , } \\ & { \qquad | \mu _ { 0 } ^ { \top } G ^ { \prime } \Delta G \Delta G r | \leq | | \mu _ { 0 } ^ { \top } | | _ { 1 } | | G ^ { \prime } | | _ { \infty } | | \Delta | | _ { \infty } | | G | | _ { \infty } | | \Delta G r | | _ { \infty } } \\ & { \qquad \leq 4 T _ { \operatorname* { m a x } } ^ { 2 } \operatorname* { m a x } _ { s } \mathrm { D } _ { T V } ^ { 2 } ( \pi ^ { \prime } ( \cdot | s ) , \pi ( \cdot | s ) ) \underset { s , a } { \operatorname* { m a x } } | \mathrm { A d v } _ { \pi } ( s , a ) | } \\ & { \qquad \leq 4 T _ { \operatorname* { m a x } } ^ { 2 } \underset { s } { \operatorname* { m a x } } \mathrm { D } _ { K L } ( \pi ( \cdot | s ) | | \pi ^ { \prime } ( \cdot | s ) ) \underset { s , a } { \operatorname* { m a x } } | \mathrm { A d v } _ { \pi } ( s , a ) | , } \end{array}
|
| 350 |
+
$$
|
| 351 |
+
|
| 352 |
+
which completes the proof.
|
| 353 |
+
|
| 354 |
+
Note this perturbation-based proof of Lemma 2 holds only for $r : { \mathcal { S } } \mathbb { R }$ . For $r : S \times \mathcal { A } \mathbb { R }$ , we can turn to the coupling-based proof as Schulman et al. (2015a), which, however, complicates the presentation and deviates from the main purpose of this paper. We, therefore, leave it for future work.
|
| 355 |
+
|
| 356 |
+
# B EXPERIMENT DETAILS
|
| 357 |
+
|
| 358 |
+
# B.1 METHODOLOGY
|
| 359 |
+
|
| 360 |
+
We use HalfCheetah, Walker, Hopper, Ant, Humanoid, and HumanoidStandup as our benchmarks. We exclude other tasks as we find PPO plateaus quickly there. The tasks we consider have a hard time limit of 1000. Following Pardo et al. (2018), we add time step information into the state, i.e., there is an additional scalar $t / 1 0 0 0$ in the observation vector. Following Achiam (2018), we estimate the KL divergence between the current policy $\theta$ and the sampling policy $\theta _ { \mathrm { o l d } }$ when optimizing the loss (3). When the estimated $\mathrm { K L }$ divergence is greater than a threshold, we stop updating the actor and update only the critic with current data. We use Adam (Kingma & Ba, 2014) as the optimizer and perform grid search for the initial learning rates of Adam optimizers. Let $\alpha _ { A }$ and $\alpha _ { C } \doteq \beta \alpha _ { A }$ be the learning rates for the actor and critic respectively. For each algorithmic configuration (i.e., a curve in a figure), we tune $\alpha _ { A } \in \{ 0 . 1 2 5 , 0 . 2 5 , 0 . 5 , 1 , 2 \} \times 3 \cdot 1 0 ^ { - 4 }$ and $\beta \in \{ 1 , 3 \}$ with grid search in Ant with 3 independent runs maximizing the average return of the last 100 training episodes. In particular, $\overline { { \alpha _ { A } } } ~ = ~ 3 \cdot 1 0 ^ { - 4 }$ and $\beta ~ = ~ 3$ is roughly the default learning rates for the PPO implementation in Achiam (2018). We then run this algorithmic configuration with the best $\alpha _ { A }$ and $\alpha _ { C }$ in all tasks. Overall, we find after removing GAE, smaller learning rates are preferred. When we use FHTD, we additionally consider $\bar { H ^ { - } } \in \{ 1 6 , 3 2 , 6 4 , 1 2 8 , 2 5 6 , 5 1 2 , 1 0 2 4 \}$ in the grid search. When we use C51, we additionally consider $\begin{array} { r l r } { \cdot { V _ { \mathrm { { m a x } } } } } & { { } \in } & { \left\{ { 2 0 , 4 0 , 8 0 , 1 6 0 , 3 2 0 , 6 4 0 , 1 2 8 0 , 2 5 6 0 , 5 1 2 0 , 1 0 2 4 0 , 8 1 9 2 0 , 1 6 3 8 4 0 , 3 2 7 6 8 0 } \right\} } \end{array}$ in the grid search. We use PPO-TD with $\gamma _ { \mathrm { c } } = 0 . 9 9$ as an example to study how the best hyperparameter configuration in Ant transfers to other games. As shown in Figure 12, the best learning rates of Ant $\overset { \prime } { \alpha _ { \mathrm { A } } } = 3 \cdot 1 0 ^ { - 4 }$ and $\beta = 3$ ) yields reasonably good performance in all the other games except Humanoid. In the paper, we do not draw a conclusion from a single task. So an outlier is unlikely to affect the overall conclusion.
|
| 361 |
+
|
| 362 |
+
In the discounted setting, we consider only Ant, HalfCheetah and their variants. For Walker2d, Hopper, and Humanoid, we find the average episode length of all algorithms are smaller than $t _ { 0 }$ , i.e., the flipped reward rarely takes effects. For HumanoidStandup, the scale of the reward is too large. To summarize, other four environments are not well-suited for the purpose of our empirical study. Moreover, in the discounted setting, we performed the grid search of the learning rates for both Ant and HalfCheetah.
|
| 363 |
+
|
| 364 |
+

|
| 365 |
+
Figure 12: PPO-TD $( \gamma _ { \mathrm { c } } = 0 . 9 9 )$ with different learning rates. A curve labeled with $( x , \beta )$ corresponds to an initial learning rate for the actor and critic of $\alpha _ { \mathrm { { A } } } = x \times 3 \cdot 1 0 ^ { - 4 }$ and $\alpha _ { \mathrm { { C } } } = \beta \alpha _ { \mathrm { { A } } }$ respectively. The best learning rates for Ant $( \alpha _ { \mathrm { A } } = 3 \cdot 1 0 ^ { - 4 }$ and $\beta = 3$ ) yields reasonably good performance in all the other games except Humanoid.
|
| 366 |
+
|
| 367 |
+
# B.2 ALGORITHM DETAILS
|
| 368 |
+
|
| 369 |
+
The pseudocode of all implemented algorithms are provide in Algorithms 1 - 7 with their architectures illustrated in Figure 13. For hyperparameters that are not included in the grid search, we use the same value as Dhariwal et al. (2017); Achiam (2018). In particular, for the rollout length, we set $K = 2 0 4 8$ . For the optimization epochs, we set $K _ { o p t } = 3 2 0$ . For the minibatch size, we set $B = 6 4$ . For the maximum KL divergence, we set $K L _ { t a r g e t } = 0 . 0 1$ . We clip $\frac { \pi _ { \theta } ( a | s ) } { \pi _ { \theta _ { o l d } } ( a | s ) }$ into $[ - 0 . 2 , 0 . 2 ]$ . We use $N _ { s } = 5 1$ supports for PPO-C51.
|
| 370 |
+
|
| 371 |
+
We use two-hidden-layer neural networks for function approximation. Each hidden layer has 64 hidden units and a tanh activation function. The output layer of the actor network has a tanh activation function and is interpreted as the mean of an isotropic Gaussian distribution, whose standard derivation is a global state-independent variable as suggested by Schulman et al. (2015a).
|
| 372 |
+
|
| 373 |
+
# Algorithm 1: PPO
|
| 374 |
+
|
| 375 |
+
#
|
| 376 |
+
|
| 377 |
+
Input:
|
| 378 |
+
$\theta , \psi$ : parameters of $\pi , \hat { v }$
|
| 379 |
+
$\alpha _ { A } , \alpha _ { C }$ : Initial learning rates of the Adam optimizers for $\theta , \psi$
|
| 380 |
+
$K , K _ { o p t } , B$ : rollout length, number of optimization epochs, and minibatch size
|
| 381 |
+
$K L _ { t a r g e t }$ : maximum KL divergence threshold
|
| 382 |
+
$S _ { 0 } \sim \mu _ { 0 }$
|
| 383 |
+
while True do Initialize a buffer $M$ $\theta _ { o l d } \theta$ for $i = 0 , \ldots , K - 1$ do $A _ { i } \sim \pi _ { \theta _ { o l d } } ( \cdot | S _ { i } )$ Execute $A _ { i }$ , get $R _ { i + 1 } , S _ { i + 1 }$ if $S _ { i + 1 }$ is a terminal state then $\dot { m } _ { i } \gets 0 , S _ { i + 1 } \sim \mu _ { 0 }$ else mi ← 1 end end $G _ { K } \gets \hat { v } ( S _ { K } )$ for $i = K - 1 , \ldots , 0$ do $G _ { i } \gets R _ { i + 1 } + \gamma _ { \mathrm { c } } m _ { i } G _ { i + 1 }$ $\mathtt { A d v } _ { i } \gets R _ { i + 1 } + \gamma _ { \mathrm { c } } m _ { i } \hat { v } _ { \psi } ( S _ { i + 1 } ) - \hat { v } _ { \psi } ( S _ { i } )$ Store $\left( { { S _ { i } } , { A _ { i } } , { G _ { i } } , \mathrm { { A d v } } _ { i } } \right)$ in $M$ end Normalize Advi in M as Advi ← Advi−mean({Advi}) for $o = 1 , \ldots , K _ { o p t }$ do Sample a minibatch $\{ ( S _ { i } , A _ { i } , G _ { i } , \mathrm { A d v } _ { i } ) \} _ { i = 1 , \ldots , B }$ from $M$ $\begin{array} { r } { L ( \psi ) \gets \frac { 1 } { 2 B } \sum _ { i = 1 } ^ { B } ( \hat { v } _ { \psi } ( S _ { i } ) - G _ { i } ) ^ { 2 } \ / \star } \end{array}$ No gradient through $G _ { i }$ \*/ $\begin{array} { r } { L ( \theta ) \gets \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \operatorname* { m i n } \{ \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } \mathrm { A d v } _ { i } , \mathrm { c l i p } ( \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } ) \mathrm { A d v } _ { i } \} } \end{array}$ if Perform one gradient update to $\begin{array} { r } { \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \log \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) - \log \pi _ { \theta } ( A _ { i } | S _ { i } ) < K L _ { t a r g e t } } \end{array}$ $\psi$ minimizing $L ( \psi )$ with Adam then Perform one gradient update to $\theta$ maximizing $L ( \theta ) { \dot { } }$ end end
|
| 384 |
+
end
|
| 385 |
+
|
| 386 |
+
# Algorithm 2: PPO-TD
|
| 387 |
+
|
| 388 |
+
#
|
| 389 |
+
|
| 390 |
+
$\theta , \psi$ : parameters of $\pi , \hat { v }$
|
| 391 |
+
$\alpha _ { A } , \alpha _ { C }$ : Initial learning rates of the Adam optimizers for $\theta , \psi$
|
| 392 |
+
$K , K _ { o p t } , B$ : rollout length, number of optimization epochs, and minibatch size
|
| 393 |
+
$K L _ { t a r g e t }$ : maximum KL divergence threshold
|
| 394 |
+
$S _ { 0 } \sim \mu _ { 0 }$
|
| 395 |
+
while True do Initialize a buffer $M$ $\theta _ { o l d } \theta$ for $i = 0 , \ldots , K - 1$ do $A _ { i } \sim \pi _ { \theta _ { o l d } } ( \cdot | S _ { i } )$ Execute $A _ { i }$ , get $R _ { i + 1 } , S _ { i + 1 }$ if $S _ { i + 1 }$ is a terminal state then $\dot { m } _ { i } \gets 0 , S _ { i + 1 } \sim \mu _ { 0 }$ else mi ← 1 end end for $i = K - 1 , \ldots , 0$ do $\mathtt { A d v } _ { i } \gets R _ { i + 1 } + \gamma _ { \mathrm { c } } m _ { i } \hat { v } _ { \psi } ( S _ { i + 1 } ) - \hat { v } _ { \psi } ( S _ { i } )$ $S _ { i } ^ { \prime } \gets S _ { i + 1 } , r _ { i } \gets R _ { i + 1 }$ Store $\left( S _ { i } , A _ { i } , m _ { i } , r _ { i } , S _ { i } ^ { \prime } , \mathrm { { A d v } } _ { i } \right)$ in $M$ end Normalize $\mathbf { A d v } _ { i }$ in $M$ as $\begin{array} { r } { \mathrm { A d v } _ { i } \gets \frac { \mathrm { A d v } _ { i } - \mathrm { m e a n } ( \{ \mathrm { A d v } _ { i } \} ) } { \mathrm { s t d } ( \{ \mathrm { A d v } _ { i } \} ) } } \end{array}$ for $o = 1 , \ldots , K _ { o p t }$ do Sample a minibatch $\{ ( S _ { i } , A _ { i } , m _ { i } , r _ { i } , S _ { i } ^ { \prime } , \mathrm { A d v } _ { i } ) \} _ { i = 1 , \dots , B }$ from M $y _ { i } \gets r _ { i } + \gamma _ { \mathrm { c } } m _ { i } \hat { v } _ { \psi } ( S _ { i } ^ { \prime } )$ $\begin{array} { r } { L ( \psi ) \gets \frac { 1 } { 2 B } \sum _ { i = 1 } ^ { B } ( \hat { v } _ { \psi } ( S _ { i } ) - y _ { i } ) ^ { 2 } \mathrm { ~ / ~ } \star } \end{array}$ No gradient through $y _ { i }$ \*/ $\begin{array} { r } { L ( \theta ) \gets \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \operatorname* { m i n } \{ \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } \mathrm { A d v } _ { i } , \mathrm { c l i p } ( \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } ) \mathrm { A d v } _ { i } \} } \end{array}$ Pif $\psi$ $L ( \psi )$ Adamthen $\begin{array} { r } { \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \log \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) - \log \pi _ { \theta } ( A _ { i } | S _ { i } ) < K L _ { t a r g e t } } \end{array}$ $\theta$ $L ( \theta ) { \dot { } }$ end end
|
| 396 |
+
end
|
| 397 |
+
|
| 398 |
+
# Algorithm 3: PPO-TD-Ex
|
| 399 |
+
|
| 400 |
+
#
|
| 401 |
+
|
| 402 |
+
$\theta , \psi$ : parameters of $\pi , \hat { v }$
|
| 403 |
+
$\alpha _ { A } , \alpha _ { C }$ : Initial learning rates of the Adam optimizers for $\theta , \psi$
|
| 404 |
+
$K , K _ { o p t } , B$ : rollout length, number of optimization epochs, and minibatch size
|
| 405 |
+
$K L _ { t a r g e t }$ : maximum KL divergence threshold
|
| 406 |
+
$N$ : number of extra transitions
|
| 407 |
+
$p , r$ : transition kernel and reward function of the oracle
|
| 408 |
+
$S _ { 0 } \sim \mu _ { 0 }$
|
| 409 |
+
while True do Initialize a buffer $M$ $\theta _ { o l d } \theta$ for $i = 0 , \ldots , K - 1$ do for $j = 0 , \ldots , N$ do $A _ { i } ^ { j } \sim \pi _ { \theta _ { o l d } } ( \cdot | S _ { i } ) , R _ { i + 1 } ^ { j } r ( S _ { i } , A _ { i } ^ { j } ) , S _ { i + 1 } ^ { j } \sim p ( \cdot | S _ { i } , A _ { i } ^ { j } )$ if $S _ { i + 1 } ^ { j }$ is a terminal state then $| \quad \stackrel { \cdot \right. } { m _ { i } ^ { j } } \left. 0 , S _ { i + 1 } ^ { j } \sim \mu _ { 0 }$ else mj i ← 1 end end $S _ { i + 1 } \gets S _ { i + 1 } ^ { 0 }$ end for $i = K - 1 , \ldots , 0$ do $\mathrm { A d v } _ { i } \gets R _ { i + 1 } ^ { 0 } + \gamma _ { \mathrm { c } } m _ { i } ^ { 0 } \hat { v } _ { \psi } ( S _ { i + 1 } ^ { 0 } ) - \hat { v } _ { \psi } ( S _ { i } ^ { 0 } )$ for $j = 0 , \ldots , N$ do $S _ { i } ^ { \prime j } \gets S _ { i + 1 } ^ { j }$ end Store $\left( \{ S _ { i } ^ { j } , A _ { i } ^ { j } , m _ { i } ^ { j } , r _ { i } ^ { j } , S _ { i } ^ { \prime j } \} _ { j = 0 , \dots , N } , \mathbf { A } \mathbf { d } \mathbf { v } _ { i } \right) .$ in M end Normalize Advi in M as Advi ← Advi−mean({Advi}) for $o = 1 , \ldots , K _ { o p t }$ do Sample a minibatch $\{ ( \{ S _ { i } ^ { j } , A _ { i } ^ { j } , m _ { i } ^ { j } , r _ { i } ^ { j } , S _ { i } ^ { \prime j } \} _ { j = 0 , \dots , N } , \mathrm { A d v } _ { i } ) \} _ { i = 1 , \dots , B }$ from M $\begin{array} { r } { y _ { i } \gets \frac { 1 } { N + 1 } \sum _ { j = 0 } ^ { N } r _ { i } ^ { j } + \gamma _ { \mathrm { c } } m _ { i } ^ { j } \hat { v } _ { \psi } ( S _ { i } ^ { \prime j } ) } \end{array}$ $\begin{array} { r } { L ( \psi ) \gets \frac { 1 } { 2 B } \sum _ { i = 1 } ^ { B } ( \hat { v } _ { \psi } ( S _ { i } ^ { 0 } ) - y _ { i } ) ^ { 2 } \ / \star } \end{array}$ No gradient through $y _ { i }$ \*/ $\begin{array} { r } { L ( \theta ) \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \operatorname* { m i n } \{ \frac { \pi _ { \theta } ( A _ { i } ^ { 0 } | S _ { i } ^ { 0 } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } ^ { 0 } | S _ { i } ^ { 0 } ) } \mathrm { A d v } _ { i } } \end{array}$ n{ πθ (A0i |S0i )πθ (A0i |S0i ) Advi, clip( πθ (A0i |S0i )πθ (A0i |S0i ) )Advi} Perform one gradient update to $\psi$ minimizing $L ( \psi )$ with Adam if $\begin{array} { r } { \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \log \pi _ { \theta _ { o l d } } ( A _ { i } ^ { 0 } | S _ { i } ^ { 0 } ) - \log \pi _ { \theta } ( A _ { i } ^ { 0 } | S _ { i } ^ { 0 } ) < K L _ { t a r g e t } } \end{array}$ thenh Adam $\theta$ $L ( \theta )$ end end
|
| 410 |
+
end
|
| 411 |
+
|
| 412 |
+
# Algorithm 4: PPO-FHTD
|
| 413 |
+
|
| 414 |
+
#
|
| 415 |
+
|
| 416 |
+

|
| 417 |
+
|
| 418 |
+
# Algorithm 5: PPO-C51
|
| 419 |
+
|
| 420 |
+
#
|
| 421 |
+
|
| 422 |
+
$\theta , \psi$ : parameters of $\pi$ $\tau , \{ \hat { v } ^ { j } \} _ { j = 1 , \dots , N _ { s } }$ with $N _ { s }$ being the number of supports and $\hat { v } ^ { j }$ being the
|
| 423 |
+
probability of each support
|
| 424 |
+
$\alpha _ { A } , \alpha _ { C }$ : Initial learning rates of the Adam optimizers for $\theta , \psi$
|
| 425 |
+
$K , K _ { o p t } , B$ : rollout length, number of optimization epochs, and minibatch size
|
| 426 |
+
$K L _ { t a r g e t }$ : maximum KL divergence threshold
|
| 427 |
+
$\begin{array} { r l } & { \Delta _ { z } \doteq \frac { 2 V _ { \mathrm { m a x } } } { N _ { s } - 1 } , \left\{ z _ { j } \doteq - V _ { \mathrm { m a x } } + ( j - 1 ) \Delta _ { z } : j = 1 , \ldots , N _ { s } \right\} / / } \\ & { S _ { 0 } \sim \mu _ { 0 } } \end{array}$ Define the supports
|
| 428 |
+
while True do
|
| 429 |
+
Initialize a buffer $M$
|
| 430 |
+
$\theta _ { o l d } \theta$
|
| 431 |
+
for i = 0, . . . , K − 1 do $A _ { i } \sim \pi _ { \theta _ { o l d } } ( \cdot | S _ { i } )$ Execute $A _ { i }$ , get $R _ { i + 1 } , S _ { i + 1 }$ if $S _ { i + 1 }$ is a terminal state then $\mid \quad \dot { m } _ { i } 0 , S _ { i + 1 } \sim \mu _ { 0 }$ else mi ← 1 end
|
| 432 |
+
end
|
| 433 |
+
for $i = K - 1 , \ldots , 0$ do $\begin{array} { r l } & { \textup { \texttt { A } } ^ { i } \gets \textup { \texttt { A } } ^ { - 1 } - 1 , \cdot \cdot \cdot , \cup \textup { \texttt { u o } } } \\ & { \quad \mathrm { A d v } _ { i } \gets R _ { i + 1 } + m _ { i } \gamma _ { \mathrm { C } } \sum _ { j = 1 } ^ { N _ { s } } \hat { v } _ { \psi } ^ { j } ( S _ { i + 1 } ) z _ { j } - \sum _ { j = 1 } ^ { N _ { s } } \hat { v } _ { \psi } ^ { j } ( S _ { i } ) z _ { j } } \\ & { \quad S _ { i } ^ { \prime } \gets S _ { i + 1 } , r _ { i } \gets R _ { i + 1 } } \\ & { \quad \mathrm { S t o r e } \ ( S _ { i } , A _ { i } , m _ { i } , r _ { i } , S _ { i } ^ { \prime } , \mathrm { A d v } _ { i } ) \mathrm { ~ i n ~ } M } \end{array}$
|
| 434 |
+
end
|
| 435 |
+
Normalize $\mathbf { A d v } _ { i }$ in $M$ as $\begin{array} { r } { \mathrm { A d v } _ { i } \gets \frac { \mathrm { A d v } _ { i } - \mathrm { m e a n } ( \{ \mathrm { A d v } _ { i } \} ) } { \mathrm { s t d } ( \{ \mathrm { A d v } _ { i } \} ) } } \end{array}$
|
| 436 |
+
for $o = 1 , \ldots , K _ { o p t }$ do Sample a minibatch $\{ ( S _ { i } , A _ { i } , m _ { i } , r _ { i } , S _ { i } ^ { \prime } , \mathrm { A d v } _ { i } ) \} _ { i = 1 , \dots , B }$ from $M$ for $i = 1 , \ldots , B$ do for $j = 1 , \dots , N _ { s }$ do $\begin{array} { r l } { | } & { { } z _ { j } ^ { i } \gets r _ { i } + m _ { i } \gamma _ { \mathrm { C } } z _ { j } } \end{array}$ end end for $j = 1 , \dots , N _ { s }$ do $\begin{array} { r } { y _ { j } ^ { i } \sum _ { k = 1 } ^ { N _ { s } } [ 1 - \frac { \vert [ z _ { j } ^ { i } ] _ { - V _ { \mathrm { m a x } } } ^ { V _ { \mathrm { m a x } } } - z _ { j } \vert } { \Delta _ { z } } ] _ { 0 } ^ { 1 } \hat { \sigma } _ { \psi } ^ { k } ( S _ { i } ^ { \prime } ) ~ / \star ~ [ x ] _ { l } ^ { u } \doteq \operatorname* { m i n } ( \operatorname* { m a x } ( x , l ) , u ) } \end{array}$ \*/ end $\begin{array} { r } { L ( \psi ) \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \sum _ { j = 1 } ^ { N _ { s } } - y _ { j } ^ { i } \log \hat { v } _ { \psi } ^ { j } ( S _ { i } ) / \star } \end{array}$ No gradient through $y _ { j } ^ { i }$ \*/ $\begin{array} { r } { L ( \theta ) \gets \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \operatorname* { m i n } \{ \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } \mathrm { A d v } _ { i } , \mathrm { c l i p } ( \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } ) \mathrm { A d v } _ { i } \} } \end{array}$ Pif $\psi$ $L ( \psi )$ Adamthen $\begin{array} { r } { \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \log \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) - \log \pi _ { \theta } ( A _ { i } | S _ { i } ) < K L _ { t a r g e t } } \end{array}$ $\theta$ $L ( \theta )$ end
|
| 437 |
+
end
|
| 438 |
+
end
|
| 439 |
+
|
| 440 |
+
# Algorithm 6: DisPPO
|
| 441 |
+
|
| 442 |
+
Input:
|
| 443 |
+
$\theta , \psi$ : parameters of $\pi , \hat { v }$
|
| 444 |
+
$\alpha _ { A } , \alpha _ { C }$ : Initial learning rates of the Adam optimizers for $\theta , \psi$
|
| 445 |
+
$K , K _ { o p t } , B$ : rollout length, number of optimization epochs, and minibatch size
|
| 446 |
+
$K L _ { t a r g e t }$ : maximum KL divergence threshold
|
| 447 |
+
$S _ { 0 } \sim \mu _ { 0 } , t 0$
|
| 448 |
+
while True do Initialize a buffer $M$ $\theta _ { o l d } \theta$ for $i = 0 , \ldots , K - 1$ do $A _ { i } \sim \pi _ { \theta _ { o l d } } ( \cdot | S _ { i } ) , t _ { i } t$ Execute $A _ { i }$ , get $R _ { i + 1 } , S _ { i + 1 }$ if $S _ { i + 1 }$ is a terminal state then $\dot { m } _ { i } \gets 0 , S _ { i + 1 } \sim \mu _ { 0 } , t \gets 0$ else $\mid \quad m _ { i } 1 , t t + 1$ end end $G _ { K } \gets \hat { v } ( S _ { K } )$ for $i = K - 1 , \ldots , 0$ do $G _ { i } \gets R _ { i + 1 } + \gamma _ { \mathrm { c } } m _ { i } G _ { i + 1 }$ $\mathtt { A d v } _ { i } \gets R _ { i + 1 } + \gamma _ { \mathrm { c } } m _ { i } \hat { v } _ { \psi } ( S _ { i + 1 } ) - \hat { v } _ { \psi } ( S _ { i } )$ Store $\left( { { S _ { i } } , { A _ { i } } , { G _ { i } } , \mathrm { { A d v } } _ { i } , { t _ { i } } } \right)$ in M end Normalize Advi in M as Advi ← Advi−mean({Advi})std({Adv }) for $o = 1 , \ldots , K _ { o p t }$ do Sample a minibatch $\{ ( S _ { i } , A _ { i } , G _ { i } , \mathrm { A d v } _ { i } , t _ { i } ) \} _ { i = 1 , \ldots , B }$ from $M$ $\begin{array} { r } { L ( \psi ) \frac { 1 } { 2 B } \sum _ { i = 1 } ^ { B } ( \hat { v } _ { \psi } ( S _ { i } ) - G _ { i } ) ^ { 2 } \mathrm { ~ / ~ } \star } \end{array}$ No gradient through $G _ { i }$ \*/ $\begin{array} { r l } { L ( \theta ) \gets \frac { 1 } { B } \sum _ { i = 1 } ^ { B } } & { { } \operatorname* { m i n } \{ \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } { \bf A } \bf d v _ { i } , \mathrm { c l i p } ( \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } ) { \bf A } \bf d v _ { i } \} } \end{array}$ Pif $\psi$ $L ( \psi )$ Adamthen $\begin{array} { r } { \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \log \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) - \log \pi _ { \theta } ( A _ { i } | S _ { i } ) < K L _ { t a r g e t } } \end{array}$ Perform one gradient update to $\theta$ maximizing $L ( \theta ) { \dot { } }$ with Adam end end
|
| 449 |
+
end
|
| 450 |
+
|
| 451 |
+
# Algorithm 7: AuxPPO
|
| 452 |
+
|
| 453 |
+
Input:
|
| 454 |
+
$\theta , \theta ^ { \prime } , \psi$ : parameters of $\pi , \pi ^ { \prime } , \hat { v }$
|
| 455 |
+
$\alpha _ { A } , \alpha _ { C }$ : Initial learning rates of the Adam optimizers for $\theta , \psi$
|
| 456 |
+
$K , K _ { o p t } , B$ : rollout length, number of optimization epochs, and minibatch size
|
| 457 |
+
$K L _ { t a r g e t }$ : maximum KL divergence threshold
|
| 458 |
+
$S _ { 0 } \sim \mu _ { 0 } , t 0$
|
| 459 |
+
while True do Initialize a buffer $M$ $\theta _ { o l d } \theta , \theta ^ { \prime } \theta$ for $i = 0 , \ldots , K - 1$ do $A _ { i } \sim \pi _ { \theta _ { o l d } } ( \cdot | S _ { i } ) , t _ { i } t$ Execute $A _ { i }$ , get $R _ { i + 1 } , S _ { i + 1 }$ if $S _ { i + 1 }$ is a terminal state then $\Dot { m } _ { i } \gets 0 , S _ { i + 1 } \sim \mu _ { 0 } , t \gets 0$ else $\mid \quad m _ { i } 1 , t t + 1$ end end $G _ { K } \gets \hat { v } ( S _ { K } )$ for $i = K - 1 , \ldots , 0$ do $G _ { i } \gets R _ { i + 1 } + \gamma _ { \mathrm { c } } m _ { i } G _ { i + 1 }$ $\mathtt { A d v } _ { i } \gets R _ { i + 1 } + \gamma _ { \mathrm { c } } m _ { i } \hat { v } _ { \psi } ( S _ { i + 1 } ) - \hat { v } _ { \psi } ( S _ { i } )$ Store $\left( { { S _ { i } } , { A _ { i } } , { G _ { i } } , \mathrm { { A d v } } _ { i } , { t _ { i } } } \right)$ in M end Normalize Advi in M as Advi ← Advi−mean({Advi}) for $o = 1 , \ldots , K _ { o p t }$ do Sample a minibatch $\{ ( S _ { i } , A _ { i } , G _ { i } , \mathrm { A d v } _ { i } , t _ { i } ) \} _ { i = 1 , \ldots , B }$ from $M$ $\begin{array} { r } { L ( \psi ) \frac { 1 } { 2 B } \sum _ { i = 1 } ^ { B } ( \hat { v } _ { \psi } ( S _ { i } ) - G _ { i } ) ^ { 2 } \mathrm { ~ / ~ } \star } \end{array}$ No gradient through $G _ { i }$ \*/ $\begin{array} { r l } & { L ( \theta , \theta ^ { \prime } ) \gets \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \gamma _ { C } ^ { t _ { i } } \operatorname* { m i n } \{ \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } \mathrm { A d v } _ { i } , \mathrm { c l i p } ( \frac { \pi _ { \theta } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } ) \mathrm { A d v } _ { i } \} + } \\ & { \quad \quad \quad \quad ( 1 - \gamma _ { \mathrm { C } } ^ { t _ { i } } ) \operatorname* { m i n } \{ \frac { \pi _ { \theta ^ { \prime } } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } \mathrm { A d v } _ { i } , \mathrm { c l i p } ( \frac { \pi _ { \theta ^ { \prime } } ( A _ { i } | S _ { i } ) } { \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) } ) \mathrm { A d v } _ { i } \} } \end{array}$ if Perform one gradient update to $\begin{array} { r } { \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \log \pi _ { \theta _ { o l d } } ( A _ { i } | S _ { i } ) - \log \pi _ { \theta } ( A _ { i } | S _ { i } ) < K L _ { t a r g e t } } \end{array}$ $\psi$ minimizing $L ( \psi )$ with Adam enwith Adam $\theta , \theta ^ { \prime }$ $\bar { L ( \theta , \theta ^ { \prime } ) }$ end end
|
| 460 |
+
end
|
| 461 |
+
|
| 462 |
+

|
| 463 |
+
(a) Architecture of PPO, PPO- (b) The first parameterization of PPO-FHTD TD, PPO-TD-Ex, DisPPO
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
Figure 13: Architectures of the algorithms
|
| 467 |
+
|
| 468 |
+
# C ADDITIONAL EXPERIMENTAL RESULTS
|
| 469 |
+
|
| 470 |
+
# C.1 DISTRIBUTIONAL RL
|
| 471 |
+
|
| 472 |
+
Hypothesis 1 and the previous empirical study suggest that representation learning may be the main bottleneck of PPO-TD $( \gamma _ { \mathrm { { c } } } = 1 )$ ). To further support this, we benchmark PPO-C51 $\gamma _ { \mathrm { c } } = 1 $ ) (Algorithm 5 in the appendix), where the critic of PPO is trained with C51. C51 is usually considered to improve representation learning by implicitly providing auxiliary tasks (Bellemare et al., 2017; Munos, 2018; Petroski Such et al., 2019). Figure 14 shows that training the critic with C51 indeed leads to a performance improvement and PPO-C51 $( \gamma _ { \mathrm { c } } = 1 )$ ) sometimes outperforms PPO-TD $( \gamma _ { \mathrm { c } } < 1 )$ by a large margin. Figure 15 further shows that when $V _ { \mathrm { m a x } }$ is optimized for PPO-C51, the benefit for using $\gamma _ { \mathrm { c } } < 1$ in PPO-C51 is less pronounced than that in PPO-TD, indicating the role of $\gamma _ { \mathrm { c } } < 1$ and distributional learning may overlap. Figures 6, 7, & 9, suggest that the overlapping is representation learning.
|
| 473 |
+
|
| 474 |
+
# C.2 OTHER COMPLEMENTARY RESULTS
|
| 475 |
+
|
| 476 |
+
Figure 16 shows how PPO-TD-Ex $\gamma _ { \mathrm { c } } = 0 . 9 9 5$ ) reacts to the increase of $N$ . Figure 17 shows the unnormalized representation error in the MRP experiment. Figure 18 shows the average episode length for the Ant environment in the discounted setting. For HalfCheetah, it is always 1000.
|
| 477 |
+
|
| 478 |
+

|
| 479 |
+
Figure 14: For PPO-C51, we set $\gamma _ { \mathrm { c } } = 1$ .
|
| 480 |
+
|
| 481 |
+

|
| 482 |
+
Figure 15: For each game, $V _ { \mathrm { m a x } }$ is the same as the $V _ { \mathrm { m a x } }$ in Figure 14.
|
| 483 |
+
|
| 484 |
+

|
| 485 |
+
Figure 16: PPO-TD-Ex $\langle \gamma _ { \mathrm { c } } = 0 . 9 9 5 \rangle$ .
|
| 486 |
+
|
| 487 |
+

|
| 488 |
+
Figure 17: Unnormalized representation error (RE) as a function of the discount factor. Shaded regions indicate one standard derivation. RE is computed analytically as $\mathrm { R E } ( X , \gamma ) \doteq \operatorname* { m i n } _ { w } | | X w -$ $v _ { \gamma } | | _ { 2 }$
|
| 489 |
+
|
| 490 |
+

|
| 491 |
+
Figure 18: Curves without any marker are obtained in the original $\mathtt { A n t }$ . Diamond-marked curves are obtained in Ant with $r ^ { \prime }$ .
|
| 492 |
+
|
| 493 |
+

|
| 494 |
+
Figure 19: The default PPO implementation with different discount factors. The larger version of Figure 1.
|
| 495 |
+
|
| 496 |
+

|
| 497 |
+
Figure 20: Comparison between PPO and PPO-TD when $\gamma _ { \mathrm { c } } = 1$ . The larger version of Figure 2.
|
| 498 |
+
|
| 499 |
+

|
| 500 |
+
Figure 21: PPO-TD with different discount factors. The larger version of Figure 3.
|
| 501 |
+
|
| 502 |
+

|
| 503 |
+
Figure 22: PPO-TD-Ex $\langle \gamma _ { \mathrm { c } } = 0 . 9 9 ,$ ). The larger version of Figure 4.
|
| 504 |
+
|
| 505 |
+

|
| 506 |
+
Figure 23: PPO-TD-Ex $( \gamma _ { \mathrm { c } } = 1$ ). The larger version of Figure 5.
|
| 507 |
+
|
| 508 |
+

|
| 509 |
+
Figure 24: PPO-FHTD with the first parameterization. The best $H$ and $\gamma _ { \mathrm { { C } } }$ are used for each game. The larger version of Figure 6.
|
| 510 |
+
|
| 511 |
+

|
| 512 |
+
Figure 25: PPO-FHTD with the second parameterization. The larger version of Figure 7.
|
| 513 |
+
|
| 514 |
+

|
| 515 |
+
Figure 26: Comparison between PPO and DisPPO with $\gamma = 0 . 9 9 5$ . The larger version of Figure 10.
|
| 516 |
+
|
| 517 |
+

|
| 518 |
+
Figure 27: Curves without any marker are obtained in the original Ant environment. Diamondmarked curves are obtained in Ant with $r ^ { \prime }$ . The larger version of Figure 11.
|
parse/train/ypJS_nyu-I/ypJS_nyu-I_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ypJS_nyu-I/ypJS_nyu-I_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ypJS_nyu-I/ypJS_nyu-I_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|