Datasets:
Add files using upload-large-folder tool
Browse files- parse/train/BJ8c3f-0b/BJ8c3f-0b.md +494 -0
- parse/train/BJ8c3f-0b/BJ8c3f-0b_content_list.json +0 -0
- parse/train/BJ8c3f-0b/BJ8c3f-0b_middle.json +0 -0
- parse/train/BJ8c3f-0b/BJ8c3f-0b_model.json +0 -0
- parse/train/BkG8sjR5Km/BkG8sjR5Km.md +395 -0
- parse/train/BkG8sjR5Km/BkG8sjR5Km_content_list.json +0 -0
- parse/train/BkG8sjR5Km/BkG8sjR5Km_middle.json +0 -0
- parse/train/BkG8sjR5Km/BkG8sjR5Km_model.json +0 -0
- parse/train/H1Dy---0Z/H1Dy---0Z.md +340 -0
- parse/train/H1Dy---0Z/H1Dy---0Z_model.json +0 -0
- parse/train/H1eqviAqYX/H1eqviAqYX.md +452 -0
- parse/train/H1eqviAqYX/H1eqviAqYX_content_list.json +2048 -0
- parse/train/H1eqviAqYX/H1eqviAqYX_middle.json +0 -0
- parse/train/H1eqviAqYX/H1eqviAqYX_model.json +0 -0
- parse/train/H1xaJn05FQ/H1xaJn05FQ.md +469 -0
- parse/train/H1xaJn05FQ/H1xaJn05FQ_content_list.json +0 -0
- parse/train/H1xaJn05FQ/H1xaJn05FQ_middle.json +0 -0
- parse/train/H1xaJn05FQ/H1xaJn05FQ_model.json +0 -0
- parse/train/SJgwNerKvB/SJgwNerKvB_content_list.json +0 -0
- parse/train/SJgwNerKvB/SJgwNerKvB_model.json +0 -0
parse/train/BJ8c3f-0b/BJ8c3f-0b.md
ADDED
|
@@ -0,0 +1,494 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AUTO-ENCODING SEQUENTIAL MONTE CARLO
|
| 2 |
+
|
| 3 |
+
Tuan Anh $\mathbf { L e } ^ { \dagger }$ , Maximilian $\mathbf { I g } \mathbf { I } ^ { \dagger }$ , Tom Rainforth‡, Tom $\mathbf { J i n } ^ { \dagger , \ S }$ , Frank Wood† †Department of Engineering Science, University of Oxford ‡Department of Statistics, University of Oxford §Department of Statistics, University of Warwick {tuananh,igl,jin,fwood}@robots.ox.ac.uk,
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We build on auto-encoding sequential Monte Carlo (AESMC):1 a method for model and proposal learning based on maximizing the lower bound to the log marginal likelihood in a broad family of structured probabilistic models. Our approach relies on the efficiency of sequential Monte Carlo (SMC) for performing inference in structured probabilistic models and the flexibility of deep neural networks to model complex conditional probability distributions. We develop additional theoretical insights and experiment with a new training procedure which can improve both model and proposal learning. We demonstrate that our approach provides a fast, easy-to-implement and scalable means for simultaneous model learning and proposal adaptation in deep generative models.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
We build upon AESMC (Le et al., 2017), a method for model learning that itself builds on variational auto-encoders (VAEs) (Kingma & Welling, 2014; Rezende et al., 2014) and importance weighted auto-encoders (IWAEs) (Burda et al., 2016). AESMC is similarly based on maximizing a lower bound to the log marginal likelihood, but uses SMC (Doucet & Johansen, 2009) as the underlying marginal likelihood estimator instead of importance sampling (IS). For a very wide array of models, particularly those with sequential structure, SMC forms a substantially more powerful inference method than IS, typically returning lower variance estimates for the marginal likelihood. Consequently, by using SMC for its marginal likelihood estimation, AESMC often leads to improvements in model learning compared with VAEs and IWAEs. We provide experiments on structured time-series data that show that AESMC based learning was able to learn useful representations of the latent space for both reconstruction and prediction more effectively than the IWAE counterpart.
|
| 12 |
+
|
| 13 |
+
AESMC was introduced in an earlier preprint (Le et al., 2017) concurrently with the closely related methods of Maddison et al. (2017); Naesseth et al. (2017). In this work we take these ideas further by providing new theoretical insights for the resulting evidence lower bounds (ELBOs), extending these to explore the relative efficiency of different approaches to proposal learning, and using our results to develop a new and improved training procedure. In particular, we introduce a method for expressing the gap between an ELBO and the log marginal likelihood as a Kullback-Leibler (KL) divergence between two distributions on an extended sampling space. Doing so allows us to investigate the behavior of this family of algorithms when the objective is maximized perfectly, which occurs only if the KL divergence becomes zero. In the IWAE case, this implies that the proposal distributions are equal to the posterior distributions under the learned model. In the AESMC case, it has implications for both the proposal distributions and the intermediate set of targets that are learned. We demonstrate that, somewhat counter-intuitively, using lower variance estimates for the marginal likelihood can actually be harmful to proposal learning. Using these insights, we experiment with an adaptation to the AESMC algorithm, which we call alternating ELBOs, that uses different lower bounds for updating the model parameters and proposal parameters. We observe that this adaptation can, in some cases, improve model learning and proposal adaptation.
|
| 14 |
+
|
| 15 |
+
# 2 BACKGROUND
|
| 16 |
+
|
| 17 |
+
# 2.1 STATE-SPACE MODELS
|
| 18 |
+
|
| 19 |
+
State-space models (SSMs) are probabilistic models over a set of latent variables $x _ { 1 : T }$ and observed variables $y _ { 1 : T }$ . Given parameters $\theta$ , a $\mathbf { S } \mathbf { S } \mathbf { M }$ is characterized by an initial density $\mu _ { \theta } ( x _ { 1 } )$ , a series of transition densities $f _ { t , \theta } { \big ( } x _ { t } | x _ { 1 : t - 1 } { \big ) }$ , and a series of emission densities $g _ { t , \theta } ( y _ { t } | x _ { 1 : t } )$ with the joint density being $\begin{array} { r } { p _ { \theta } ( x _ { 1 : T } , y _ { 1 : T } ) = \mu _ { \theta } ( x _ { 1 } ) \prod _ { t = 2 } ^ { T } f _ { t , \theta } ( x _ { t } | x _ { 1 : t - 1 } ) \prod _ { t = 1 } ^ { T } g _ { t , \theta } ( y _ { t } | x _ { 1 : t } ) . } \end{array}$ .
|
| 20 |
+
|
| 21 |
+
We are usually interested in approximating the posterior $p _ { \theta } ( x _ { 1 : T } | y _ { 1 : T } )$ or the expectation of some test function $\varphi$ under this posterior $\begin{array} { r } { I ( \varphi ) : = \bar { \int } \varphi ( \bar { x _ { 1 : T } } ) p _ { \theta } ( \bar { x _ { 1 : T } } | y _ { 1 : T } ) \mathrm { d } x _ { 1 : T } } \end{array}$ . We refer to these two tasks as inference. Inference in models which are non-linear, non-discrete, and non-Gaussian is difficult and one must resort to approximate methods, for which SMC has been shown to be one of the most powerful approaches (Doucet & Johansen, 2009).
|
| 22 |
+
|
| 23 |
+
We will consider model learning as a problem of maximizing the marginal likelihood $p _ { \theta } ( y _ { 1 : T } ) =$ $\begin{array} { r } { \int p _ { \theta } \big ( x _ { 1 : T } , y _ { 1 : T } \big ) \mathrm { d } x _ { 1 : T } } \end{array}$ in the family of models parameterized by $\theta$ .
|
| 24 |
+
|
| 25 |
+
# 2.2 SEQUENTIAL MONTE CARLO
|
| 26 |
+
|
| 27 |
+
SMC performs approximate inference on a sequence of target distributions $( \pi _ { t } ( x _ { 1 : t } ) ) _ { t = 1 } ^ { T }$ . In the context of SSMs, the target distributions are often taken to be $( p _ { \theta } ( \underline { { x } } _ { 1 : t } | y _ { 1 : t } ) ) _ { t = 1 } ^ { T }$ . Given a parameter $\phi$ and proposal distributions $q _ { 1 , \phi } ( x _ { 1 } | y _ { 1 } )$ and $( q _ { t , \phi } ( x _ { t } | y _ { 1 : t } , x _ { 1 : t - 1 } ) ) _ { t = 2 } ^ { T }$ from which we can sample and whose densities we can evaluate, SMC is described in Algorithm 1.
|
| 28 |
+
|
| 29 |
+
Using the set of weighted particles $( \tilde { x } _ { 1 : T } ^ { k } , w _ { T } ^ { k } ) _ { k = 1 } ^ { K }$ at the last time step, we can approximate the posterior as $\begin{array} { r } { \sum _ { k = 1 } ^ { K } \bar { w } _ { T } ^ { k } \delta _ { \tilde { x } _ { 1 : T } ^ { k } } ( x _ { 1 : T } ) } \end{array}$ and the integral $I _ { \varphi }$ as $\begin{array} { r } { \sum _ { k = 1 } ^ { K } \hat { w } _ { T } ^ { k } \varphi ( \tilde { x } _ { 1 : T } ^ { k } ) } \end{array}$ , where $\begin{array} { r } { \bar { w } _ { T } ^ { k } : = w _ { T } ^ { k } / \sum _ { j } w _ { T } ^ { j } } \end{array}$ is the normalized weight and $\delta _ { z }$ is a Dirac measure centered on $z$ . Furthermore, one can obtain an unbiased estimator of the marginal likelihood $p _ { \theta } ( y _ { 1 : T } )$ using the intermediate particle weights:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\hat { Z } _ { \mathrm { S M C } } : = \prod _ { t = 1 } ^ { T } \left[ \frac { 1 } { K } \sum _ { k = 1 } ^ { K } w _ { t } ^ { k } \right] .
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
# Algorithm 1: Sequential Monte Carlo
|
| 36 |
+
|
| 37 |
+
Data: observed values $y _ { 1 : T }$ , model parameters $\theta$ , proposal parameters $\phi$ begin
|
| 38 |
+
|
| 39 |
+
Sample initial particle values $x _ { 1 } ^ { k } \sim q _ { 1 , \phi } ( \cdot | y _ { 1 } )$
|
| 40 |
+
|
| 41 |
+
Compute and normalize weights:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
w _ { 1 } ^ { k } = \frac { \mu _ { \theta } ( x _ { 1 } ^ { k } ) g _ { 1 , \theta } ( y _ { 1 } | x _ { 1 } ^ { k } ) } { q _ { 1 , \phi } ( x _ { 1 } ^ { k } | y _ { 1 } ) } , \qquad \quad \bar { w } _ { 1 } ^ { k } = \frac { w _ { 1 } ^ { k } } { \sum _ { \ell = 1 } ^ { K } w _ { 1 } ^ { \ell } } .
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
Initialize particle set: $\tilde { x } _ { 1 } ^ { k } \gets x _ { 1 } ^ { k }$ for $t = 2 , 3 , \dots , T$ do
|
| 48 |
+
|
| 49 |
+
Sample ancestor index $a _ { t - 1 } ^ { k } \sim \mathrm { D i s c r e t e } ( \cdot | \bar { w } _ { t - 1 } ^ { 1 } , \dots , \bar { w } _ { t - 1 } ^ { K } )$
|
| 50 |
+
|
| 51 |
+
$x _ { t } ^ { k } \sim q _ { t , \phi } ( \cdot | y _ { 1 : t } , \tilde { x } _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { k } } )$
|
| 52 |
+
|
| 53 |
+
$\tilde { x } _ { 1 : t } ^ { k } \gets ( \tilde { x } _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { k } } , x _ { t } ^ { k } )$
|
| 54 |
+
|
| 55 |
+
Compute and normalize weights:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
w _ { t } ^ { k } = \frac { f _ { t , \theta } ( x _ { t } ^ { k } | \tilde { x } _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { k } } ) g _ { t , \theta } ( y _ { t } | \tilde { x } _ { 1 : t } ^ { k } ) } { q _ { t , \phi } ( x _ { t } ^ { k } | y _ { 1 : t } , \tilde { x } _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { k } } ) } ,
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\bar { w } _ { t } ^ { k } = \frac { w _ { t } ^ { k } } { \sum _ { \ell = 1 } ^ { K } w _ { t } ^ { \ell } } .
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
Compute marginal likelihood: $\begin{array} { r } { \hat { Z } _ { \mathrm { S M C } } = \prod _ { t = 1 } ^ { T } \frac { 1 } { K } \sum _ { k = 1 } ^ { K } w _ { t } ^ { k } } \end{array}$ return particles $( \tilde { x } _ { 1 : T } ^ { k } ) _ { k = 1 } ^ { K }$ , weights $( w _ { T } ^ { k } ) _ { k = 1 } ^ { K }$ , marginal likelihood estimate $\hat { Z } _ { S M C }$
|
| 66 |
+
|
| 67 |
+
The sequential nature of SMC and the resampling step are crucial in making SMC scalable to large $T$ . The former makes it easier to design efficient proposal distributions as each step need only target the next set of variables $x _ { t }$ . The resampling step allows the algorithm to focus on promising particles in light of new observations, avoiding the exponential divergence between the weights of different samples that occurs for importance sampling as $T$ increases. This can be demonstrated both empirically and theoretically (Del Moral, 2004, Chapter 9). We refer the reader to (Doucet & Johansen, 2009) for an in-depth treatment of SMC.
|
| 68 |
+
|
| 69 |
+
# 2.3 IMPORTANCE WEIGHTED AUTO-ENCODERS
|
| 70 |
+
|
| 71 |
+
Given a dataset of observations $( y ^ { ( n ) } ) _ { n = 1 } ^ { N }$ , a generative network $p _ { \theta } ( x , y )$ and an inference network $q _ { \phi } ( x | y )$ , IWAEs (Burda et al., 2016) maximize $\begin{array} { r } { \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \operatorname { E L B O } _ { \mathrm { I S } } ( \theta , \phi , y ^ { ( n ) } ) } \end{array}$ where, for a given observation $y$ , the ELBOIS (with $K$ particles) is a lower bound on $\log p _ { \theta } ( y )$ by Jensen’s inequality:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\begin{array} { r l } & { \displaystyle \mathrm { E L B O } _ { \mathrm { I S } } ( \theta , \phi , y ) = \int Q _ { \mathrm { I S } } ( x ^ { 1 : K } ) \log \hat { Z } _ { \mathrm { I S } } ( x ^ { 1 : K } ) \mathrm { d } x ^ { 1 : K } \leq \log p _ { \theta } ( y ) \mathrm { , ~ w h e r e ~ } } \\ & { \displaystyle Q _ { \mathrm { I S } } ( x ^ { 1 : K } ) = \prod _ { k = 1 } ^ { K } q _ { \phi } ( x ^ { k } | y ) , \hat { Z } _ { \mathrm { I S } } ( x ^ { 1 : K } ) = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \frac { p _ { \theta } ( x ^ { k } , y ) } { q _ { \phi } ( x ^ { k } | y ) } . } \end{array}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
Note that for $K = 1$ particle, this objective reduces to a VAE (Kingma & Welling, 2014; Rezende et al., 2014) objective we will refer to as
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\operatorname { E L B O v a g } ( \theta , \phi , y ) = \int q _ { \phi } ( x | y ) ( \log p _ { \theta } ( x , y ) - \log q _ { \phi } ( x | y ) ) \mathrm { d } x .
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
The IWAE optimization is performed using stochastic gradient ascent (SGA) where a sample from $\scriptstyle \left( \prod _ { k = 1 } ^ { K } q _ { \phi } ( x ^ { k } | y ^ { ( n ) } ) \right)$ is obtained using the reparameterization trick (Kingma & Welling, 2014) and the gradient $\begin{array} { r } { \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \nabla _ { \theta , \phi } \log \left( \sum _ { k = 1 } ^ { K } \frac { p _ { \theta } ( x ^ { k } , y ^ { ( n ) } ) } { q _ { \phi } ( x ^ { k } | y ^ { ( n ) } ) } \right) } \end{array}$ is used to perform an optimization step.
|
| 84 |
+
|
| 85 |
+
# 3 AUTO-ENCODING SEQUENTIAL MONTE CARLO
|
| 86 |
+
|
| 87 |
+
AESMC implements model learning, proposal adaptation, and inference amortization in a similar manner to the VAE and the IWAE: it uses SGA on an empirical average of the ELBO over observations. However, it varies in the form of this ELBO. In this section, we will introduce the AESMC ELBO, explain how gradients of it can be estimated, and discuss the implications of these changes.
|
| 88 |
+
|
| 89 |
+
# 3.1 OBJECTIVE FUNCTION
|
| 90 |
+
|
| 91 |
+
Consider a family of SSMs $\{ p _ { \theta } ( x _ { 1 : T } , y _ { 1 : T } ) ~ : ~ \theta ~ \in ~ \Theta \}$ and a family of proposal distributions $\begin{array} { r } { \{ q _ { \phi } ( x _ { 1 : T } | y _ { 1 : T } ) = q _ { 1 , \phi } ( x _ { 1 } | y _ { 1 } ) \prod _ { t = 2 } ^ { T } q _ { t , \phi } ( x _ { t } | x _ { 1 : t - 1 } , y _ { 1 : t } ) : \phi \in \Phi \} } \end{array}$ . AESMC uses an ELBO objective based on the SMC marginal likelihood estimator (1). In particular, for a given $y _ { 1 : T }$ , the objective is defined as
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\mathrm { E L B O } _ { \mathrm { S M C } } ( \theta , \phi , y _ { 1 : T } ) : = \int Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \mathrm { d } x _ { 1 : T } ^ { 1 : K } \mathrm { d } a _ { 1 : T - 1 } ^ { 1 : K } ,
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
where $\hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } )$ is defined in (1) and $Q _ { \mathrm { S M C } }$ is the sampling distribution of SMC,
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) = \left( \prod _ { k = 1 } ^ { K } q _ { 1 , \phi } ( x _ { 1 } ^ { k } ) \right) \left( \prod _ { t = 2 } ^ { T } \prod _ { k = 1 } ^ { K } q _ { t , \phi } ( x _ { t } ^ { k } | \tilde { x } _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { k } } ) \cdot \operatorname { D i s c r e t e } ( a _ { t - 1 } ^ { k } | w _ { t - 1 } ^ { 1 : K } ) \right) .
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
and the unbiasedness of the marginal likelihood estimator. Hence, given a dataset $\mathbf { E L B O } _ { \mathbf { S M C } }$ forms a lower bound to the log marginal likelihood $\log p _ { \theta } ( y _ { 1 : T } )$ due to Jensen’s inequality $( y _ { 1 : T } ^ { ( n ) } ) _ { n = 1 } ^ { N }$ , we can perform model learning based on maximizing the lower bound of $\begin{array} { r } { \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \log p _ { \theta } ( y _ { 1 : T } ^ { ( n ) } ) } \end{array}$ as a
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\mathcal { I } ( \theta , \phi ) : = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathrm { E L B O } _ { \mathrm { S M C } } \big ( \theta , \phi , y _ { 1 : T } ^ { ( n ) } \big ) .
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
For notational convenience, we will talk about optimizing ELBOs in the rest of this section. However, we note that the main intended use of AESMC is to amortize over datasets, for which the ELBO is replaced by the dataset average ${ \mathcal { I } } ( \theta , \phi )$ in the optimization target. Nonetheless, rather than using the full dataset for each gradient update, will we instead use minibatches, noting that this forms unbiased estimator.
|
| 110 |
+
|
| 111 |
+
# 3.2 GRADIENT ESTIMATION
|
| 112 |
+
|
| 113 |
+
We describe a gradient estimator used for optimizing $\mathbf { \Theta } _ { \mathrm { E L B O } _ { \mathrm { S M C } } } ( \theta , \phi , y _ { 1 : T } )$ using SGA. The SMC sampler in Algorithm 1 proceeds by sampling $x _ { 1 } ^ { 1 : K } , \bar { a _ { 1 } ^ { 1 : K } } , x _ { 2 } ^ { 1 : K } ,$ : K , a 1: K1 , . . . sequentially from their respective distributions $\textstyle \prod _ { k = 1 } ^ { K } q _ { 1 } ( x _ { 1 } ^ { k } )$ , $\textstyle \prod _ { k = 1 } ^ { K }$ Discrete $( a _ { 1 } ^ { k } | w _ { 1 } ^ { 1 : K } )$ , $\begin{array} { r } { \prod _ { k = 1 } ^ { K } q _ { 2 } ( x _ { 2 } ^ { k } | x _ { 1 } ^ { a _ { 1 } ^ { k } } ) , . . . } \end{array}$ until the whole k=1 particle-weight trajectory $( x _ { 1 : K } ^ { 1 : T } , a _ { 1 : T - 1 } ^ { 1 : K } )$ 1 | 1 k=1 2 | 1 is sampled. From this trajectory, using equation (1), we can
|
| 114 |
+
|
| 115 |
+
Assuming that the sampling of latent variables $x _ { 1 : T } ^ { 1 : K }$ is reparameterizable, we can make their sampling independent of $( \theta , \phi )$ . In particular, assume that there exists a set of auxiliary random variables 1:T t ∼by first sampling $\epsilon _ { 1 : T } ^ { 1 : K }$ where $\epsilon _ { t } ^ { k } \sim s _ { t }$ $\begin{array} { r } { \epsilon _ { 1 } ^ { 1 : K } \sim \prod _ { k = 1 } ^ { K } s _ { 1 } } \end{array}$ and a set of reparameterization functions and setting K $x _ { 1 } ^ { k } = r _ { 1 } ( \epsilon _ { 1 } ^ { k } )$ and . We can simulate the SMC sampler $\tilde { x } _ { 1 } ^ { k } = x _ { 1 } ^ { k }$ , then for K $t = 2 , \dots , T$ cycling through sampling $\begin{array} { r } { a _ { t - 1 } ^ { 1 : K } \sim \prod _ { k = 1 } ^ { K } } \end{array}$ Q k=1 Discrete $\left( a _ { t - 1 } ^ { k } | w _ { t - 1 } ^ { 1 : K } \right)$ and $\begin{array} { r } { \epsilon _ { t } ^ { 1 : K } \sim \prod _ { k = 1 } ^ { K } s _ { t } } \end{array}$ , and setting $x _ { t } ^ { k } = r _ { t } ( \epsilon _ { t } ^ { k } , \tilde { x } _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { k } } )$ and $\tilde { x } _ { 1 : t } ^ { k } \ = \ ( \tilde { x } _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { k } } , x _ { t } ^ { k } )$ . We use the resulting reparameterized sample of $( x _ { 1 : K } ^ { 1 : T } , a _ { 1 : T - 1 } ^ { 1 : K } )$ 1:t−1 1: 1:t−1 to evaluate the gradient estimator $\nabla _ { \theta , \phi } \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } )$ .
|
| 116 |
+
|
| 117 |
+
To account for the discrete choices of ancestor indices $a _ { t } ^ { k }$ one could additionally use the REINFORCE (Williams, 1992) trick, however in practice, we found that the additional term in the estimator has problematically high variance. We explore various other possible gradient estimators and empirical assessments of their variances in Appendix A. This exploration confirms that including the additional REINFORCE terms leads to problematically high variance, justifying our decision to omit them, despite introducing a small bias into the gradient estimates.
|
| 118 |
+
|
| 119 |
+
# 3.3 BIAS & IMPLICATIONS ON THE PROPOSALS
|
| 120 |
+
|
| 121 |
+
In this section, we express the gap between ELBOs and the log marginal likelihood as a KL divergence and study implications on the proposal distributions. We present a set of claims and propositions whose full proofs are in Appendix B. These give insight into the behavior of AESMC and show the advantages, and disadvantages, of using our different ELBO. This insight motivates Section 4 which proposes an algorithm for improving proposal learning.
|
| 122 |
+
|
| 123 |
+
Definition 1. Given an unnormalized target density ${ \tilde { P } } : { \mathcal { X } } \to [ 0 , \infty )$ with normalizing constant $Z _ { P } > 0$ , $P : = { \tilde { P } } / { Z _ { P } }$ , and $a$ proposal density $Q : \mathcal { X } [ 0 , \infty )$ , then
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\mathtt { E L B O } : = \int Q ( x ) \log \frac { \tilde { P } ( x ) } { Q ( x ) } \mathrm { d } x ,
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
is a lower bound on $\log Z _ { P }$ and satisfies
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\begin{array} { r } { { \bf E L B O } = \log Z _ { P } - { \bf K L } \left( { Q } \vert \vert { P } \right) . } \end{array}
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
This is a standard identity used in variational inference and VAEs. In the case of VAEs, applying Definition 1 with $P$ being $p _ { \theta } ( x | y )$ , $\tilde { P }$ being $p _ { \theta } ( x , y )$ , $Z _ { P }$ being $p _ { \theta } ( y )$ , and $Q$ being $q _ { \phi } ( x | y )$ , we can directly rewrite (4) as $\begin{array} { r } { \mathrm { E L B O } _ { \mathrm { V A E } } ( \theta , \phi , y ) = \log p _ { \theta } ( y ) - \mathrm { K L } \left( q _ { \phi } ( x | y ) | | p _ { \theta } ( x | y ) \right) } \end{array}$ .
|
| 136 |
+
|
| 137 |
+
The key observation for expressing such a bound for general ELBOs such as $_ { \mathrm { E L B O _ { I S } } }$ and ELBOSMC is that the target density $P$ and the proposal density $Q$ need not directly correspond to $p _ { \theta } ( x | y )$ and $q _ { \phi } ( x | y )$ . This allows us to view the underlying sampling distributions of the marginal likelihood Monte Carlo estimators such as $Q _ { \mathrm { I S } }$ in (3) and $Q _ { \mathrm { S M C } }$ in (6) as proposal distributions on an extended space $\mathcal { X }$ . The following claim uses this observation to express the bound between a general ELBO and the log marginal likelihood as KL divergence from the extended space sampling distribution to a corresponding target distribution.
|
| 138 |
+
|
| 139 |
+
Claim 1. Given a non-negative unbiased estimator $\hat { Z } _ { P } ( x ) \geq 0$ of the normalizing constant $Z _ { P }$ where x is distributed according to the proposal distribution $Q ( x )$ , the following holds:
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\begin{array} { r l } & { \displaystyle \mathrm { E L B O } = \int Q ( { \boldsymbol x } ) \log \hat { Z } _ { P } ( { \boldsymbol x } ) \mathrm { d } { \boldsymbol x } = \log Z _ { P } - \mathrm { K L } \left( Q | | P \right) , } \\ { { \boldsymbol w h e r e } } & { P ( { \boldsymbol x } ) = \displaystyle \frac { Q ( { \boldsymbol x } ) \hat { Z } _ { P } ( { \boldsymbol x } ) } { Z _ { P } } } \end{array}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
is the implied normalized target density.
|
| 146 |
+
|
| 147 |
+
In the case of IWAEs, we can apply Claim 1 with $Q$ and $\hat { Z } _ { P }$ being $Q _ { \mathrm { I S } }$ and $\hat { Z } _ { \mathrm { I S } }$ respectively as defined in (3) and $Z _ { P }$ being $p _ { \theta } ( y )$ . This yields
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\begin{array} { r } { \begin{array} { r l } & { \mathrm { E L B O } _ { \mathrm { I S } } ( \theta , \phi , y ) = \log p _ { \theta } ( y ) - \mathrm { K L } \left( Q _ { \mathrm { I S } } | | P _ { \mathrm { I S } } \right) , \mathrm { ~ w h e r e } } \\ & { \qquad P _ { \mathrm { I S } } ( x ^ { 1 : K } ) = \displaystyle \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \left( q _ { \phi } ( x ^ { 1 } | y ) \cdots q _ { \phi } ( x ^ { k - 1 } | y ) p _ { \theta } ( x ^ { k } | y ) q _ { \phi } ( x ^ { k + 1 } | y ) \cdots q _ { \phi } ( x ^ { K } | y ) \right) . } \end{array} } \end{array}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
Similarly, in the case of AESMC, we obtain
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
\begin{array} { r l } & { \mathrm { E L B O } _ { \mathrm { S M C } } ( \theta , \phi , y _ { 1 : T } ) = \log p _ { \theta } ( y _ { 1 : T } ) - \mathrm { K L } \left( Q _ { \mathrm { S M C } } | | P _ { \mathrm { S M C } } \right) , \mathrm { ~ w h e r e } } \\ & { P _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) = Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) / p _ { \theta } ( y _ { 1 : T } ) . } \end{array}
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
Having expressions for the target distribution $P$ and the sampling distribution $Q$ for a given ELBO allows us to investigate what happens when we maximize that ELBO, remembering that the KL term is strictly non-negative and zero if and only if $P = Q$ . For the VAE and IWAE cases then, provided the proposal is sufficiently flexible, one can always perfectly maximize the ELBO by setting $\bar { p } _ { \theta } ( x | y ) = \bar { q _ { \phi } } ( \bar { x | y } )$ for all $x$ . The reverse implication also holds: if $\mathtt { E L B O } _ { \mathrm { V A E } } = \log Z _ { P }$ then it must be the case that $p _ { \theta } ( x | y ) = q _ { \phi } ( x | y )$ . However, for AESMC, achieving $\mathtt { E L B O } = \log Z _ { P }$ is only possible when one also has sufficient flexibility to learn a particular series of intermediate target distributions, namely the marginals of the final target distribution. In other words, it is necessary to learn a particular factorization of the generative model, not just the correct individual proposals, to achieve $P = Q$ and thus $\mathtt { E L B O } _ { \mathtt { S M C } } = Z _ { P }$ . These observations are formalized in Propositions 1 and 2 below.
|
| 160 |
+
|
| 161 |
+
Proposition 1. $Q _ { I S } ( x ^ { 1 : K } ) = P _ { I S } ( x ^ { 1 : K } )$ for all $x ^ { 1 : K }$ if and only if $q ( x | y ) = p ( x | y )$ for all $x$
|
| 162 |
+
|
| 163 |
+
Proposition 2. If $K > 1$ , then $P _ { S M C } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) = Q _ { S M C } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } )$ for all $( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) i f$ and only if
|
| 164 |
+
|
| 165 |
+
$\begin{array} { r } { l . ~ \pi _ { t } ( x _ { 1 : t } ) = \int p ( x _ { 1 : T } | y _ { 1 : T } ) \mathrm { d } x _ { t + 1 : T } = p ( x _ { 1 : t } | y _ { 1 : T } ) , } \end{array}$ for all $x _ { 1 : t }$ and $t = 1 , \dots , T$ , and 2. $q _ { 1 } ( x _ { 1 } | y _ { 1 } ) = p ( x _ { 1 } | y _ { 1 : T } )$ for all $x _ { 1 }$ and $q _ { t } ( x _ { t } | x _ { 1 : t - 1 } , y _ { 1 : t } ) = p ( x _ { 1 : t } | y _ { 1 : T } ) / p ( x _ { 1 : t - 1 } | y _ { 1 : T } )$ for $t = 2 , \ldots , T$ for all $x _ { 1 : t }$ ,
|
| 166 |
+
|
| 167 |
+
where $\pi _ { t } ( x _ { 1 : t } )$ are the intermediate targets used by SMC.
|
| 168 |
+
|
| 169 |
+
Proposition 2 has the consequence that if the family of generative models is such that the first condition does not hold, we will not be able to make the bound tight. This means that, except for a very small class of models, then, for most convenient parameterizations, it will be impossible to learn a perfect proposal that gives a tight bound, i.e. there will be no $\theta$ and $\phi$ such that the above conditions can be satisfied. However, it also means that ELBOSMC encodes important additional information about the implications the factorization of the generative model has on the inference—the model depends only on the final target $\pi _ { T } ( x _ { 1 : T } ) = p _ { \theta } ( x _ { 1 : T } | y _ { 1 : T } )$ , but some choices of the intermediate targets $\pi _ { t } ( x _ { 1 : t } )$ will lead to much more efficient inference than others. Perhaps more importantly, SMC is usually a far more powerful inference algorithm than importance sampling and so the AESMC setup allows for more ambitious model learning problems to be effectively tackled than the VAE or IWAE. After all, even though it is well known in the SMC literature that, unlike for IS, most problems have no perfect set of SMC proposals which will generate exact samples from the posterior (Doucet & Johansen, 2009), SMC still gives superior performance on most problems with more than a few dimensions. These intuitions are backed up by our experiments that show that using ELBOSMC regularly learns better models than using ELBOIS.
|
| 170 |
+
|
| 171 |
+
# 4 IMPROVING PROPOSAL LEARNING
|
| 172 |
+
|
| 173 |
+
In practice, one is rarely able to perfectly drive the divergence to zero and achieve a perfect proposal. In addition to the implications of the previous section, this occurs because $q _ { \phi } ( x _ { 1 : T } | y _ { 1 : T } )$ may not be sufficiently expressive to represent $p _ { \theta } ( x _ { 1 : T } | y _ { 1 : T } )$ exactly and because of the inevitable sub-optimality of the optimization process, remembering that we are aiming to learn an amortized inference artifact, rather than a single posterior representation. Consequently, to accurately assess the merits of different ELBOs for proposal learning, it is necessary to consider their finite-time performance. We therefore now consider the effect the number of particles $K$ has on the gradient estimators for ELBOIS and ELBOSMC.
|
| 174 |
+
|
| 175 |
+
Counter-intuitively, it transpires that the tighter bounds implied by using a larger $K$ is often harmful to proposal learning for both IWAE and AESMC. At a high-level, this is because an accurate estimate for $\hat { Z } _ { P }$ can be achieved for a wide range of proposal parameters $\phi$ and so the magnitude of $\nabla _ { \phi }$ ELBO reduces as $K$ increases. Typically, this shrinkage happens faster than increasing $K$ reduces the standard deviation of the estimate and so the standard deviation of the gradient estimate relative to the problem scaling (i.e. as a ratio of true gradient $\nabla _ { \phi }$ ELBO) actually increases. This effect is demonstrated in Figure 1 which shows a kernel density estimator for the distribution of the gradient estimate for different $K$ and the model given in Section 5.2. Here we see that as we increase $K$ , both the expected gradient estimate (which is equal to the true gradient by unbiasedness) and standard deviation of the estimate decrease. However, the former decreases faster and so the relative standard deviation increases. This is perhaps easiest to appreciate by noting that for $K > 1 0$ , there is a roughly equal probability of the estimate being positive or negative, such that we are equally likely to increase or decrease the parameter value at the next SGA iteration, inevitably leading to poor performance. On the other hand, when $K = 1$ , it is far more likely that the gradient estimate is positive than negative, and so there is clear drift to the gradient steps. We add to the empirical evidence for this behavior in Section 5. Note the critical difference for model learning is that $\nabla _ { \theta }$ ELBO does not, in general, decrease in magnitude as $K$ increases. Note also that using a larger $K$ should always give better performance at test time; it may though be better to learn $\phi$ using a smaller $K$ .
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
Figure 1: Density estimate of $\nabla _ { \phi }$ ELBO for different $K$
|
| 179 |
+
|
| 180 |
+
In simultaneously developed work (Rainforth et al., 2017), we formalized this intuition in the IWAE setting by showing that the estimator of $\nabla _ { \phi } \operatorname { E L B O } _ { \mathrm { I S } } ( \theta , \phi , x )$ with $K$ particles, denoted by $I _ { K }$ , has the following signal-to-noise ratio (SNR):
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\mathrm { { s N R } } : = { \frac { \mathbb { E } [ I _ { K } ] } { \sqrt { \operatorname { V a r } [ I _ { K } ] } } } = O \left( { \sqrt { \frac { 1 } { K } } } \right) .
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
We thus see that increasing $K$ reduces the SNR and so the gradient updates for the proposal will degrade towards pure noise if $K$ is set too high.
|
| 187 |
+
|
| 188 |
+
# 4.1 ALTERNATING ELBOS
|
| 189 |
+
|
| 190 |
+
To address these issues, we suggest and investigate the alternating ELBOs (ALT) algorithm which updates $( \theta , \phi )$ in a coordinate descent fashion using different ELBOs, and thus gradient estimates, for each. We pick a $\theta$ -optimizing pair and a $\phi$ -optimizing pair $( A _ { \theta } , K _ { \theta } ) , ( A _ { \phi } , K _ { \phi } ) \in \{ \mathrm { I S } , \mathrm { S M C } \} \times$ $\{ 1 , 2 , \dots \}$ , corresponding to an inference type and number of particles. In an optimization step, we obtain an estimator for $\nabla _ { \theta } \operatorname { E L B O } _ { A _ { \theta } }$ with $K _ { \theta }$ particles and an estimator for $\nabla _ { \phi } \operatorname { E L B O } _ { A _ { \phi } }$ with $K _ { \phi }$ particles which we call $g _ { \boldsymbol { \theta } }$ and $g _ { \phi }$ respectively. We use $g _ { \theta }$ to update the current $\theta$ and $g _ { \phi }$ to update the current $\phi$ . The results from the previous sections suggest that using $A _ { \theta } = \mathsf { s M C }$ and $A _ { \phi } = \mathrm { I S }$ with a large $K _ { \theta }$ and a small $K _ { \phi }$ may perform better model and proposal learning than just fixing $( A _ { \theta } , K _ { \theta } ) = ( A _ { \phi } , K _ { \phi } )$ to (SMC, large) since using $A _ { \phi } = \mathrm { I S }$ with small $K _ { \phi }$ helps learning $\phi$ (at least in terms of the SNR) and using $A _ { \theta } = \mathsf { s M C }$ with large $K _ { \theta }$ helps learning $\theta$ . We experimentally observe that this procedure can in some cases improve both model and proposal learning.
|
| 191 |
+
|
| 192 |
+
# 5 EXPERIMENTS
|
| 193 |
+
|
| 194 |
+
We now present a series of experiments designed to answer the following questions: 1) Does tightening the bound by using either more particles or a better inference procedure lead to an adverse effect on proposal learning? 2) Can AESMC, despite this effect, outperform IWAE? 3) Can we further improve the learned model and proposal by using ALT?
|
| 195 |
+
|
| 196 |
+
First we investigate a linear Gaussian state space model (LGSSM) for model learning and a latent variable model for proposal adaptation. This allows us to compare the learned parameters to the optimal ones. Doing so, we confirm our conclusions for this simple problem.
|
| 197 |
+
|
| 198 |
+
We then extend those results to more complex, high dimensional observation spaces that require models and proposals parameterized by neural networks. We do so by investigating the Moving Agents dataset, a set of partially occluded video sequences.
|
| 199 |
+
|
| 200 |
+
# 5.1 LINEAR GAUSSIAN STATE SPACE MODEL
|
| 201 |
+
|
| 202 |
+
Given the following LGSSM
|
| 203 |
+
|
| 204 |
+
$$
|
| 205 |
+
\begin{array} { r l } & { p ( x _ { 1 } ) = \mathrm { N o r m a l } \left( x _ { 1 } ; 0 , 1 ^ { 2 } \right) , } \\ & { p ( x _ { t } | x _ { t - 1 } ) = \mathrm { N o r m a l } \left( x _ { t } ; \theta _ { 1 } x _ { t - 1 } , 1 ^ { 2 } \right) , } \\ & { ~ p ( y _ { t } | x _ { t } ) = \mathrm { N o r m a l } \left( y _ { t } ; \theta _ { 2 } x _ { t } , \sqrt { 0 . 1 } ^ { 2 } \right) , ~ t = 1 , \dots , T , } \end{array}
|
| 206 |
+
$$
|
| 207 |
+
|
| 208 |
+
we find that optimizing $\mathrm { E L B O } _ { \mathrm { S M C } } ( \theta , \phi , y _ { 1 : T } )$ w.r.t. $\theta$ leads to better generative models than optimizing $\mathrm { E L B O _ { I S } } ( \theta , \phi , y _ { 1 : T } )$ . The same is true for using more particles.
|
| 209 |
+
|
| 210 |
+
We generate a sequence $y _ { 1 : T }$ for $T = 2 0 0$ by sampling from the model with $\theta = ( \theta _ { 1 } , \theta _ { 2 } ) = ( 0 . 9 , 1 . 0 )$ . We then optimize the different ELBOs w.r.t. $\theta$ using the bootstrap proposal $q _ { 1 } ( x _ { 1 } | y _ { 1 } ) = \mu _ { \theta } ( x _ { 1 } )$ and $q _ { t } ( x _ { t } | x _ { 1 : t - 1 } , y _ { 1 : t } ) = f _ { t , \theta } ( x _ { t } | x _ { 1 : t - 1 } )$ . Because we use the bootstrap proposal, gradients w.r.t. to $\theta$ are not backpropagated through $q$ .
|
| 211 |
+
|
| 212 |
+
We use a fixed learning rate of 0.01 and optimize for 500 steps using SGA. Figure 2 shows that the convergence of both $\log p _ { \theta } ( y _ { 1 : T } )$ to $\operatorname* { m a x } _ { \theta } \log p _ { \theta } ( y _ { 1 : T } )$ and $\theta$ to argmax $\cdot \theta$ $\log p _ { \theta } ( y _ { 1 : T } )$ is faster when $\mathbf { E L B O } _ { \mathbf { S M C } }$ and more particles are used.
|
| 213 |
+
|
| 214 |
+

|
| 215 |
+
Figure 2: (Left) Log marginal likelihood analytically evaluated at every $\theta$ during optimization; the black line indicates $\operatorname { m a x } _ { \theta }$ $\arg p _ { \theta } ( y _ { 1 : T } )$ obtained by the expectation maximization (EM) algorithm. (Right) learning of model parameters; the black line indicates argmax $\scriptstyle { \dot { \theta } }$ $\log p _ { \theta } ( y _ { 1 : T } )$ obtained by the EM algorithm.
|
| 216 |
+
|
| 217 |
+
# 5.2 PROPOSAL LEARNING
|
| 218 |
+
|
| 219 |
+
We now investigate how learning $\phi$ , i.e. the proposal, is affected by the the choice of ELBO and the number of particles.
|
| 220 |
+
|
| 221 |
+
Consider a simple, fixed generative model $p ( \mu ) p ( x | \mu ) = \mathrm { N o r m a l } ( \mu ; 0 , 1 ^ { 2 } ) \mathrm { N o r m a l } ( x ; \mu , 1 ^ { 2 } )$ where $\mu$ and $x$ are the latent and observed variables respectively and a family of proposal distributions $q _ { \phi } ( \mu ) = \mathrm { N o r m a l } ( \mu ; \mu _ { q } , \sigma _ { q } ^ { 2 } )$ parameterized by $\phi \overset { \cdot } { = } ( \mu _ { q } , \operatorname { l o g } \sigma _ { q } ^ { 2 } )$ . For a fixed observation $x = 2 . 3$ , we initialize $\phi = ( 0 . 0 1 , 0 . 0 1 )$ and optimize $_ { \mathrm { E L B O _ { I S } } }$ with respect to $\phi$ . We investigate the quality of the learned parameter $\phi$ as we increase the number of particles $K$ during training. Figure 3 (left) clearly demonstrates that the quality of $\phi$ compared to the analytic posterior decreases as we increase $K$ .
|
| 222 |
+
|
| 223 |
+
Similar behavior is observed in Figure 3 (middle, right) where we optimize $\mathrm { E L B O } _ { \mathrm { S M C } }$ with respect to both $\theta$ and $\phi$ for the LGSSM described in Section 5.1. We see that using more particles helps model learning but makes proposal learning worse. Using our ALT algorithm alleviates this problem and at the same time makes model learning faster as it profits from a more accurate proposal distribution. We provide more extensive experiments exploring proposal learning with different ELBOs and number of particles in Appendix C.3.
|
| 224 |
+
|
| 225 |
+

|
| 226 |
+
Figure 3: (Left) Optimizing $_ { \mathrm { E L B O _ { I S } } }$ for the Gaussian unknown mean model with respect to $\phi$ results in worse $\phi$ as we increase number of particles $K$ . (Middle, right) Optimizing ELBOSMC with respect to $( \theta , \phi )$ for LGSSM and using the ALT algorithm for updating $( \theta , \phi )$ with $( A _ { \theta } , K _ { \theta } ) = ( \mathrm { s M C } , 1 0 0 0 )$ and $( A _ { \phi } , K _ { \phi } ) = ( \mathrm { { I S } , 1 0 ) }$ . Right measures the quality of $\phi$ by showing $\sqrt { \sum _ { t = 1 } ^ { T } ( \mu _ { t } ^ { \mathrm { k a l m a n } } - \mu _ { t } ^ { \mathrm { a p p r o x } } ) ^ { 2 } }$ where $\mu _ { t } ^ { \mathrm { k a l m a n } }$ is the marginal mean obtained from the Kalman smoothing algorithm under the model twith EM-optimized parameters and $\mu _ { t } ^ { \mathrm { a p p r o x } }$ is an marginal mean obtained from the set of $1 0 \ \mathrm { { s u c } }$ particles with learned/bootstrap proposal.
|
| 227 |
+
|
| 228 |
+
# 5.3 MOVING AGENTS
|
| 229 |
+
|
| 230 |
+
To show that our results are applicable to complex, high dimensional data we compare AESMC and IWAE on stochastic, partially observable video sequences. Figure 7 in Appendix C.2 shows an example of such a sequence.
|
| 231 |
+
|
| 232 |
+
The dataset consists of $N = 5 0 0 0$ sequences of images $( y _ { 1 : T } ^ { ( n ) } ) _ { n = 1 } ^ { N }$ of which 1000 are randomly held out as test set. Each sequence contains $T = 4 0$ images represented as a 2 dimensional array of size $3 2 \times 3 2$ . In each sequence there is one agent, represented as circle, whose starting position is sampled randomly along the top and bottom of the image. The dataset is inspired by (Ondrúška & Posner, 2016), however with the crucial difference that the movement of the agent is stochastic. The agent performs a directed random walk through the image. At each timestep, it moves according to
|
| 233 |
+
|
| 234 |
+
$$
|
| 235 |
+
\begin{array} { r l } & { y _ { t + 1 } \sim \mathrm { N o r m a l } ( y _ { t + 1 } ; y _ { t } + 0 . 1 5 , 0 . 0 2 ^ { 2 } ) } \\ & { x _ { t + 1 } \sim \mathrm { N o r m a l } ( x _ { t + 1 } ; 0 , 0 . 0 2 ^ { 2 } ) } \end{array}
|
| 236 |
+
$$
|
| 237 |
+
|
| 238 |
+
where $( x _ { t } , y _ { t } )$ are the coordinates in frame $t$ in a unit square that is then projected onto $3 2 \times 3 2$ pixels. In addition to the stochasticity of the movement, half of the image is occluded, preventing the agent from being observed.
|
| 239 |
+
|
| 240 |
+
For the generative model and proposal distribution we use a Variational Recurrent Neural Network (VRNN) (Chung et al., 2015). It extends recurrent neural networks (RNNs) by introducing a stochastic latent state $x _ { t }$ at each timestep $t$ . Together with the observation $y _ { t }$ , this state conditions the deterministic transition of the RNN. By introducing this unobserved stochastic state, the VRNN is able to better model complex long range variability in stochastic sequences. Architecture and hyperparameter details are given in Appendix C.1.
|
| 241 |
+
|
| 242 |
+
Figure 4 shows $\mathrm { \ m a x { ( E L B O _ { I S } } }$ , $\mathrm { E L B O } _ { \mathrm { S M C } }$ ) for models trained with IWAE and AESMC for different particle numbers. The lines correspond to the mean over three different random seeds and the shaded areas indicate the standard deviation. The same number of particles was used for training and testing, additional hyperparameter settings are given in the appendix. One can see that models trained using AESMC outperform IWAE and using more particles improves the ELBO for both. In Appendix C.2, we inspect different learned generative models by using them for prediction, confirming the results presented here. We also tested ALT on this task, but found that while it did occasionally improve performance, it was much less stable than IWAE and AESMC.
|
| 243 |
+
|
| 244 |
+

|
| 245 |
+
Figure 4: (Left) Rolling mean over 5 epochs of max(ELBOSMC, ELBOIS) on the test set, lines indicate the average over 3 random seeds and shaded areas indicate standard deviation. The color indicates the number of particles, the line style the used algorithm. (Right) The table shows the final max(ELBOSMC, ELBOIS) for each learned model.
|
| 246 |
+
|
| 247 |
+
<table><tr><td>Particles</td><td>Method</td><td> Moving Agents</td></tr><tr><td rowspan="2">10</td><td>IWAE</td><td>-357.3</td></tr><tr><td>AESMC</td><td>-356.7</td></tr><tr><td rowspan="2">20</td><td>IWAE</td><td>-356.6</td></tr><tr><td>AESMC</td><td>-356.1</td></tr><tr><td rowspan="2">40</td><td>IWAE</td><td>-356.2</td></tr><tr><td>AESMC</td><td>-356.1</td></tr></table>
|
| 248 |
+
|
| 249 |
+
# 6 CONCLUSIONS
|
| 250 |
+
|
| 251 |
+
We have developed AESMC—a method for performing model learning using a new ELBO objective which is based on the SMC marginal likelihood estimator. This ELBO objective is optimized using SGA and the reparameterization trick. Our approach utilizes the efficiency of SMC in models with intermediate observations and hence is suitable for highly structured models. We experimentally demonstrated that this objective leads to better generative model training than the IWAE objective for structured problems, due to the superior inference and tighter bound provided by using SMC instead of importance sampling.
|
| 252 |
+
|
| 253 |
+
Additionally, in Claim 1, we provide a simple way to express the bias of objectives induced by log of marginal likelihood estimators as a KL divergence on an extended space. In Propositions 1 and 2, we investigate the implications of these KLs being zero in the case of IWAE and AESMC. In the latter case, we find that we can achieve zero KL only if we are able to learn SMC intermediate target distributions corresponding to marginals of the target distribution. Using our assertion that tighter variational bounds are not necessarily better, we then introduce and test a new method, alternating ELBOs, that addresses some of these issues and observe that, in some cases, this improves both model and proposal learning.
|
| 254 |
+
|
| 255 |
+
# ACKNOWLEDGMENTS
|
| 256 |
+
|
| 257 |
+
TAL is supported by EPSRC DTA and Google (project code DF6700) studentships. MI is supported by the UK EPSRC CDT in Autonomous Intelligent Machines and Systems. TR is supported by the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007- 2013) ERC grant agreement no. 617071; majority of TR’s work was undertaken while he was in the Department of Engineering Science, University of Oxford, and was supported by a BP industrial grant. TJ is supported by the UK EPSRC and MRC CDT in Statistical Science. FW is supported by The Alan Turing Institute under the EPSRC grant EP/N510129/1; DARPA PPAML through the U.S. AFRL under Cooperative Agreement FA8750-14-2-0006; Intel and DARPA D3M, under Cooperative Agreement FA8750-17-2-0093.
|
| 258 |
+
|
| 259 |
+
# REFERENCES
|
| 260 |
+
|
| 261 |
+
Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. In ICLR, 2016.
|
| 262 |
+
|
| 263 |
+
Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pp. 2980–2988, 2015.
|
| 264 |
+
|
| 265 |
+
P Del Moral. Feynman-Kac formulae: genealogical and interacting particle systems with applications. Probability and its applications, 2004.
|
| 266 |
+
|
| 267 |
+
Arnaud Doucet and Adam M Johansen. A tutorial on particle filtering and smoothing: Fifteen years later. Handbook of nonlinear filtering, 12(656-704):3, 2009.
|
| 268 |
+
|
| 269 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. In ICLR, 2014.
|
| 270 |
+
|
| 271 |
+
Tuan Anh Le, Maximilian Igl, Tom Jin, Tom Rainforth, and Frank Wood. Auto-encoding sequential Monte Carlo. arXiv preprint arXiv:1705.10306v1, 2017.
|
| 272 |
+
|
| 273 |
+
Chris J Maddison, John Lawson, George Tucker, Nicolas Heess, Mohammad Norouzi, Andriy Mnih, Arnaud Doucet, and Yee Teh. Filtering variational objectives. In Advances in Neural Information Processing Systems, pp. 6576–6586, 2017.
|
| 274 |
+
|
| 275 |
+
Christian A Naesseth, Scott W Linderman, Rajesh Ranganath, and David M Blei. Variational sequential Monte Carlo. arXiv preprint arXiv:1705.11140, 2017.
|
| 276 |
+
|
| 277 |
+
Peter Ondrúška and Ingmar Posner. Deep tracking: Seeing beyond seeing using recurrent neural networks. In Thirtieth AAAI Conference on Artificial Intelligence, 2016.
|
| 278 |
+
|
| 279 |
+
Tom Rainforth, Tuan Anh Le, Maximilian Igl, Chris J Maddison, Yee Whye Teh, and Frank Wood. Tighter variational bounds are not necessarily better. NIPS Workshop on Bayesian Deep Learning, 2017.
|
| 280 |
+
|
| 281 |
+
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014.
|
| 282 |
+
|
| 283 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 284 |
+
|
| 285 |
+
# A GRADIENTS
|
| 286 |
+
|
| 287 |
+
The goal is to obtain an unbiased estimator for the gradient
|
| 288 |
+
|
| 289 |
+
$$
|
| 290 |
+
\nabla _ { \theta , \phi } \int Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \mathrm { d } x _ { 1 : T } ^ { 1 : K } \mathrm { d } a _ { 1 : T - 1 } ^ { 1 : K } .
|
| 291 |
+
$$
|
| 292 |
+
|
| 293 |
+
# A.1 FULL REINFORCE
|
| 294 |
+
|
| 295 |
+
We express the required quantity as
|
| 296 |
+
|
| 297 |
+
$$
|
| 298 |
+
\begin{array} { r l } & { \nabla _ { \theta , \phi } \int Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \mathrm { d } x _ { 1 : T } ^ { 1 : K } \mathrm { d } a _ { 1 : T - 1 } ^ { 1 : K } } \\ & { = \displaystyle \int \nabla _ { \theta , \phi } Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) + } \\ & { \qquad Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \nabla _ { \theta , \phi } \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \mathrm { d } x _ { 1 : T } ^ { 1 : K } \mathrm { d } a _ { 1 : T - 1 } ^ { 1 : K } } \\ & { = \displaystyle \int Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \left[ \nabla _ { \theta , \phi } \log Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) + \right. } \\ & { \qquad \left. \nabla _ { \theta , \phi } \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \right] \mathrm { d } x _ { 1 : T } ^ { 1 : K } \mathrm { d } a _ { 1 : T - 1 } ^ { 1 : K } , } \end{array}
|
| 299 |
+
$$
|
| 300 |
+
|
| 301 |
+
which we can estimate by sampling $( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } )$ directly from $Q _ { \mathrm { S M C } }$ and evaluating $\begin{array} { r } { \left[ \nabla _ { \theta , \phi } \log Q _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) + \nabla _ { \theta , \phi } \log \hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) \right] . } \end{array}$
|
| 302 |
+
|
| 303 |
+
# A.2 REINFORCE & REPARAMETERIZATION
|
| 304 |
+
|
| 305 |
+
We express the required quantity as
|
| 306 |
+
|
| 307 |
+
$$
|
| 308 |
+
\begin{array} { r l } { \nabla _ { \Phi , \Phi } \int Q _ { \mathrm { A W } } ( z _ { 1 , 1 } ^ { ( 1 ) K } , z _ { 1 } ^ { ( 1 ) K } - 1 ) \mathrm { i } \simeq \widetilde \chi _ { \Phi , \Phi } ( z _ { 1 , 1 } ^ { ( 1 ) K } , z _ { 1 } ^ { ( 1 ) K } - 1 ) \mathrm { d } z _ { 1 , 1 } ^ { ( 1 ) K } \mathrm { d } z _ { 1 , 1 } ^ { ( 1 ) K } - } & { \ : \ : \ : \ : \ : \ : \ : \ : \ : } \\ & { = \nabla _ { \Phi , \Phi } \int \left( \displaystyle \prod _ { k = 1 } ^ { 1 } \sigma _ { k } ( \boldsymbol { \bar { \epsilon } } ^ { ( 1 ) K } ) \right) \left( \displaystyle \prod _ { k = 2 } ^ { 1 } \| Q _ { \boldsymbol { k } } ( z _ { 1 , k } ^ { ( 1 ) K } | \boldsymbol { \bar { \epsilon } } _ { k - 1 } ^ { ( 2 ) K } ) - 1 ) \mathrm { d } z _ { 1 , k } ^ { ( 1 ) K } \mathrm { d } z _ { 1 , 1 } ^ { ( 1 ) K } \right) } \\ & { \ : \ : \ : \ : \ : \ : \ : \ : \ : \ : } \\ & { = \nabla _ { \Phi , \Phi } \int \left( \displaystyle \prod _ { k = 1 } ^ { 1 } \sigma _ { k } ( \boldsymbol { \bar { \epsilon } } _ { k - 1 } ^ { ( K ) } , z _ { 1 - k } ^ { ( K ) } - 1 ) \mathrm { d } z _ { 1 , k } ^ { ( 1 ) K } \mathrm { d } z _ { 1 , 1 } ^ { ( K ) } - 1 \right. } \\ & { \ : \ : \ : \ : \ : \ : \ : \ : \ : \ : \left. \lVert \prod _ { k = 1 } ^ { 1 } \sigma _ { k } ( z _ { 1 , k } ^ { ( 1 ) K } ) \right) \left( \displaystyle \prod _ { k = 2 } ^ { 1 } \| Q _ { \boldsymbol { k } } ( z _ { 1 , k } ^ { ( 1 ) K } - 1 ) \mathrm { d } z _ { 1 , k } ^ { ( 1 ) K } \| \boldsymbol { \bar { \epsilon } } _ { k - 1 } ^ { ( K ) } \right) } \\ & \ : \ : \ : \ : \ : \ : \ : \ : \mathrm { i n f } \left( \displaystyle \prod _ { k = 1 } ^ { 1 } \sigma _ { k } ( z _ { 1 , k } ^ { ( 1 ) K } ) \right) \ : \ : \ : \ : \ : \ : \mathrm { d } z _ { 1 , k } ^ { ( 1 ) K } \sigma _ { k } ( \boldsymbol { \bar { \epsilon } } ^ { ( 1 ) K } , 1 ) \ : \ : \end{array}
|
| 309 |
+
$$
|
| 310 |
+
|
| 311 |
+
$$
|
| 312 |
+
\begin{array} { l } { \displaystyle = \int \left( \prod _ { t = 1 } ^ { T } \prod _ { k = 1 } ^ { K } s _ { t } ( \epsilon _ { t } ^ { k } ) \right) \left( \prod _ { t = 2 } ^ { T } \prod _ { k = 1 } ^ { K } \mathrm { D i s c r e t e } ( a _ { t - 1 } ^ { k } | w _ { t - 1 } ^ { 1 ; K } ) \right) \cdot } \\ { \displaystyle \left[ \nabla _ { \theta , \phi } \log \left( \prod _ { t = 2 } ^ { T } \prod _ { k = 1 } ^ { K } \mathrm { D i s c r e t e } ( a _ { t - 1 } ^ { k } | w _ { t - 1 } ^ { 1 ; K } ) \right) \log \hat { Z } _ { \mathrm { S M C } } ( r ( \epsilon _ { 1 : T } ^ { 1 ; K } ) , a _ { 1 : T - 1 } ^ { 1 ; K } ) + \right. } \\ { \displaystyle \left. \nabla _ { \theta , \phi } \log \hat { Z } _ { \mathrm { S M C } } ( r ( \epsilon _ { 1 : T } ^ { 1 ; K } ) , a _ { 1 : T - 1 } ^ { 1 ; K } ) \right] \mathrm { d } \epsilon _ { 1 : T } ^ { 1 ; K } \mathrm { d } a _ { 1 : T - 1 } ^ { 1 ; K } , } \end{array}
|
| 313 |
+
$$
|
| 314 |
+
|
| 315 |
+
where $r \big ( \epsilon _ { 1 : T } ^ { 1 : K } \big )$ denotes a sample with identical distribution as $x _ { 1 : T } ^ { 1 : K }$ obtained by passing the auxiliary samples $\epsilon _ { 1 : T } ^ { 1 : K }$ through the reparameterization function. We can thus estimate the gradient by sampling $\epsilon _ { 1 : T } ^ { 1 : K }$ from the auxiliary distribution, reparameterizing and evaluating h $\begin{array} { r } { \overset { \cdot } { \nabla } \varrho _ { \theta , \phi } \log \Big ( \prod _ { t = 2 } ^ { \bar { T } } \prod _ { k = 1 } ^ { \bar { K } } \bar { \mathrm { D i s c r e t e } ( a _ { t - 1 } ^ { k } | w _ { t - 1 } ^ { 1 : K } ) } \Big ) \log \hat { Z } _ { \mathrm { S M C } } ( r ( \epsilon _ { 1 : T } ^ { 1 : K } ) , a _ { 1 : T - 1 } ^ { 1 : K } ) + \nabla \varrho _ { \theta , \phi } \log \hat { Z } _ { \mathrm { S M C } } ( r ( \epsilon _ { 1 : T } ^ { 1 : K } ) , } \end{array}$ a1:K1:T −1 )i. In Figure 5, we demonstrate that the estimator in (31) has much higher variance if we include the first term.
|
| 316 |
+
|
| 317 |
+

|
| 318 |
+
Figure 5: $T = 2 0 0$ model described in Section 5.1. Kernel density estimation (KDE) of $\nabla _ { \theta _ { 1 } }$ ELBOSMC evaluated at $\theta _ { 1 } = 0 . 1$ with $K = 1 6$ using 100 samples.
|
| 319 |
+
|
| 320 |
+
# B PROOFS FOR BIAS & IMPLICATIONS ON THE PROPOSALS
|
| 321 |
+
|
| 322 |
+
Derivation of (9).
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
\begin{array} { r l } & { \displaystyle \mathrm { E L B O } = \int Q ( x ) \log \frac { Z _ { P } P ( x ) } { Q ( x ) } \mathrm { d } x } \\ & { \qquad = \displaystyle \int Q ( x ) \log Z _ { P } \mathrm { d } x - \int Q ( x ) \log \frac { Q ( x ) } { P ( x ) } \mathrm { d } x } \\ & { \qquad = \log Z _ { P } - \mathrm { K L } \left( Q | | P \right) . } \end{array}
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
Proof of Claim $I$ . Since $\hat { Z } _ { P } ( x ) \geq 0$ , $Q ( x ) \geq 0$ and $\begin{array} { r } { \int Q ( x ) \hat { Z } _ { P } ( x ) \mathrm { d } x = Z _ { P } } \end{array}$ , we can let the unnormalized target density in Definition 1 be $\tilde { P } ( x ) = Q ( x ) \hat { Z } _ { P } ( x )$ . Hence, the normalized target density is $P ( x ) = Q ( x ) \hat { Z } _ { P } ( x ) / Z _ { P }$ . Substituting these quantities into (8) and (9) yields the two equalities in (10). □
|
| 329 |
+
|
| 330 |
+
Proof of Proposition $^ { l }$ . $( \implies$ ) Substituting for $Q _ { \mathrm { I S } } ( x ^ { 1 : K } ) = P _ { \mathrm { I S } } ( x ^ { 1 : K } )$ , we obtain
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
\begin{array} { l } { \displaystyle \prod _ { k = 1 } ^ { K } q ( x ^ { k } | y ) = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \frac { \prod _ { \ell = 1 } ^ { K } q ( x ^ { \ell } | y ) } { q ( x ^ { k } | y ) } p ( x ^ { k } | y ) } \\ { \displaystyle \qquad = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \left[ q ( x ^ { 1 } | y ) \cdot \cdot \cdot q ( x ^ { k - 1 } | y ) p ( x ^ { k } | y ) q ( x ^ { k + 1 } | y ) \cdot \cdot \cdot q ( x ^ { K } | y ) \right] . } \end{array}
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
Integrating both sides with respect to $( x ^ { 2 } , \ldots , x ^ { K } )$ over the whole support (i.e. marginalizing out everything except $x ^ { 1 }$ ), we obtain:
|
| 337 |
+
|
| 338 |
+
$$
|
| 339 |
+
q ( x ^ { 1 } | y ) = { \frac { 1 } { K } } \left[ p ( x ^ { 1 } | y ) + \sum _ { k = 2 } ^ { K } q ( x ^ { 1 } | y ) \right] .
|
| 340 |
+
$$
|
| 341 |
+
|
| 342 |
+
Rearranging gives us $q ( x ^ { 1 } | y ) = p ( x ^ { 1 } | y )$ for all $x ^ { 1 }$ .
|
| 343 |
+
|
| 344 |
+
( $\Longleftarrow )$ Substituting $p ( x ^ { k } | y ) = q ( x ^ { k } | y )$ , we obtain
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
\begin{array} { l } { \displaystyle P _ { \mathrm { I S } } ( \boldsymbol { x } ^ { 1 : K } ) = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \frac { Q _ { \mathrm { I S } } ( \boldsymbol { x } ^ { 1 : K } ) } { q ( \boldsymbol { x } ^ { k } | \boldsymbol { y } ) } p ( \boldsymbol { x } ^ { k } | \boldsymbol { y } ) } \\ { \displaystyle ~ = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } Q _ { \mathrm { I S } } ( \boldsymbol { x } ^ { 1 : K } ) } \\ { \displaystyle ~ = Q _ { \mathrm { I S } } ( \boldsymbol { x } ^ { 1 : K } ) . } \end{array}
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
Proof of Proposition 2. We consider the general sequence of target distributions $\pi _ { t } ( x _ { 1 : t } )$ $( p _ { \theta } ( x _ { 1 : t } | y _ { 1 : t } )$ in the case of SSMs), their unnormalized versions $\gamma _ { t } ( x _ { 1 : t } \bar { ) } \left( p _ { \theta } ( x _ { 1 : t } , y _ { 1 : t } ) \right.$ in the case of SSMs), their normalizing constants $\begin{array} { r } { Z _ { t } = \int \gamma _ { t } ( x _ { 1 : t } ) \mathrm { d } x _ { 1 : t } } \end{array}$ $( p _ { \theta } ( y _ { 1 : t } )$ in the case of SSMs), where $Z = Z _ { T } = p ( y _ { 1 : T } )$ .
|
| 351 |
+
|
| 352 |
+
$( \Longrightarrow )$ ) It suffices to show that $\hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) = Z$ for all $( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } )$ implies 1 and 2 in Proposal 2 due to equation (11).
|
| 353 |
+
|
| 354 |
+
We first prove that $\hat { Z } _ { \mathrm { S M C } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) = Z$ for all $( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } )$ implies that the weights
|
| 355 |
+
|
| 356 |
+
$$
|
| 357 |
+
\begin{array} { l } { { w _ { 1 } ( x _ { 1 } ) : = \displaystyle \frac { \gamma _ { 1 } ( x _ { 1 } ) } { q _ { 1 } ( x _ { 1 } ) } } } \\ { { w _ { t } ( x _ { 1 : t } ) : = \displaystyle \frac { \gamma _ { t } ( x _ { 1 : t } ) } { \gamma _ { t - 1 } ( x _ { 1 : t - 1 } ) q _ { t } ( x _ { t } | x _ { 1 : t - 1 } ) } \qquad \mathrm { f o r } t = 2 , \ldots , T } } \end{array}
|
| 358 |
+
$$
|
| 359 |
+
|
| 360 |
+
are constant with respect to $x _ { 1 : t }$
|
| 361 |
+
|
| 362 |
+
Pick sets $t \in \{ 1 , \ldots , T \}$ $k , \ell \in \{ 1 , \dots , K \}$ Also, pick , illustrate $x _ { 1 : t }$ and Figu $x ^ { \prime } { _ { 1 : t } }$ . Now, consider twosuch that $( \bar { x } _ { 1 : T } ^ { 1 : K } , \bar { a } _ { 1 : T - 1 } ^ { 1 : K } )$ $( \tilde { x } _ { 1 : T } ^ { 1 : K } , \tilde { a } _ { 1 : T - 1 } ^ { 1 : K } )$
|
| 363 |
+
|
| 364 |
+
$$
|
| 365 |
+
\bar { x } _ { \tau } ^ { \kappa } = \left\{ \begin{array} { l l } { x ^ { \prime } { } _ { \tau } } & { \mathrm { ~ i f ~ } \kappa = \ell \mathrm { ~ a n d ~ } { } \tau < t } \\ { x ^ { \prime } { } _ { \tau } } & { \mathrm { ~ i f ~ } ( \kappa , \tau ) = ( k , t ) } \\ { x _ { \tau } } & { \mathrm { ~ i f ~ } \kappa = k \mathrm { ~ a n d ~ } { } \tau < t } \\ { x _ { \tau } ^ { \kappa } } & { \mathrm { ~ o t h e r w i s e } } \end{array} \right.
|
| 366 |
+
$$
|
| 367 |
+
|
| 368 |
+
$$
|
| 369 |
+
\mathrm { f o r } \tau = 1 , \dots , T , \kappa = 1 , \dots , K ,
|
| 370 |
+
$$
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
{ \bar { a } } _ { \tau } ^ { \kappa } = \left\{ { \begin{array} { l l } { \ell } & { { \mathrm { ~ i f ~ } } ( \kappa , \tau ) = ( k , t - 1 ) { \mathrm { ~ o r ~ } } ( k , t ) } \\ { \kappa } & { { \mathrm { ~ o t h e r w i s e } } } \end{array} } \right.
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
$$
|
| 377 |
+
\mathrm { f o r } \tau = 1 , \dots , T - 1 , \kappa = 1 , \dots , K ,
|
| 378 |
+
$$
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
\tilde { x } _ { \tau } ^ { \kappa } = \left\{ \begin{array} { l l } { x _ { \tau } ^ { \prime } } & { \mathrm { ~ i f ~ } \kappa = \ell \mathrm { ~ a n d ~ } \tau < t } \\ { x _ { \tau } } & { \mathrm { ~ i f ~ } ( \kappa , \tau ) = ( k , t ) } \\ { x _ { \tau } } & { \mathrm { ~ i f ~ } \kappa = k \mathrm { ~ a n d ~ } \tau < t } \\ { x _ { \tau } ^ { \kappa } } & { \mathrm { ~ o t h e r w i s e ~ } } \end{array} \right.
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
$$
|
| 385 |
+
\mathfrak { r } \tau = 1 , \dots , T , \kappa = 1 , \dots , K ,
|
| 386 |
+
$$
|
| 387 |
+
|
| 388 |
+
$$
|
| 389 |
+
\tilde { \boldsymbol { a } } _ { \tau } ^ { \kappa } = \left\{ \begin{array} { l l } { \ell } & { \mathrm { i f } \left( \kappa , \tau \right) = \left( k , t \right) } \\ { \boldsymbol { \kappa } } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 390 |
+
$$
|
| 391 |
+
|
| 392 |
+

|
| 393 |
+
Figure 6: (Left) particle set $( \bar { x } _ { 1 : T } ^ { 1 : K } , \bar { a } _ { 1 : T - 1 } ^ { 1 : K } )$ and (right) particle set $( \tilde { x } _ { 1 : T } ^ { 1 : K } , \tilde { a } _ { 1 : T - 1 } ^ { 1 : K } )$ . Lines indicate ancestor indices.
|
| 394 |
+
|
| 395 |
+
The weights $\bar { w } _ { \tau } ^ { \kappa }$ and $\tilde { w } _ { \tau } ^ { \kappa }$ for the respective particle sets are identical except when $( \tau , \kappa ) = ( t , k )$ where
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\begin{array} { r } { \bar { w } _ { t } ^ { k } = w _ { t } ( x _ { 1 : t } ^ { \prime } ) , } \\ { \tilde { w } _ { t } ^ { k } = w _ { t } ( x _ { 1 : t } ) . } \end{array}
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
Since $\hat { Z } ( \bar { x } _ { 1 : T } ^ { 1 : K } , \bar { a } _ { 1 : T - 1 } ^ { 1 : K } ) = \hat { Z } ( \tilde { x } _ { 1 : T } ^ { 1 : K } , \tilde { a } _ { 1 : T - 1 } ^ { 1 : K } )$ , we have $w _ { t } ( x ^ { \prime } _ { 1 : t } ) = w _ { t } ( x _ { 1 : t } )$ . As this holds for any arbitrary $t$ and $x _ { 1 : t }$ , it follows that $w _ { t } ( x _ { 1 : t } )$ must be constant with respect to $x _ { 1 : t }$ for all $t = 1 , \dots , T$ .
|
| 402 |
+
|
| 403 |
+
Now, for $x _ { 1 : t }$ , consider the implied proposal by rearranging (41) and (42)
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\begin{array} { r l } { q _ { 1 } ( x _ { 1 } ) = \frac { \gamma _ { 1 } ( x _ { 1 } ) } { w _ { 1 } } } \\ { q _ { t } ( x _ { t } | x _ { 1 : t - 1 } ) = \frac { \gamma _ { t } ( x _ { 1 : t } ) } { \gamma _ { t - 1 } ( x _ { 1 : t - 1 } ) w _ { t } } \qquad } & { \mathrm { f o r } t = 2 , \dots , T , } \end{array}
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
where $w _ { t } : = w _ { t } ( x _ { 1 : t } )$ is constant from our previous results. For this to be a normalized density with respect to $x _ { t }$ , we must have
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
w _ { 1 } = \int \gamma _ { 1 } ( x _ { 1 } ) \mathrm { d } x _ { 1 } = Z _ { 1 } ,
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
and for $t = 2 , \ldots , T$ :
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
\begin{array} { r l } & { w _ { t } = \displaystyle \int \frac { \gamma _ { t } \big ( x _ { 1 : t } \big ) } { \gamma _ { t - 1 } \big ( x _ { 1 : t - 1 } \big ) } \mathrm { d } x _ { t } } \\ & { \quad = \displaystyle \frac { \int \gamma _ { t } \big ( x _ { 1 : t } \big ) \mathrm { d } x _ { t } } { \gamma _ { t - 1 } \big ( x _ { 1 : t - 1 } \big ) } } \\ & { \quad = \displaystyle \frac { Z _ { t } } { Z _ { t - 1 } } \cdot \frac { \int \pi _ { t } \big ( x _ { 1 : t } \big ) \mathrm { d } x _ { t } } { \pi _ { t - 1 } \big ( x _ { 1 : t - 1 } \big ) } . } \end{array}
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
Since $\textstyle \int \pi _ { t + 1 } ( x _ { 1 : t + 1 } ) \mathrm { d } x _ { t + 1 }$ and $\pi _ { t } ( x _ { 1 : t } )$ are both normalized densities, we must have $\pi _ { t } ( x _ { 1 : t } ) =$ $\textstyle \int \pi _ { t + 1 } ( x _ { 1 : t + 1 } ) \mathrm { d } x _ { t + 1 }$ for all $t = 1 , \dots , T - 1$ for all $x _ { 1 : t }$ . For a given $t \in \{ 1 , \ldots , T - 1 \}$ and $x _ { 1 : t }$ , applying this repeatedly yields
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\tau _ { t } ( x _ { 1 : t } ) = \int \pi _ { t + 1 } ( x _ { 1 : t + 1 } ) \mathrm { d } x _ { t + 1 } = \int \int \pi _ { t + 2 } ( x _ { 1 : t + 2 } ) \mathrm { d } x _ { t + 2 } \mathrm { d } x _ { t + 1 } = \cdot \cdot = \int \pi _ { T } ( x _ { 1 : T } ) \mathrm { d } x _ { t + 1 : T } ,
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
such that each $\pi _ { t } ( x _ { 1 : t } )$ must be the corresponding marginal of the final target. We also have
|
| 428 |
+
|
| 429 |
+
$$
|
| 430 |
+
\begin{array} { r l r } & { w _ { 1 } ( x _ { 1 } ) = Z _ { 1 } , } \\ & { w _ { t } ( x _ { 1 : t } ) = \displaystyle \frac { Z _ { t } } { Z _ { t - 1 } } , } & { t = 2 , \ldots , T , } \\ & { q _ { 1 } ( x _ { 1 } ) = \pi _ { 1 } ( x _ { 1 } ) = \pi _ { T } ( x _ { 1 } ) , } \\ & { q _ { t } ( x _ { t } | x _ { 1 : t - 1 } ) = \displaystyle \frac { \pi _ { t } ( x _ { 1 : t } ) } { \pi _ { t - 1 } ( x _ { 1 : t - 1 } ) } = \displaystyle \frac { \pi _ { T } ( x _ { 1 : t } ) } { \pi _ { T } ( x _ { 1 : t - 1 } ) } , } & { t = 2 , \ldots , T . } \end{array}
|
| 431 |
+
$$
|
| 432 |
+
|
| 433 |
+
( $\Longleftarrow )$ To complete the proof, we now simply substitute identities in 1 and 2 of Proposal 2 back to the expression of $\hat { Z } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } )$ to obtain $\bar { \hat { Z } } ( x _ { 1 : T } ^ { 1 : K } , a _ { 1 : T - 1 } ^ { 1 : K } ) = Z$ . □
|
| 434 |
+
|
| 435 |
+
# C EXPERIMENTS
|
| 436 |
+
|
| 437 |
+
# C.1 VRNN
|
| 438 |
+
|
| 439 |
+
In the following we give the details of our VRNN architecture. The generative model is given by:
|
| 440 |
+
|
| 441 |
+
$$
|
| 442 |
+
p ( x _ { 1 : T } , h _ { 0 : T } , y _ { 1 : T } ) = p ( h _ { 0 } ) \prod _ { t } p ( x _ { t } | h _ { t - 1 } ) p ( y _ { t } | h _ { t - 1 } , x _ { t } ) p ( h _ { t } | h _ { t - 1 } , x _ { t } , y _ { t } )
|
| 443 |
+
$$
|
| 444 |
+
|
| 445 |
+
where
|
| 446 |
+
|
| 447 |
+
$$
|
| 448 |
+
\begin{array} { r } { p ( h _ { 0 } ) = \mathrm { N o r m a l } ( h _ { 0 } ; 0 , I ) \qquad } \\ { p ( x _ { t } | h _ { t - 1 } ) = \mathrm { N o r m a l } ( x _ { t } ; \mu _ { \theta } ^ { x } ( h _ { t - 1 } ) , \sigma _ { \theta } ^ { x } ( h _ { t - 1 } ) ^ { 2 } ) } \\ { p ( y _ { t } | h _ { t - 1 } , x _ { t } ) = \mathrm { B e r n o u l l i } ( y _ { t } ; \mu _ { \theta } ^ { y } ( \varphi _ { \theta } ^ { x } ( x _ { t } ) , h _ { t - 1 } ) ) } \\ { p ( h _ { t } | h _ { t - 1 } , x _ { t } , y _ { t } ) = \delta _ { f ( h _ { t - 1 } , \varphi _ { \theta } ^ { x } ( x _ { t } ) , \varphi _ { \theta } ^ { y } ( y _ { t } ) ) } ( h _ { t } ) } \end{array}
|
| 449 |
+
$$
|
| 450 |
+
|
| 451 |
+
and the proposal distribution is given by
|
| 452 |
+
|
| 453 |
+
$$
|
| 454 |
+
p ( x _ { t } | y _ { t } , h _ { t - 1 } ) = \mathrm { N o r m a l } ( x _ { t } ; \mu _ { \phi } ^ { p } ( \varphi _ { \phi } ^ { y } ( y _ { t } ) , h _ { t - 1 } ) , \sigma _ { \phi } ^ { p 2 } ( \varphi _ { \phi } ^ { y } ( y _ { t } ) , h _ { t - 1 } ) )
|
| 455 |
+
$$
|
| 456 |
+
|
| 457 |
+
The functions $\mu _ { \theta } ^ { x }$ and $\sigma _ { \theta } ^ { x }$ are computed by networks with two fully connected layers of size 128 whose first layer is shared. $\varphi _ { \theta } ^ { x }$ is one fully connected layer of size 128.
|
| 458 |
+
|
| 459 |
+
For visual input, the encoding $\varphi _ { \theta } ^ { y }$ is a convolutional network with conv-4x4-2-1-32, conv-4x4-2-1-64, conv-4x4-2-1-128 where conv-wxh-s-p-n denotes a convolutional network with $n$ filters of size $w \times h$ , stride $s$ , padding $p$ . Between convolutions we use leaky ReLUs with slope 0.2 as nonlinearity and batch norms. The decoding $\mu _ { \boldsymbol { \theta } } ^ { y }$ uses transposed convolutions of the same dimensions but in reversed order, however with stride $s = 1$ and padding $p = 0$ for the first layer.
|
| 460 |
+
|
| 461 |
+
A Gated Recurrent Unit (GRU) is used as RNN and if not stated otherwise ReLUs are used in between fully connected layers.
|
| 462 |
+
|
| 463 |
+
For the proposal distribution, the functions $\mu _ { \phi } ^ { p }$ and $\sigma _ { \phi } ^ { p }$ are neural networks with three fully connected layers of size 128 that are sharing the first two layers. Sigmoid and softplus functions are used where values in $( 0 , 1 )$ or $\mathbb { R } ^ { + }$ are required. We use a minibatch size of 25.
|
| 464 |
+
|
| 465 |
+
For the moving agents dataset we use ADAM with a learning rate of $1 0 ^ { - 3 }$ .
|
| 466 |
+
|
| 467 |
+
A specific feature of the VRNN architecture is that the proposal and the generative model share the component $\varphi _ { \phi , \theta } ^ { y }$ . Consequently, we set $\phi = \theta$ for the parameters belonging to this module and train it using gradients for both and $\phi$ .
|
| 468 |
+
|
| 469 |
+
# C.2 MOVING AGENTS
|
| 470 |
+
|
| 471 |
+
In Figure 7 we investigate the quality of the generative model by comparing visual predictions. We do so for models learned by IWAE $( t o p )$ and AESMC (bottom). The models were learned using ten particles but for easier visualization we only predict using five particles.
|
| 472 |
+
|
| 473 |
+
The first row in each graphic shows the ground truth. The second row shows the averaged predictions of all five particles. The next five rows show the predictions made by each particle individually.
|
| 474 |
+
|
| 475 |
+
The observations (i.e. the top row) up to $t = 1 9$ are shown to the model. Up to this timestep the latent values $x _ { \mathrm { 0 : 1 9 } }$ are drawn from the proposal distribution $q ( x _ { t } | y _ { t } , h _ { t - 1 } )$ . From $t = 2 0$ onwards the latent values $x _ { 2 0 : 3 7 }$ are drawn from the generative model $p ( x _ { t } | x _ { t - 1 } )$ . Consequently, the model predicts the partially occluded, stochastic movement over 17 timesteps into the future.
|
| 476 |
+
|
| 477 |
+
We note that most particles predict a viable future trajectory. However, the model learned by IWAE is not as consistent in the quality of its predictions, often ’forgetting’ the particle. This does not happen in every predicted sequence but the behavior shown here is very typical. Models learned by AESMC are much more consistent in the quality of their predictions.
|
| 478 |
+
|
| 479 |
+
# C.3 OPTIMIZING ONLY PROPOSAL PARAMETERS
|
| 480 |
+
|
| 481 |
+
We have run experiments where we optimize various ELBO objectives with respect to $\phi$ with $\theta$ fixed in order to see how various objectives have an effect on proposal learning. In particular, we train $_ { \mathrm { E L B O _ { I S } } }$ and $\mathrm { E L B O } _ { \mathrm { S M C } }$ with number of particles $K \in \{ 1 0 , 1 0 0 , 1 0 0 0 \}$ . Once the training is done, we use the trained proposal network to perform inference using both IS and SMC with number of particles $K _ { \mathrm { t e s t } } \in \{ 1 0 , 1 0 0 , 1 0 0 0 \}$ .
|
| 482 |
+
|
| 483 |
+
In Figure 8, we see experimental results for the LGSSM described in Section 5.1. We measure the quality of the inference network using a proxy $\begin{array} { r } { \sqrt { \sum _ { t = 1 } ^ { T } ( \mu _ { t } ^ { \mathrm { k a l m a n } } - \mu _ { t } ^ { \mathrm { a p p r o x } } ) ^ { 2 } } } \end{array}$ where $\mu _ { t } ^ { \mathrm { k a l m a n } }$ is the true marginal mean $\mathbb { E } _ { p ( x _ { 1 : T } | y _ { 1 : T } ) } [ x _ { t } ]$ obtained from the Kalman smoothing algorithm and $\begin{array} { r } { \mu _ { t } ^ { \mathrm { a p p r o x } } = \left( \sum _ { k = 1 } ^ { K } w _ { T } ^ { k } x _ { t } \right) / \left( \sum _ { k = 1 } ^ { K } w _ { T } ^ { k } \right) } \end{array}$ is an approximate marginal mean obtained from the proposal parameterized by $\phi$ .
|
| 484 |
+
|
| 485 |
+

|
| 486 |
+
Figure 7: Visualisation of the learned model. Ground truth observations (top row in each sub figure) are only revealed to the algorithm up until $_ { \mathrm { t = } 1 9 }$ inclusive. The second row shows the prediction averaged over all particles, all following rows show the prediction made by a single particle. (Top) IWAE. (Bottom) AESMC.
|
| 487 |
+
|
| 488 |
+
We see that if we train using ELBOSMC with $K _ { \mathrm { t r a i n } } = 1 0 0 0$ , the performance for inference using SMC (with whichever $K _ { \mathrm { t e s t } } \in \{ 1 0 , 1 0 0 , 1 0 0 0 \} )$ is worse than if we train with $\mathrm { E L B O _ { I S } }$ with any number of particles $K _ { \mathrm { t r a i n } } \in \{ 1 0 , 1 0 0 , 1 0 0 0 \}$ . Examining the other axes of variation:
|
| 489 |
+
|
| 490 |
+
• Increasing $K _ { \mathrm { t e s t } }$ (moving up in Figure 8 (Right)) improves inference. • Increasing $K _ { \mathrm { t r a i n } }$ (moving to the right in Figure 8 (Right)) worsens inference. • Among different possible combinations of (training algorithm, testing algorithm), (IS, SMC) $\begin{array} { r } { \succ ( \mathrm { S M C } , \mathrm { S M C } ) \succ ( \mathrm { I S } , \mathrm { I S } ) \succ ( \mathrm { S M C } , \mathrm { I S } ) , } \end{array}$ where we use “ $\mathbf { \boldsymbol { a } } \succ \mathbf { \boldsymbol { b } } ^ { \prime }$ to denote that the combination $a$ results in better inference than combination $b$ .
|
| 491 |
+
|
| 492 |
+

|
| 493 |
+
|
| 494 |
+
Figure 8: (Left) Optimizing ELBO with respect to $\phi$ for LGSSM. (Right) The lengths of the squares are proportional (with a constant factor) to $\begin{array} { r } { \sqrt { \sum _ { t = 1 } ^ { T } ( \mu _ { t } ^ { \mathrm { k a l m a n } } - \mu _ { t } ^ { \mathrm { a p p r o x } } ) ^ { 2 } } } \end{array}$ which is a proxy for inference quality of $\phi$ described in the main text. The larger the square, the worse the inference.
|
parse/train/BJ8c3f-0b/BJ8c3f-0b_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BJ8c3f-0b/BJ8c3f-0b_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BJ8c3f-0b/BJ8c3f-0b_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkG8sjR5Km/BkG8sjR5Km.md
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EMERGENT COORDINATION THROUGH COMPETITION
|
| 2 |
+
|
| 3 |
+
Siqi Liu∗, Guy Lever∗, Josh Merel, Saran Tunyasuvunakool, Nicolas Heess, Thore Graepel
|
| 4 |
+
DeepMind
|
| 5 |
+
London, United Kingdom
|
| 6 |
+
{liusiqi,guylever,jsmerel,stunya,heess,thore}@google.com
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
We study the emergence of cooperative behaviors in reinforcement learning agents by introducing a challenging competitive multi-agent soccer environment with continuous simulated physics. We demonstrate that decentralized, populationbased training with co-play can lead to a progression in agents’ behaviors: from random, to simple ball chasing, and finally showing evidence of cooperation. Our study highlights several of the challenges encountered in large scale multi-agent training in continuous control. In particular, we demonstrate that the automatic optimization of simple shaping rewards, not themselves conducive to co-operative behavior, can lead to long-horizon team behavior. We further apply an evaluation scheme, grounded by game theoretic principals, that can assess agent performance in the absence of pre-defined evaluation tasks or human baselines.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
Competitive games have been grand challenges for artificial intelligence research since at least the 1950s (Samuel, 1959; Tesauro, 1995; Campbell et al., 2002; Vinyals et al., 2017). In recent years, a number of breakthroughs in AI have been made in these domains by combining deep reinforcement learning (RL) with self-play, achieving superhuman performance at Go and Poker (Silver et al., 2016; Moravk et al., 2017). In continuous control domains, competitive games possess a natural curriculum property, as observed in Bansal et al. (2017), where complex behaviors have the potential to emerge in simple environments as a result of competition between agents, rather than due to increasing difficulty of manually designed tasks. Challenging collaborative-competitive multi-agent environments have only recently been addressed using end-to-end RL by Jaderberg et al. (2018), which learns visually complex first-person 2v2 video games to human level. One longstanding challenge in AI has been robot soccer (Kitano et al., 1997), including simulated leagues, which has been tackled with machine learning techniques (Riedmiller et al., 2009; MacAlpine & Stone, 2018) but not yet mastered by end-to-end reinforcement learning.
|
| 15 |
+
|
| 16 |
+
We investigate the emergence of co-operative behaviors through multi-agent competitive games. We design a simple research environment with simulated physics in which complexity arises primarily through competition between teams of learning agents. We introduce a challenging multi-agent soccer environment, using MuJoCo (Todorov et al., 2012) which embeds soccer in a wider universe of possible environments with consistent simulated physics, already used extensively in the machine learning research community (Heess et al., 2016; 2017; Bansal et al., 2017; Brockman et al., 2016; Tassa et al., 2018; Riedmiller et al., 2018). We focus here on multi-agent interaction by using relatively simple bodies with a 3-dimensional action space (though the environment is scalable to more agents and more complex bodies).1 We use this environment to examine continuous multiagent reinforcement learning and some of its challenges including coordination, use of shaping rewards, exploitability and evaluation.
|
| 17 |
+
|
| 18 |
+
We study a framework for continuous multi-agent RL based on decentralized population-based training (PBT) of independent RL learners (Jaderberg et al., 2017; 2018), where individual agents learn off-policy with recurrent memory and decomposed shaping reward channels. In contrast to some recent work where some degree of centralized learning was essential for multi-agent coordinated behaviors (e.g. Lowe et al., 2017; Foerster et al., 2016), we demonstrate that end-to-end PBT can lead to emergent cooperative behaviors in our soccer domain. While designing shaping rewards that induce desired cooperative behavior is difficult, PBT provides a mechanism for automatically evolving simple shaping rewards over time, driven directly by competitive match results. We further suggest to decompose reward into separate weighted channels, with individual discount factors and automatically optimize reward weights and corresponding discounts online. We demonstrate that PBT is able to evolve agents’ shaping rewards from myopically optimizing dense individual shaping rewards through to focusing relatively more on long-horizon game rewards, i.e. individual agent’s rewards automatically align more with the team objective over time. Their behavior correspondingly evolves from random, through simple ball chasing early in the learning process, to more co-operative and strategic behaviors showing awareness of other agents. These behaviors are demonstrated visually and we provide quantitative evidence for coordination using game statistics, analysis of value functions and a new method of analyzing agents’ counterfactual policy divergence.
|
| 19 |
+
|
| 20 |
+
Finally, evaluation in competitive multi-agent domains remains largely an open question. Traditionally, multi-agent research in competitive domains relies on handcrafted bots or established human baselines (Jaderberg et al., 2018; Silver et al., 2016), but these are often unavailable and difficult to design. In this paper, we highlight that diversity and exploitability of evaluators is an issue, by observing non-transitivities in the agents pairwise rankings using tournaments between trained teams. We apply an evaluation scheme based on Nash averaging (Balduzzi et al., 2018) and evaluate our agents based on performance against pre-trained agents in the support set of the Nash average.
|
| 21 |
+
|
| 22 |
+
# 2 PRELIMINARIES
|
| 23 |
+
|
| 24 |
+
We treat our soccer domain as a multi-agent reinforcement learning problem (MARL) which models a collection of agents interacting with an environment and learning, from these interactions, to optimize individual cumulative reward. MARL can be cooperative, competitive or some mixture of the two (as is the case in soccer), depending upon the alignment of agents’ rewards. MARL is typically modelled as a Markov game (Shapley, 1953; Littman, 1994), which comprises: a state space $s$ , $n$ agents with observation and action sets $O ^ { 1 } , . . . , O ^ { n }$ and $\mathcal { A } ^ { 1 } , . . . , \mathcal { A } ^ { n }$ ; a (possibly stochastic) reward function $R ^ { i } : \mathcal { S } \times \mathcal { A } ^ { i } \mathbb { R }$ for each agent; observation functions $\phi ^ { i } : { \bar { \cal S } } { \bar { \cal O } } ^ { i }$ ; a transition function $P$ which defines the conditional distribution over successor states given previous state-actions: $P ( S _ { t + 1 } | S _ { t } , A _ { t } ^ { 1 } , . . . , A _ { t } ^ { n } )$ , which satisfies the Markov property $P ( S _ { t + 1 } \bar { | } S _ { \tau } , \dot { A _ { \tau } ^ { 1 } } , . . . , A _ { \tau } ^ { n } , \forall \tau \leq t ) =$ $P ( S _ { t + 1 } | S _ { t } , A _ { t } ^ { 1 } , . . . , A _ { t } ^ { n } )$ ; and a start state distribution $P _ { 0 } ( S _ { 0 } )$ on $s$ . In our application the state and action sets are continuous, and the transition distributions should be thought of as densities. Each agent $i$ sequentially chooses actions, $a _ { t } ^ { i }$ , at each timestep $t$ , based on their observations, $\phi _ { t } ^ { i } = \phi ^ { i } ( s _ { t } )$ , and these interactions give rise to a trajectory $\bigl ( \bigl ( s _ { t } , a _ { t } ^ { 1 } , . . . , a _ { t } ^ { n } , r _ { t } ^ { 1 } , . . . , r _ { t } ^ { n } \bigr ) \bigr ) _ { t = 1 , 2 , . . . , H }$ , over a horizon $H$ , where at each time step $S _ { t + 1 } \sim P ( \cdot | s _ { t } , a _ { t } ^ { 1 } , . . . , a _ { t } ^ { n } )$ , and $r _ { t } ^ { i } = R ^ { i } ( s _ { t } , a _ { t } ^ { i } )$ . Each agent aims to maximize expected cumulative reward, $\mathbb { E } [ \sum _ { t = 0 } ^ { H } \gamma ^ { t } r _ { t } ^ { i } ]$ (discounted by a factor $\gamma < 1$ to ensure convergence when $H$ is infinite), and chooses actions according to a policy $a _ { t } ^ { i } \sim \pi ^ { i } ( \cdot | x _ { t } ^ { i } )$ , which in general can be any function of the history $\ v { x } _ { t } ^ { i }$ of the agent’s prior observations and actions at time $t$ , $\overline { { x } } _ { t } ^ { i } : = ( \phi ^ { i } ( s _ { 1 } ) , a _ { 1 } ^ { i } , . . . , \phi ^ { i } ( s _ { t - 1 } ) , a _ { t - 1 } ^ { i } , \phi ^ { i } \bar { ( s _ { t } ) } )$ . The special case of a Markov game with one agent is a partially-observed Markov decision process (POMDP) (Sutton & Barto, 1998). In this work all players have the same action and observation space.
|
| 25 |
+
|
| 26 |
+
# 3 METHODS
|
| 27 |
+
|
| 28 |
+
We seek a method of training agents which addresses the exploitability issues of competitive games, arising from overfitting to a single opponents policy, and provides a method of automatically optimizing hyperparameters and shaping rewards online, which are otherwise hard to tune. Following Jaderberg et al. (2018), we combine algorithms for single-agent RL (in our case, SVG0 for continuous control) with population-based training (PBT) (Jaderberg et al., 2017). We describe the individual components of this framework, and several additional novel algorithmic components introduced in this paper.
|
| 29 |
+
|
| 30 |
+
# 3.1 POPULATION BASED TRAINING
|
| 31 |
+
|
| 32 |
+
Population Based Training (PBT) (Jaderberg et al., 2017) was proposed as a method to optimize hyperparameters via a population of simultaneously learning agents: during training, poor performing agents, according to some fitness function, inherit network parameters and some hyperparameters from stronger agents, with additional mutation. Hyperparameters can continue to evolve during training, rather than committing to a single fixed value (we show that this is indeed the case in Section 5.1). PBT was extended to incorporate co-play (Jaderberg et al., 2018) as a method of optimizing agents for MARL: subsets of agents are selected from the population to play together in multi-agent games. In any such game each agent in the population effectively treats the other agents as part of their environment and learns a policy $\pi _ { \theta }$ to optimize their expected return, averaged over such games. In any game in which $\pi _ { \theta }$ controls player $i$ in the game, if we denote by $\overline { { { \pi } } } _ { \backslash i } : = \{ \pi ^ { j } \} _ { j \in \{ 1 , 2 , . . . , n \} , j \neq i }$ the policies of the other agents $j \neq i$ , we can write the expected cumulative return over a game as
|
| 33 |
+
|
| 34 |
+
Algorithm 1 Population-based Training for Multi-Agent RL.
|
| 35 |
+
|
| 36 |
+
<table><tr><td colspan="2">1: procedure PBT-MARL</td></tr><tr><td>2: 3:</td><td>{Ai}i∈[1.,N] N independent agents forming a population. for agent Ai in {Ai}i∈[1.,N] do</td></tr><tr><td>4:</td><td>Initialize agent network parameters 0i and agent rating ri to fixed initial rating Rinit.</td></tr><tr><td>5: 6:</td><td>Sample initial hyper-parameter 0' from the initial hyper-parameter distribution.</td></tr><tr><td>end for</td><td></td></tr><tr><td>7: while true do</td><td></td></tr><tr><td>8:</td><td>Agents play TrainingMatches and update network parameters by Retrace-SVG0.</td></tr><tr><td>9:</td><td>for match result (si,sj) ∈ TrainingMatches do</td></tr><tr><td>10:</td><td>UpdateRating(ri,rj,Si,Sj) See Appendix B.1</td></tr><tr><td>11: 12:</td><td>end for</td></tr><tr><td>13:</td><td>for agent Ai E {Ai}ie[1,., N] do Evolution Procedure</td></tr><tr><td>14:</td><td>if Eligible(Ai) then > See Appendix B.2</td></tr><tr><td>15:</td><td>Aj←Select(Ai,{Ai}iε∈[1..,N];i≠j) See Appendix B.3</td></tr><tr><td>16:</td><td>if Aj ≠ NULL then</td></tr><tr><td>17:</td><td>Inherit(0,0,,) >Ai inherits from Aj,See Appendix B.4</td></tr><tr><td>18:</td><td>←Mutate(0) See Appendix B.5</td></tr><tr><td>19:</td><td>end if</td></tr><tr><td>20:</td><td>end if</td></tr><tr><td>21:</td><td>end for</td></tr><tr><td>22:</td><td>end while</td></tr><tr><td>end procedure</td><td></td></tr></table>
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
J ^ { i } ( \pi _ { \theta } ; \pi _ { \setminus i } ) : = \mathbb { E } \left[ \sum _ { t = 0 } ^ { H } \gamma ^ { t } r _ { t } ^ { i } | \pi ^ { i } = \pi _ { \theta } , \pi _ { \setminus i } \right]
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where the expectation is w.r.t. the environment dynamics and conditioned on the actions being drawn from policies $\pi _ { \theta }$ and $\pi _ { \backslash i }$ . Each agent in the population attempts to optimize (1) averaged over the draw of all agents from the population $\mathcal { P }$ , leading to the PBT objective $J ( \pi _ { \theta } ) : =$ $\bar { \mathbb { E } _ { i } } [ \mathbb { E } _ { \pi _ { \backslash i } \sim \mathcal { P } } [ J ^ { i } ( \pi _ { \theta } ; \pi _ { \setminus i } ) | \pi ^ { i } = \pi _ { \theta } ] ]$ , where the outer expectation is w.r.t. the probability that the agent with policy $\pi _ { \theta }$ controls player $i$ in the environment, and the inner expectation is the expectation over the draw of other agents, conditioned on $\pi _ { \theta }$ controlling player $i$ in the game. PBT achieves some robustness to exploitability by training a population of learning agents against each other. Algorithm 1 describes PBT-MARL for a population of $N$ agents $\{ A _ { i } \} _ { i \in [ 1 , \ldots , N ] }$ , employed in this work.
|
| 43 |
+
|
| 44 |
+
# 3.2 RETRACE-SVG0
|
| 45 |
+
|
| 46 |
+
Throughout our experiments we use Stochastic Value Gradients (SVG0) (Heess et al., 2015b) as our reinforcement learning algorithm for continuous control. This is an actor-critic policy gradient algorithm, which in our setting is used to estimate gradients $\textstyle { \frac { \partial } { \partial \theta } } J ^ { i } ( \pi _ { \theta } ; \pi _ { \setminus i } )$ of the objective (1) for each game. Averaging these gradients over games will effectively optimize the PBT objective $J ( \pi _ { \theta } )$ . Policies are additionally regularized with an entropy loss $H ( \pi )$ i.e. we maximize ${ \hat { J } } ( \pi _ { \theta } ) : = { }$ $J ( \pi _ { \theta } ) + \alpha H ( \pi _ { \theta } )$ using the Adam optimizer (Kingma & Ba, 2014) to apply gradient updates where $\alpha$ represents a multiplicative entropy cost factor. A derivation of SVG0 is provided in Appendix A.
|
| 47 |
+
|
| 48 |
+
SVG utilizes a differentiable Q-critic. Our critic is learned using experience replay, minimizing a $k$ -step TD-error with off-policy retrace corrections (Munos et al., 2016), using a separate target network for bootstrapping, as is also described in Hausman et al. (2018); Riedmiller et al. (2018). The identity of other agents $\pi _ { \backslash i }$ in a game are not explicitly revealed but are potentially vital for accurate action-value estimation (value will differ when playing against weak rather than strong opponents). Thus, we use a recurrent critic to enable the $Q$ -function to implicitly condition on other players observed behavior, better estimate the correct value for the current game, and generalize over the diversity of players in the population of PBT, and, to some extent, the diversity of behaviors in replay. We find in practice that a recurrent $Q$ -function, learned from partial unrolls, performs very well. Details of our Q-critic updates, including how memory states are incorporated into replay, are given in Appendix A.2.
|
| 49 |
+
|
| 50 |
+
# 3.3 DECOMPOSED DISCOUNTS AND ACTION-VALUE ESTIMATION FOR REWARD SHAPING
|
| 51 |
+
|
| 52 |
+
Reinforcement learning agents learning in environments with sparse rewards often require additional reward signal to provide more feedback to the optimizer. Reward can be provided to encourage agents to explore novel states for instance (e.g. Brafman & Tennenholtz, 2001), or some other form of intrinsic motivation. Reward shaping is particularly challenging in continuous control (e.g. Popov et al., 2017) where obtaining sparse rewards is often highly unlikely with random exploration, but shaping can perturb objectives (e.g. Bagnell & Ng, 2005) resulting in degenerate behaviors. Reward shaping is yet more complicated in the cooperative multi-agent setting in which independent agents must optimize a joint objective. Team rewards can be difficult to co-optimize due to complex credit assignment, and can result in degenerate behavior where one agent learns a reasonable policy before its teammate, discouraging exploration which could interfere with the first agent’s behavior as observed by Hausknecht (2016). On the other hand, it is challenging to design shaping rewards which induce desired co-operative behavior.
|
| 53 |
+
|
| 54 |
+
We design $n _ { r }$ shaping reward functions $\{ r _ { j } : \mathcal { S } \times \mathcal { A } \mathbb { R } \} _ { j = 1 , \dots , n _ { r } }$ , weighted so that $r ( \cdot ) : =$ Pnrj=1 $\begin{array} { r } { \sum _ { j = 1 } ^ { n _ { r } } \alpha _ { j } r _ { j } ( \cdot ) } \end{array}$ is the agent’s internal reward and, as in Jaderberg et al. (2018), we use populationbased training to optimize the relative weighting $\{ \alpha _ { j } \} _ { j = 1 , \ldots , n _ { r } }$ . Our shaping rewards are simple individual rewards to help with exploration, but which would induce degenerate behaviors if badly scaled. Since the fitness function used in PBT will typically be the true environment reward (in our case win/loss signal in soccer), the weighting of shaping rewards can in principle be automatically optimized online using the environment reward signal. One enhancement we introduce is to optimize separate discount factors is then (recalling Equati $\{ \gamma _ { j } \} _ { j = 1 , \dots , n _ { r } }$ $\begin{array} { r } { J ( \pi _ { \theta } ; \pi _ { \setminus i } ) : = \mathbb { E } \big [ \sum _ { j = 1 } ^ { n _ { r } } \alpha _ { j } \sum _ { t = 0 } ^ { H } \gamma _ { j } ^ { t } r _ { j } \big ( s _ { t } , a _ { t } ^ { 1 } , . . . , a _ { t } ^ { n } \big ) \big | \pi ^ { i } = \pi _ { \theta } , \pi _ { \setminus i } \big ] } \end{array}$ . This separation of discount factors enables agents to learn to optimize the sparse environment reward far in the future with a high discount factor, but optimize dense shaping rewards myopically, which would also make value-learning easier. This would be impossible if discounts were confounded. The specific shaping rewards used for soccer are detailed in Section 5.1.
|
| 55 |
+
|
| 56 |
+
# 4 EXPERIMENTAL SETUP
|
| 57 |
+
|
| 58 |
+
# 4.1 MUJOCO SOCCER ENVIRONMENT
|
| 59 |
+
|
| 60 |
+
We simulate 2v2 soccer using the MuJoCo physics engine (Todorov et al., 2012). The 4 players in the game are a single sphere (the body) with 2 fixed arms, and a box head, and have a 3-dimensional action space: accelerate the body forwards/backwards, torque can be applied around the vertical axis to rotate, and apply downwards force to “jump”. Applying torque makes the player spin, gently for steering, or with more force in order to “kick” the football with its arms. At each timestep, proprioception (position, velocity, accelerometer information), task (egocentric ball position, velocity and angular velocity, goal and corner positions) and teammate and opponent (orientation, position and velocity) features are observed making a 93-dimensional input observation vector. Each soccer match lasts upto 45 seconds, and is terminated when the first team scores. We disable contacts between the players, but enable contacts between the players, the pitch and the ball. This makes it impossible for players to foul and avoids the need for a complicated contact rules, and led to more dynamic matches. There is a small border around the pitch which players can enter, but when the ball is kicked out-of-bounds it is reset by automatic “throw in” a small random distance towards the center of the pitch, and no penalty is incurred. The players choose a new action every 0.05 seconds. At the start of an episode the players and ball are positioned uniformly at random on the pitch. We train agents on a field whose dimensions are randomized in the range $2 0 m \times 1 5 m$ to $2 8 m \times 2 1 m$ , with fixed aspect ratio, and are tested on a field of fixed size $2 4 m \times 1 8 m$ . We show an example frame of the game in Figure 1.
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 1: Top-down view with individual camera views of 2v2 multi-agent soccer environment.
|
| 64 |
+
|
| 65 |
+
# 4.2 PBT SETTINGS
|
| 66 |
+
|
| 67 |
+
We use population-based training with 32 agents in the population, an agent is chosen for evolution if its expected win rate against another chosen agent drops below 0.47. The $\mathbf { k }$ -factor learning rate for Elo is 0.1 (this is low, due to the high stochasticity in the game results). Following evolution there is a grace period where the agent does not learn while its replay buffer refills with fresh data, and a further “burn-in” period before the agent can evolve again or before its weights can be copied into another agent, in order to limit the frequency of evolution and maintain diversity in the population. For each 2v2 training match 4 agents were selected uniformly at random from the population of 32 agents, so that agents are paired with diverse teammates and opponents.
|
| 68 |
+
|
| 69 |
+
# 4.3 EVALUATION
|
| 70 |
+
|
| 71 |
+
Unlike multi-agent domains where we possess hand-crafted bots or human baselines, evaluating agent performance in novel domains where we do not possess such knowledge remains an open question. A number of solutions have been proposed: for competitive board games, there exits evaluation metrics such as Elo (Elo, 1978) where ratings of two players should translate to their relative win-rates; in professional team sports, head-to-head tournaments are typically used to measure team performance; in Al-Shedivat et al. (2017), survival-of-the-fittest is directly translated to multiagent learning as a proxy to relative agent performance. Unfortunately, as shown in Balduzzi et al. (2018), in a simple game of rock-paper-scissors, a rock-playing agent will attain high Elo score if we simply introduce more scissor-play agents into a tournament. Survival-of-the-fittest analysis as shown in Al-Shedivat et al. (2017) would lead to a cycle, and agent ranking would depend on when measurements are taken (Tuyls et al., 2018).
|
| 72 |
+
|
| 73 |
+
Nash-Averaging Evaluators: One desirable property for multi-agent evaluation is invariance to redundant agents: i.e. the presence of multiple agents with similar strategies should not bias the ranking. In this work, we apply Nash-averaging which possesses this property. Nash-Averaging consists of a meta-game played using a pair-wise win-rate matrix between $_ \mathrm { N }$ agents. A row player and a column player simultaneously pick distributions over agents for a mixed strategy, aiming for a non-exploitable strategy (see Balduzzi et al., 2018).
|
| 74 |
+
|
| 75 |
+
In order to meaningfully evaluate our learned agents, we need to bootstrap our evaluation process. Concretely, we choose a set of fixed evaluation teams by Nash-averaging from a population of 10 teams previously produced by diverse training schemes, with 25B frames of learning experience each. We collected 1M tournament matches between the set of 10 agents. Figure 2 shows the pairwise expected goal difference among the 3 agents in the support set. Nash Averaging assigned nonzero weights to 3 teams that exhibit diverse policies with non-transitive performance which would not have been apparent under alternative evaluation schemes: agent A wins or draws against agent B on $5 9 . 7 \%$ of the games; agent B wins or draws against agent C on $7 1 . 1 \%$ of the games and agent C wins or draws against agent A on $6 5 . 3 \%$ of the matches. We show recordings of example tournament matches between agent A, B and C to demonstrate qualitatively the diversity in their policies (video 3 on the website 2). Elo rating alone would yield a different picture: agent $B$ is the best agent in the tournament with an Elo rating of 1084.27, followed by $C$ at 1068.85; Agent $A$ ranks 5th at 1016.48 and we would have incorrectly concluded that agent $\pmb { B }$ ought to beat agent A with a win-rate of $62 \%$ . All variants of agents presented in the experimental section are evaluated against the set of 3 agents in terms of their pair-wise expected difference in score, weighted by support weights.
|
| 76 |
+
|
| 77 |
+

|
| 78 |
+
Figure $2 \colon L I$ : selected set of agents in Nash support set with their respective support weights. $L 2$ : pair-wise expected goal difference among evaluator agents. $L 3$ : Elo ratings for all agents computed from tournament matches. $L 4$ : pair-wise expected goal difference among all agents.
|
| 79 |
+
|
| 80 |
+
# 5 RESULTS
|
| 81 |
+
|
| 82 |
+
We describe in this section a set of experimental results. We first present the incremental effect of various algorithmic components. We further show that population-based training with co-play and reward shaping induces a progression from random to simple ball chasing and finally coordinated behaviors. A tournament between all trained agents is provided in Appendix D.
|
| 83 |
+
|
| 84 |
+
# 5.1 ABLATION STUDY
|
| 85 |
+
|
| 86 |
+
We incrementally introduce algorithmic components and show the effect of each by evaluating them against the set of 3 evaluation agents. We compare agent performance using expected goal difference weighted according to the Nash averaging procedure. We annotate a number of algorithmic components as follows: ff: feedforward policy and action-value estimator; evo: population-based training with agents evolving within the population; rwd shp: providing dense shaping rewards on top of sparse environment scoring/conceding rewards; lstm: recurrent policy with recurrent action-value estimator; lstm q: feedforward policy with recurrent action-value estimator; channels: decomposed action-value estimation for each reward component; each with its own, individually evolving discount factor.
|
| 87 |
+
|
| 88 |
+
Population-based Training with Evolution: We first introduce PBT with evolution. Figure 3 (ff vs $\mathbf { f } \mathbf { f } + \mathbf { e v } \mathbf { o } { \mathrm { ~ , ~ } }$ ) shows that Evolution kicks in at 2B steps, which quickly improves agent performance at the population level. We show in Figure 4 that Population-based training coupled with evolution yields a natural progression of learning rates, entropy costs as well as the discount factor. Critic learning rate gradually decreases as training progresses, while discount factor increases over time, focusing increasingly on long-term return. Entropy costs slowly decreases which reflects a shift from exploration to exploitation over the course training.
|
| 89 |
+
|
| 90 |
+
Reward Shaping: We introduced two simple dense shaping rewards in addition to the sparse scoring and conceding environment rewards: vel-to-ball: player’s linear velocity projected onto its unit direction vector towards the ball, thresholded at zero; vel-ball-to-goal: ball’s linear velocity projected onto its unit direction vector towards the center of opponent’s goal. Furthermore the sparse goal reward and concede penalty are separately evolved, and so can receive separate weight that trades off between the importance of scoring versus conceding.
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 3: Weighted expected goal difference shown in blue line. Agents’ expected goal difference against each evaluator agent in point plot. A dummy evaluator that takes random actions has been introduced to show learning progress early in the training, with zero weight in the performance computation.
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 4: Evolution of hyper-parameters. Hyperparameters of individual agents within the population in gray.
|
| 97 |
+
|
| 98 |
+
Dense shaping rewards make learning significantly easier early in training. This is reflected by agents’ performance against the dummy evaluator where agents with dense shaping rewards quickly start to win games from the start (Figure 3, $\mathbf { f } \mathbf { f } + \mathbf { e } \mathbf { v } \mathbf { 0 }$ vs $\mathbf { f f } + \mathbf { e v 0 } +$ rwd shp). On the other hand, shaping rewards tend to induce sub-optimal policies $\mathrm { N g }$ et al., 1999; Popov et al., 2017); We show in Figure 5 however that this is mitigated by coupling training with hyper-parameter evolution which adaptively adjusts the importance of shaping rewards. Early on in the training, the population as a whole decreases the penalty of conceding a goal which evolves towards zero, assigning this reward relatively lower weight than scoring. This trend is subsequently reversed towards the end of training, where the agents evolved to pay more attention to conceding goals: i.e. agents first learn to optimize scoring and then incorporate defending. The dense shaping reward vel-to-ball however quickly decreases in relative importance which is mirrored in their changing behavior, see Section 5.2.
|
| 99 |
+
|
| 100 |
+
Recurrence: The introduction of recurrence in the action-value function has a significant impact on agents’ performance as shown in Figure 3 $\mathbf { f f } + \mathbf { e v 0 } +$ rwd shp vs $\mathbf { l s t m + e v 0 + }$ rwd shp reaching weighted expected goal difference of 0 at 22B vs 35B steps). A recurrent policy seems to underperform its feedforward counterpart in the presence of a recurrent action-value function. This could be due to out-of-sample evaluators which suggests that recurrent policy might overfit to the behaviors of agents from its own population while feedforward policy cannot.
|
| 101 |
+
|
| 102 |
+
Decomposed Action-Value Function: While we observed empirically that the discount factor increases over time during the evolution process, we hypothesize that different reward components require different discount factor. We show in Figure 6 that this is indeed the case, for sparse environment rewards and vel-ball-to-goal, the agents focus on increasingly long planning horizon. In contrast, agents quickly evolve to pay attention to short-term returns on vel-to-ball, once they learned the basic movements. Note that although this agent underperforms l $\mathbf { s t m + e v 0 + }$ rwd shp asymptotically, it achieved faster learning in comparison (reaching 0.2 at 15B vs 35B). This agent also attains the highest Elo in a tournament between all of our trained agents, see Appendix D. This indicates that the training population is less diverse than the Nash-averaging evaluation set, motivating future work on introducing diversity as part of training regime.
|
| 103 |
+
|
| 104 |
+

|
| 105 |
+
Figure 5: Evolution of relative importance of dense shaping rewards over the course of training. Hyperparameters of individual agents within the population in gray.
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
Figure 6: Evolution of discount factor for each reward component. We show hyperparameters of individual agents within the population in gray.
|
| 109 |
+
|
| 110 |
+
# 5.2 EMERGENT MULTI-AGENT BEHAVIORS
|
| 111 |
+
|
| 112 |
+
Assessing cooperative behavior in soccer is difficult. We present several indicators ranging from behavior statistics, policy analysis to behavior probing and qualitative game play in order to demonstrate the level of cooperation between agents.
|
| 113 |
+
|
| 114 |
+
We provide birds-eye view videos on the website2 (video 1), where each agent’s value-function is also plotted, along with a bar plot showing the value-functions for each weighted shaping reward component. Early in the matches the 2 dense shaping rewards (rightmost channels) dominate the value, until it becomes apparent that one team has an advantage at which point all agent’s value functions become dominated by the sparse conceding/scoring reward (first and second channels) indicating that PBT has learned a balance between sparse environment and dense shaping rewards so that positions with a clear advantage to score will be preferred. There are recurring motifs in the videos: for example, evidence that agents have learned a “cross” pass from the sideline to a teammate in the centre (see Appendix F for example traces), and frequently appear to anticipate this and change direction to receive. Another camera angle is provided on the website2 (video 2) showing representative, consecutive games played between two fixed teams. These particular agents generally kick the ball upfield, avoiding opponents and towards teammates.
|
| 115 |
+
|
| 116 |
+
# 5.2.1 BEHAVIOR STATISTICS
|
| 117 |
+
|
| 118 |
+
Statistics collected during matches are shown in Figure 7. The vel-to-ball plot shows the agents average velocity towards the ball as training progresses: early in the learning process agents quickly maximize their velocity towards the ball (optimizing their shaping reward) but gradually fixate less on simple ball chasing as they learn more useful behaviors, such as kicking the ball upfield. The teammate-spread-out shows the evolution of the spread of teammates position on the pitch. This shows the percentage of timesteps where the teammates are spread at least $5 \mathrm { m }$ apart: both agents quickly learn to hog the ball, driving this lower, but over time learn more useful behaviors which result in diverse player distributions. pass/interception shows that pass, where players from the same team consecutively kicked the ball and interception, where players from the opposing teams kicked the ball in sequence, both remain flat throughout training. To pass is the more difficult behavior as it requires two teammates to coordinate whereas interception only requires one of the two opponents to position correctly. pass/interception-10m logs pass/interception events over more than $1 0 \mathrm { m }$ , and here we see a dramatic increase in pass-10m while interception-10m remains flat, i.e. long range passes become increasingly common over the course of training, reaching equal frequency as long-range interception.
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
Figure 7: Behavior statistics evolution.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 8: $L l$ : agent’s average velocity towards the ball. $L 2$ : percentage of time when players within a team are spread out. $L 3$ : KL divergence incurred by replacing a subset of state with counterfactual information.
|
| 125 |
+
|
| 126 |
+
# 5.2.2 COUNTERFACTUAL POLICY DIVERGENCE
|
| 127 |
+
|
| 128 |
+
In addition to analyzing behavior statistics, we could ask the following: “had a subset of the observation been different, how much would I have changed my policy?”. This reveals the extent to which an agent’s policy is dependent on this subset of the observation space. To quantify this, we analyze counterfactual policy divergence: at each step, we replace a subset of the observation with 10 valid alternatives, drawn from a fixed distribution, and we measure the KL divergence incurred in agents’ policy distributions. This cannot be measured for a recurrent policy due to recurrent states and we investigate $\mathbf { f f } + \mathbf { e v 0 } +$ rwd shp instead (Figure 3), where the policy network is feedforward. We study the effect of five types of counterfactual information over the course of training.
|
| 129 |
+
|
| 130 |
+
ball-position has a strong impact on agent’s policy distribution, more so than player and opponent positions. Interestingly, ball-position initially reaches its peak quickly while divergence incurred by counterfactual player/opponent positions plateau until reaching 5B training steps. This phase coincides with agent’s greedy optimization of shaping rewards, as reflected in Figure 8. Counterfactual teammate/opponent position increasingly affect agents’ policies from 5B steps, as they spread out more and run less directly towards the ball. Opponent-0/1-position incur less divergence than teammate position individually, suggesting that teammate position has relatively large impact than any single opponent, and increasingly so during 5B-20B steps. This suggests that comparatively players learn to leverage a coordinating teammate first, before paying attention to competing opponents. The gap between teammate-position and opponents-position eventually widens, as opponents become increasingly relevant to the game dynamics. The progression observed in counterfactual policy divergence provides evidence for emergent cooperative behaviors among the players.
|
| 131 |
+
|
| 132 |
+
# 5.2.3 MULTI-AGENT BEHAVIOR PROBING
|
| 133 |
+
|
| 134 |
+
Qualitatively, we could ask the following question: would agents coordinate in scenarios where it’s clearly advantageous to do so? To this end, we designed a probe task, to test our trained agents for coordination, where blue0 possesses the ball, while the two opponents are centered on the pitch in front. A teammate blue1 is introduced to either left or right side. In Figure 9 we show typical traces of agents’ behaviors (additional probe task video shown at Video 4 on our website2): at 5B steps, when agents play more individualistically, we observe that blue0 always tries to dribble the ball by itself, regardless of the position of blue1. Later on in the training, blue0 actively seeks to pass and its behavior is driven by the configuration of its teammate, showing a high-level of coordination. In “8e10 left” in particular, we observe two consecutive pass (blue0 to blue1 and back), in the spirit of 2-on-1 passes that emerge frequently in human soccer games.
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 9: L1: Comparison between two snapshots (5B vs 80B) of the same agent. $L 2$ : number of successful passes and interception occurred in the first 100 timesteps, aggregated over 100 episodes.
|
| 138 |
+
|
| 139 |
+
<table><tr><td></td><td>pass</td><td>intercept</td></tr><tr><td>5B_left</td><td>0</td><td>100</td></tr><tr><td>5B_right</td><td>31</td><td>90</td></tr><tr><td>80B_left</td><td>76</td><td>24</td></tr><tr><td>80B_right</td><td>56</td><td>27</td></tr></table>
|
| 140 |
+
|
| 141 |
+
# 6 RELATED WORK
|
| 142 |
+
|
| 143 |
+
The population-based training we use here was introduced by Jaderberg et al. (2018) for the capturethe-flag domain, whereas our implementation is for continuous control in simulated physics which is less visually rich but arguably more open-ended, with potential for sophisticated behaviors generally and allows us to focus on complex multi-agent interactions, which may often be physically observable and interpretable (as is the case with passing in soccer). Other recent related approaches to multi-agent training include PSRO (Lanctot et al., 2017) and NFSP (Heinrich & Silver, 2016), which are motivated by game-theoretic methods (fictitious play and double oracle) for solving matrix games, aiming for some robustness by playing previous best response policies, rather than the (more data efficient and parallelizable) approach of playing against simultaneous learning agents in a population. The RoboCup competition is a grand challenge in AI and some top-performing teams have used elements of reinforcement learning (Riedmiller et al., 2009; MacAlpine & Stone, 2018), but are not end-to-end RL. Our environment is intended as a research platform, and easily extendable along several lines of complexity: complex bodies; more agents; multi-task, transfer and continual learning. Coordination and cooperation has been studied recently in deepRL in, for example, Lowe et al. (2017); Foerster et al. (2018; 2016); Sukhbaatar et al. (2016); Mordatch & Abbeel (2018), but all of these require some degree of centralization. Agents in our framework perform fully independent asynchronous learning yet demonstrate evidence of complex coordinated behaviors. Bansal et al. (2017); Al-Shedivat et al. (2017) introduce a MuJoCo Sumo domain with similar motivation to ours, and observe emergent complexity from competition, in a 1v1 domain. We are explicitly interested in cooperation within teams as well as competition. Other attempts at optimizing rewards for multi-agent teams include Liu et al. (2012).
|
| 144 |
+
|
| 145 |
+
# 7 CONCLUSIONS AND FUTURE WORK
|
| 146 |
+
|
| 147 |
+
We have introduced a new 2v2 soccer domain with simulated physics for continuous multi-agent reinforcement learning research, and used competition between agents in this simple domain to train teams of independent RL agents, demonstrating coordinated behavior, including repeated passing motifs. We demonstrated that a framework of distributed population-based-training with continuous control, combined with automatic optimization of shaping reward channels, can learn in this environment end-to-end. We introduced the idea of automatically optimizing separate discount factors for the shaping rewards, to facilitate the transition from myopically optimizing shaping rewards towards alignment with the sparse long-horizon team rewards and corresponding cooperative behavior. We have introduced novel method of counterfactual policy divergence to analyze agent behavior. Our evaluation has highlighted non-transitivities in pairwise match results and the practical need for robustness, which is a topic for future work. Our environment can serve as a platform for multiagent research with continuous physical worlds, and can be easily scaled to more agents and more complex bodies, which we leave for future research.
|
| 148 |
+
|
| 149 |
+
# REFERENCES
|
| 150 |
+
|
| 151 |
+
Maruan Al-Shedivat, Trapit Bansal, Yuri Burda, Ilya Sutskever, Igor Mordatch, and Pieter Abbeel. Continuous adaptation via meta-learning in nonstationary and competitive environments. arXiv preprint arXiv:1710.03641, 2017.
|
| 152 |
+
|
| 153 |
+
J. Andrew Bagnell and Andrew Y. Ng. On local rewards and scaling distributed reinforcement learning. In Advances in Neural Information Processing Systems 18 [Neural Information Processing Systems, NIPS 2005, December 5-8, 2005, Vancouver, British Columbia, Canada], pp. 91–98, 2005.
|
| 154 |
+
|
| 155 |
+
David Balduzzi, Karl Tuyls, Julien Perolat, and Thore Graepel. Re-evaluating evaluation. arXiv preprint arXiv:1806.02643, 2018.
|
| 156 |
+
|
| 157 |
+
Trapit Bansal, Jakub Pachocki, Szymon Sidor, Ilya Sutskever, and Igor Mordatch. Emergent complexity via multi-agent competition. arXiv preprint arXiv:1710.03748, 2017.
|
| 158 |
+
|
| 159 |
+
Ronen I. Brafman and Moshe Tennenholtz. R-MAX - A general polynomial time algorithm for nearoptimal reinforcement learning. In Proceedings of the Seventeenth International Joint Conference on Artificial Intelligence, IJCAI 2001, Seattle, Washington, USA, August 4-10, 2001, pp. 953–958, 2001.
|
| 160 |
+
|
| 161 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. CoRR, abs/1606.01540, 2016.
|
| 162 |
+
|
| 163 |
+
Murray Campbell, A. Joseph Hoane Jr., and Feng-hsiung Hsu. Deep blue. Artif. Intell., 134(1-2): 57–83, 2002.
|
| 164 |
+
|
| 165 |
+
Djork-Arne Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network ´ learning by exponential linear units (elus). CoRR, abs/1511.07289, 2015.
|
| 166 |
+
|
| 167 |
+
Arpad E. Elo. The rating of chessplayers, past and present. Arco Pub., New York, 1978. ISBN 0668047216 9780668047210. URL http://www.amazon.com/ Rating-Chess-Players-Past-Present/dp/0668047216.
|
| 168 |
+
|
| 169 |
+
Jakob N. Foerster, Yannis M. Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pp. 2137–2145, 2016.
|
| 170 |
+
|
| 171 |
+
Jakob N. Foerster, Nantas Nardelli, Gregory Farquhar, Triantafyllos Afouras, Philip H. S. Torr, Pushmeet Kohli, and Shimon Whiteson. Stabilising experience replay for deep multi-agent reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, pp. 1146–1155, 2017.
|
| 172 |
+
|
| 173 |
+
Jakob N. Foerster, Gregory Farquhar, Triantafyllos Afouras, Nantas Nardelli, and Shimon Whiteson. Counterfactual multi-agent policy gradients. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, Louisiana, USA, February 2-7, 2018, 2018.
|
| 174 |
+
|
| 175 |
+
Matthew John Hausknecht. Cooperation and communication in multiagent deep reinforcement learning. PhD thesis, University of Texas at Austin, Austin, USA, 2016.
|
| 176 |
+
|
| 177 |
+
Karol Hausman, Jost Tobias Springenberg, Ziyu Wang, Nicolas Heess, and Martin Riedmiller. Learning an embedding space for transferable robot skills. In International Conference on Learning Representations, 2018.
|
| 178 |
+
|
| 179 |
+
Nicolas Heess, Jonathan J. Hunt, Timothy P. Lillicrap, and David Silver. Memory-based control with recurrent neural networks. CoRR, abs/1512.04455, 2015a.
|
| 180 |
+
|
| 181 |
+
Nicolas Heess, Gregory Wayne, David Silver, Tim Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, pp. 2944–2952, 2015b.
|
| 182 |
+
|
| 183 |
+
Nicolas Heess, Gregory Wayne, Yuval Tassa, Timothy P. Lillicrap, Martin A. Riedmiller, and David Silver. Learning and transfer of modulated locomotor controllers. CoRR, abs/1610.05182, 2016. URL http://arxiv.org/abs/1610.05182.
|
| 184 |
+
|
| 185 |
+
Nicolas Heess, Dhruva TB, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, S. M. Ali Eslami, Martin A. Riedmiller, and David Silver. Emergence of locomotion behaviours in rich environments. CoRR, abs/1707.02286, 2017. URL http: //arxiv.org/abs/1707.02286.
|
| 186 |
+
|
| 187 |
+
Johannes Heinrich and David Silver. Deep reinforcement learning from self-play in imperfectinformation games. CoRR, abs/1603.01121, 2016.
|
| 188 |
+
|
| 189 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 190 |
+
|
| 191 |
+
Max Jaderberg, Valentin Dalibard, Simon Osindero, Wojciech M Czarnecki, Jeff Donahue, Ali Razavi, Oriol Vinyals, Tim Green, Iain Dunning, Karen Simonyan, et al. Population based training of neural networks. arXiv preprint arXiv:1711.09846, 2017.
|
| 192 |
+
|
| 193 |
+
Max Jaderberg, Wojciech Czarnecki, Iain Dunning, Luke Marris, Guy Lever, Antonio Garc´ıa Castaneda, Charles Beattie, Neil C. Rabinowitz, Ari S. Morcos, Avraham Ruderman, Nico- ˜ las Sonnerat, Tim Green, Louise Deason, Joel Z. Leibo, David Silver, Demis Hassabis, Koray Kavukcuoglu, and Thore Graepel. Human-level performance in first-person multiplayer games with population-based deep reinforcement learning. CoRR, abs/1807.01281, 2018.
|
| 194 |
+
|
| 195 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980.
|
| 196 |
+
|
| 197 |
+
Hiroaki Kitano, Minoru Asada, Yasuo Kuniyoshi, Itsuki Noda, and Eiichi Osawa. Robocup: The robot world cup initiative. In Agents, pp. 340–347, 1997.
|
| 198 |
+
|
| 199 |
+
Marc Lanctot, Vin´ıcius Flores Zambaldi, Audrunas Gruslys, Angeliki Lazaridou, Karl Tuyls, Julien Perolat, David Silver, and Thore Graepel. A unified game-theoretic approach to multiagent re- ´ inforcement learning. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pp. 4193–4206, 2017.
|
| 200 |
+
|
| 201 |
+
Michael L. Littman. Markov games as a framework for multi-agent reinforcement learning. In In Proceedings of the Eleventh International Conference on Machine Learning, pp. 157–163. Morgan Kaufmann, 1994.
|
| 202 |
+
|
| 203 |
+
Bingyao Liu, Satinder P. Singh, Richard L. Lewis, and Shiyin Qin. Optimal rewards in multiagent teams. In 2012 IEEE International Conference on Development and Learning and Epigenetic Robotics, ICDL-EPIROB 2012, San Diego, CA, USA, November 7-9, 2012, pp. 1–8, 2012.
|
| 204 |
+
|
| 205 |
+
Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, OpenAI Pieter Abbeel, and Igor Mordatch. Multi-agent actor-critic for mixed cooperative-competitive environments. In Advances in Neural Information Processing Systems, pp. 6379–6390, 2017.
|
| 206 |
+
|
| 207 |
+
Patrick MacAlpine and Peter Stone. Overlapping layered learning. Artif. Intell., 254:21–43, 2018. doi: 10.1016/j.artint.2017.09.001. URL https://doi.org/10.1016/j.artint.2017. 09.001.
|
| 208 |
+
|
| 209 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin A. Riedmiller, Andreas Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
|
| 210 |
+
|
| 211 |
+
Matej Moravk, Martin Schmid, Neil Burch, Viliam Lis, Dustin Morrill, Nolan Bard, Trevor Davis, Kevin Waugh, Michael Johanson, and Michael Bowling. Deepstack: Expert-level artificial intelligence in no-limit poker. 356, 01 2017.
|
| 212 |
+
|
| 213 |
+
Igor Mordatch and Pieter Abbeel. Emergence of grounded compositional language in multi-agent populations. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, Louisiana, USA, February 2-7, 2018, 2018.
|
| 214 |
+
|
| 215 |
+
Remi Munos, Tom Stepleton, Anna Harutyunyan, and Marc Bellemare. Safe and efficient off-policy ´ reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1054–1062, 2016.
|
| 216 |
+
|
| 217 |
+
Andrew Y. Ng, Daishi Harada, and Stuart J. Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In Proceedings of the Sixteenth International Conference on Machine Learning (ICML 1999), Bled, Slovenia, June 27 - 30, 1999, pp. 278–287, 1999.
|
| 218 |
+
|
| 219 |
+
Ivaylo Popov, Nicolas Heess, Timothy P. Lillicrap, Roland Hafner, Gabriel Barth-Maron, Matej Vecerik, Thomas Lampe, Yuval Tassa, Tom Erez, and Martin A. Riedmiller. Data-efficient deep reinforcement learning for dexterous manipulation. CoRR, abs/1704.03073, 2017.
|
| 220 |
+
|
| 221 |
+
Martin Riedmiller, Roland Hafner, Thomas Lampe, Michael Neunert, Jonas Degrave, Tom Van de Wiele, Volodymyr Mnih, Nicolas Heess, and Jost Tobias Springenberg. Learning by playingsolving sparse reward tasks from scratch. arXiv preprint arXiv:1802.10567, 2018.
|
| 222 |
+
|
| 223 |
+
Martin A. Riedmiller, Thomas Gabel, Roland Hafner, and Sascha Lange. Reinforcement learning for robot soccer. Auton. Robots, 27(1):55–73, 2009.
|
| 224 |
+
|
| 225 |
+
A. L. Samuel. Some studies in machine learning using the game of checkers. IBM J. Res. Dev., 3 (3):210–229, July 1959. ISSN 0018-8646.
|
| 226 |
+
|
| 227 |
+
L. S. Shapley. Stochastic games. Proceedings of the National Academy of Sciences of the United States of America, 39(10):1095–1100, 1953.
|
| 228 |
+
|
| 229 |
+
David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin A. Riedmiller. Deterministic policy gradient algorithms. In Proceedings of the 31th International Conference on Machine Learning, ICML 2014, Beijing, China, 21-26 June 2014, pp. 387–395, 2014.
|
| 230 |
+
|
| 231 |
+
David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Vedavyas Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy P. Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
|
| 232 |
+
|
| 233 |
+
Sainbayar Sukhbaatar, Arthur Szlam, and Rob Fergus. Learning multiagent communication with backpropagation. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pp. 2244–2252, 2016.
|
| 234 |
+
|
| 235 |
+
R. Sutton and A. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998.
|
| 236 |
+
|
| 237 |
+
Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, Timothy P. Lillicrap, and Martin A. Riedmiller. Deepmind control suite. CoRR, abs/1801.00690, 2018.
|
| 238 |
+
|
| 239 |
+
G. Tesauro. Temporal difference learning and td-gammon. Commun. ACM, 38(3):58–68, March 1995.
|
| 240 |
+
|
| 241 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, IROS 2012, Vilamoura, Algarve, Portugal, October 7-12, 2012, pp. 5026–5033, 2012.
|
| 242 |
+
|
| 243 |
+
Karl Tuyls, Julien Perolat, Marc Lanctot, Joel Z Leibo, and Thore Graepel. A generalised method for empirical game theoretic analysis. arXiv preprint arXiv:1803.06376, 2018.
|
| 244 |
+
|
| 245 |
+
Oriol Vinyals, Timo Ewalds, Sergey Bartunov, Petko Georgiev, Alexander Sasha Vezhnevets, Michelle Yeo, Alireza Makhzani, Heinrich Kuttler, John Agapiou, Julian Schrittwieser, John ¨ Quan, Stephen Gaffney, Stig Petersen, Karen Simonyan, Tom Schaul, Hado van Hasselt, David Silver, Timothy P. Lillicrap, Kevin Calderone, Paul Keet, Anthony Brunasso, David Lawrence, Anders Ekermo, Jacob Repp, and Rodney Tsing. Starcraft II: A new challenge for reinforcement learning. CoRR, abs/1708.04782, 2017.
|
| 246 |
+
|
| 247 |
+
# A OFF-POLICY SVG0 ALGORITHM
|
| 248 |
+
|
| 249 |
+
# A.1 POLICY UPDATES
|
| 250 |
+
|
| 251 |
+
The Stochastic Value Gradients (SVG0) algorithm used throughout this work is a special case of the family of policy gradient algorithms provided by Heess et al. (2015b) in which the gradient of a value function used to compute the policy gradient, and is closely related to the Deterministic Policy Gradient algorithm (DPG) (Silver et al., 2014), which is itself a special case of SVG0. For clarity we provide the specific derivation of SVG0 here.
|
| 252 |
+
|
| 253 |
+
Using the reparametrization method of Heess et al. (2015b) we write a stochastic policy $\pi _ { \boldsymbol { \theta } } ( \cdot | \boldsymbol { s } )$ as a deterministic policy $\mu _ { \theta } : { \mathcal { S } } \times \mathbb { R } \to { \mathcal { A } }$ further conditioned on a random variable $\eta \in \mathbb { R } ^ { p }$ , so that $a \sim \pi _ { \theta } ( \cdot | s )$ is equivalent to $a \sim \mu _ { \theta } ( s , \eta )$ , where $\eta \sim \rho$ for some distribution $\rho$ . Then,
|
| 254 |
+
|
| 255 |
+
$$
|
| 256 |
+
\begin{array} { r l } & { \begin{array} { r l } & { Q ^ { \pi _ { \theta } } ( s , a ) = r ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } \sim P ( \cdot \vert s , a ) } [ \mathbb { E } _ { a ^ { \prime } \sim \pi ( \cdot \vert s ^ { \prime } ) } [ Q ^ { \pi _ { \theta } } ( s ^ { \prime } , a ^ { \prime } ) ] ] } \\ & { \quad \quad \quad \quad \quad \quad = r ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } \sim P ( \cdot \vert s , a ) } [ \mathbb { E } _ { \eta ^ { \prime } \sim \rho } [ Q ^ { \pi _ { \theta } } ( s ^ { \prime } , \mu _ { \theta } ( s ^ { \prime } , \eta ^ { \prime } ) ) ] ] } \end{array} } \\ & { \begin{array} { r l } & { \underline { { \mathcal { Q } } } ^ { \pi _ { \theta } } ( s , a ) = \gamma \mathbb { E } _ { s ^ { \prime } \sim P ( \cdot \vert s , a ) } [ \mathbb { E } _ { \eta ^ { \prime } \sim \rho } [ \underline { { \partial } } \theta Q ^ { \pi _ { \theta } } ( s ^ { \prime } , \mu _ { \theta } ( s ^ { \prime } , \eta ^ { \prime } ) ) ] ] } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \end{array} } \\ & { = \gamma \mathbb { E } _ { s ^ { \prime } \sim P ( \cdot \vert s , a ) } [ \mathbb { E } _ { \eta ^ { \prime } \sim \rho } [ \underline { { \partial } } Q ^ { \pi _ { \theta } } ( s ^ { \prime } , a ^ { \prime } ) ] _ { a ^ { \prime } = \mu _ { \theta } ( s ^ { \prime } , \eta ^ { \prime } ) } + \frac { \partial } { \partial a ^ { \prime } } Q ^ { \pi _ { \theta } } ( s ^ { \prime } , a ^ { \prime } ) ] _ { a ^ { \prime } = \mu _ { \theta } ( s ^ { \prime } , \eta ^ { \prime } ) } \frac { \partial } { \partial \theta } \mu _ { \theta } ( s ^ { \prime } , \eta ^ { \prime } ) ] } \end{array}
|
| 257 |
+
$$
|
| 258 |
+
|
| 259 |
+
from which we obtain a recursion for $\frac { \partial Q ^ { \pi _ { \theta } } ( s , a ) } { \partial \theta }$ . Expanding the recursion we obtain the policy gradient
|
| 260 |
+
|
| 261 |
+
$$
|
| 262 |
+
\begin{array} { c } { { \displaystyle \frac { \partial Q ^ { \pi _ { \theta } } ( s _ { 0 } , a _ { 0 } ) } { \partial \theta } = \sum _ { t = 1 } ^ { \infty } \gamma ^ { t } \mathbb { E } _ { s _ { t } \sim P ( \cdot | s _ { t - 1 } , a _ { t - 1 } ) } \Biggl [ \mathbb { E } _ { \eta _ { t } \sim \rho } \biggl [ \displaystyle \frac { \partial } { \partial a _ { t } } Q ^ { \pi _ { \theta } } ( s _ { t } , a _ { t } ) \biggr | _ { a _ { t } = \mu _ { \theta } ( s _ { t } , \eta _ { t } ) } \times } } \\ { { \displaystyle \left. \frac { \partial } { \partial \theta } \mu _ { \theta } ( s _ { t } , \eta _ { t } ) \right] \biggl | s _ { 0 } , a _ { 0 } , a _ { \tau } = \mu _ { \theta } ( s _ { \tau } , \eta _ { \tau } ) , \eta _ { \tau } \sim \rho \forall \tau < t \biggr ] } } \\ { { \displaystyle = \int _ { \mathcal { S } } \int _ { \mathbb { R } ^ { p } } \zeta ( s , \eta ) \displaystyle \frac { \partial } { \partial a } Q ^ { \pi _ { \theta } } ( s , a ) \Biggl | _ { a = \mu _ { \theta } ( s , \eta ) } \displaystyle \frac { \partial } { \partial \theta } \mu _ { \theta } ( s , \eta ) d \eta d s } } \end{array}
|
| 263 |
+
$$
|
| 264 |
+
|
| 265 |
+
where $\begin{array} { r } { \zeta ( s , \eta ) : = \sum _ { t = 1 } ^ { \infty } \gamma ^ { t } p _ { t } ( s , \eta ) } \end{array}$ and where $p _ { t } ( s , \eta )$ is the joint density over (state, $\eta$ ) at timestep $t$ following the policy. Typically $\gamma$ is replaced with 1 in the definition of $\zeta$ to avoid discounting terms depending on future states in the gradient too severely. This suggests Algorithm 3 given in Heess et al. (2015b). For details on recurrent policies see Heess et al. (2015a).
|
| 266 |
+
|
| 267 |
+
# Algorithm 2 Off-policy SVG0 algorithm (Heess et al., 2015b).
|
| 268 |
+
|
| 269 |
+
1: initialize replay buffer $B = \varnothing$
|
| 270 |
+
2: sample initial state $s _ { 0 }$ from environment
|
| 271 |
+
3: for t $\scriptstyle \mathbf { d o } = 0$ to $\infty$ do
|
| 272 |
+
4: sample action from current policy $a _ { t } = \mu _ { \theta } ( \cdot | s _ { t } , \eta )$ , $\eta \sim \rho$
|
| 273 |
+
5: observe reward and state observation $r _ { t } , s _ { t }$
|
| 274 |
+
6: 7: $\begin{array} { r } { \theta \gets \theta + \alpha \frac { \partial } { \partial a } Q ^ { \pi _ { \theta } } ( s _ { t } , a ; \psi ) \big | _ { a = \mu _ { \theta } ( s _ { t } , \eta _ { t } ) } \frac { \partial } { \partial \theta } \mu _ { \theta } ( s _ { t } , \eta _ { t } ) } \end{array}$ $Q ^ { \pi _ { \theta } } ( \cdot , \cdot ; \psi )$ $\boldsymbol { B }$ )
|
| 275 |
+
8: end for
|
| 276 |
+
|
| 277 |
+
# A.2 Q-VALUE UPDATES
|
| 278 |
+
|
| 279 |
+
As in Section 3.1, in any given game, by treating all other players as part of the environment dynamics, we can define action-value function for policy $\pi _ { \theta }$ controlling player $i$ :
|
| 280 |
+
|
| 281 |
+
$$
|
| 282 |
+
Q ^ { \pi _ { \theta } , i } ( s , a ; \pi _ { \backslash i } ) : = \mathbb { E } \big [ \sum _ { t = 0 } ^ { H } \gamma ^ { t } r _ { t } ^ { i } \big | s _ { 0 } = s , a _ { 0 } ^ { i } = a ; \pi ^ { i } = \pi _ { \theta } , \pi _ { \backslash i } \big ]
|
| 283 |
+
$$
|
| 284 |
+
|
| 285 |
+
In our soccer environment the reward is invariant over player and we can drop the dependence on $i$
|
| 286 |
+
|
| 287 |
+
SVG requires the critic to learn a differentiable Q-function. The true state of the game $s$ and the identity of other agents $\pi _ { \backslash i }$ , are not revealed during a game and so identities must be inferred from their behavior, for example. Further, as noted in Foerster et al. (2017), off-policy replay is not always fully sound in multi-agent environments since the effective dynamics from any single agent’s perspective changes as the other agent’s policies change. Because of this, we generally model $Q$ as a function of an agents history of observations - typically keeping a low dimensional summary in the internal state of an LSTM: $Q ^ { \pi _ { \theta } } ( \cdot , \cdot ; \psi ) : \mathcal { X } \times \mathcal { A } \mathbb { R }$ , where $\mathcal { X }$ denotes the space of possible histories or internal memory state, parameterized by a neural network with weights $\psi$ . This enables the $Q$ -function to implicitly condition on other players observed behavior and generalize over the diversity of players in the population and diversity of behaviors in replay, $Q$ is learned using trajectory data stored in an experience replay buffer $\boldsymbol { B }$ , by minimizing the $k$ -step return TD-error with off-policy retrace correction (Munos et al., 2016), using a separate target network for bootstrapping, as is also described in Hausman et al. (2018); Riedmiller et al. (2018). Specifically we minimize:
|
| 288 |
+
|
| 289 |
+
$$
|
| 290 |
+
L ( \psi ) : = \mathbb { E } _ { \xi \sim \mathcal { B } } \left[ ( Q ^ { \pi _ { \theta } } ( x _ { i } , a _ { i } ; \psi ) - Q _ { \tt r e t r a c e } ( \xi ) ) ^ { 2 } \right]
|
| 291 |
+
$$
|
| 292 |
+
|
| 293 |
+
where $\xi : = ( ( s _ { t } , a _ { t } , r _ { t } ) ) _ { t = i } ^ { i + k }$ is a $\mathrm { k }$ -step trajectory snippet, where $i$ denotes the timestep of the first state in the snippet, sampled uniformly from the replay buffer of prior experience, and $Q _ { \tt r e t r a c e }$ is the off-policy corrected retrace target:
|
| 294 |
+
|
| 295 |
+
$$
|
| 296 |
+
\begin{array} { l } { { Q _ { \mathrm { r e t r a c e } } ( \xi ) : = \displaystyle \hat { Q } ( x _ { i } , a _ { i } ; \hat { \psi } ) + \sum _ { t = 0 } ^ { k } \gamma ^ { t } \left( \prod _ { s = i + 1 } ^ { t + i } c _ { s } \right) \left( r ( s _ { i + t } , a _ { i + t } ) + \right. } } \\ { { \left. \qquad \gamma \mathbb { E } _ { a \sim \hat { \pi } ( \cdot \vert x _ { i + t + 1 } ) } [ \hat { Q } ( x _ { i + t + 1 } , a ; \hat { \psi } ) ] - \hat { Q } ( x _ { i + t } , a _ { i + t } ; \hat { \psi } ) \right) } } \end{array}
|
| 297 |
+
$$
|
| 298 |
+
|
| 299 |
+
where, for stability, $\hat { Q } ( \cdot , \cdot ; \hat { \psi } ) : \mathcal { X } \times \mathcal { A } \mathbb { R }$ and $\hat { \pi }$ are target network and policies (Mnih et al., 2015) periodically synced with the online action-value critic and policy (in our experiments we sync after every 100 gradient steps), and $\begin{array} { r } { c _ { s } : = m i n ( 1 , \frac { \pi ( a _ { s } | x _ { s } ) } { \beta ( a _ { s } | x _ { s } ) } ) } \end{array}$ , where $\beta$ denotes the behavior policy which generated the trajectory snippet $\xi$ sampled from $\boldsymbol { B }$ , and $\textstyle \prod _ { s = i \pm 1 } ^ { i } c _ { s } : = 1$ . In our soccer experiments $k = 4 0$ . Though we use off-policy corrections, the replay buffer has a threshold, to ensure that data is relatively recent.
|
| 300 |
+
|
| 301 |
+
When modelling $Q$ using an LSTM the agent’s internal memory state at the first timestep of the snippet is stored in replay, along with the trajectory data. When replaying the experience the LSTM is primed with this stored internal state but then updates its own state during replay of the snippet. LSTMs are optimized using backpropagation through time with unrolls truncated to length 40 in our experiments.
|
| 302 |
+
|
| 303 |
+
# B POPULATION-BASED TRAINING PROCEDURE
|
| 304 |
+
|
| 305 |
+
# B.1 FITNESS
|
| 306 |
+
|
| 307 |
+
We use Elo rating (Elo (1978)), introduced to evaluate the strength of human chess players, to measure an agent’s performance within the population of learning agents and determine eligibility for evolution. Elo is updated from pairwise match results and can be used to predict expected win rates against the other members of the population.
|
| 308 |
+
|
| 309 |
+
For a given pair of agents $i , j$ (or a pair of agent teams), $s _ { e l o }$ estimates the expected win rate of agent $i$ playing against agent $j$ . We show in Algorithm 3 the update rule for a two player competitive game for simplicity, for a team of multiple players, we use their average Elo score instead.
|
| 310 |
+
|
| 311 |
+
By using Elo as the fitness function, driving the evolution of the population’s hyperparamters, the agents’ internal hyperparameters (see Section 3.3) can be automatically optimized for the objective we are ultimately interested in - the win rate against other agents. Individual shaping rewards would otherwise be difficult to handcraft without biasing this objective.
|
| 312 |
+
|
| 313 |
+
# Algorithm 3 Iterative Elo rating update.
|
| 314 |
+
|
| 315 |
+
1: Initialize rating $r _ { i }$ for each agent in the agent population.
|
| 316 |
+
2: $K$ : step size of Elo rating update given one match result.
|
| 317 |
+
3: $s _ { i } , s _ { j }$ : score for agent $i , j$ in a given match.
|
| 318 |
+
4: procedure UPDATERATIN $\mathsf { I G } ( r _ { i } , r _ { j } , s _ { i } , s _ { j } )$
|
| 319 |
+
5: $s \gets ( \mathrm { s i g n } ( s _ { i } - s _ { j } ) + 1 ) / 2$
|
| 320 |
+
6: selo ← 1/(1 + 10(rj−ri)/400)
|
| 321 |
+
7: $r _ { i } r _ { i } + K ( s - s _ { e l o } )$
|
| 322 |
+
8: $r _ { j } r _ { j } - K ( s - s _ { e l o } )$
|
| 323 |
+
9: end procedure
|
| 324 |
+
|
| 325 |
+
# B.2 EVOLUTION ELIGIBILITY
|
| 326 |
+
|
| 327 |
+
To limit the frequency of evolution and prevent premature convergence of the population, we adopted the same eligibility criteria introduced in Jaderberg et al. (2017). In particular, we consider an agent $i$ eligible for evolution if it has:
|
| 328 |
+
|
| 329 |
+
1. processed $2 \times 1 0 ^ { 9 }$ frames for learning since the beginning of training; and 2. processed $4 \times 1 0 ^ { 8 }$ frames for learning since the last time it became eligible for evolution. and agent $j$ can be a parent if agent $j$ has 1. processed $4 \times 1 0 ^ { 8 }$ frames for learning since it last evolved. which we refer to as a “burn-in” period.
|
| 330 |
+
|
| 331 |
+
# B.3 SELECTION
|
| 332 |
+
|
| 333 |
+
When an agent $i$ becomes eligible for evolution, it is compared against another agent $j$ who has finished its “burn-in” period for evolution selection. We describe this procedure in Algorithm 4.
|
| 334 |
+
|
| 335 |
+
Algorithm 4 Given agent $i$ , select an agent $j$ to evolve to.
|
| 336 |
+
|
| 337 |
+
1: $T _ { s e l e c t }$ : win rate selection threshold below which $A _ { i }$ should evolve to $A _ { j }$ .
|
| 338 |
+
2: $r _ { i } , r _ { j }$ : Elo ratings of agents $i , j$ .
|
| 339 |
+
3: procedure $\operatorname { S E L E C T } ( A _ { i } , \{ A _ { i } \} _ { i \in [ 1 , \dots , N ] ; i \neq j } )$
|
| 340 |
+
4: Choose $A _ { j }$ uniformly at random from $\{ A _ { i } \} _ { i \in [ 1 , . . , N ] ; i \neq j }$ .
|
| 341 |
+
5: selo ← 1/(1 + 10(rj−ri)/400)
|
| 342 |
+
6: if $s _ { e l o } < T _ { s e l e c t }$ then
|
| 343 |
+
7: return $A _ { j }$
|
| 344 |
+
8: else
|
| 345 |
+
9: return NULL
|
| 346 |
+
10: end if
|
| 347 |
+
11: end procedure
|
| 348 |
+
|
| 349 |
+
# B.4 INHERITANCE
|
| 350 |
+
|
| 351 |
+
Upon selection for evolution, agent $i$ inherits hyperparameters from agent $j$ by “cross-over” meaning that hyperparameters are either inherited or not independently with probability 0.5 as described in Algorithm 5:
|
| 352 |
+
|
| 353 |
+
# B.5 MUTATION
|
| 354 |
+
|
| 355 |
+
Upon each evolution action the child agent mutates its hyper-parameters with mutation probability $p _ { m u t a t e }$ at a multiplicative perturbation scale $p _ { p e r t u r b }$ . In this work, we apply a mutation probability of $p _ { m u t a t e } = 0 . 1$ and $p _ { p e r t u r b } = 0 . 2$ for all experiments. We limit a subset of hyperparameters to bounded ranges (e.g. discount factor) such that their values remain valid throughout training.
|
| 356 |
+
|
| 357 |
+
Algorithm 5 Agent $i$ inherits from agent $j$ by cross-over.
|
| 358 |
+
|
| 359 |
+
1: Agent $i , j$ with respective network parameters $\theta _ { i } , \theta _ { j }$ and hyper-parameters $\theta _ { i } ^ { h } , \theta _ { j } ^ { h }$ .
|
| 360 |
+
2: procedure INHERIT $\cdot ( \theta _ { i } , \theta _ { j } , \theta _ { i } ^ { h } , \theta _ { j } ^ { h } )$
|
| 361 |
+
3: ${ \theta _ { i } \theta _ { j } }$
|
| 362 |
+
4: $m = ( m _ { k } ) _ { k }$ , mk ∼ bernouilli(0.5)
|
| 363 |
+
5: $\theta _ { i } ^ { h } m \theta _ { i } ^ { h } + ( 1 - m ) \theta _ { j } ^ { h }$
|
| 364 |
+
6: end procedure
|
| 365 |
+
|
| 366 |
+
# C FURTHER ENVIRONMENT DETAILS AND AGENT PARAMETERIZATION
|
| 367 |
+
|
| 368 |
+
# C.1 POLICY PARAMETRIZATION AND OPTIMIZATION
|
| 369 |
+
|
| 370 |
+
We parametrize each agent’s policy and critic using neural networks. Observation preprocessing is first applied to each raw teammate and opponent feature using a shared 2-layer network with 32 and 16 neurons and Elu activations (Clevert et al., 2015) to embed each individual player’s data into a consistent, learned 16 dimensional embedding space. The maximum, minimum and mean of each dimension is then passed as input to the remainder of the network, where it is concatenated with the ball and pitch features. This preprocessing makes the network architecture invariant to the order of teammates and opponents features.
|
| 371 |
+
|
| 372 |
+
Both critic and actor then apply 2 feed-forward, elu-activated, layers of size 512 and 256, followed by a final layer of 256 neurons which is either feed-forward or made recurrent using an LSTM (Hochreiter & Schmidhuber, 1997). Weights are not shared between critic and actor networks.
|
| 373 |
+
|
| 374 |
+
We learn the parametrized gaussian policies using SVG0 as detailed in Appendix A, and the critic as described in Section A.2, with the Adam optimizer (Kingma & Ba, 2014) used to apply gradient updates.
|
| 375 |
+
|
| 376 |
+
# D HEAD-TO-HEAD TOURNAMENT OF TRAINED AGENTS
|
| 377 |
+
|
| 378 |
+
We also ran a round robin tournament with 50,000 matches between the best teams from 5 populations of agents (selected by Elo within their population), all trained for 5e10 agent steps - i.e. each learner had processed at least 5e10 frames from the replay buffer, though the number of raw environment steps would be much lower than that) and computed the Elo score. This shows the advantage of including shaping rewards, adding a recurrent critic and separate reward and discount channels, and the further (marginal) contribution of a recurrent actor. The full win rate matrix for this tournament is given in Figure 10. Note that the agent with full recurrence and separate reward channels attains the highest Elo in this tournament, though performance against our Nash evaluators in Section 5.1 is more mixed. This highlights the possibility for non-transitivities in this domain and the practical need for robustness to opponents.
|
| 379 |
+
|
| 380 |
+
# E HYPERPARAMETER EVOLUTION
|
| 381 |
+
|
| 382 |
+
To assess the relative importance of hyperparameters we replicated a single experiment (using a feed-forward policy and critic network) with 3 different seeds, see Figure 11. Critic learning rate and entropy regularizer evolve consistently over the three training runs. In particular the critic learning rate tends to be reduced over time. If a certain hyperparameter was not important to agent performance we would expect less consistency in its evolution across seeds, as selection would be driven by other hyperparameters: thus indicating performance is more sensitive to critic learning rate than actor learning rate.
|
| 383 |
+
|
| 384 |
+

|
| 385 |
+
Figure 10: Win rate matrix for the Tournament between teams: from top to bottom, ordered by Elo, ascending: $\mathbf { f } \mathbf { f } + \mathbf { e v } \mathbf { o }$ ; $\mathbf { f f } + \mathbf { e v 0 } +$ rwd shp; lstm $\mathbf { q } + \mathbf { e v } \mathbf { 0 } +$ rwd shp; lstm $\mathbf { q } + \mathbf { e v } \mathbf { 0 } +$ rwd shp $^ +$ channels; $\mathbf { l s t m + e v 0 + }$ rwd shp $^ +$ channels. ELo derived from the tournament is given in the table.
|
| 386 |
+
|
| 387 |
+

|
| 388 |
+
Figure 11: Hyperparameter evolution for three separate seeds, displayed over three separate rows.
|
| 389 |
+
|
| 390 |
+
# F BEHAVIOR VISUALIZATIONS
|
| 391 |
+
|
| 392 |
+
As well as the videos at the website3, we provide visualizations of traces of the agent behavior, in the repeated “cross pass” motif, see Figure 12.
|
| 393 |
+
|
| 394 |
+

|
| 395 |
+
Figure 12: On the left red agent 0 has passed to agent 1, who apparently ran into position to receive. On the right blue agent 1 has passed to agent 0.
|
parse/train/BkG8sjR5Km/BkG8sjR5Km_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkG8sjR5Km/BkG8sjR5Km_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BkG8sjR5Km/BkG8sjR5Km_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1Dy---0Z/H1Dy---0Z.md
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DISTRIBUTED PRIORITIZED EXPERIENCE REPLAY
|
| 2 |
+
|
| 3 |
+
Dan Horgan
|
| 4 |
+
DeepMind
|
| 5 |
+
horgan@google.com
|
| 6 |
+
John Quan
|
| 7 |
+
DeepMind
|
| 8 |
+
johnquan@google.com
|
| 9 |
+
David Budden
|
| 10 |
+
DeepMind
|
| 11 |
+
budden@google.com
|
| 12 |
+
|
| 13 |
+
Gabriel Barth-Maron DeepMind gabrielbm@google.com
|
| 14 |
+
|
| 15 |
+
Matteo Hessel
|
| 16 |
+
DeepMind
|
| 17 |
+
mtthss@google.com
|
| 18 |
+
|
| 19 |
+
Hado van Hasselt DeepMind hado@google.com
|
| 20 |
+
|
| 21 |
+
David Silver
|
| 22 |
+
DeepMind
|
| 23 |
+
davidsilver@google.com
|
| 24 |
+
|
| 25 |
+
# ABSTRACT
|
| 26 |
+
|
| 27 |
+
We propose a distributed architecture for deep reinforcement learning at scale, that enables agents to learn effectively from orders of magnitude more data than previously possible. The algorithm decouples acting from learning: the actors interact with their own instances of the environment by selecting actions according to a shared neural network, and accumulate the resulting experience in a shared experience replay memory; the learner replays samples of experience and updates the neural network. The architecture relies on prioritized experience replay to focus only on the most significant data generated by the actors. Our architecture substantially improves the state of the art on the Arcade Learning Environment, achieving better final performance in a fraction of the wall-clock training time.
|
| 28 |
+
|
| 29 |
+
# 1 INTRODUCTION
|
| 30 |
+
|
| 31 |
+
A broad trend in deep learning is that combining more computation (Dean et al., 2012) with more powerful models (Kaiser et al., 2017) and larger datasets (Deng et al., 2009) yields more impressive results. It is reasonable to hope that a similar principle holds for deep reinforcement learning. There are a growing number of examples to justify this optimism: effective use of greater computational resources has been a critical factor in the success of such algorithms as Gorila (Nair et al., 2015), A3C (Mnih et al., 2016), GPU Advantage Actor Critic (Babaeizadeh et al., 2017), Distributed PPO (Heess et al., 2017) and AlphaGo (Silver et al., 2016).
|
| 32 |
+
|
| 33 |
+
Deep learning frameworks such as TensorFlow (Abadi et al., 2016) support distributed training, making large scale machine learning systems easier to implement and deploy. Despite this, much current research in deep reinforcement learning concerns itself with improving performance within the computational budget of a single machine, and the question of how to best harness more resources is comparatively underexplored.
|
| 34 |
+
|
| 35 |
+
In this paper we describe an approach to scaling up deep reinforcement learning by generating more data and selecting from it in a prioritized fashion (Schaul et al., 2016). Standard approaches to distributed training of neural networks focus on parallelizing the computation of gradients, to more rapidly optimize the parameters (Dean et al., 2012). In contrast, we distribute the generation and selection of experience data, and find that this alone suffices to improve results. This is complementary to distributing gradient computation, and the two approaches can be combined, but in this work we focus purely on data-generation.
|
| 36 |
+
|
| 37 |
+
We use this distributed architecture to scale up variants of Deep Q-Networks (DQN) and Deep Deterministic Policy Gradient (DDPG), and we evaluate these on the Arcade Learning Environment benchmark (Bellemare et al., 2013), and on a range of continuous control tasks. Our architecture achieves a new state of the art performance on Atari games, using a fraction of the wall-clock time compared to the previous state of the art, and without per-game hyperparameter tuning.
|
| 38 |
+
|
| 39 |
+
We empirically investigate the scalability of our framework, analysing how prioritization affects performance as we increase the number of data-generating workers. Our experiments include an analysis of factors such as the replay capacity, the recency of the experience, and the use of different data-generating policies for different workers. Finally, we discuss implications for deep reinforcement learning agents that may apply beyond our distributed framework.
|
| 40 |
+
|
| 41 |
+
# 2 BACKGROUND
|
| 42 |
+
|
| 43 |
+
Distributed Stochastic Gradient Descent Distributed stochastic gradient descent is widely used in supervised learning to speed up training of deep neural networks, by parallelizing the computation of the gradients used to update their parameters. The resulting parameter updates may be applied synchronously (Krizhevsky, 2014) or asynchronously (Dean et al., 2012). Both approaches have proven effective and are an increasingly standard part of the deep learning toolbox. Inspired by this, Nair et al. (2015) applied distributed asynchronous parameter updates and distributed data generation to deep reinforcement learning. Asynchronous parameter updates and parallel data generation have also been successfully used within a single-machine, in a multi-threaded rather than a distributed context (Mnih et al., 2016). GPU Asynchronous Actor-Critic (GA3C; Babaeizadeh et al., 2017) and Parallel Advantage Actor-Critic (PAAC; Clemente et al., 2017) adapt this approach to make efficient use of GPUs.
|
| 44 |
+
|
| 45 |
+
Distributed Importance Sampling A complementary family of techniques for speeding up training is based on variance reduction by means of importance sampling (cf. Hastings, 1970). This has been shown to be useful in the context of neural networks (Hinton, 2007). Sampling non-uniformly from a dataset and weighting updates according to the sampling probability in order to counteract the bias thereby introduced can increase the speed of convergence by reducing the variance of the gradients. One way of doing this is to select samples with probability proportional to the $L _ { 2 }$ norm of the corresponding gradients. In supervised learning, this approach has been successfully extended to the distributed setting (Alain et al., 2015). An alternative is to rank samples according to their latest known loss value and make the sampling probability a function of the rank rather than of the loss itself (Loshchilov & Hutter, 2015).
|
| 46 |
+
|
| 47 |
+
Prioritized Experience Replay Experience replay (Lin, 1992) has long been used in reinforcement learning to improve data efficiency. It is particularly useful when training neural network function approximators with stochastic gradient descent algorithms, as in Neural Fitted Q-Iteration (Riedmiller, 2005) and Deep Q-Learning (Mnih et al., 2015). Experience replay may also help to prevent overfitting by allowing the agent to learn from data generated by previous versions of the policy. Prioritized experience replay (Schaul et al., 2016) extends classic prioritized sweeping ideas (Moore & Atkeson, 1993) to work with deep neural network function approximators. The approach is strongly related to the importance sampling techniques discussed in the previous section, but using a more general class of biased sampling procedures that focus learning on the most ‘surprising’ experiences. Biased sampling can be particularly helpful in reinforcement learning, since the reward signal may be sparse and the data distribution depends on the agent’s policy. As a result, prioritized experience replay is used in many agents, such as Prioritized Dueling DQN (Wang et al., 2016), UNREAL (Jaderberg et al., 2017), DQfD (Hester et al., 2017), and Rainbow (Hessel et al., 2017). In an ablation study conducted to investigate the relative importance of several algorithmic ingredients (Hessel et al., 2017), prioritization was found to be the most important ingredient contributing to the agent’s performance.
|
| 48 |
+
|
| 49 |
+
# 3 OUR CONTRIBUTION: DISTRIBUTED PRIORITIZED EXPERIENCE REPLAY
|
| 50 |
+
|
| 51 |
+
In this paper we extend prioritized experience replay to the distributed setting and show that this is a highly scalable approach to deep reinforcement learning. We introduce a few key modifications that enable this scalability, and we refer to our approach as Ape-X.
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 1: The Ape-X architecture in a nutshell: multiple actors, each with its own instance of the environment, generate experience, add it to a shared experience replay memory, and compute initial priorities for the data. The (single) learner samples from this memory and updates the network and the priorities of the experience in the memory. The actors’ networks are periodically updated with the latest network parameters from the learner.
|
| 55 |
+
|
| 56 |
+
<table><tr><td colspan="2">Algorithm1 Actor</td><td></td></tr><tr><td colspan="2">1: procedure ACTOR(B,T)</td><td>>Run agent in environment instance,storing experiences.</td></tr><tr><td>2:</td><td>00←LEARNER.PARAMETERS()</td><td>Remote call to obtain latest network parameters.</td></tr><tr><td>3:</td><td>SO←ENVIRONMENT.INITIALIZE()</td><td>>Get initial state from environment.</td></tr><tr><td>4:</td><td>fort=1toTdo</td><td></td></tr><tr><td>5:</td><td>at-1←π0t-1(St-1)</td><td> Select an action using the current policy.</td></tr><tr><td>6:</td><td>(Tt,t,St) ←ENVIRONMENT.STEP(at-1)</td><td>>Apply the action in the environment.</td></tr><tr><td>7:</td><td>LOCALBUFFER.ADD((St-1,at-1,rt,/t))</td><td>Add data to local buffer.</td></tr><tr><td>8:</td><td></td><td>if LOCALBUFFER.SIzE()≥ B thenIn a background thread, periodically send data to replay.</td></tr><tr><td>9:</td><td>T ←LOCALBUFFER.GET(B)</td><td>Get buffered data (e.g.batch of multi-step transitions).</td></tr><tr><td>10:</td><td></td><td>p ← COMPUTEPRIORITIEs(T)>Calculate priorities for experience (e.g.absolute TD error).</td></tr><tr><td>11:</td><td>REPLAY.ADD(T,p)</td><td>>Remote call to add experience to replay memory.</td></tr><tr><td>12:</td><td>endif</td><td></td></tr><tr><td>13:</td><td>PERIODICALLY(0t ← LEARNER.PARAMETERS())</td><td> Obtain latest network parameters.</td></tr><tr><td>14:</td><td>end for</td><td></td></tr><tr><td>15: end procedure</td><td></td><td></td></tr></table>
|
| 57 |
+
|
| 58 |
+
# Algorithm 2 Learner
|
| 59 |
+
|
| 60 |
+
1: procedure LEARNER $( T )$ . Update network using batches sampled from memory.
|
| 61 |
+
2: 3: $\theta _ { 0 } \gets$ INITIALIZENETWORK( )
|
| 62 |
+
for $t = 1$ to $T$ do . Update the parameters $T$ times.
|
| 63 |
+
4: id, τ ← REPLAY.SAMPLE( ) . Sample a prioritized batch of transitions (in a background thread).
|
| 64 |
+
5: lt ← COMPUTELOSS $( \tau ; \theta _ { t } )$ . Apply learning rule; e.g. double Q-learning or DDPG
|
| 65 |
+
6: $\theta _ { t + 1 } \gets$ UPDATEPARAMETERS $\left( l _ { t } ; \theta _ { t } \right)$
|
| 66 |
+
7: $p $ COMPUTEPRIORITIES( ) $\triangleright$ Calculate priorities for experience, (e.g. absolute TD error).
|
| 67 |
+
8: REPLAY.SETPRIORITY $( i d , p )$ $\triangleright$ Remote call to update priorities.
|
| 68 |
+
9: PERIODICALLY(REPLAY.REMOVETOFIT()) . Remove old experience from replay memory.
|
| 69 |
+
10: end for
|
| 70 |
+
11: end procedure
|
| 71 |
+
|
| 72 |
+
As in Gorila (Nair et al., 2015), we decompose the standard deep reinforcement learning algorithm into two parts, which run concurrently with no high-level synchronization. The first part consists of stepping through an environment, evaluating a policy implemented as a deep neural network, and storing the observed data in a replay memory. We refer to this as acting. The second part consists of sampling batches of data from the memory to update the policy parameters. We term this learning.
|
| 73 |
+
|
| 74 |
+
In principle, both acting and learning may be distributed across multiple workers. In our experiments, hundreds of actors run on CPUs to generate data, and a single learner running on a GPU samples the most useful experiences (Figure 1). Pseudocode for the actors and learners is shown in Algorithms 1 and 2. Updated network parameters are periodically communicated to the actors from the learner.
|
| 75 |
+
|
| 76 |
+
In contrast to Nair et al. (2015), we use a shared, centralized replay memory, and instead of sampling uniformly, we prioritize, to sample the most useful data more often. Since priorities are shared, high priority data discovered by any actor can benefit the whole system. Priorities can be defined in various ways, depending on the learning algorithm; two instances are described in the next sections.
|
| 77 |
+
|
| 78 |
+
In Prioritized DQN (Schaul et al., 2016) priorities for new transitions were initialized to the maximum priority seen so far, and only updated once they were sampled. This does not scale well: due to the large number of actors in our architecture, waiting for the learner to update priorities would result in a myopic focus on the most recent data, which has maximum priority by construction. Instead, we take advantage of the computation the actors in Ape-X are already doing to evaluate their local copies of the policy, by making them also compute suitable priorities for new transitions online. This ensures that data entering the replay has more accurate priorities, at no extra cost.
|
| 79 |
+
|
| 80 |
+
Sharing experiences has certain advantages compared to sharing gradients. Low latency communication is not as important as in distributed SGD, because experience data becomes outdated less rapidly than gradients, provided the learning algorithm is robust to off-policy data. Across the system, we take advantage of this by batching all communications with the centralized replay, increasing the efficiency and throughput at the cost of some latency. With this approach it is even possible for actors and learners to run in different data-centers without limiting performance.
|
| 81 |
+
|
| 82 |
+
Finally, by learning off-policy (cf. Sutton & Barto, 1998; 2017), we can further take advantage of Ape-X’s ability to combine data from many distributed actors, by giving the different actors different exploration policies, broadening the diversity of the experience they jointly encounter. As we will see in the results, this can be sufficient to make progress on difficult exploration problems.
|
| 83 |
+
|
| 84 |
+
# 3.1 APE-X DQN
|
| 85 |
+
|
| 86 |
+
The general framework we have described may be combined with different learning algorithms. First, we combined it with a variant of DQN (Mnih et al., 2015) with some of the components of Rainbow (Hessel et al., 2017). More specifically, we used double Q-learning (van Hasselt, 2010; van Hasselt et al., 2016) with multi-step bootstrap targets (cf. Sutton, 1988; Sutton & Barto, 1998; 2017; Mnih et al., 2016) as the learning algorithm, and a dueling network architecture (Wang et al., 2016) as the function approximator $q ( \cdot , \cdot , \pmb \theta )$ .
|
| 87 |
+
|
| 88 |
+
This results in computing for all elements in the batch the loss $l _ { t } ( \pmb \theta ) = { \textstyle { \frac { 1 } { 2 } } } ( G _ { t } - q ( S _ { t } , A _ { t } , \pmb \theta ) ) ^ { 2 }$ with
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
G _ { t } = R _ { t + 1 } + \gamma R _ { t + 2 } + . . . + \gamma ^ { n - 1 } R _ { t + n } + \gamma ^ { n } \overbrace { q ( S _ { t + n } , \underset { a } { \mathrm { a r g m a x } } q ( S _ { t + n } , a , \pmb { \theta } ) , \pmb { \theta } ^ { - } ) } ^ { \theta _ { t } } ,
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where $t$ is a time index for an experience sampled from the replay starting with state $S _ { t }$ and action $A _ { t }$ , and $\pmb { \theta } ^ { - }$ denotes parameters of the target network (Mnih et al., 2015), a slow moving copy of the online parameters. Multi-step returns are truncated if the episode ends in fewer than $n$ steps.
|
| 95 |
+
|
| 96 |
+
In principle, Q-learning variants are off-policy methods, so we are free to choose the policies we use to generate data. However, in practice, the choice of behaviour policy does affect both exploration and the quality of function approximation. Furthermore, we are using a multi-step return with no off-policy correction, which in theory could adversely affect the value estimation. Nonetheless, in Ape-X DQN, each actor executes a different policy, and this allows experience to be generated from a variety of strategies, relying on the prioritization mechanism to pick out the most effective experiences. In our experiments, the actors use $\epsilon$ -greedy policies with different values of . Low $\epsilon$ policies allow exploring deeper in the environment, while high $\epsilon$ policies prevent over-specialization.
|
| 97 |
+
|
| 98 |
+
# 3.2 APE-X DPG
|
| 99 |
+
|
| 100 |
+
To test the generality of the framework we also combined it with a continuous-action policy gradient system based on DDPG (Lillicrap et al., 2016), an implementation of deterministic policy gradients Silver et al. (2014) also similar to older methods (Werbos, 1990; Prokhorov & Wunsch, 1997), and tested it on continuous control tasks from the DeepMind Control Suite (Tassa et al., 2018).
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Figure 2: Left: Atari results aggregated across 57 games, evaluated from random no-op starts. Right: Atari training curves for selected games, against baselines. Blue: Ape- $\mathrm { . } \mathrm { X }$ DQN with 360 actors; Orange: A3C; Purple: Rainbow; Green: DQN. See appendix for longer runs over all games.
|
| 104 |
+
|
| 105 |
+
The Ape-X DPG setup is similar to Ape-X DQN, but the actor’s policy is now represented explicitly by a separate policy network, in addition to the Q-network. The two networks are optimized separately, by minimizing different losses on the sampled experience. We denote the policy and Q-network parameters by $\phi$ and $\psi$ respectively, and adopt the same convention as above to denote target networks. The Q-network outputs an action-value estimate $q ( s , a , \psi )$ for a given state $s$ , and multi-dimensional action $a \in \mathbb { R } ^ { m }$ . It is updated using temporal-difference learning with a multi-step bootstrap target. The Q-network loss can be written as $\begin{array} { r } { l _ { t } ( \dot { \psi } ) = \frac { 1 } { 2 } ( G _ { t } - q ( S _ { t } , A _ { t } , \hat { \psi } ) ) ^ { 2 } } \end{array}$ , where
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
G _ { t } = { R } _ { t + 1 } + \gamma { R } _ { t + 2 } + \ldots + \gamma ^ { n - 1 } { R } _ { t + n } + \gamma ^ { n } q ( S _ { t + n } , \pi ( S _ { t + n } , \phi ^ { - } ) , \psi ^ { - } ) .
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
The policy network outputs an action $A _ { t } = \pi ( S _ { t } , \phi ) \in \mathbb { R } ^ { m }$ . The policy parameters are updated using policy gradient ascent on the estimated Q-value, using gradient $\nabla _ { \phi } q ( S _ { t } , \pi ( S _ { t } , \phi ) , \psi )$ — note that this depends on the policy parameters $\phi$ only through the action $A _ { t } = \pi ( S _ { t } , \phi )$ that is input to the critic network. Further details of the Ape- $\mathbf { \nabla } \cdot \mathbf { X }$ DPG algorithm are available in the appendix.
|
| 112 |
+
|
| 113 |
+
# 4 EXPERIMENTS
|
| 114 |
+
|
| 115 |
+
# 4.1 ATARI
|
| 116 |
+
|
| 117 |
+
In our first set of experiments we evaluate Ape-X DQN on Atari, and show state of the art results on this standard reinforcement learning benchmark. We use 360 actor machines (each using one CPU core) to feed data into the replay memory as fast as they can generate it; approximately 139 frames per second (FPS) each, for a total of $\mathord { \sim } 5 0 \mathrm { K }$ FPS, which corresponds to ${ \sim } 1 2 . 5 \mathrm { K }$ transitions (because of a fixed action repeat of 4). The actors batch experience data locally before sending it to the replay: up to 100 transitions may be buffered at a time, which are then sent asynchronously in batches of $B = 5 0$ . The learner asynchronously prefetches up to 16 batches of 512 transitions, and computes updates for 19 such batches each second, meaning that gradients are computed for ${ \sim } 9 . 7 \mathrm { K }$ transitions per second on average. To reduce memory and bandwidth requirements, observation data is compressed using a PNG codec when sent and when stored in the replay. The learner decompresses data as it prefetches it, in parallel with computing and applying gradients. The learner also asynchronously handles any requests for parameters from actors.
|
| 118 |
+
|
| 119 |
+
<table><tr><td></td><td>Training Time</td><td>Environment Frames</td><td>Resources (per game)</td><td>Median (no-op starts)</td><td>Median (human starts)</td></tr><tr><td>Ape-X DQN</td><td>5 days</td><td>22800M</td><td>376 cores,1 GPU a</td><td>434%</td><td>358%</td></tr><tr><td>Rainbow</td><td>10 days</td><td>200M</td><td>1 GPU</td><td>223%</td><td>153%</td></tr><tr><td>Distributional (C51)</td><td>10 days</td><td>200M</td><td>1 GPU</td><td>178%</td><td>125%</td></tr><tr><td>A3C</td><td>4 days</td><td></td><td>16 cores</td><td></td><td>117%</td></tr><tr><td>Prioritized Dueling</td><td>9.5 days</td><td>200M</td><td>1 GPU</td><td>172%</td><td>115%</td></tr><tr><td>DQN</td><td>9.5 days</td><td>200M</td><td>1 GPU</td><td>79%</td><td>68%</td></tr><tr><td>GorilaDQN</td><td>~4 days</td><td></td><td>unknown b</td><td>96%</td><td>78%</td></tr><tr><td>UNREAL d</td><td></td><td>250M</td><td>16 cores</td><td>331% d</td><td>250% d</td></tr></table>
|
| 120 |
+
|
| 121 |
+
Table 1: Median normalized scores across 57 Atari games. a Tesla P100. $^ \mathrm { b } > 1 0 0$ CPUs, with a mixed number of cores per CPU machine. c Only evaluated on 49 games. d Hyper-parameters were tuned per game.
|
| 122 |
+
|
| 123 |
+
Actors copy the network parameters from the learner every 400 frames ${ \sim } 2 . 8$ seconds). Each actor $i \in \{ 0 , . . . , N - 1 \}$ executes an $\epsilon _ { i }$ -greedy policy where $\epsilon _ { i } = \epsilon ^ { 1 + \frac { i } { N - 1 } \alpha }$ with $\epsilon = 0 . 4$ , $\alpha = 7$ . Each $\epsilon _ { i }$ is held constant throughout training. The episode length is limited to 50000 frames during training.
|
| 124 |
+
|
| 125 |
+
The capacity of the shared experience replay memory is soft-limited to 2 million transitions: adding new data is always permitted, to not slow down the actors, but every 100 learning steps any excess data above this capacity threshold is removed en masse, in FIFO order. The median actual size of the memory is 2035050. Data is sampled according to proportional prioritization, with a priority exponent of 0.6 and an importance sampling exponent set to 0.4.
|
| 126 |
+
|
| 127 |
+
In Figure 2, on the left, we compare the median human normalized score across all 57 games to several baselines: DQN, Prioritized DQN, Distributional DQN (Bellemare et al., 2017), Rainbow, and Gorila. In all cases the performance is measured at the end of training under the no-op starts testing regime (Mnih et al., 2015). On the right, we show initial learning curves (taken from the greediest actor) for a selection of 6 games (full learning curves for all games are in the appendix). Given that Ape-X can harness substantially more computation than most baselines, one might expect it to train faster. Figure 2 shows that this was indeed the case. Perhaps more surprisingly, our agent achieved a substantially higher final performance.
|
| 128 |
+
|
| 129 |
+
In Table 1 we compare the median human-normalized performance of Ape-X DQN on the Atari benchmark to corresponding metrics as reported for other baseline agents in their respective publications. Whenever available we report results both for no-op starts and for human starts. The human-starts regime (Nair et al., 2015) corresponds to a more challenging generalization test, as the agent is initialized from random starts drawn from games played by human experts. Ape-X’s performance is higher than the performance of any of the baselines according to both metrics.
|
| 130 |
+
|
| 131 |
+
# 4.2 CONTINUOUS CONTROL
|
| 132 |
+
|
| 133 |
+
In a second set of experiments we evaluated Ape-X DPG on four continuous control tasks. In the manipulator domain the agent must learn to bring a ball to a specified location. In the humanoid domain the agent must learn to control a humanoid body to solve three distinct tasks of increasing complexity: Standing, Walking and Running. Since here we learn from features, rather than from pixels, the observation space is much smaller than it is in the Atari domain. We therefore use small, fully-connected networks (details in the appendix). With 64 actors on this domain, we obtain ${ \sim } 1 4 \mathrm { K }$ total FPS (the same number of transitions per second; here we do not use action repeats). We process 86 batches of 256 transitions per second, or ${ \sim } 2 2 \mathrm { K }$ transitions processed per second.
|
| 134 |
+
|
| 135 |
+
Figure 3 shows that Ape-X DPG achieved very good performance on all four tasks. The figure shows the performance of Ape-X DPG for different numbers of actors: as the number of actors increases our agent becomes increasingly effective at solving these problems rapidly and reliably, outperforming a standard DDPG baseline trained for over 10 times longer. A parallel paper (Barth-Maron et al., 2018) builds on this work by combining Ape-X DPG with distributional value functions, and the resulting algorithm is successfully applied to further continuous control tasks.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
Figure 3: Performance of Ape-X DPG on four continuous control tasks, as a function of wall clock time. Performance improves as we increase the numbers of actors. The black dashed line indicates the maximum performance reached by a standard DDPG baseline over 5 days of training.
|
| 139 |
+
|
| 140 |
+

|
| 141 |
+
Figure 4: Scaling the number of actors. Performance consistently improves as we scale the number of actors from 8 to 256, note that the number of learning updates performed does not depend on the number of actors.
|
| 142 |
+
|
| 143 |
+
# 5 ANALYSIS
|
| 144 |
+
|
| 145 |
+
In this section we describe additional Ape-X DQN experiments on Atari that helped improve our understanding of the framework, and we investigate the contribution of different components.
|
| 146 |
+
|
| 147 |
+
First, we investigated how the performance scales with the number of actors. We trained our agent with different numbers of actors (8, 16, 32, 64, 128 and 256) for 35 hours on a subset of 6 Atari games. In all experiments we kept the size of the shared experience replay memory fixed at 1 million transitions. Figure 4 shows that the performance consistently improved as the number of actors increased. The appendix contains learning curves for additional games, and a comparison of the scalability of the algorithm with and without prioritized replay. It is perhaps surprising that performance improved so substantially purely by increasing the number of actors, without changing the rate at which the network parameters are updated, the structure of the network, or the update rule. We hypothesize that the proposed architecture helps with a common deep reinforcement learning failure mode, in which the policy discovered is a local optimum in the parameter space, but not a global one, e.g., due to insufficient exploration. Using a large number of actors with varying amounts of exploration helps to discover promising new courses of action, and prioritized replay ensures that when this happens, the learning algorithm focuses its efforts on this important information.
|
| 148 |
+
|
| 149 |
+
Next, we investigated varying the capacity of the replay memory (see Figure 5). We used a setup with 256 actors, for a median of ${ \sim } 3 7 \mathrm { K }$ total environment frames per second (approximately ${ \sim } 9 \mathrm { K }$ transitions). With such a large number of actors, the contents of the memory is replaced much faster than in most DQN-like agents. We observed a small benefit to using a larger replay capacity. We hypothesize this is due to the value of keeping some high priority experiences around for longer and replaying them. As above, a single learner machine trained the network with median 19 batches per second, each of 512 transitions, for a median of ${ \sim } 9 . 7 \mathrm { K }$ transitions processed per second.
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 5: Varying the capacity of the replay. Agents with larger replay memories perform better on most games. Each curve corresponds to a single run, smoothed over 20 points. The curve for Wizard Of Wor with replay size 250K is incomplete because training diverged; we did not observe this with the other replay sizes.
|
| 153 |
+
|
| 154 |
+
Finally, we ran additional experiments to disentangle potential effects of two confounding factors in our scalability analysis: recency of the experience data in the replay memory, and diversity of the data-generating policies. The full description of these experiments is confined to the appendix; to summarize, neither factor alone is sufficient to explain the performance we see. We therefore conclude that the results are due substantially to the positive effects of gathering more experience data; namely better exploration of the environment and better avoidance of overfitting.
|
| 155 |
+
|
| 156 |
+
# 6 CONCLUSION
|
| 157 |
+
|
| 158 |
+
We have designed, implemented, and analyzed a distributed framework for prioritized replay in deep reinforcement learning. This architecture achieved state of the art results in a wide range of discrete and continuous tasks, both in terms of wall-clock learning speed and final performance.
|
| 159 |
+
|
| 160 |
+
In this paper we focused on applying the Ape-X framework to DQN and DPG, but it could also be combined with any other off-policy reinforcement learning update. For methods that use temporally extended sequences (e.g., Mnih et al., 2016; Wang et al., 2017), the Ape-X framework may be adapted to prioritize sequences of past experiences instead of individual transitions.
|
| 161 |
+
|
| 162 |
+
Ape-X is designed for regimes in which it is possible to generate large quantities of data in parallel. This includes simulated environments but also a variety of real-world applications, such as robotic arm farms, self-driving cars, online recommender systems, or other multi-user systems in which data is generated by many instances of the same environment (c.f. Silver et al., 2013). In applications where data is costly to obtain, our approach will not be directly applicable. With powerful function approximators, overfitting is an issue: generating more training data is the simplest way of addressing it, but may also provide guidance towards data-efficient solutions.
|
| 163 |
+
|
| 164 |
+
Many deep reinforcement learning algorithms are fundamentally limited by their ability to explore effectively in large domains. Ape-X uses a naive yet effective mechanism to address this issue: generating a diverse set of experiences and then identifying and learning from the most useful events. The success of this approach suggests that simple and direct approaches to exploration may be feasible, even for synchronous agents.
|
| 165 |
+
|
| 166 |
+
Our architecture illustrates that distributed systems are now practical both for research and, potentially, large-scale applications of deep reinforcement learning. We hope that the algorithms, architecture, and analysis we have presented will help to accelerate future efforts in this direction.
|
| 167 |
+
|
| 168 |
+
# ACKNOWLEDGMENTS
|
| 169 |
+
|
| 170 |
+
We would like to acknowledge the contributions of our colleagues at DeepMind, whose input and support has been vital to the success of this work. Thanks in particular to Tom Schaul, Joseph Modayil, Sriram Srinivasan, Georg Ostrovski, Josh Abramson, Todd Hester, Jean-Baptiste Lespiau, Alban Rrustemi and Dan Belov.
|
| 171 |
+
|
| 172 |
+
# REFERENCES
|
| 173 |
+
|
| 174 |
+
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.
|
| 175 |
+
|
| 176 |
+
Guillaume Alain, Alex Lamb, Chinnadhurai Sankar, Aaron Courville, and Yoshua Bengio. Variance reduction in sgd by distributed importance sampling. arXiv preprint arXiv:1511.06481, 2015.
|
| 177 |
+
|
| 178 |
+
Mohammad Babaeizadeh, Iuri Frosio, Stephen Tyree, Jason Clemons, and Jan Kautz. Reinforcement learning through asynchronous advantage actor-critic on a gpu. In International Conference on Learning Representations, 2017.
|
| 179 |
+
|
| 180 |
+
Gabriel Barth-Maron, Matthew W. Hoffman, David Budden, Will Dabney, Dan Horgan, Dhruva TB, Alistair Muldal, Nicolas Heess, and Timothy Lillicrap. Distributional policy gradients. In International Conference on Learning Representations, 2018.
|
| 181 |
+
|
| 182 |
+
Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. J. Artif. Intell. Res. (JAIR), 47:253–279, 2013.
|
| 183 |
+
|
| 184 |
+
Marc G. Bellemare, Will Dabney, and Remi Munos. A distributional perspective on reinforcement ´ learning. In International Conference on Machine Learning, 2017.
|
| 185 |
+
|
| 186 |
+
Alfredo V. Clemente, Humberto Nicolas Castej ´ on Mart ´ ´ınez, and Arjun Chandra. Efficient parallel methods for deep reinforcement learning. arXiv preprint arXiv:1705.04862, 2017.
|
| 187 |
+
|
| 188 |
+
Jeffrey Dean, Greg S. Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Quoc V. Le, Mark Z. Mao, Marc’Aurelio Ranzato, Andrew Senior, Paul Tucker, Ke Yang, and Andrew Y. Ng. Large scale distributed deep networks. In Proceedings of the 25th International Conference on Neural Information Processing Systems, NIPS’12, pp. 1223–1231, USA, 2012. Curran Associates Inc.
|
| 189 |
+
|
| 190 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009.
|
| 191 |
+
|
| 192 |
+
W Keith Hastings. Monte carlo sampling methods using markov chains and their applications. Biometrika, 57(1):97–109, 1970.
|
| 193 |
+
|
| 194 |
+
Nicolas Heess, Dhruva TB, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, S. M. Ali Eslami, Martin A. Riedmiller, and David Silver. Emergence of locomotion behaviours in rich environments. arXiv preprint arXiv:1707.02286, 2017.
|
| 195 |
+
|
| 196 |
+
Matteo Hessel, Joseph Modayil, Hado van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. arXiv preprint arXiv:1710.02298, 2017.
|
| 197 |
+
|
| 198 |
+
Todd Hester, Matej Vecerik, Olivier Pietquin, Marc Lanctot, Tom Schaul, Bilal Piot, Andrew Sendonaris, Gabriel Dulac-Arnold, Ian Osband, John Agapiou, Joel Z. Leibo, and Audrunas Gruslys. Learning from demonstrations for real world reinforcement learning. CoRR, abs/1704.03732, 2017.
|
| 199 |
+
|
| 200 |
+
Geoffrey E Hinton. To recognize shapes, first learn to generate images. Prog. Brain Res., 165: 535–547, 2007.
|
| 201 |
+
|
| 202 |
+
Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. In International Conference on Learning Representations, 2017.
|
| 203 |
+
|
| 204 |
+
Lukasz Kaiser, Aidan N. Gomez, Noam Shazeer, Ashish Vaswani, Niki Parmar, Llion Jones, and Jakob Uszkoreit. One model to learn them all. CoRR, abs/1706.05137, 2017.
|
| 205 |
+
|
| 206 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 207 |
+
|
| 208 |
+
Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. arXiv preprint arXiv:1404.5997, 2014.
|
| 209 |
+
|
| 210 |
+
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. In International Conference on Learning Representations, 2016.
|
| 211 |
+
|
| 212 |
+
Long-H Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine Learning, 1992.
|
| 213 |
+
|
| 214 |
+
Ilya Loshchilov and Frank Hutter. Online batch selection for faster training of neural networks. arXiv preprint arXiv:1511.06343, 2015.
|
| 215 |
+
|
| 216 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 26 February 2015.
|
| 217 |
+
|
| 218 |
+
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 International Conference on Machine Learning, pp. 1928–1937, 11 June 2016.
|
| 219 |
+
|
| 220 |
+
Andrew W Moore and Christopher G Atkeson. Prioritized sweeping: Reinforcement learning with less data and less time. Machine learning, 13(1):103–130, 1993.
|
| 221 |
+
|
| 222 |
+
Arun Nair, Praveen Srinivasan, Sam Blackwell, Cagdas Alcicek, Rory Fearon, Alessandro De Maria, Vedavyas Panneershelvam, Mustafa Suleyman, Charles Beattie, Stig Petersen, Shane Legg, Volodymyr Mnih, Koray Kavukcuoglu, and David Silver. Massively parallel methods for deep reinforcement learning. arXiv preprint arXiv:1507.04296, 15 July 2015.
|
| 223 |
+
|
| 224 |
+
Danil V Prokhorov and Donald C Wunsch. Adaptive critic designs. IEEE transactions on Neural Networks, 8(5):997–1007, 1997.
|
| 225 |
+
|
| 226 |
+
Martin Riedmiller. Neural Fitted Q Iteration – First Experiences with a Data Efficient Neural Reinforcement Learning Method, pp. 317–328. Springer Berlin Heidelberg, Berlin, Heidelberg, 2005. ISBN 978-3-540-31692-3. doi: 10.1007/11564096 32.
|
| 227 |
+
|
| 228 |
+
Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. In International Conference on Learning Representations, 2016.
|
| 229 |
+
|
| 230 |
+
David Silver, Leonard Newnham, David Barker, Suzanne Weller, and Jason McFall. Concurrent reinforcement learning from customer interactions. In Sanjoy Dasgupta and David McAllester (eds.), Proceedings of the 30th International Conference on Machine Learning, volume 28 of Proceedings of Machine Learning Research, pp. 924–932, Atlanta, Georgia, USA, 17–19 Jun 2013. PMLR.
|
| 231 |
+
|
| 232 |
+
David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin Riedmiller. Deterministic policy gradient algorithms. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp. 387–395, 2014.
|
| 233 |
+
|
| 234 |
+
David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
|
| 235 |
+
|
| 236 |
+
Richard S Sutton. Learning to predict by the methods of temporal differences. Machine learning, 3 (1):9–44, 1988.
|
| 237 |
+
|
| 238 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press Cambridge, 1998.
|
| 239 |
+
|
| 240 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, 2nd edition. 2017.
|
| 241 |
+
|
| 242 |
+
Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, Timothy Lillicrap, and Martin Riedmiller. Deepmind control suite, 2018.
|
| 243 |
+
|
| 244 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012.
|
| 245 |
+
|
| 246 |
+
George E Uhlenbeck and Leonard S Ornstein. On the theory of the brownian motion. Physical review, 36(5):823, 1930.
|
| 247 |
+
|
| 248 |
+
Hado van Hasselt. Double Q-learning. In Advances in Neural Information Processing Systems, pp. 2613–2621, 2010.
|
| 249 |
+
|
| 250 |
+
Hado van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double Qlearning. In Advances in Neural Information Processing Systems, 2016.
|
| 251 |
+
|
| 252 |
+
Ziyu Wang, Tom Schaul, Matteo Hessel, Hado van Hasselt, Marc Lanctot, and Nando de Freitas. Dueling network architectures for deep reinforcement learning. In International Conference on Machine Learning, 2016.
|
| 253 |
+
|
| 254 |
+
Ziyu Wang, Victor Bapst, Nicolas Heess, Volodymyr Mnih, Remi Munos, Koray Kavukcuoglu, and Nando de Freitas. Sample efficient actor-critic with experience replay. In International Conference on Learning Representations, 2017.
|
| 255 |
+
|
| 256 |
+
Paul J Werbos. A menu of designs for reinforcement learning over time. Neural networks for control, pp. 67–95, 1990.
|
| 257 |
+
|
| 258 |
+

|
| 259 |
+
Figure 6: Testing whether improved performance is caused by recency alone: $n$ denotes the number of actors, $k$ the number of times each transition is replicated in the replay. The data in the run with $n = 3 2$ , $k = 8$ is therefore as recent as the data in the run with $n = 2 5 6$ , $k = 1$ , but performance is not as good.
|
| 260 |
+
|
| 261 |
+

|
| 262 |
+
Figure 7: Varying the data-generating policies: Red: fixed set of 6 values for $\cdot$ . Blue: full range of values for $\epsilon$ . In both cases, the curve plotted is from a separate actor that does not add data to the replay memory, and which follows an $\epsilon$ -greedy policy with $\epsilon = 0 . 0 0 1 6 4$ .
|
| 263 |
+
|
| 264 |
+
# A RECENCY OF EXPERIENCE
|
| 265 |
+
|
| 266 |
+
In our main experiments we do not change the size of the replay memory in proportion to the number of actors, so by changing the number of actors we also increased the rate at which the contents of the replay memory is replaced. This means that in the experiments with more actors, transitions in the replay memory are more recent: they are generated by following policies whose parameters are closer to version of the parameters being optimized by the learner, and in this sense they are more onpolicy. Could this alone be sufficient to explain the improved performance? If so, we might be able to recover the results without needing a large number of actor machines. To test this, we constructed an experiment wherein we replicate the rate at which the contents of the replay memory is replaced in the 256-actor experiments, but instead of actually using 256 actors, we use 32 actors but add each transition they generate to the replay memory 8 times over. In this setup, the contents of the replay memory is similarly generated by policies with a recent version of the network parameters: the only difference is that the data is not as diverse as in the 256-actor case. We observe (see Figure 6) that this does not recover the same performance, and therefore conclude that the recency of the experience alone is not sufficient to explain the performance of our method. Indeed, we see that adding the same data multiple times can sometimes harm performance, since although it increases recency this comes at the expense of diversity.
|
| 267 |
+
|
| 268 |
+
Note: in principle, duplicating the added data in this fashion has a similar effect to reducing the capacity of the replay memory, and indeed, our results with a smaller replay memory in Figure 5 do corroborate the finding. However, we test also by duplicating the data primarily in order to exclude any effects arising from the implementation. In particular, in contrast to simply reducing the replay capacity, duplicating each data point means that the computational demands on the replay server in these runs are the same as when we use the corresponding number of real actors.
|
| 269 |
+
|
| 270 |
+
# B VARYING THE DATA-GENERATING POLICIES
|
| 271 |
+
|
| 272 |
+
Another factor that could conceivably contribute to the scalability of our algorithm is the fact that each actor has a different $\epsilon$ . To determine the extent to which this impacts upon the performance, we ran an experiment (see Figure 7) with some simple variations on the mechanism we use to choose the policies that generate the data we train on. The first alternative we tested is to choose a small fixed set of 6 values for $\epsilon$ , instead of the full range that we typically use. In this test, we use prioritized
|
| 273 |
+
|
| 274 |
+
replay as normal, and we find that the results with the full range of $\epsilon$ are overall slightly better.
|
| 275 |
+
However, it is not essential for achieving good results within our distributed framework.
|
| 276 |
+
|
| 277 |
+
# C ATARI: ADDITIONAL DETAILS
|
| 278 |
+
|
| 279 |
+
The frames received from the environment are preprocessed on the actor side with the standard transformations introduced by DQN. This includes greyscaling, frame stacking, repeating actions 4 times, and clipping rewards to $[ - 1 , 1 ]$ .
|
| 280 |
+
|
| 281 |
+
The learner waits for at least 50000 transitions to be accumulated in the replay before starting learning. We use a Centered RMSProp optimizer with a learning rate of $0 . 0 0 0 2 5 \mid 4$ , decay of 0.95, epsilon of 1.5e-7, and no momentum to minimize the multi-step loss (with $n = 3$ ). Gradient norms are clipped to 40. The target network used in the loss calculation is copied from the online network every 2500 training batches. We use the same network as in the Dueling DDQN agent.
|
| 282 |
+
|
| 283 |
+
# D CONTINUOUS CONTROL: ADDITIONAL DETAILS
|
| 284 |
+
|
| 285 |
+
The critic network has a layer with 400 units, followed by a tanh activation, followed by another layer of 300 units. The actor network has a layer with 300 units, followed by a tanh activation, followed by another layer of 200 units. The gradient used to update the actor network is clipped to $[ - 1 , 1 ]$ , element-wise. Training uses the Adam optimizer (Kingma & Ba (2014)) with learning rate of 0.0001. The target network used in the loss calculation is copied from the online network every 100 training batches.
|
| 286 |
+
|
| 287 |
+
Replay sampling priorities are set according to the absolute TD error as given by the critic, and are sampled by the learner using proportional prioritized sampling (see appendix F) with priority exponent $\alpha _ { \mathrm { s a m p l e } } = 0 . 6$ . To maintain a fixed replay capacity of $\mathrm { { \bar { 1 } 0 ^ { 6 } } }$ , transitions are periodically evicted using proportional prioritized sampling, with priority exponent $\alpha _ { \mathrm { e v i c t } } = - 0 . 4$ . This is a different strategy for removing data than in the Atari experiments, which simply removed the oldest data first - it remains to be seen which is superior.
|
| 288 |
+
|
| 289 |
+
Unlike the original DPG algorithm which applies autocorrelated noise sampled from a OrnsteinUhlenbeck process (Uhlenbeck & Ornstein (1930)), we apply exploration noise to each action sampled from a normal distribution with $\sigma = 0 . 3$ . Evaluation is performed using the noiseless deterministic policy. Hyperparameters are otherwise as per DQN.
|
| 290 |
+
|
| 291 |
+
Benchmarking was performed in two continuous control domains ((a) Humanoid and (b) Manipulator, see Figure 8) implemented in the MuJoCo physics simulator (Todorov et al. (2012)). Humanoid is a humanoid walker with action, state and observation dimensionalities $| { \mathcal { A } } | = 2 1$ , $| S | = 5 5$ and $| \mathcal { O } | = 6 7 $ respectively. Three Humanoid tasks were considered: walk (reward for exceeding a minimum velocity), run (reward proportional to movement speed) and stand (reward proportional to standing height). Manipulator is a 2-dimensional planar arm with $| { \mathcal { A } } | = 2$ , $| { \cal S } | = 2 2$ and $| \mathcal { O } | = 3 7 $ , which receives reward for catching a randomly-initialized moving ball.
|
| 292 |
+
|
| 293 |
+

|
| 294 |
+
Figure 8: Continuous control domains considered for benchmarking Ape-X DPG: (a) Humanoid, and (b) Manipulator. All tasks simulated in the MuJoCo physics simulator (Todorov et al. (2012)).
|
| 295 |
+
|
| 296 |
+
# E TUNING
|
| 297 |
+
|
| 298 |
+
On Atari, we performed some limited tuning of the learning rate and batch size: we found that larger batch sizes contribute significantly to performance, when using many actors. We tried batch sizes from $\{ 3 2 , 1 2 8 , 2 5 6 , 5 1 2 , 1 0 2 4 \}$ , seeing clear benefits up to 512. We attempted increasing the learning rate to 0.00025 with the larger batch sizes but this destabilized training on some games. We also tried a lower learning rate of $0 . 0 0 0 2 5 / 8$ , but this did not reliably improve results.
|
| 299 |
+
|
| 300 |
+
Likewise for continuous control, we experimented with batch sizes $\{ 3 2 , 1 2 8 , 2 5 6 , 5 1 2 , 1 0 2 4 \}$ and learning rates from $1 0 ^ { - 3 }$ to $1 0 ^ { - 5 }$ . We also experimented with the prioritization exponents $\alpha$ from 0.0 to 1.0, with results proving essentially consistent within the range [0.3, 0.7] (beyond 0.7, training would sometimes become unstable and diverge).
|
| 301 |
+
|
| 302 |
+
For the experiments with many actors, we set the period for updating network parameters on the actors to be high enough that the learner was not overloaded with requests, and we set the number of transitions that are locally accumulated on each actor to be high enough that the replay server would not be overloaded with network traffic, but we did not otherwise tune those parameters and have not observed them to have significant impact on the learning dynamics.
|
| 303 |
+
|
| 304 |
+
# F IMPLEMENTATION
|
| 305 |
+
|
| 306 |
+
The following section makes explicit some of the more practical details that may be of interest to anyone wishing to implement a similar system.
|
| 307 |
+
|
| 308 |
+
Data Storage The algorithm is implemented using TensorFlow (Abadi et al., 2016). Replay data is kept in a distributed in-memory key-value store implemented using custom TensorFlow ops, similar to the lookup ops available in core TensorFlow. The ops allow adding, reading, and removing batches of Tensor data efficiently.
|
| 309 |
+
|
| 310 |
+
Sampling Data We also implemented ops for efficiently maintaining and sampling from a prioritized distribution over the keys, using the algorithm for proportional prioritization described in Schaul et al. (2016). The probability of sampling a transition is $p _ { k } ^ { \alpha } / \sum _ { k } \bar { p _ { k } ^ { \alpha } }$ where $p _ { k }$ is the priority of the transition with key $k$ . The exponent $\alpha$ controls the amount of prioritization, and when $\alpha = 0$ uniform sampling is recovered. The proportional variant sets priority $p _ { k } \ = \ | \delta _ { k } |$ where $\delta _ { k }$ is the TD error for transition $k$ . Whenever a batch of data is added to or removed from the store, or is processed by the learner, this distribution is correspondingly updated, recording any change to the set of valid keys and the priorities associated with them.
|
| 311 |
+
|
| 312 |
+
A background thread on the learner fetches batches of sampled data from the remote replay and decompresses it using the learner’s CPU, in parallel with the gradients being computed on the GPU. The fetched data is buffered in a TensorFlow queue, so that the GPU always has data available to train on.
|
| 313 |
+
|
| 314 |
+
Adding Data In order to efficiently construct $n$ -step transition data, each actor maintains a circular buffer of capacity $n$ containing tuples $( S _ { t } , A _ { t } , R _ { t : t + B } , \gamma _ { t : t + B } , q ( S _ { t } , * ) )$ , where $B$ is the current size of the buffer. With each step, the new data is appended and the accumulated per-step discounts $\gamma _ { t : t + B }$ and partial returns $R _ { t : t + B }$ for all entries in the buffer are updated. If the buffer has reached its capacity, $n$ , then its first element may be combined with the latest state $S _ { t + n }$ and value estimates $q ( S _ { t + n } )$ to produce a valid $n$ -step transition (with accompanying Q-values).
|
| 315 |
+
|
| 316 |
+
However, instead of being directly added to the remote replay memory on each step, the constructed transitions $( S _ { t } , A _ { t } , R _ { t : t + B } , \gamma _ { t : t + B } , S _ { t + n } , q ( S _ { t } , * ) , q ( S _ { t + n } , * ) )$ are first stored in a local TensorFlow queue, in order to reduce the number of requests to the replay server. The queue is periodically flushed, at which stage the absolute $n$ -step TD-errors (and thus the initial priorities) for the queued transitions are computed in batch, using the buffered Q-values to avoid recomputation. The Q-value estimates from which the initial priorities are derived are therefore based on the actor’s copy of the network parameters at the time the corresponding state was obtained from the environment, rather than the latest version on the learner. These $\mathbf { Q }$ -values need not be stored after this, since the learner does not require them, although they can be helpful for debugging.
|
| 317 |
+
|
| 318 |
+
A unique key is assigned to each transition, which records which actor and environment step it came from, and the dequeued transition tuples are stored in the remote replay memory. As mentioned in the previous section, the remote sampling distribution is immediately updated with the newly added keys and the corresponding initial priorities computed by the actor. Note that, since we store both the start and the end state with each transition, we are storing some data twice: this costs more RAM, but simplifies the code.
|
| 319 |
+
|
| 320 |
+
Contention It is important that the replay server be able to handle all requests in a timely fashion, in order to avoid slowing down the whole system. Possible bottlenecks include CPU, network bandwidth, and any locks protecting the shared data. In our experiments we found CPU to be the main bottleneck, but this was resolved by ensuring all requests and responses use sufficiently large batches. Nonetheless, it is advisable to consider all of these potential performance concerns when designing such systems.
|
| 321 |
+
|
| 322 |
+
Asynchronicity In our framework, since acting and learning proceed with no synchronization, and performance depends on both, it can be misleading to consider performance with reference to only one of these. For example, the results after a given total number of environment frames have been experienced are highly dependent on the number of updates the learner has performed in that time. For this reason it is important to monitor and report the speeds of all parts of the system and to consider them when analyzing results.
|
| 323 |
+
|
| 324 |
+
Failure Tolerance In distributed systems with many workers, it is inevitable that interruptions or failures will occur, either due to occasional hardware issues or because shared resources are needed by higher priority jobs. All stateful parts of the system therefore must periodically save their work and be able to resume where they left off when restarted. In our system, actors may be interrupted at any time and this will not prevent continued learning, albeit with a temporarily reduced rate of new data entering the replay memory. If the replay server is interrupted, the data it contains is discarded, and upon resuming, the memory is refilled quickly by the actors. In this event, to avoid overfitting, the learner will pause training briefly, until the minimum amount of data has once again been accumulated. If the learner is interrupted, progress will stall until it resumes.
|
| 325 |
+
|
| 326 |
+

|
| 327 |
+
Figure 9: Training curves for 57 Atari games (performance against wall clock time). Green: DQN baseline. Purple: Rainbow baseline. Orange: A3C baseline. Blue: Ape-X DQN with 360 actors, 1 replay server and 1 Tesla P100 GPU learner. The anomaly in Riverraid is due to an infrastructure error.
|
| 328 |
+
|
| 329 |
+

|
| 330 |
+
Figure 10: Training curves for 57 Atari games (performance against environment frames). Only the first billion frames are shown, corresponding to 5-6 hours of training for Ape-X. Green: DQN baseline. Purple: Rainbow baseline. Blue: ApeX-DQN with 360 actors, 1 replay server and 1 Tesla P100 GPU learner.
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
Figure 11: Speed of data generation scales linearly with the number of actors.
|
| 334 |
+
|
| 335 |
+

|
| 336 |
+
Figure 12: Training curves showing performance against wall clock time for various numbers of actors on a selection of Atari games. Blue: prioritized replay, with learning rate $0 . 0 0 0 2 5 \mid 4$ . Red: uniform replay, with learning rate 0.00025. For both prioritized and uniform, we tried both of these learning rates and selected the best. Both variants benefit from larger numbers of actors, but prioritized can better take advantage of the increased amount of data. In the 256-actor run, prioritized is equal or better in 7 of 9 games.
|
| 337 |
+
|
| 338 |
+
<table><tr><td>Game</td><td>No-op starts</td><td>Human starts</td></tr><tr><td></td><td>40,804.9</td><td>17,731.5</td></tr><tr><td>alien</td><td></td><td>1,047.3</td></tr><tr><td>amidar</td><td>8,659.2</td><td></td></tr><tr><td>assault</td><td>24,559.4</td><td>24,404.6</td></tr><tr><td>asterix</td><td>313,305.0</td><td>283,179.5</td></tr><tr><td>asteroids</td><td>155,495.1</td><td>117,303.4</td></tr><tr><td>atlantis</td><td>944,497.5</td><td>918,714.5</td></tr><tr><td>bank_heist battle_zone</td><td>1,716.4</td><td>1,200.8</td></tr><tr><td>beam_rider</td><td>98,895.0</td><td>92,275.0</td></tr><tr><td>berzerk</td><td>63,305.2 57,196.7</td><td>72,233.7 55,598.9</td></tr><tr><td>bowling</td><td>17.6</td><td>30.2</td></tr><tr><td>boxing</td><td>100.0</td><td>80.9</td></tr><tr><td>breakout</td><td>800.9</td><td>756.5</td></tr><tr><td>centipede</td><td>12,974.0</td><td>5,711.6</td></tr><tr><td>chopper_command</td><td>721,851.0</td><td>576,601.5</td></tr><tr><td>crazy_climber</td><td>320,426.0</td><td>263,953.5</td></tr><tr><td>defender</td><td>411,943.5</td><td>399,865.3</td></tr><tr><td>demon_attack</td><td>133,086.4</td><td>133,002.1</td></tr><tr><td>double_dunk</td><td>23.5</td><td>22.3</td></tr><tr><td>enduro</td><td>2,177.4</td><td>2,042.4</td></tr><tr><td>fishing_derby</td><td>44.4</td><td>22.4</td></tr><tr><td>freeway</td><td>33.7</td><td>29.0</td></tr><tr><td>frostbite</td><td>9,328.6</td><td>6,511.5</td></tr><tr><td>gopher</td><td>120,500.9</td><td>121,168.2</td></tr><tr><td>gravitar</td><td>1,598.5</td><td>662.0</td></tr><tr><td>hero</td><td>31,655.9</td><td>26,345.3</td></tr><tr><td>ice_hockey</td><td>33.0</td><td>24.0</td></tr><tr><td>jamesbond</td><td>21,322.5</td><td>18,992.3</td></tr><tr><td>kangaroo</td><td>1,416.0</td><td>577.5</td></tr><tr><td>krull</td><td>11,741.4</td><td>8,592.0</td></tr><tr><td>kung_fu_master</td><td>97,829.5</td><td>72,068.0</td></tr><tr><td>montezuma_revenge</td><td>2,500.0</td><td>1,079.0</td></tr><tr><td>ms_pacman</td><td>11,255.2</td><td>6,135.4</td></tr><tr><td>name_this-game</td><td>25,783.3</td><td>23,829.9</td></tr><tr><td>phoenix</td><td>224,491.1</td><td>188,788.5</td></tr><tr><td>pitfall</td><td>-0.6</td><td>-273.3</td></tr><tr><td>pong</td><td>20.9</td><td>18.7</td></tr><tr><td>private_eye</td><td>49.8</td><td>864.7</td></tr><tr><td>qbert</td><td>302,391.3</td><td>380,152.1</td></tr><tr><td>riverraid</td><td>63,864.4</td><td></td></tr><tr><td>road_runner</td><td>222,234.5</td><td>49,982.8</td></tr><tr><td>robotank</td><td>73.8</td><td>127,111.5</td></tr><tr><td>seaquest</td><td>392,952.3</td><td>68.5</td></tr><tr><td>skiing</td><td>-10,789.9</td><td>377,179.8</td></tr><tr><td>solaris</td><td>2,892.9</td><td>-11,359.3</td></tr><tr><td>space_invaders</td><td></td><td>3,115.9</td></tr><tr><td></td><td>54,681.0</td><td>50,699.3</td></tr><tr><td>star_gunner</td><td>434,342.5</td><td>432,958.0</td></tr><tr><td>surround</td><td>7.1</td><td>5.5</td></tr><tr><td>tennis</td><td>23.9</td><td>23.0</td></tr><tr><td>time_pilot</td><td>87,085.0</td><td>71,543.0</td></tr><tr><td>tutankham</td><td>272.6</td><td>127.7</td></tr><tr><td>up_n_down</td><td>401,884.3</td><td>347,912.2</td></tr><tr><td>venture</td><td>1,813.0</td><td>935.5</td></tr><tr><td>video_pinball</td><td>565,163.2</td><td>873,988.5</td></tr><tr><td>wizard_of_wor</td><td>46,204.0</td><td>46,897.0</td></tr><tr><td>yars_revenge zaxxon</td><td>148,594.8 42,285.5</td><td>131,701.1 37,672.0</td></tr></table>
|
| 339 |
+
|
| 340 |
+
Table 2: Scores obtained by Ape-X DQN in final evaluation, under the standard no-op starts and human starts regimes. In some games the scores are higher than in the training curves: this is because the maximum episode length is shorter during training. 19
|
parse/train/H1Dy---0Z/H1Dy---0Z_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1eqviAqYX/H1eqviAqYX.md
ADDED
|
@@ -0,0 +1,452 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WHY DO NEURAL RESPONSE GENERATION MODELS PREFER UNIVERSAL REPLIES?
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Recent advances in neural Sequence-to-Sequence (Seq2Seq) models reveal a purely data-driven approach to the response generation task. Despite its diverse variants and applications, the existing Seq2Seq models are prone to producing short and generic replies, which blocks such neural network architectures from being utilized in practical open-domain response generation tasks. In this research, we analyze this critical issue from the perspective of the optimization goal of models and the specific characteristics of human-to-human conversational corpora. Our analysis is conducted by decomposing the goal of Neural Response Generation (NRG) into the optimizations of word selection and ordering. It can be derived from the decomposing that Seq2Seq based NRG models naturally tend to select common words to compose responses, and ignore the semantic of queries in word ordering. On the basis of the analysis, we propose a max-marginal ranking regularization term to avoid Seq2Seq models from producing the generic and uninformative responses. The empirical experiments on benchmarks with several metrics have validated our analysis and proposed methodology.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Past years have witnessed the dramatic progress on the application of generative sequential models (also noted as seq2seq learning (Sutskever et al., 2014; Bahdanau et al., 2015)) on Neural Response Generation (NRG) fields (Vinyals & Le, 2015; Serban et al., 2017). Seq2seq model has been proved to be capable of directly generating reply given an open domain query (Li et al., 2016c; Xing et al., 2017). Both relevant words or phrases are automatically selected, and smoothness and fluency of responses are guaranteed through the end-to-end learning. Moreover, abundant impressive humanto-machine conversation cases have been presented in many previous studies (Serban et al., 2016; Shang et al., 2015; Shao et al., 2017).
|
| 12 |
+
|
| 13 |
+
Despite these promising results, current Sequence-to-Sequence (Seq2Seq) architectures for response generation are still far from steadily generating relevant and coherent replies. The essential issue identified by many studies is the Universal Replies: the model tends to generate short and general replies which contain limited information, such as “That’s great!”, “I don’t know”, etc. (Li et al., 2016b;d; Mou et al., 2016; Xing et al., 2017). Intuitively, this problem was attributed to the vast coverage of common replies in the training set and insufficient guiding knowledge in the models’ response generation step (Mou et al., 2016; Shao et al., 2017). Hence, current efforts mainly focus on introducing external information to the model (Mou et al., 2016; Xing et al., 2017), and encouraging the model to generate diverse responses in searching space via variational beam search strategies during inference (Shao et al., 2017; Li et al., 2016b;d).
|
| 14 |
+
|
| 15 |
+
Nevertheless, most previous analysis over the issue are empirical and lack of statistical evidence. Therefore, in this paper, we conduct an in-depth investigation on the performance of seq2seq models on the NRG task. In our inspections on the existing dialog corpora, it is shown that those repeatedly appeared replies have two essential traits: 1) Most of them are composed of highly frequent words; 2) They cover a large portion of the dialog corpora that each universal reply stands for the response of various queries. Above characteristics of universal replies deviate the NRG from other successful applications of sea2seq model such as translation, and lead current generative NRG models to prefer common replies. To discuss the influences from the specific distributed corpus, we decompose the target sequence’s probability into two parts and analyze the probability respectively.
|
| 16 |
+
|
| 17 |
+
Table 1: Replies and translated version of an example which reveal the different source-target sentence distribution for dialog and translation.
|
| 18 |
+
|
| 19 |
+
<table><tr><td>Query</td><td>I would add Metropolis to the list.</td></tr><tr><td>Replies</td><td>I love this film so much. Me too,itisa beautiful film. This movie has beautiful background art. Fritz is really a good director,I like his film.</td></tr><tr><td>Translate</td><td>Brigitte cooling off on the set of Metropolis. J'ajouterais Metropolis ala liste. Je voudrais ajouter Metropolis a la liste.</td></tr></table>
|
| 20 |
+
|
| 21 |
+
To break down the mentioned characteristics of dialog corpora in the model training step, we propose a ranking-oriented regularization term to prune the scores of those irrelevant replies. Experimental results reveal that the model with such regularization can produce better results and avoid generating ambiguous responses. Also, case studies show that the issue of generic response is alleviated that these common responses are ranked relatively lower than more appropriate answers.
|
| 22 |
+
|
| 23 |
+
The main contributions of this paper are concluded as follows: 1) We analyze the loss function of Seq2seq models on NRG task and conclude several critical reasons that the NRG models prefer universal replies; 2) Based on the analysis, a max-marginal ranking regularization is presented to help the model converge to informative responses.
|
| 24 |
+
|
| 25 |
+
# 2 ANALYSIS OF SEQ2SEQ MODELS FOR NRG
|
| 26 |
+
|
| 27 |
+
Different from significant advances in machine translation (Bahdanau et al., 2015) and abstractive summarization (Rush et al., 2015; Nallapati et al., 2016), it remains challenging to apply Seq2Seq models in practical response generation. One widely accepted issue within current models is that Seq2Seq architectures are inclined to produce common and unrelated replies, even when the quality of training data is significantly improved and different Seq2Seq variants are proposed. The primary reason for this phenomenon lies in the fact that the semantic constraint from query to the possible responses is naturally weak, since the responses to a given query are not required to be semantically equivalent. In contrast, the references in machine translation or summarization are usually restricted to be equivalent to each other semantically or even lexically. Especially, for machine translation, words that appear in the target language should satisfy word level mapping from the source sentence, so the learned word alignment function could ensure the model to generate suitable translated words. Different from learning the semantic alignments between languages in NMT, in NRG the replies can be diversified as they only need to satisfy the causality with the given queries. Moreover, given a query, the sequential model is optimized to learn the shared information among all replies, thus the model is more likely to choose those high-frequent common replies, which is also mentioned in Ritter et al. (2011).
|
| 28 |
+
|
| 29 |
+
Taking the case in Table 1 for example, the topic of this query is about movie. It can be observed that the replies shown in the table are semantically diversified: the first two replies are related to the opinion of the respondent toward the movie, while the rest of the replies are about the director, content, and origin of the movie. By contrast, the two valid translations in French are very similar regarding their semantics, which can be attributed to the fixed word-level mapping between query and targets.
|
| 30 |
+
|
| 31 |
+
# 2.1 PROBLEM DECOMPOSITION
|
| 32 |
+
|
| 33 |
+
The sequence-mapping problem in NRG can be decomposed into two independent sub-learning problems: 1) Target word selection, in which a query is summarized and translated into the semantic space of responses, and then a set of target words is selected to represent the meaning; 2) Word ordering, in which a grammatical coherent reply is generated based on the candidate word set (Vinyals et al., 2016). The word selection and ordering of the target sequence are jointly learned which can also be reflected in the model’s loss function by two possible factored phases:
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 1: Response Unigram probability distribution in Table 1.
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
- \log p ( y | x ) = - \log p ( S ( y ) | x ) - \log p ( y | S ( y ) , x )
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $x$ stands for the given query and $y$ is the corresponding response with $n$ words. Besides, $\boldsymbol { S } ( y ) = \{ w _ { 1 } , \cdots , w _ { n } | \boldsymbol { \bar { w _ { i } } } \in y , \boldsymbol { \bar { i } } \in [ 1 , n ] \}$ represents all predicted words without sequential order, so $p ( \boldsymbol { S } ( y ) | \boldsymbol { x } )$ is referred as the probability of the target word selection. Meanwhile, $p ( \boldsymbol { y } | \boldsymbol { S } ( \boldsymbol { y } ) , \boldsymbol { x } )$ indicates the probability of word ordering given this group of possible words. Thus, the objective can be redescribed from maximizing the probability of the ground truth response $y$ under query $x$ to maximizing these two joint probabilities simultaneously.
|
| 43 |
+
|
| 44 |
+
After the above interpretation, we will further discuss the impact of the implicative constriction from two separated probabilities in Eq. 1, which results in the potential failure of models in learning conversational patterns.
|
| 45 |
+
|
| 46 |
+
# 2.2 TARGET WORD SELECTION PROBABILITY
|
| 47 |
+
|
| 48 |
+
Assuming that we have a set of $\kappa$ ground-truth replies: $\{ y _ { 1 } , \cdots , y _ { K } \}$ to a given query $x$ , the upper bound of the target word selection probability can be derived via Jensen’s Inequality (Boyd $\&$ Vandenberghe, 2004):
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\begin{array} { l } { \displaystyle \sum _ { k } ^ { K } \log p ( \mathcal { S } ( y _ { k } ) | x ) = \displaystyle \sum _ { k } ^ { K } \log \prod _ { w \in \mathcal { S } ( y _ { k } ) } p ( w | x ) } \\ { = \displaystyle \sum _ { w \in \cup _ { k } ^ { K } \mathcal { S } ( y _ { k } ) } \log p ( w | x ) } \\ { \leq L _ { \mathcal { S } } \log \displaystyle \sum _ { w \in \cup _ { k } ^ { K } \mathcal { S } ( y _ { k } ) } \frac { p ( w | x ) } { L _ { \mathcal { S } } } } \end{array}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $\cup _ { k } ^ { K } S ( y _ { k } )$ denotes all the words appearing in the entire response set, and $L _ { S } = | \cup _ { k } ^ { K } S ( y _ { k } ) |$ . Thus, optimizing the first segment is proportional to maximizing the last conditional probabilities, and the optimal strategy is to assign probabilities according to the frequency of words in these $\kappa$ responses. Such strategy adopted by Seq2Seq can be verified by the long-tailed distribution of words in Fig. 1, in which only few common words are assigned with preferred high probabilities. Given that, during the inference, the best strategy is to employ more frequently occurring words rather than rare ones such as “background,” “art,” and “director” in Table 1.
|
| 55 |
+
|
| 56 |
+
Furthermore, assuming that each response contains a fixed number of $T$ words (so that $1 \leq L _ { S } \leq$ $\kappa \times T )$ , we can find that the probability of each response for $x$ is inversely proportional to $\kappa$ :
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
L _ { S } \log \sum _ { w \in \cup _ { k } ^ { \kappa } { \cal S } ( y _ { k } ) } \frac { p ( w | x ) } { L _ { S } } = L _ { S } \log \frac { \mathbb { E } ( w | x ) \times T } { K \times T \times L _ { S } } \propto \log \frac { 1 } { ( K \times L _ { S } ) ^ { L _ { S } } } \leq \log \frac { 1 } { K }
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $\mathbb { E } ( w | x )$ denotes the mean frequency of words appeared in these $\kappa$ replies, which is 1.32 for the cases in Table 1. In general, the mean frequency is around 1 owing to the long-tailed Unigram distribution which satisfies Zipf’s law (Zipf, 1935). In other words, the target word selection
|
| 63 |
+
|
| 64 |
+
probability is limited by $\kappa$ , so queries with more diverse answers are more challenging to learn. Meanwhile, it is difficult to obtain good predictions for lower-informational queries, as they contain more possible responses which are somewhat equivalent to a larger $\kappa$ (Li et al., 2016a).
|
| 65 |
+
|
| 66 |
+
Nonetheless, the translation task requires word-level mappings as they are well-aligned in the semantic space, therefore source and target sentences are semantically equivalent. So that, translated candidates are confined to $\kappa \approx 1$ . Thus the upper bound can be approximated as the full probability.
|
| 67 |
+
|
| 68 |
+
# 2.3 WORD ORDERING PROBABILITY
|
| 69 |
+
|
| 70 |
+
# 2.3.1 LEMMAS
|
| 71 |
+
|
| 72 |
+
Before discussing the word ordering probability, we present four lemmas and corresponding proofs.
|
| 73 |
+
Moreover, all these lemmas are only available for the response generation task except Lemma 1.
|
| 74 |
+
|
| 75 |
+
According to the Zipf’s law (Zipf, 1935), the frequency of any word is inversely proportional to its rank in the frequency table, such that the probability $p ( w _ { i } ) = Z / i ^ { \alpha }$ , where $Z \approx 0 . 1$ , $\alpha \approx 1$ , and $i$ is the frequency rank of the word $w _ { i }$ . Then, denoting the vocabulary size as $V$ and the total number of query-response pairs as $N$ , we can formulate two characteristics of a universal reply $y$ as follows:
|
| 76 |
+
|
| 77 |
+
1) A response is universal if it consists of only top- $\mathbf { \nabla } \cdot t$ ranked words. For any word $w$ in such response, $p ( w ) \geq 1 / ( 1 0 t )$ according to the Zipf’s law.
|
| 78 |
+
|
| 79 |
+
2) The amount of possible queries $M$ of $y$ is directly proportional to the size of query-response pairs $N$ , noted as $1 \ll M \propto N$ .
|
| 80 |
+
|
| 81 |
+
To simplify, we suppose that $t > 1 0 0 0$ to cover most universal replies, and the frequency of the response not belonging to the universal replies is a constant $c$ $1 \leq c \ll M$ ). Accordingly, we can derive the following lemmas.
|
| 82 |
+
|
| 83 |
+
Lemma 1 $p ( \boldsymbol { S } ( y ) | y ) = 1$ $\begin{array} { r } { \mathbf { \Phi } _ { I } ) \vert y \rangle = 1 , p ( S ( y ) , y ) = p ( y ) , p ( x , y , S ( y ) ) = p ( x , y ) . } \end{array}$
|
| 84 |
+
|
| 85 |
+
Proof. Lemma 1 describes the obvious fact that the event “the word set of the response equals to $\boldsymbol { S } ( y ) ^ { \flat }$ must happen when the event ${ \ " } y$ stands for the response” is established.
|
| 86 |
+
|
| 87 |
+
Lemma 2 $p ( x | y _ { u r } ) = \epsilon _ { 1 }$ , where $\epsilon _ { 1 } > 0$ and is sufficiently small, and $y _ { u r }$ is a universal reply.
|
| 88 |
+
|
| 89 |
+
Proof. Based on the second character of the universal reply and the fact that $N$ is a very large number for any large scaled datasets, Lemma 2 is established as: $\begin{array} { r } { \dot { p } ( x | y _ { u r } ) = \frac { 1 } { M } \propto \frac { 1 } { N } = \epsilon _ { 1 } } \end{array}$
|
| 90 |
+
|
| 91 |
+
Lemma 3 $\begin{array} { r } { \sum _ { i } p ( y _ { i } ^ { u r } | S ( y ) ) 1 } \end{array}$ , $p ( y _ { j } ^ { o } | S ( y ) ) = \epsilon _ { 2 }$ , where $\epsilon _ { 2 } > 0$ and is sufficiently small, $y _ { i } ^ { u r }$ stands for the $i$ -th universal reply and $\check { y } _ { j } ^ { o }$ is the $j$ -th non-universal grammatical replies, meanwhile, ${ \cal S } ( y _ { i } ^ { u r } ) \subseteq { \cal S } ( y )$ and $S ( y _ { j } ^ { o } ) \subseteq S ( y )$
|
| 92 |
+
|
| 93 |
+
Proof. According to the following inequation $\begin{array} { r } { \sum _ { i } ^ { t } \frac { 1 } { i } ~ > ~ \int _ { 1 } ^ { t + 1 } \frac { 1 } { x } d x = l n ( t + 1 ) } \end{array}$ , we can get the conclusion that the probability of a chosen word belonging to the most frequent $t$ words is large than $0 . 1 * l n ( t + 1 ) > 0 . 6 9$ . Since $y$ contains $T$ words, there is at least $T l n ( t + 1 )$ words belonging to the top-t ranked on average according to the binomial distribution.
|
| 94 |
+
|
| 95 |
+
We suppose $m$ responses are universal replies among the $n$ possible responses when their words are constrained by $\bar { \mathcal { S } } ( \bar { y } )$ . Besides, the proportion of $\mathbf { m }$ can be computed as:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\begin{array} { l } { \displaystyle \frac { m } { n } = \sum _ { i = 1 } ^ { T l n ( t + 1 ) } \frac { C _ { T } ^ { i } } { \sum _ { j = 1 } ^ { T } C _ { T } ^ { j } } \ast \frac { 1 } { 1 0 } l n ( t + 1 ) } \\ { \displaystyle = \frac { 2 ^ { T } - \sum _ { i = T l n ( t + 1 ) } ^ { T } C _ { T } ^ { i } } { 2 ^ { T } } \ast \frac { 1 } { 1 0 } l n ( t + 1 ) } \\ { \displaystyle > \frac { 1 } { 2 0 } l n ( t + 1 ) } \\ { \displaystyle > 0 . 3 4 } \end{array}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where $C$ donates the combination. Since $n / m$ is not a very large number, the total probability of these $m$ replies can be deducted as:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\begin{array} { l } { \displaystyle \sum _ { i } p ( y _ { i } ^ { u r } | \mathcal S ( y ) ) = \frac { \sum _ { i } ^ { m } f ( y _ { i } ^ { u r } ) } { \sum _ { i } ^ { m } f ( y _ { i } ^ { u r } ) + \sum _ { i } ^ { n - m } f ( Y _ { i } ^ { o } ) } } \\ { = \frac { M * m } { M * m + c * ( n - m ) } } \\ { = \frac { M } { M + n / m - c } } \\ { > \frac { M } { M + 3 - c } } \end{array}
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
where $f ( y )$ donates the frequency of a response $y$ in the corpus. According to the Eq. 5 and the fact that $M \propto N$ is a very large number for any practical large-scale datasets, $\begin{array} { r } { \sum _ { i } p ( \bar { y _ { i } ^ { u r } } | S ( y ) ) 1 } \end{array}$ can be established. Apparently, for any other candidate response $y _ { j } ^ { o }$ , its probability satisfies $\begin{array} { r } { p ( y _ { j } ^ { o } | S ( y ) ) < 1 - \sum _ { i } p ( y _ { i } ^ { u r } | S ( y ) ) = \epsilon _ { 2 } } \end{array}$ .
|
| 108 |
+
|
| 109 |
+
Lemma 4 Assuming each informative query has $\kappa$ ground-truth replies and the query-response pairs are extracted from a multi-turn conversational corpus, a reply y not belonging to universal replies has $\kappa$ unique queries, noted as $\begin{array} { r } { p ( x | y ) = \frac { 1 } { \mathcal { K } } } \end{array}$ .
|
| 110 |
+
|
| 111 |
+
Proof. Most query-response pairs are extracted from a practical large-scale multi-turn conversational corpus, so that any response always works as the post in another pair. That is, $y$ also appears $\kappa$ times as it also has $\kappa$ replies. Therefore, there also exist $\kappa$ unique posts for $y$ .
|
| 112 |
+
|
| 113 |
+
# 2.3.2 DISCUSSION
|
| 114 |
+
|
| 115 |
+
On the basis of Lemma 1, the word ordering probability could be deducted as:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
\begin{array} { r l } { \iota o g p ( y | S ( y ) , x ) = l o g \frac { p ( S ( y ) | y ) p ( y ) p ( x | \cdot | S ( y ) ) } { p ( S ( y ) ) p ( x | S ( y ) ) } } \\ & { = l o g 1 + l o g \frac { p ( y ) } { p ( S ( y ) ) } + l o g \frac { p ( x | y ) , S ( y ) ) } { p ( x | S ( y ) ) } } \\ & { = l o g \frac { p ( y , S ( y ) ) } { p ( S ( y ) ) } + l o g \frac { p ( x , y , S ( y ) ) p ( S ( y ) ) } { p ( y , S ( y ) ) p ( x , S ( y ) ) } } \\ & { = l o g p ( y | S ( y ) ) + l o g \frac { p ( x , y , y ) p ( S ( y ) ) } { p ( y , S ( y ) ) p ( x , S ( y ) ) } } \\ & { = l o g p ( y ) S ( y ) + l o g \frac { p ( x , y ) p ( S ( y ) ) } { p ( y ) p ( x , S ( y ) ) } } \\ & { = l o g p ( y ) S ( y ) ) + l o g \frac { p ( x | y ) } { p ( x ) S ( y ) } } \\ & { = l o g p ( y ) S ( y ) ) + l o g \frac { p ( x | y ) } { p ( x ) S ( y ) } } \end{array}
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
All the possible $y _ { i }$ satisfying $S ( y _ { i } ) \subseteq S ( y )$ can be divided into three categories: ground-truth reply $y$ , universal replies $y ^ { u r }$ and other replies $y ^ { o }$ . From above, we can get the following direct proportion according to the Lemma 2 and Lemma 3,
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\begin{array} { l } { { \displaystyle \sum _ { i } p ( x | y _ { i } ) p ( y _ { i } | S ( y ) ) } \ ~ } \\ { { \displaystyle = p ( x | y ) p ( y | S ( y ) ) + \sum _ { i } p ( x | y _ { i } ^ { u r } ) p ( y _ { i } ^ { u r } | S ( y ) ) + \sum _ { i } p ( x | y _ { i } ^ { o } ) p ( y _ { i } ^ { o } | S ( y ) ) } } \\ { { \displaystyle \propto p ( x | y ) p ( y | S ( y ) ) + \epsilon _ { 1 } + \epsilon _ { 2 } } } \end{array}
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
On the basis of Eq. 7 and Lemma 4, for any reply $y$ not belonging to universal replies, the Eq. 6 can be further deducted as:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\mathit { l o g p } ( y | S ( y ) , x ) \propto \mathit { l o g p } ( y | S ( y ) ) + \mathit { l o g } \frac { p ( x | y ) } { p ( x | y ) p ( y | S ( y ) ) + \epsilon } \propto \mathit { l o g } \frac { p ( y | S ( y ) ) } { p ( y | S ( y ) ) + K \epsilon }
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
where $\epsilon = \epsilon _ { 1 } + \epsilon _ { 2 } > 0$ , which is also a sufficiently small positive value. Thus, optimizing the word ordering probability for the non-universal replies is partially equivalent to maximizing $\bar { p } ( y | S ( y ) )$ . In fact the term $p ( \boldsymbol { y } | \boldsymbol { S } ( \boldsymbol { y } ) )$ is the language model probability and it is irrelevant with the query $x$ (Maning et al., 2009). In the sequential models, it is performed as $\begin{array} { r } { \prod _ { t } p ( y _ { t } | y _ { 1 : t - 1 } , S ( y ) ) } \end{array}$ , in other words the sequences are generated based only on previously outputted words. This equation indicates that optimizing the mainly seeks the grammatical competence based on the selected words.
|
| 134 |
+
|
| 135 |
+
# 2.4 BRIEF SUMMARY
|
| 136 |
+
|
| 137 |
+
In conclusion, the insufficient constraint of the target words’ cross-entropy loss in NRG is the primary reason that hinders seq2seq models from exploring presumable parameters. This situation is mainly caused by the particular distribution of NRG corpus, since there exist many universal replies composed of high-frequent words in corpus. Consequently, the model tends to promotes such universal replies, regardless of the given query.
|
| 138 |
+
|
| 139 |
+
# 3 MAX-MARGINAL RANKING REGULARIZATION
|
| 140 |
+
|
| 141 |
+
As discussed above, various responses corresponding to the same query appearing in the training data leads to the undesired preference of NRG on universal replies, so an intuitive solution is removing the multiple replies and just keeping one-to-one pairs. However, filtering the training dataset in large scale raises the difficulty of model training. Besides, naively removing the multiple replies is detrimental to the reply diversity, which is important in NRG task. As shown in Table 1, an ideal chatbot agent is prospected to provide all listed replies and build a connection with some keywords such as ‘film’, ‘background’, ‘director’ and ‘book’, rather than other commonly appeared words like ‘I’, ‘him’, ‘a’ and ‘really’.
|
| 142 |
+
|
| 143 |
+
Thus, under this assumption, we propose a max-marginal ranking loss to emphasize the queries’ impact on these less common but relevant words. During training, as it becomes a necessity to constrain the learned feature space and reinforce related replies with more discriminative information, we classify the candidate responses into two categories: positive (i.e., highly related) and negative (i.e., irrelevant) answers. A training instance is re-constructed as a triplet $( x , y , y ^ { - } )$ , where a tuple $( x , y )$ is the original query-response pair and noise $y ^ { - }$ is uniformly sampled from all of the responses in the training data. Given that, the model’s loss function is reconstructed as:
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
\ell _ { \theta } = - \log p ( y | x ) + \lambda \operatorname* { m a x } \{ 0 , - \log p ( y | x ) + \log p ( y ^ { - } | x ) + \gamma \}
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
where $\gamma > 0$ , $\log p ( y | x )$ denotes the cross-entropy loss between the model’s prediction and ground truth sequences, and the second part encourages the separation between the irrelevant responses and related replies. Moreover, the hyper-parameter $\lambda$ defines the penalty for the seq2seq loss, it offers a degree of freedom to control the importance of the max-marginal between the positive and negative instances. The model is trained in the same setting as the conventional model when $\lambda = 0$ .
|
| 150 |
+
|
| 151 |
+
The gradient of $\ell _ { \theta }$ is computed using the sub-gradient method, as the second term is nondifferentiable but convex (Agarwal & Collins, 2010). Supposing $\log p ( y | x ) - \log p ( y ^ { - } | x ) \leq \gamma$ , the gradient of the composed loss function can be formalized as:
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\nabla _ { \boldsymbol { \theta } } \ell _ { \boldsymbol { \theta } } = - \nabla _ { \boldsymbol { \theta } } \log { p ( \boldsymbol { y } | \boldsymbol { x } ) } ,
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
If $\log p ( y | x ) - \log p ( y ^ { - } | x ) > \gamma$ , then the gradient should be written as:
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
\nabla _ { \boldsymbol { \theta } } \ell _ { \boldsymbol { \theta } } = - ( \lambda + 1 ) \nabla _ { \boldsymbol { \theta } } \log p ( \boldsymbol { y } | \boldsymbol { x } ) + \lambda \nabla _ { \boldsymbol { \theta } } \log p ( \boldsymbol { y } ^ { - } | \boldsymbol { x } ) .
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
The underlying motivation of our proposed loss function is based on three considerations: 1) Universal replies are more likely to be sampled from a statistical perspective, so adding a negative term would directly ease the weight of these generic responses, and the ranking regularization can penalize those irrelevant responses; 2) Positive and negative sentences overall share a same set of generic words, which suggests that the loss optimization should pay more attention on those different words rather than generic ones; 3) Only differentiable loss can solely be served as the model’s optimization goal for the sequence generation model. Furthermore, the newly proposed loss aims to penalize frequent words and irrelevant candidates, rather than repudiating the literal expression included in negative samples. Consequently, based on these considerations, we propose this term as a regularization to constrain the search space of parameters instead of the stand-alone loss function.
|
| 164 |
+
|
| 165 |
+
Table 2: Dataset statistics. For multiple replies, the three values represent the percentages of queries with one, two, and more than two responses, respectively. For the out of vocabulary (OOV) columns, the number in front of “/” denotes the percentage rate of the query, and the other one denotes replies.
|
| 166 |
+
|
| 167 |
+
<table><tr><td></td><td># train</td><td># valid</td><td>#test</td></tr><tr><td>QA Pairs</td><td>5,982,868</td><td>315,136</td><td>315,136</td></tr><tr><td>Unique Replies</td><td>4,499,176</td><td>298,723</td><td>287,312</td></tr><tr><td>Multi Replies(%)</td><td>70/24/6</td><td>97/2/1</td><td>96/3/1</td></tr><tr><td>0OV (%)</td><td>.90/.90</td><td>.92/.93</td><td>.91/.92</td></tr><tr><td>Vocab Size</td><td></td><td>29241/27859</td><td></td></tr></table>
|
| 168 |
+
|
| 169 |
+
# 4 EXPERIMENTAL STUDIES
|
| 170 |
+
|
| 171 |
+
4.1 EXPERIMENTAL SETUPS
|
| 172 |
+
|
| 173 |
+
# 4.1.1 DATASET DESCRIPTION
|
| 174 |
+
|
| 175 |
+
The dataset used in this study contained almost ten million query and response pairs collected from a popular Chinese social media site: Douban Group Chat1. All case studies used in this paper were extracted from this dataset and translated into English.
|
| 176 |
+
|
| 177 |
+
For easier training and better efficiency, the maximal lengths of queries and replies were set to 30 and 50 respectively. In all of our experiments, our dataset was split into the training, validation and test sets, with detailed statistical characterization given in Table 2. Thirty percent of queries had more than one responses, and each answer appeared about 1.33 times in the training dataset, which is consistent with our hypothesis in the analysis section.
|
| 178 |
+
|
| 179 |
+
# 4.1.2 BASELINE MODELS
|
| 180 |
+
|
| 181 |
+
To validate the performance of the proposed model, the following baselines were considered:
|
| 182 |
+
|
| 183 |
+
• S2SA: The basic seq2seq model with attention mechanism (Bahdanau et al., 2015) at the target output side.
|
| 184 |
+
• $\mathrm { S } 2 \mathrm { S A } + \mathrm { M M I }$ : The best performing model in Li et al. (2016b) with the length norm based on the same S2SA.
|
| 185 |
+
• Ranking-Reg: The seq2seq model with proposed ranking regularization and attention. In this model, negative samples were uniformly sampled from the corpus, and the process was repeated 4 times for every positive case. The averaged negative loss was calculated as the probability of universal replies.
|
| 186 |
+
• Ranking- $\mathbf { \nabla \cdot R e g + M M I }$ : Ranking-Reg with MMI during inference procedure.
|
| 187 |
+
|
| 188 |
+
# 4.1.3 EVALUATION METRICS
|
| 189 |
+
|
| 190 |
+
The quality of response was measured using both numeric metrics and human annotators. Firstly, Word Perplexity (PPL) is used to measure the model’s ability to account for the syntactic structure for each utterance (Serban et al., 2016). Secondly, ROGUE score (Lin, 2004), which evaluates the extent of overlapping words between the ground-truth and predicted replies, was also adopted in experiments. Thirdly, we employed the widely used diversity measurements Distinct-1 and Distinct2 to evaluate the number of distinct Unigrams and Bigrams of generated responses (Li et al., 2016b).
|
| 191 |
+
|
| 192 |
+
Furthermore, we recruited three highly educated human annotators to cross verify the quality of generated responses. We randomly sampled 100 queries and generated 10 replies for each query using different models, with beam size set to 10. The labeled results were categorized into three degree (Xing et al., 2017; Mou et al., 2016):
|
| 193 |
+
|
| 194 |
+
Table 3: Summarized results of testing set with metrics: Human Label, ROGUE-1, ROGUE-L, Distinct-1, Distinct-2 and PPL.
|
| 195 |
+
|
| 196 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="3">Human Label</td><td colspan="2">ROUGE</td><td colspan="2">Distinct</td><td rowspan="2">PPL</td></tr><tr><td>0</td><td>1</td><td>2</td><td>ROUGE-1</td><td>ROUGE-L</td><td>1</td><td>2</td></tr><tr><td>S2SA</td><td>52.46%</td><td>20.52%</td><td>27.02%</td><td>4.97%</td><td>3.13%</td><td>.129</td><td>.285</td><td>110.0</td></tr><tr><td>S2SA +MMI</td><td>51.88%</td><td>19.92%</td><td>28.20%</td><td>3.96%</td><td>2.77%</td><td>.140</td><td>.312</td><td>110.0</td></tr><tr><td>Rank-Reg</td><td>48.20%</td><td>15.38%</td><td>36.42%</td><td>3.45%</td><td>2.55%</td><td>.163</td><td>.358</td><td>85.6</td></tr><tr><td>Rank-Reg + MMI</td><td>47.40%</td><td>18.75%</td><td>33.85%</td><td>3.43%</td><td>2.63%</td><td>.167</td><td>.345</td><td>85.6</td></tr></table>
|
| 197 |
+
|
| 198 |
+
0: The response cannot be used as a reply to the message. It is either semantically irrelevant or not fluent (e.g., with grammatical errors or UNK).
|
| 199 |
+
|
| 200 |
+
1: The response can be used as a reply to the message, which includes the universal replies such as “Yes, I see” , “Me too” and “I dont know”.
|
| 201 |
+
|
| 202 |
+
2: The response is not only relevant and natural, but also informative and interesting.
|
| 203 |
+
|
| 204 |
+
# 4.1.4 TRAINING PROCEDURES
|
| 205 |
+
|
| 206 |
+
For all of the models, LSTM was chosen as the recurrent cell, and there were 512 hidden units for both the encoder and decoder (Greff et al., 2017). Embedding size and batch size were set to 200 and 20 respectively. The Adam algorithm was employed for gradient optimization (Kingma & Ba, 2015), and the initial learning rate was 1e-4. All of the models were implemented in Theano (Theano Development Team, 2016), and each ran on a standalone K40m GPU device for 7 epochs, which took 7 days; twice longer time was required for training models with rank regularization.
|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
Figure 2: Learning curve for the two models.
|
| 210 |
+
|
| 211 |
+
The last two models with the rank regularization share the related hyper-parameters. We set $\lambda$ to 0.1 and $\gamma$ to 0.18, according to the model’s performance on the validation set.
|
| 212 |
+
|
| 213 |
+
Fig. 2 shows cross-entropy loss flows vs. training epoch numbers. The model with max-marginal ranking regularization converges faster than S2SA throughout the training. This shows that the additional regularization term helps to speed up the fitting by removing these sub-optimal paths.
|
| 214 |
+
|
| 215 |
+
# 4.2 RESULTS AND ANALYSIS
|
| 216 |
+
|
| 217 |
+
# 4.2.1 EXPERIMENTAL RESULTS.
|
| 218 |
+
|
| 219 |
+
The performance of four models on existing metrics is summarized in Table 3. The model with the max-marginal ranking regularization outperforms the model with primary loss function on the target loss PPL. As the MMI method is performing during inference, losses of models with MMI are identical to those without revision.
|
| 220 |
+
|
| 221 |
+
However, the results are opposite regarding the ROGUE scores. The generated responses by the S2SA model contain more words appearing in the ground truth answers. These experimental results can be attributed to mainly two factors. a) The very low ROUGE scores reflect few words shared by any predictions and the ground truth. Most n-gram overlaps belonging to the common words, such as “I”, “are”, “that”. b) A certain proportion of replies in the test set are universal themselves. Therefore, S2SA has achieved higher ROUGE score as its’ results are more consistent with those common ground truth responses.
|
| 222 |
+
|
| 223 |
+
University are far away, and the city's most famous commercial street are near to me.Query:
|
| 224 |
+
|
| 225 |
+
# Replies from $\mathbf { S } 2 \mathbf { S } + .$ Attention:
|
| 226 |
+
|
| 227 |
+
# Replies from Ranking Loss :
|
| 228 |
+
|
| 229 |
+
1) Where is your home?
|
| 230 |
+
2) Where is your city?
|
| 231 |
+
3) Where is your location?
|
| 232 |
+
4) Where is your hometown?
|
| 233 |
+
5) Where is your city, hn?
|
| 234 |
+
6) Where is your location?
|
| 235 |
+
7) Where is your home, mine
|
| 236 |
+
1) Joy City Shopping mall?
|
| 237 |
+
2) Is shopping mall?
|
| 238 |
+
3) Joy City Shopping mall!
|
| 239 |
+
4) Where is your location?
|
| 240 |
+
5) Where?
|
| 241 |
+
6) Near that <unk> road.
|
| 242 |
+
7) That Joy City shopping mall is great.
|
| 243 |
+
|
| 244 |
+

|
| 245 |
+
|
| 246 |
+
Most Banks are not reliable.Query:
|
| 247 |
+
|
| 248 |
+
# Replies from $\mathbf { S } 2 \mathbf { S } +$ Attention:
|
| 249 |
+
|
| 250 |
+
# Replies from Ranking Loss :
|
| 251 |
+
|
| 252 |
+

|
| 253 |
+
Figure 3: Response re-rank capability. Responses generated by the basic model and model with rank loss are linked by arrows, and same topics are typeset using the same color. Some ungrammatical and incomprehensible sentences exist due to the translating try to keep the word order.
|
| 254 |
+
|
| 255 |
+
The human evaluation is the most important metric, and it is clear from Table 3 that the models with rank regularization beat S2SA with a large margin. It increases the number of meaningful responses by around $10 \%$ and reduces the number of irrelevant cases by around $4 \%$ . Meanwhile, most the acceptable replies (labeled as “1” or “2”) of S2SA is labeled as “1”, which indicates the model prefer the safe responses. We attribute the gaps to the promotion of highly related words and reducing of the universal replies. Same trend can be also spotted on Distinct-1 and Distinct-2, it reveals the model’s ability to generate diverse responses (Li et al., 2016b; Serban et al., 2015). The seq2seq model yields lower levels of unigram and bigram diversity than the rank loss model.
|
| 256 |
+
|
| 257 |
+
As another comparison, we note that the improvement introduced by MMI is much smaller than that introduced by the ranking regularization, whereas MMI is a widely used mechanism for promoting diverse responses during inference. Besides, performing it upon the regularization reduces the rate of informative and interesting responses. This observation indicates that the fundamental reason behind generating tasteless or inappropriate replies is that Seq2Seq model learned from conversational corpora prefers universal replies. Moreover, the revision during the greedy search is less effective on solving the underlying problems than the proposed ranking regularization.
|
| 258 |
+
|
| 259 |
+
# 4.2.2 RANKING LOSS FOR GENERIC RESPONSES.
|
| 260 |
+
|
| 261 |
+
From the generated results, it is found that the seq2seq model with the ranking regularization term prefers meaningful content when the query contains sufficient amount of information. We present top responses for two queries generated by different models in Fig. 3. As shown in the first case, user posts a query which initiates a complicated discussion about locations. It is observed that S2SA converges to a typical “where is your” pattern of replies when discussing locations, which is an example of universal replies. As the greedy beam search strategy is utilized during inference, many location-related constraints further promote these relevant universal replies instead of more varied results from different beams. In contrast, some of the responses in the right column captured the “commercial street” clues and inferred a possible location “Joy City shopping mall” demoting the generic beams results. We attributed this to the boosting ability associated with semantically relevant words, as mentioned in Section 3.
|
| 262 |
+
|
| 263 |
+
The second case is quite different. In this case, the seq2seq model did not perform satisfactorily. Even though the subject “bank” was extracted into the generated candidates, we cannot perceive the results aligned with the same “not reliable” topic, and most of them were just chosen from two beams. Inspecting the replies generated by the rank loss model, we found that more complicated and diverse sentences that discuss “unreliable” can be generated, and irrelevant answers about “bank” are lower-ranked. To further investigate the difference brought by the max-marginal ranking regularization, we randomly sampled more cases shown in the Fig. 4 as appendix. Even though some of them were bad cases and contained some grammatical errors, overall the model with rank regularization tends to generate more informative and interesting sentences compared with baselines.
|
| 264 |
+
|
| 265 |
+
In conclusion, the seq2seq model with rank regularization can not only formulate the conditional language model but also boost related answers to higher ranks than the rest of universal or inappropriate replies.
|
| 266 |
+
|
| 267 |
+
# 5 RELATED WORK
|
| 268 |
+
|
| 269 |
+
Recent years have witnessed the rapid development of data-driven dialog models with the help of accumulated conversational data from online communities. Query-response pairs are modeled by Seq2Seq models with attention mechanism (Sutskever et al., 2014; Serban et al., 2016; Bahdanau et al., 2015), and NRG model are designed to maximize the likelihood of target response given the source query. As there exist various reasonable responses given a query, some researches conclude that the limited information in many queries constrains the model inference, which makes the NRG models prefer universal replies (Shao et al., 2017; Mou et al., 2016).
|
| 270 |
+
|
| 271 |
+
To address this issue, various works are conducted on bringing more information to Seq2Seq models. Some works focus on constraining the replies with topic information or keywords (Mou et al., 2016; Xing et al., 2017; Wang et al., 2017; Wu et al., 2018). Other researchers argue that diverse responses are buried by the greedy beam-search rules (Li et al., 2016b), so their works mainly focus on involving more punishment or randomness in the inference stages. For example, Li et al. (2016b) constrain the search space using mutual information with the query, while Shao et al. (2017) randomly chose candidate words from top beams to constrain short phrases. These existing works mainly focus on the generation strategies during inference, in contrast, the model’s architecture and loss function have rarely been explored.
|
| 272 |
+
|
| 273 |
+
Serban et al. (2017) introduce to model the underlying distribution over possible replies directly with supposing various latent variables to affect the response generation. Shen et al. (2017) further constructs a variational lower bound for response constraint. During inference, these models generate responses by first sampling an assignment of latent variables, so that models can generate more diverse responses. Such methods attempt to improve the diversity of responses by modifying the Seq2Seq architecture, and our analysis may be also helpful to design more effective latent variable based models to restrain current problems. Besides, the ranking penalty has also been used by Wiseman & Rush (2016), they employ a word-level margin to promote ground-truth sequences appearing in the beam search results. Different from our method, they directly optimize the beam search procedure to fine-tune the trained model.
|
| 274 |
+
|
| 275 |
+
# 6 CONCLUSION
|
| 276 |
+
|
| 277 |
+
Eliminating generic responses is the essence for the widely practical utilization of the Seq2Seq based neural response generation architectures, and thus, this paper has conducted a thorough investigation on the cause of such uninformative responses and proposed the solution from the statistical perspective. The main contributions of this work can be summarized as follows: a) The theoretical analysis is performed to capture the root reason of NRG models producing generic responses through the optimization goal of models and the statistical characteristics of human-to-human conversational corpora, which has been little studied currently. In detail, we have decomposed the goal of NRG into the optimizations of word selection and word ordering, and finally derived that NRG models tend to select common words as responses and order words from the language model perspective which ignores queries. b) According to the analysis, a max-marginal ranking regularization term is proposed to cooperate with the learning target of Seq2Seq, so as to help NRG models converge to the status of producing informative responses, rather than merely manipulating the decoding procedure to constrain the generation of universal replies. Furthermore, the empirical experiments on the conversation dataset indicate that the models utilizing this strategy notably outperform the current baseline models.
|
| 278 |
+
|
| 279 |
+
# REFERENCES
|
| 280 |
+
|
| 281 |
+
Shivani Agarwal and Michael Collins. Maximum margin ranking algorithms for information retrieval. In Proc. of ECIR, pp. 332–343, 2010.
|
| 282 |
+
|
| 283 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proc. of ICLR, 2015.
|
| 284 |
+
|
| 285 |
+
Stephen Boyd and Lieven Vandenberghe. Convex Optimization. Cambridge University Press, New York, NY, USA, 2004. ISBN 0521833787.
|
| 286 |
+
|
| 287 |
+
Klaus Greff, Rupesh K Srivastava, Jan Koutn´ık, Bas R Steunebrink, and Jurgen Schmidhuber. Lstm: ¨ A search space odyssey. IEEE transactions on neural networks and learning systems, 28(10): 2222–2232, 2017.
|
| 288 |
+
|
| 289 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. international conference on learning representations, 2015.
|
| 290 |
+
|
| 291 |
+
Chaozhuo Li, Yu Wu, Wei Wu, Chen Xing, Zhoujun Li, and Ming Zhou. Detecting context dependent messages in a conversational environment. In Proc. of COLING, pp. 1990–1999, 2016a.
|
| 292 |
+
|
| 293 |
+
Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. A diversity-promoting objective function for neural conversation models. In Proc. of NAACL-HLT, pp. 110–119, 2016b.
|
| 294 |
+
|
| 295 |
+
Jiwei Li, Michel Galley, Chris Brockett, Georgios P. Spithourakis, Jianfeng Gao, and William B. Dolan. A persona-based neural conversation model. In Proc. of ACL, pp. 994–1003, 2016c.
|
| 296 |
+
|
| 297 |
+
Jiwei Li, Will Monroe, and Dan Jurafsky. A simple, fast diverse decoding algorithm for neural generation. CoRR, abs/1611.08562, 2016d.
|
| 298 |
+
|
| 299 |
+
Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Proc. of ACL workshop, volume 8, 2004.
|
| 300 |
+
|
| 301 |
+
Christopher Maning, Prabhaker Raghavan, and Hinrich Schtze. An introduction to information retrieval. 2009.
|
| 302 |
+
|
| 303 |
+
Lili Mou, Yiping Song, Rui Yan, Ge Li, Lu Zhang, and Zhi Jin. Sequence to backward and forward sequences: A content-introducing approach to generative short-text conversation. In Proc. of COLING, pp. 3349–3358, 2016.
|
| 304 |
+
|
| 305 |
+
Ramesh Nallapati, Bowen Zhou, C´ıcero Nogueira dos Santos, C¸ aglar Gulc¸ehre, and Bing Xiang. ¨ Abstractive text summarization using sequence-to-sequence rnns and beyond. In Proc. of CoNLL, pp. 280–290, 2016.
|
| 306 |
+
|
| 307 |
+
Alan Ritter, Colin Cherry, and William B. Dolan. Data-driven response generation in social media. In Proc. of EMNLP, pp. 583–593, 2011.
|
| 308 |
+
|
| 309 |
+
Alexander M Rush, Sumit Chopra, and Jason Weston. A neural attention model for abstractive sentence summarization. empirical methods in natural language processing, pp. 379–389, 2015.
|
| 310 |
+
|
| 311 |
+
Iulian Vlad Serban, Ryan Lowe, Peter Henderson, Laurent Charlin, and Joelle Pineau. A survey of available corpora for building data-driven dialogue systems. CoRR, abs/1512.05742, 2015.
|
| 312 |
+
|
| 313 |
+
Iulian Vlad Serban, Alessandro Sordoni, Yoshua Bengio, Aaron C. Courville, and Joelle Pineau. Building end-to-end dialogue systems using generative hierarchical neural network models. In Proc. of AAAI, pp. 3776–3784, 2016.
|
| 314 |
+
|
| 315 |
+
Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron C Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. In AAAI, pp. 3295–3301, 2017.
|
| 316 |
+
|
| 317 |
+
Lifeng Shang, Zhengdong Lu, and Hang Li. Neural responding machine for short-text conversation. In Proc. of ACL, pp. 1577–1586, 2015.
|
| 318 |
+
|
| 319 |
+
Yuanlong Shao, Stephan Gouws, Denny Britz, Anna Goldie, Brian Strope, and Ray Kurzweil. Generating high-quality and informative conversation responses with sequence-to-sequence models. In Proc. of EMNLP, pp. 2210–2219, 2017.
|
| 320 |
+
|
| 321 |
+
Xiaoyu Shen, Hui Su, Yanran Li, Wenjie Li, Shuzi Niu, Yang Zhao, Akiko Aizawa, and Guoping Long. A conditional variational framework for dialog generation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, pp. 504–509, 2017.
|
| 322 |
+
|
| 323 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proc. of NIPS, pp. 3104–3112, 2014.
|
| 324 |
+
|
| 325 |
+
Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016.
|
| 326 |
+
|
| 327 |
+
Oriol Vinyals and Quoc V. Le. A neural conversational model. arXiv preprint arXiv:1506.05869, 2015.
|
| 328 |
+
|
| 329 |
+
Oriol Vinyals, Samy Bengio, and Manjunath Kudlur. Order matters: Sequence to sequence for sets. In Proc. of ICLR, 2016.
|
| 330 |
+
|
| 331 |
+
Di Wang, Nebojsa Jojic, Chris Brockett, and Eric Nyberg. Steering output style and topic in neural response generation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2140–2150, 2017.
|
| 332 |
+
|
| 333 |
+
Sam Wiseman and Alexander M. Rush. Sequence-to-sequence learning as beam-search optimization. In Proc. of EMNLP, pp. 1296–1306, 2016.
|
| 334 |
+
|
| 335 |
+
Yu Wu, Wei Wu, Zhoujun Li, Can Xu, and Dejian Yang. Neural response generation with dynamic vocabularies. national conference on artificial intelligence, 2018.
|
| 336 |
+
|
| 337 |
+
Chen Xing, Wei Wu, Yu Wu, Jie Liu, Yalou Huang, Ming Zhou, and Wei-Ying Ma. Topic aware neural response generation. In Proc. of AAAI, pp. 3351–3357, 2017.
|
| 338 |
+
|
| 339 |
+
George Kingsley Zipf. The psychobiology of language. 1935.
|
| 340 |
+
|
| 341 |
+
# A CASES
|
| 342 |
+
|
| 343 |
+
What should I do?Query:
|
| 344 |
+
|
| 345 |
+
# Replies form S2S+Attention:
|
| 346 |
+
|
| 347 |
+
1) Do nothing.
|
| 348 |
+
2) Go on.
|
| 349 |
+
3) Do nothing, hm.
|
| 350 |
+
4) How?
|
| 351 |
+
5) Do nothing do nothing.
|
| 352 |
+
6) Then go ahead.
|
| 353 |
+
7) So how do you do?
|
| 354 |
+
|
| 355 |
+
# Replies from Ranking Loss :
|
| 356 |
+
|
| 357 |
+
1) Do nothing.
|
| 358 |
+
2) Do nothing.
|
| 359 |
+
3) Go to sleep.
|
| 360 |
+
4) Don’t worry.
|
| 361 |
+
5) You should keep on.
|
| 362 |
+
6) Then go ahead.
|
| 363 |
+
7) Keep finding.
|
| 364 |
+
|
| 365 |
+
How about the salary?Query:
|
| 366 |
+
|
| 367 |
+
# Replies from S2S+Attention:
|
| 368 |
+
|
| 369 |
+
1) negotiable
|
| 370 |
+
2) Salary negotiable.
|
| 371 |
+
3) Salary negotiable.
|
| 372 |
+
4) Salary negotiable!
|
| 373 |
+
5) Salary and payment negotiable.
|
| 374 |
+
6) Payment is nice.
|
| 375 |
+
7) Payment is nice, and salary negotiable.
|
| 376 |
+
|
| 377 |
+
# Replies from Ranking Loss :
|
| 378 |
+
|
| 379 |
+
1) Salary negotiable.
|
| 380 |
+
2) Salary negotiable.
|
| 381 |
+
3) High salary.
|
| 382 |
+
4) Basic salary and plus
|
| 383 |
+
5) Salary negotiable!
|
| 384 |
+
6) Salary and payment negotiable.
|
| 385 |
+
7) Payment is nice, send your CV.
|
| 386 |
+
|
| 387 |
+
I’m 23, why I’m still in growth?Query:
|
| 388 |
+
|
| 389 |
+
# Replies from S2S+Attention:
|
| 390 |
+
|
| 391 |
+
1) 23
|
| 392 |
+
2) 22.
|
| 393 |
+
3) 21.
|
| 394 |
+
4) 20.
|
| 395 |
+
5) 25.
|
| 396 |
+
6) 23 years old.
|
| 397 |
+
7) 22 years old.
|
| 398 |
+
|
| 399 |
+
# Replies from Ranking Loss :
|
| 400 |
+
|
| 401 |
+
1) 23.
|
| 402 |
+
2) 23.
|
| 403 |
+
3) just 23.
|
| 404 |
+
4) just 22.
|
| 405 |
+
5) 23 years old are not
|
| 406 |
+
6) 23 years old are not old
|
| 407 |
+
7) 23 years old are not old!
|
| 408 |
+
|
| 409 |
+
Where are you graduate?Query:
|
| 410 |
+
|
| 411 |
+
# Replies from S2S+Attention:
|
| 412 |
+
|
| 413 |
+
1) Xi’an.
|
| 414 |
+
2) Wuhan.
|
| 415 |
+
3) <unk>.
|
| 416 |
+
4) Nanjing.
|
| 417 |
+
5) Junior.
|
| 418 |
+
6) In Junior.
|
| 419 |
+
7) In junior junior Shanghai.
|
| 420 |
+
|
| 421 |
+
# Replies from Ranking Loss :
|
| 422 |
+
|
| 423 |
+
1) Peking.
|
| 424 |
+
2) Chengdu.
|
| 425 |
+
3) Xi’an.
|
| 426 |
+
4) In Chengdu.
|
| 427 |
+
5) I study in Chengdu.
|
| 428 |
+
6) I study in Shanghai.
|
| 429 |
+
7) I study in Beijing.
|
| 430 |
+
|
| 431 |
+
My child is born.Query:
|
| 432 |
+
|
| 433 |
+
# Replies from S2S+Attention:
|
| 434 |
+
|
| 435 |
+
# Replies from Ranking Loss :
|
| 436 |
+
|
| 437 |
+
1) <unk>.
|
| 438 |
+
2) born.
|
| 439 |
+
3) born baby.
|
| 440 |
+
4) children born.
|
| 441 |
+
5) born born children.
|
| 442 |
+
6) born born born children.
|
| 443 |
+
7) born children born children.
|
| 444 |
+
1) ok
|
| 445 |
+
2) Cheers!
|
| 446 |
+
3) Em.
|
| 447 |
+
4) ok, born child.
|
| 448 |
+
5) cheers, congulations!
|
| 449 |
+
6) born born born children.
|
| 450 |
+
7) born children born children.
|
| 451 |
+
|
| 452 |
+
Figure 4: Cases for comparing the S2SA and the model with ranking regularization, and the topics or expressions of the generated replies marked with blue are excluded in the responses generated by SASA.
|
parse/train/H1eqviAqYX/H1eqviAqYX_content_list.json
ADDED
|
@@ -0,0 +1,2048 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "WHY DO NEURAL RESPONSE GENERATION MODELS PREFER UNIVERSAL REPLIES? ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
823,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
184,
|
| 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": "Recent advances in neural Sequence-to-Sequence (Seq2Seq) models reveal a purely data-driven approach to the response generation task. Despite its diverse variants and applications, the existing Seq2Seq models are prone to producing short and generic replies, which blocks such neural network architectures from being utilized in practical open-domain response generation tasks. In this research, we analyze this critical issue from the perspective of the optimization goal of models and the specific characteristics of human-to-human conversational corpora. Our analysis is conducted by decomposing the goal of Neural Response Generation (NRG) into the optimizations of word selection and ordering. It can be derived from the decomposing that Seq2Seq based NRG models naturally tend to select common words to compose responses, and ignore the semantic of queries in word ordering. On the basis of the analysis, we propose a max-marginal ranking regularization term to avoid Seq2Seq models from producing the generic and uninformative responses. The empirical experiments on benchmarks with several metrics have validated our analysis and proposed methodology. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
267,
|
| 43 |
+
764,
|
| 44 |
+
474
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
502,
|
| 55 |
+
336,
|
| 56 |
+
518
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Past years have witnessed the dramatic progress on the application of generative sequential models (also noted as seq2seq learning (Sutskever et al., 2014; Bahdanau et al., 2015)) on Neural Response Generation (NRG) fields (Vinyals & Le, 2015; Serban et al., 2017). Seq2seq model has been proved to be capable of directly generating reply given an open domain query (Li et al., 2016c; Xing et al., 2017). Both relevant words or phrases are automatically selected, and smoothness and fluency of responses are guaranteed through the end-to-end learning. Moreover, abundant impressive humanto-machine conversation cases have been presented in many previous studies (Serban et al., 2016; Shang et al., 2015; Shao et al., 2017). ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
535,
|
| 66 |
+
825,
|
| 67 |
+
645
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Despite these promising results, current Sequence-to-Sequence (Seq2Seq) architectures for response generation are still far from steadily generating relevant and coherent replies. The essential issue identified by many studies is the Universal Replies: the model tends to generate short and general replies which contain limited information, such as “That’s great!”, “I don’t know”, etc. (Li et al., 2016b;d; Mou et al., 2016; Xing et al., 2017). Intuitively, this problem was attributed to the vast coverage of common replies in the training set and insufficient guiding knowledge in the models’ response generation step (Mou et al., 2016; Shao et al., 2017). Hence, current efforts mainly focus on introducing external information to the model (Mou et al., 2016; Xing et al., 2017), and encouraging the model to generate diverse responses in searching space via variational beam search strategies during inference (Shao et al., 2017; Li et al., 2016b;d). ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
652,
|
| 77 |
+
825,
|
| 78 |
+
791
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Nevertheless, most previous analysis over the issue are empirical and lack of statistical evidence. Therefore, in this paper, we conduct an in-depth investigation on the performance of seq2seq models on the NRG task. In our inspections on the existing dialog corpora, it is shown that those repeatedly appeared replies have two essential traits: 1) Most of them are composed of highly frequent words; 2) They cover a large portion of the dialog corpora that each universal reply stands for the response of various queries. Above characteristics of universal replies deviate the NRG from other successful applications of sea2seq model such as translation, and lead current generative NRG models to prefer common replies. To discuss the influences from the specific distributed corpus, we decompose the target sequence’s probability into two parts and analyze the probability respectively. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
799,
|
| 88 |
+
825,
|
| 89 |
+
924
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "table",
|
| 95 |
+
"img_path": "images/cd57d42cce32d0cbcaa71847ec1c7fbb1e1438890e571db760b37d4db5039518.jpg",
|
| 96 |
+
"table_caption": [
|
| 97 |
+
"Table 1: Replies and translated version of an example which reveal the different source-target sentence distribution for dialog and translation. "
|
| 98 |
+
],
|
| 99 |
+
"table_footnote": [],
|
| 100 |
+
"table_body": "<table><tr><td>Query</td><td>I would add Metropolis to the list.</td></tr><tr><td>Replies</td><td>I love this film so much. Me too,itisa beautiful film. This movie has beautiful background art. Fritz is really a good director,I like his film.</td></tr><tr><td>Translate</td><td>Brigitte cooling off on the set of Metropolis. J'ajouterais Metropolis ala liste. Je voudrais ajouter Metropolis a la liste.</td></tr></table>",
|
| 101 |
+
"bbox": [
|
| 102 |
+
320,
|
| 103 |
+
141,
|
| 104 |
+
678,
|
| 105 |
+
280
|
| 106 |
+
],
|
| 107 |
+
"page_idx": 1
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"type": "text",
|
| 111 |
+
"text": "To break down the mentioned characteristics of dialog corpora in the model training step, we propose a ranking-oriented regularization term to prune the scores of those irrelevant replies. Experimental results reveal that the model with such regularization can produce better results and avoid generating ambiguous responses. Also, case studies show that the issue of generic response is alleviated that these common responses are ranked relatively lower than more appropriate answers. ",
|
| 112 |
+
"bbox": [
|
| 113 |
+
174,
|
| 114 |
+
306,
|
| 115 |
+
825,
|
| 116 |
+
377
|
| 117 |
+
],
|
| 118 |
+
"page_idx": 1
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"type": "text",
|
| 122 |
+
"text": "The main contributions of this paper are concluded as follows: 1) We analyze the loss function of Seq2seq models on NRG task and conclude several critical reasons that the NRG models prefer universal replies; 2) Based on the analysis, a max-marginal ranking regularization is presented to help the model converge to informative responses. ",
|
| 123 |
+
"bbox": [
|
| 124 |
+
174,
|
| 125 |
+
383,
|
| 126 |
+
825,
|
| 127 |
+
440
|
| 128 |
+
],
|
| 129 |
+
"page_idx": 1
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"type": "text",
|
| 133 |
+
"text": "2 ANALYSIS OF SEQ2SEQ MODELS FOR NRG ",
|
| 134 |
+
"text_level": 1,
|
| 135 |
+
"bbox": [
|
| 136 |
+
174,
|
| 137 |
+
462,
|
| 138 |
+
566,
|
| 139 |
+
478
|
| 140 |
+
],
|
| 141 |
+
"page_idx": 1
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"type": "text",
|
| 145 |
+
"text": "Different from significant advances in machine translation (Bahdanau et al., 2015) and abstractive summarization (Rush et al., 2015; Nallapati et al., 2016), it remains challenging to apply Seq2Seq models in practical response generation. One widely accepted issue within current models is that Seq2Seq architectures are inclined to produce common and unrelated replies, even when the quality of training data is significantly improved and different Seq2Seq variants are proposed. The primary reason for this phenomenon lies in the fact that the semantic constraint from query to the possible responses is naturally weak, since the responses to a given query are not required to be semantically equivalent. In contrast, the references in machine translation or summarization are usually restricted to be equivalent to each other semantically or even lexically. Especially, for machine translation, words that appear in the target language should satisfy word level mapping from the source sentence, so the learned word alignment function could ensure the model to generate suitable translated words. Different from learning the semantic alignments between languages in NMT, in NRG the replies can be diversified as they only need to satisfy the causality with the given queries. Moreover, given a query, the sequential model is optimized to learn the shared information among all replies, thus the model is more likely to choose those high-frequent common replies, which is also mentioned in Ritter et al. (2011). ",
|
| 146 |
+
"bbox": [
|
| 147 |
+
174,
|
| 148 |
+
494,
|
| 149 |
+
825,
|
| 150 |
+
718
|
| 151 |
+
],
|
| 152 |
+
"page_idx": 1
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"type": "text",
|
| 156 |
+
"text": "Taking the case in Table 1 for example, the topic of this query is about movie. It can be observed that the replies shown in the table are semantically diversified: the first two replies are related to the opinion of the respondent toward the movie, while the rest of the replies are about the director, content, and origin of the movie. By contrast, the two valid translations in French are very similar regarding their semantics, which can be attributed to the fixed word-level mapping between query and targets. ",
|
| 157 |
+
"bbox": [
|
| 158 |
+
174,
|
| 159 |
+
724,
|
| 160 |
+
825,
|
| 161 |
+
809
|
| 162 |
+
],
|
| 163 |
+
"page_idx": 1
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"type": "text",
|
| 167 |
+
"text": "2.1 PROBLEM DECOMPOSITION ",
|
| 168 |
+
"text_level": 1,
|
| 169 |
+
"bbox": [
|
| 170 |
+
176,
|
| 171 |
+
827,
|
| 172 |
+
405,
|
| 173 |
+
842
|
| 174 |
+
],
|
| 175 |
+
"page_idx": 1
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"type": "text",
|
| 179 |
+
"text": "The sequence-mapping problem in NRG can be decomposed into two independent sub-learning problems: 1) Target word selection, in which a query is summarized and translated into the semantic space of responses, and then a set of target words is selected to represent the meaning; 2) Word ordering, in which a grammatical coherent reply is generated based on the candidate word set (Vinyals et al., 2016). The word selection and ordering of the target sequence are jointly learned which can also be reflected in the model’s loss function by two possible factored phases: ",
|
| 180 |
+
"bbox": [
|
| 181 |
+
174,
|
| 182 |
+
853,
|
| 183 |
+
823,
|
| 184 |
+
924
|
| 185 |
+
],
|
| 186 |
+
"page_idx": 1
|
| 187 |
+
},
|
| 188 |
+
{
|
| 189 |
+
"type": "image",
|
| 190 |
+
"img_path": "images/1cea15e9546323fad54b6531ab96375dcbed97d9c7efe4fcc306e99ecabdf3e8.jpg",
|
| 191 |
+
"image_caption": [
|
| 192 |
+
"Figure 1: Response Unigram probability distribution in Table 1. "
|
| 193 |
+
],
|
| 194 |
+
"image_footnote": [],
|
| 195 |
+
"bbox": [
|
| 196 |
+
299,
|
| 197 |
+
98,
|
| 198 |
+
696,
|
| 199 |
+
229
|
| 200 |
+
],
|
| 201 |
+
"page_idx": 2
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"type": "text",
|
| 205 |
+
"text": "",
|
| 206 |
+
"bbox": [
|
| 207 |
+
176,
|
| 208 |
+
282,
|
| 209 |
+
679,
|
| 210 |
+
297
|
| 211 |
+
],
|
| 212 |
+
"page_idx": 2
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"type": "equation",
|
| 216 |
+
"img_path": "images/528030e112a9935770e374fb3317bd94e31cfcf667cbe23098f45ebb18a65ca3.jpg",
|
| 217 |
+
"text": "$$\n- \\log p ( y | x ) = - \\log p ( S ( y ) | x ) - \\log p ( y | S ( y ) , x )\n$$",
|
| 218 |
+
"text_format": "latex",
|
| 219 |
+
"bbox": [
|
| 220 |
+
326,
|
| 221 |
+
304,
|
| 222 |
+
671,
|
| 223 |
+
321
|
| 224 |
+
],
|
| 225 |
+
"page_idx": 2
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"type": "text",
|
| 229 |
+
"text": "where $x$ stands for the given query and $y$ is the corresponding response with $n$ words. Besides, $\\boldsymbol { S } ( y ) = \\{ w _ { 1 } , \\cdots , w _ { n } | \\boldsymbol { \\bar { w _ { i } } } \\in y , \\boldsymbol { \\bar { i } } \\in [ 1 , n ] \\}$ represents all predicted words without sequential order, so $p ( \\boldsymbol { S } ( y ) | \\boldsymbol { x } )$ is referred as the probability of the target word selection. Meanwhile, $p ( \\boldsymbol { y } | \\boldsymbol { S } ( \\boldsymbol { y } ) , \\boldsymbol { x } )$ indicates the probability of word ordering given this group of possible words. Thus, the objective can be redescribed from maximizing the probability of the ground truth response $y$ under query $x$ to maximizing these two joint probabilities simultaneously. ",
|
| 230 |
+
"bbox": [
|
| 231 |
+
173,
|
| 232 |
+
328,
|
| 233 |
+
825,
|
| 234 |
+
414
|
| 235 |
+
],
|
| 236 |
+
"page_idx": 2
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"type": "text",
|
| 240 |
+
"text": "After the above interpretation, we will further discuss the impact of the implicative constriction from two separated probabilities in Eq. 1, which results in the potential failure of models in learning conversational patterns. ",
|
| 241 |
+
"bbox": [
|
| 242 |
+
174,
|
| 243 |
+
419,
|
| 244 |
+
825,
|
| 245 |
+
462
|
| 246 |
+
],
|
| 247 |
+
"page_idx": 2
|
| 248 |
+
},
|
| 249 |
+
{
|
| 250 |
+
"type": "text",
|
| 251 |
+
"text": "2.2 TARGET WORD SELECTION PROBABILITY ",
|
| 252 |
+
"text_level": 1,
|
| 253 |
+
"bbox": [
|
| 254 |
+
176,
|
| 255 |
+
478,
|
| 256 |
+
504,
|
| 257 |
+
493
|
| 258 |
+
],
|
| 259 |
+
"page_idx": 2
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"type": "text",
|
| 263 |
+
"text": "Assuming that we have a set of $\\kappa$ ground-truth replies: $\\{ y _ { 1 } , \\cdots , y _ { K } \\}$ to a given query $x$ , the upper bound of the target word selection probability can be derived via Jensen’s Inequality (Boyd $\\&$ Vandenberghe, 2004): ",
|
| 264 |
+
"bbox": [
|
| 265 |
+
176,
|
| 266 |
+
505,
|
| 267 |
+
823,
|
| 268 |
+
547
|
| 269 |
+
],
|
| 270 |
+
"page_idx": 2
|
| 271 |
+
},
|
| 272 |
+
{
|
| 273 |
+
"type": "equation",
|
| 274 |
+
"img_path": "images/5a5d3507121bc3eb74c891308291dfd2f444732bbdabeb2463ce31a0125b2c3c.jpg",
|
| 275 |
+
"text": "$$\n\\begin{array} { l } { \\displaystyle \\sum _ { k } ^ { K } \\log p ( \\mathcal { S } ( y _ { k } ) | x ) = \\displaystyle \\sum _ { k } ^ { K } \\log \\prod _ { w \\in \\mathcal { S } ( y _ { k } ) } p ( w | x ) } \\\\ { = \\displaystyle \\sum _ { w \\in \\cup _ { k } ^ { K } \\mathcal { S } ( y _ { k } ) } \\log p ( w | x ) } \\\\ { \\leq L _ { \\mathcal { S } } \\log \\displaystyle \\sum _ { w \\in \\cup _ { k } ^ { K } \\mathcal { S } ( y _ { k } ) } \\frac { p ( w | x ) } { L _ { \\mathcal { S } } } } \\end{array}\n$$",
|
| 276 |
+
"text_format": "latex",
|
| 277 |
+
"bbox": [
|
| 278 |
+
338,
|
| 279 |
+
554,
|
| 280 |
+
658,
|
| 281 |
+
684
|
| 282 |
+
],
|
| 283 |
+
"page_idx": 2
|
| 284 |
+
},
|
| 285 |
+
{
|
| 286 |
+
"type": "text",
|
| 287 |
+
"text": "where $\\cup _ { k } ^ { K } S ( y _ { k } )$ denotes all the words appearing in the entire response set, and $L _ { S } = | \\cup _ { k } ^ { K } S ( y _ { k } ) |$ . Thus, optimizing the first segment is proportional to maximizing the last conditional probabilities, and the optimal strategy is to assign probabilities according to the frequency of words in these $\\kappa$ responses. Such strategy adopted by Seq2Seq can be verified by the long-tailed distribution of words in Fig. 1, in which only few common words are assigned with preferred high probabilities. Given that, during the inference, the best strategy is to employ more frequently occurring words rather than rare ones such as “background,” “art,” and “director” in Table 1. ",
|
| 288 |
+
"bbox": [
|
| 289 |
+
173,
|
| 290 |
+
690,
|
| 291 |
+
825,
|
| 292 |
+
790
|
| 293 |
+
],
|
| 294 |
+
"page_idx": 2
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"type": "text",
|
| 298 |
+
"text": "Furthermore, assuming that each response contains a fixed number of $T$ words (so that $1 \\leq L _ { S } \\leq$ $\\kappa \\times T )$ , we can find that the probability of each response for $x$ is inversely proportional to $\\kappa$ : ",
|
| 299 |
+
"bbox": [
|
| 300 |
+
173,
|
| 301 |
+
796,
|
| 302 |
+
825,
|
| 303 |
+
825
|
| 304 |
+
],
|
| 305 |
+
"page_idx": 2
|
| 306 |
+
},
|
| 307 |
+
{
|
| 308 |
+
"type": "equation",
|
| 309 |
+
"img_path": "images/ea2c2e701de93483e3806d4582e03aec4d856790a32512c36368df11999440d6.jpg",
|
| 310 |
+
"text": "$$\nL _ { S } \\log \\sum _ { w \\in \\cup _ { k } ^ { \\kappa } { \\cal S } ( y _ { k } ) } \\frac { p ( w | x ) } { L _ { S } } = L _ { S } \\log \\frac { \\mathbb { E } ( w | x ) \\times T } { K \\times T \\times L _ { S } } \\propto \\log \\frac { 1 } { ( K \\times L _ { S } ) ^ { L _ { S } } } \\leq \\log \\frac { 1 } { K }\n$$",
|
| 311 |
+
"text_format": "latex",
|
| 312 |
+
"bbox": [
|
| 313 |
+
235,
|
| 314 |
+
830,
|
| 315 |
+
763,
|
| 316 |
+
873
|
| 317 |
+
],
|
| 318 |
+
"page_idx": 2
|
| 319 |
+
},
|
| 320 |
+
{
|
| 321 |
+
"type": "text",
|
| 322 |
+
"text": "where $\\mathbb { E } ( w | x )$ denotes the mean frequency of words appeared in these $\\kappa$ replies, which is 1.32 for the cases in Table 1. In general, the mean frequency is around 1 owing to the long-tailed Unigram distribution which satisfies Zipf’s law (Zipf, 1935). In other words, the target word selection ",
|
| 323 |
+
"bbox": [
|
| 324 |
+
176,
|
| 325 |
+
881,
|
| 326 |
+
823,
|
| 327 |
+
924
|
| 328 |
+
],
|
| 329 |
+
"page_idx": 2
|
| 330 |
+
},
|
| 331 |
+
{
|
| 332 |
+
"type": "text",
|
| 333 |
+
"text": "probability is limited by $\\kappa$ , so queries with more diverse answers are more challenging to learn. Meanwhile, it is difficult to obtain good predictions for lower-informational queries, as they contain more possible responses which are somewhat equivalent to a larger $\\kappa$ (Li et al., 2016a). ",
|
| 334 |
+
"bbox": [
|
| 335 |
+
174,
|
| 336 |
+
103,
|
| 337 |
+
823,
|
| 338 |
+
146
|
| 339 |
+
],
|
| 340 |
+
"page_idx": 3
|
| 341 |
+
},
|
| 342 |
+
{
|
| 343 |
+
"type": "text",
|
| 344 |
+
"text": "Nonetheless, the translation task requires word-level mappings as they are well-aligned in the semantic space, therefore source and target sentences are semantically equivalent. So that, translated candidates are confined to $\\kappa \\approx 1$ . Thus the upper bound can be approximated as the full probability. ",
|
| 345 |
+
"bbox": [
|
| 346 |
+
174,
|
| 347 |
+
152,
|
| 348 |
+
823,
|
| 349 |
+
195
|
| 350 |
+
],
|
| 351 |
+
"page_idx": 3
|
| 352 |
+
},
|
| 353 |
+
{
|
| 354 |
+
"type": "text",
|
| 355 |
+
"text": "2.3 WORD ORDERING PROBABILITY ",
|
| 356 |
+
"text_level": 1,
|
| 357 |
+
"bbox": [
|
| 358 |
+
176,
|
| 359 |
+
229,
|
| 360 |
+
439,
|
| 361 |
+
244
|
| 362 |
+
],
|
| 363 |
+
"page_idx": 3
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"type": "text",
|
| 367 |
+
"text": "2.3.1 LEMMAS ",
|
| 368 |
+
"text_level": 1,
|
| 369 |
+
"bbox": [
|
| 370 |
+
174,
|
| 371 |
+
263,
|
| 372 |
+
292,
|
| 373 |
+
277
|
| 374 |
+
],
|
| 375 |
+
"page_idx": 3
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "text",
|
| 379 |
+
"text": "Before discussing the word ordering probability, we present four lemmas and corresponding proofs. \nMoreover, all these lemmas are only available for the response generation task except Lemma 1. ",
|
| 380 |
+
"bbox": [
|
| 381 |
+
176,
|
| 382 |
+
295,
|
| 383 |
+
823,
|
| 384 |
+
324
|
| 385 |
+
],
|
| 386 |
+
"page_idx": 3
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"type": "text",
|
| 390 |
+
"text": "According to the Zipf’s law (Zipf, 1935), the frequency of any word is inversely proportional to its rank in the frequency table, such that the probability $p ( w _ { i } ) = Z / i ^ { \\alpha }$ , where $Z \\approx 0 . 1$ , $\\alpha \\approx 1$ , and $i$ is the frequency rank of the word $w _ { i }$ . Then, denoting the vocabulary size as $V$ and the total number of query-response pairs as $N$ , we can formulate two characteristics of a universal reply $y$ as follows: ",
|
| 391 |
+
"bbox": [
|
| 392 |
+
174,
|
| 393 |
+
329,
|
| 394 |
+
825,
|
| 395 |
+
386
|
| 396 |
+
],
|
| 397 |
+
"page_idx": 3
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"type": "text",
|
| 401 |
+
"text": "1) A response is universal if it consists of only top- $\\mathbf { \\nabla } \\cdot t$ ranked words. For any word $w$ in such response, $p ( w ) \\geq 1 / ( 1 0 t )$ according to the Zipf’s law. ",
|
| 402 |
+
"bbox": [
|
| 403 |
+
173,
|
| 404 |
+
392,
|
| 405 |
+
823,
|
| 406 |
+
422
|
| 407 |
+
],
|
| 408 |
+
"page_idx": 3
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"type": "text",
|
| 412 |
+
"text": "2) The amount of possible queries $M$ of $y$ is directly proportional to the size of query-response pairs $N$ , noted as $1 \\ll M \\propto N$ . ",
|
| 413 |
+
"bbox": [
|
| 414 |
+
171,
|
| 415 |
+
428,
|
| 416 |
+
823,
|
| 417 |
+
457
|
| 418 |
+
],
|
| 419 |
+
"page_idx": 3
|
| 420 |
+
},
|
| 421 |
+
{
|
| 422 |
+
"type": "text",
|
| 423 |
+
"text": "To simplify, we suppose that $t > 1 0 0 0$ to cover most universal replies, and the frequency of the response not belonging to the universal replies is a constant $c$ $1 \\leq c \\ll M$ ). Accordingly, we can derive the following lemmas. ",
|
| 424 |
+
"bbox": [
|
| 425 |
+
174,
|
| 426 |
+
463,
|
| 427 |
+
825,
|
| 428 |
+
506
|
| 429 |
+
],
|
| 430 |
+
"page_idx": 3
|
| 431 |
+
},
|
| 432 |
+
{
|
| 433 |
+
"type": "text",
|
| 434 |
+
"text": "Lemma 1 $p ( \\boldsymbol { S } ( y ) | y ) = 1$ $\\begin{array} { r } { \\mathbf { \\Phi } _ { I } ) \\vert y \\rangle = 1 , p ( S ( y ) , y ) = p ( y ) , p ( x , y , S ( y ) ) = p ( x , y ) . } \\end{array}$ ",
|
| 435 |
+
"bbox": [
|
| 436 |
+
174,
|
| 437 |
+
512,
|
| 438 |
+
635,
|
| 439 |
+
529
|
| 440 |
+
],
|
| 441 |
+
"page_idx": 3
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"type": "text",
|
| 445 |
+
"text": "Proof. Lemma 1 describes the obvious fact that the event “the word set of the response equals to $\\boldsymbol { S } ( y ) ^ { \\flat }$ must happen when the event ${ \\ \" } y$ stands for the response” is established. ",
|
| 446 |
+
"bbox": [
|
| 447 |
+
174,
|
| 448 |
+
534,
|
| 449 |
+
823,
|
| 450 |
+
563
|
| 451 |
+
],
|
| 452 |
+
"page_idx": 3
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"type": "text",
|
| 456 |
+
"text": "Lemma 2 $p ( x | y _ { u r } ) = \\epsilon _ { 1 }$ , where $\\epsilon _ { 1 } > 0$ and is sufficiently small, and $y _ { u r }$ is a universal reply. ",
|
| 457 |
+
"bbox": [
|
| 458 |
+
173,
|
| 459 |
+
569,
|
| 460 |
+
782,
|
| 461 |
+
585
|
| 462 |
+
],
|
| 463 |
+
"page_idx": 3
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"type": "text",
|
| 467 |
+
"text": "Proof. Based on the second character of the universal reply and the fact that $N$ is a very large number for any large scaled datasets, Lemma 2 is established as: $\\begin{array} { r } { \\dot { p } ( x | y _ { u r } ) = \\frac { 1 } { M } \\propto \\frac { 1 } { N } = \\epsilon _ { 1 } } \\end{array}$ ",
|
| 468 |
+
"bbox": [
|
| 469 |
+
171,
|
| 470 |
+
590,
|
| 471 |
+
823,
|
| 472 |
+
621
|
| 473 |
+
],
|
| 474 |
+
"page_idx": 3
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "Lemma 3 $\\begin{array} { r } { \\sum _ { i } p ( y _ { i } ^ { u r } | S ( y ) ) 1 } \\end{array}$ , $p ( y _ { j } ^ { o } | S ( y ) ) = \\epsilon _ { 2 }$ , where $\\epsilon _ { 2 } > 0$ and is sufficiently small, $y _ { i } ^ { u r }$ stands for the $i$ -th universal reply and $\\check { y } _ { j } ^ { o }$ is the $j$ -th non-universal grammatical replies, meanwhile, ${ \\cal S } ( y _ { i } ^ { u r } ) \\subseteq { \\cal S } ( y )$ and $S ( y _ { j } ^ { o } ) \\subseteq S ( y )$ ",
|
| 479 |
+
"bbox": [
|
| 480 |
+
174,
|
| 481 |
+
625,
|
| 482 |
+
823,
|
| 483 |
+
672
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 3
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "text",
|
| 489 |
+
"text": "Proof. According to the following inequation $\\begin{array} { r } { \\sum _ { i } ^ { t } \\frac { 1 } { i } ~ > ~ \\int _ { 1 } ^ { t + 1 } \\frac { 1 } { x } d x = l n ( t + 1 ) } \\end{array}$ , we can get the conclusion that the probability of a chosen word belonging to the most frequent $t$ words is large than $0 . 1 * l n ( t + 1 ) > 0 . 6 9$ . Since $y$ contains $T$ words, there is at least $T l n ( t + 1 )$ words belonging to the top-t ranked on average according to the binomial distribution. ",
|
| 490 |
+
"bbox": [
|
| 491 |
+
173,
|
| 492 |
+
679,
|
| 493 |
+
825,
|
| 494 |
+
738
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 3
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "text",
|
| 500 |
+
"text": "We suppose $m$ responses are universal replies among the $n$ possible responses when their words are constrained by $\\bar { \\mathcal { S } } ( \\bar { y } )$ . Besides, the proportion of $\\mathbf { m }$ can be computed as: ",
|
| 501 |
+
"bbox": [
|
| 502 |
+
173,
|
| 503 |
+
744,
|
| 504 |
+
823,
|
| 505 |
+
773
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 3
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "equation",
|
| 511 |
+
"img_path": "images/7ef7fabd68763759f8a433f5ff1482ba0d02d0ddd3d3d8a571ce6c501b546c47.jpg",
|
| 512 |
+
"text": "$$\n\\begin{array} { l } { \\displaystyle \\frac { m } { n } = \\sum _ { i = 1 } ^ { T l n ( t + 1 ) } \\frac { C _ { T } ^ { i } } { \\sum _ { j = 1 } ^ { T } C _ { T } ^ { j } } \\ast \\frac { 1 } { 1 0 } l n ( t + 1 ) } \\\\ { \\displaystyle = \\frac { 2 ^ { T } - \\sum _ { i = T l n ( t + 1 ) } ^ { T } C _ { T } ^ { i } } { 2 ^ { T } } \\ast \\frac { 1 } { 1 0 } l n ( t + 1 ) } \\\\ { \\displaystyle > \\frac { 1 } { 2 0 } l n ( t + 1 ) } \\\\ { \\displaystyle > 0 . 3 4 } \\end{array}\n$$",
|
| 513 |
+
"text_format": "latex",
|
| 514 |
+
"bbox": [
|
| 515 |
+
352,
|
| 516 |
+
797,
|
| 517 |
+
645,
|
| 518 |
+
929
|
| 519 |
+
],
|
| 520 |
+
"page_idx": 3
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"type": "text",
|
| 524 |
+
"text": "where $C$ donates the combination. Since $n / m$ is not a very large number, the total probability of these $m$ replies can be deducted as: ",
|
| 525 |
+
"bbox": [
|
| 526 |
+
171,
|
| 527 |
+
102,
|
| 528 |
+
825,
|
| 529 |
+
132
|
| 530 |
+
],
|
| 531 |
+
"page_idx": 4
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"type": "equation",
|
| 535 |
+
"img_path": "images/40e944857234875c00d8588e3bb4db7d9c4bd7a310ba9c4b3d1b8f750b0a5db0.jpg",
|
| 536 |
+
"text": "$$\n\\begin{array} { l } { \\displaystyle \\sum _ { i } p ( y _ { i } ^ { u r } | \\mathcal S ( y ) ) = \\frac { \\sum _ { i } ^ { m } f ( y _ { i } ^ { u r } ) } { \\sum _ { i } ^ { m } f ( y _ { i } ^ { u r } ) + \\sum _ { i } ^ { n - m } f ( Y _ { i } ^ { o } ) } } \\\\ { = \\frac { M * m } { M * m + c * ( n - m ) } } \\\\ { = \\frac { M } { M + n / m - c } } \\\\ { > \\frac { M } { M + 3 - c } } \\end{array}\n$$",
|
| 537 |
+
"text_format": "latex",
|
| 538 |
+
"bbox": [
|
| 539 |
+
333,
|
| 540 |
+
140,
|
| 541 |
+
663,
|
| 542 |
+
282
|
| 543 |
+
],
|
| 544 |
+
"page_idx": 4
|
| 545 |
+
},
|
| 546 |
+
{
|
| 547 |
+
"type": "text",
|
| 548 |
+
"text": "where $f ( y )$ donates the frequency of a response $y$ in the corpus. According to the Eq. 5 and the fact that $M \\propto N$ is a very large number for any practical large-scale datasets, $\\begin{array} { r } { \\sum _ { i } p ( \\bar { y _ { i } ^ { u r } } | S ( y ) ) 1 } \\end{array}$ can be established. Apparently, for any other candidate response $y _ { j } ^ { o }$ , its probability satisfies $\\begin{array} { r } { p ( y _ { j } ^ { o } | S ( y ) ) < 1 - \\sum _ { i } p ( y _ { i } ^ { u r } | S ( y ) ) = \\epsilon _ { 2 } } \\end{array}$ . ",
|
| 549 |
+
"bbox": [
|
| 550 |
+
173,
|
| 551 |
+
287,
|
| 552 |
+
826,
|
| 553 |
+
348
|
| 554 |
+
],
|
| 555 |
+
"page_idx": 4
|
| 556 |
+
},
|
| 557 |
+
{
|
| 558 |
+
"type": "text",
|
| 559 |
+
"text": "Lemma 4 Assuming each informative query has $\\kappa$ ground-truth replies and the query-response pairs are extracted from a multi-turn conversational corpus, a reply y not belonging to universal replies has $\\kappa$ unique queries, noted as $\\begin{array} { r } { p ( x | y ) = \\frac { 1 } { \\mathcal { K } } } \\end{array}$ . ",
|
| 560 |
+
"bbox": [
|
| 561 |
+
173,
|
| 562 |
+
352,
|
| 563 |
+
825,
|
| 564 |
+
397
|
| 565 |
+
],
|
| 566 |
+
"page_idx": 4
|
| 567 |
+
},
|
| 568 |
+
{
|
| 569 |
+
"type": "text",
|
| 570 |
+
"text": "Proof. Most query-response pairs are extracted from a practical large-scale multi-turn conversational corpus, so that any response always works as the post in another pair. That is, $y$ also appears $\\kappa$ times as it also has $\\kappa$ replies. Therefore, there also exist $\\kappa$ unique posts for $y$ . ",
|
| 571 |
+
"bbox": [
|
| 572 |
+
173,
|
| 573 |
+
401,
|
| 574 |
+
823,
|
| 575 |
+
445
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 4
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "2.3.2 DISCUSSION ",
|
| 582 |
+
"text_level": 1,
|
| 583 |
+
"bbox": [
|
| 584 |
+
174,
|
| 585 |
+
462,
|
| 586 |
+
316,
|
| 587 |
+
476
|
| 588 |
+
],
|
| 589 |
+
"page_idx": 4
|
| 590 |
+
},
|
| 591 |
+
{
|
| 592 |
+
"type": "text",
|
| 593 |
+
"text": "On the basis of Lemma 1, the word ordering probability could be deducted as: ",
|
| 594 |
+
"bbox": [
|
| 595 |
+
174,
|
| 596 |
+
486,
|
| 597 |
+
687,
|
| 598 |
+
502
|
| 599 |
+
],
|
| 600 |
+
"page_idx": 4
|
| 601 |
+
},
|
| 602 |
+
{
|
| 603 |
+
"type": "equation",
|
| 604 |
+
"img_path": "images/9b64ea47804b324d3f618a76004ebf199ed38f41ad1df15b83e78662e51aabe8.jpg",
|
| 605 |
+
"text": "$$\n\\begin{array} { r l } { \\iota o g p ( y | S ( y ) , x ) = l o g \\frac { p ( S ( y ) | y ) p ( y ) p ( x | \\cdot | S ( y ) ) } { p ( S ( y ) ) p ( x | S ( y ) ) } } \\\\ & { = l o g 1 + l o g \\frac { p ( y ) } { p ( S ( y ) ) } + l o g \\frac { p ( x | y ) , S ( y ) ) } { p ( x | S ( y ) ) } } \\\\ & { = l o g \\frac { p ( y , S ( y ) ) } { p ( S ( y ) ) } + l o g \\frac { p ( x , y , S ( y ) ) p ( S ( y ) ) } { p ( y , S ( y ) ) p ( x , S ( y ) ) } } \\\\ & { = l o g p ( y | S ( y ) ) + l o g \\frac { p ( x , y , y ) p ( S ( y ) ) } { p ( y , S ( y ) ) p ( x , S ( y ) ) } } \\\\ & { = l o g p ( y ) S ( y ) + l o g \\frac { p ( x , y ) p ( S ( y ) ) } { p ( y ) p ( x , S ( y ) ) } } \\\\ & { = l o g p ( y ) S ( y ) ) + l o g \\frac { p ( x | y ) } { p ( x ) S ( y ) } } \\\\ & { = l o g p ( y ) S ( y ) ) + l o g \\frac { p ( x | y ) } { p ( x ) S ( y ) } } \\end{array}\n$$",
|
| 606 |
+
"text_format": "latex",
|
| 607 |
+
"bbox": [
|
| 608 |
+
292,
|
| 609 |
+
511,
|
| 610 |
+
705,
|
| 611 |
+
720
|
| 612 |
+
],
|
| 613 |
+
"page_idx": 4
|
| 614 |
+
},
|
| 615 |
+
{
|
| 616 |
+
"type": "text",
|
| 617 |
+
"text": "All the possible $y _ { i }$ satisfying $S ( y _ { i } ) \\subseteq S ( y )$ can be divided into three categories: ground-truth reply $y$ , universal replies $y ^ { u r }$ and other replies $y ^ { o }$ . From above, we can get the following direct proportion according to the Lemma 2 and Lemma 3, ",
|
| 618 |
+
"bbox": [
|
| 619 |
+
174,
|
| 620 |
+
733,
|
| 621 |
+
823,
|
| 622 |
+
777
|
| 623 |
+
],
|
| 624 |
+
"page_idx": 4
|
| 625 |
+
},
|
| 626 |
+
{
|
| 627 |
+
"type": "equation",
|
| 628 |
+
"img_path": "images/a34c7fe840169eca469cb61fb97f81c24cecd2d1f14657f9a9ecc39a456c28ca.jpg",
|
| 629 |
+
"text": "$$\n\\begin{array} { l } { { \\displaystyle \\sum _ { i } p ( x | y _ { i } ) p ( y _ { i } | S ( y ) ) } \\ ~ } \\\\ { { \\displaystyle = p ( x | y ) p ( y | S ( y ) ) + \\sum _ { i } p ( x | y _ { i } ^ { u r } ) p ( y _ { i } ^ { u r } | S ( y ) ) + \\sum _ { i } p ( x | y _ { i } ^ { o } ) p ( y _ { i } ^ { o } | S ( y ) ) } } \\\\ { { \\displaystyle \\propto p ( x | y ) p ( y | S ( y ) ) + \\epsilon _ { 1 } + \\epsilon _ { 2 } } } \\end{array}\n$$",
|
| 630 |
+
"text_format": "latex",
|
| 631 |
+
"bbox": [
|
| 632 |
+
253,
|
| 633 |
+
795,
|
| 634 |
+
743,
|
| 635 |
+
885
|
| 636 |
+
],
|
| 637 |
+
"page_idx": 4
|
| 638 |
+
},
|
| 639 |
+
{
|
| 640 |
+
"type": "text",
|
| 641 |
+
"text": "On the basis of Eq. 7 and Lemma 4, for any reply $y$ not belonging to universal replies, the Eq. 6 can be further deducted as: ",
|
| 642 |
+
"bbox": [
|
| 643 |
+
173,
|
| 644 |
+
895,
|
| 645 |
+
825,
|
| 646 |
+
924
|
| 647 |
+
],
|
| 648 |
+
"page_idx": 4
|
| 649 |
+
},
|
| 650 |
+
{
|
| 651 |
+
"type": "equation",
|
| 652 |
+
"img_path": "images/4bb340687a106285a924657c585b975a5fc8a77bb01ff08d7cd53d1f857562c6.jpg",
|
| 653 |
+
"text": "$$\n\\mathit { l o g p } ( y | S ( y ) , x ) \\propto \\mathit { l o g p } ( y | S ( y ) ) + \\mathit { l o g } \\frac { p ( x | y ) } { p ( x | y ) p ( y | S ( y ) ) + \\epsilon } \\propto \\mathit { l o g } \\frac { p ( y | S ( y ) ) } { p ( y | S ( y ) ) + K \\epsilon }\n$$",
|
| 654 |
+
"text_format": "latex",
|
| 655 |
+
"bbox": [
|
| 656 |
+
210,
|
| 657 |
+
113,
|
| 658 |
+
769,
|
| 659 |
+
147
|
| 660 |
+
],
|
| 661 |
+
"page_idx": 5
|
| 662 |
+
},
|
| 663 |
+
{
|
| 664 |
+
"type": "text",
|
| 665 |
+
"text": "where $\\epsilon = \\epsilon _ { 1 } + \\epsilon _ { 2 } > 0$ , which is also a sufficiently small positive value. Thus, optimizing the word ordering probability for the non-universal replies is partially equivalent to maximizing $\\bar { p } ( y | S ( y ) )$ . In fact the term $p ( \\boldsymbol { y } | \\boldsymbol { S } ( \\boldsymbol { y } ) )$ is the language model probability and it is irrelevant with the query $x$ (Maning et al., 2009). In the sequential models, it is performed as $\\begin{array} { r } { \\prod _ { t } p ( y _ { t } | y _ { 1 : t - 1 } , S ( y ) ) } \\end{array}$ , in other words the sequences are generated based only on previously outputted words. This equation indicates that optimizing the mainly seeks the grammatical competence based on the selected words. ",
|
| 666 |
+
"bbox": [
|
| 667 |
+
173,
|
| 668 |
+
150,
|
| 669 |
+
825,
|
| 670 |
+
234
|
| 671 |
+
],
|
| 672 |
+
"page_idx": 5
|
| 673 |
+
},
|
| 674 |
+
{
|
| 675 |
+
"type": "text",
|
| 676 |
+
"text": "2.4 BRIEF SUMMARY ",
|
| 677 |
+
"text_level": 1,
|
| 678 |
+
"bbox": [
|
| 679 |
+
174,
|
| 680 |
+
250,
|
| 681 |
+
334,
|
| 682 |
+
265
|
| 683 |
+
],
|
| 684 |
+
"page_idx": 5
|
| 685 |
+
},
|
| 686 |
+
{
|
| 687 |
+
"type": "text",
|
| 688 |
+
"text": "In conclusion, the insufficient constraint of the target words’ cross-entropy loss in NRG is the primary reason that hinders seq2seq models from exploring presumable parameters. This situation is mainly caused by the particular distribution of NRG corpus, since there exist many universal replies composed of high-frequent words in corpus. Consequently, the model tends to promotes such universal replies, regardless of the given query. ",
|
| 689 |
+
"bbox": [
|
| 690 |
+
173,
|
| 691 |
+
276,
|
| 692 |
+
825,
|
| 693 |
+
347
|
| 694 |
+
],
|
| 695 |
+
"page_idx": 5
|
| 696 |
+
},
|
| 697 |
+
{
|
| 698 |
+
"type": "text",
|
| 699 |
+
"text": "3 MAX-MARGINAL RANKING REGULARIZATION ",
|
| 700 |
+
"text_level": 1,
|
| 701 |
+
"bbox": [
|
| 702 |
+
176,
|
| 703 |
+
366,
|
| 704 |
+
591,
|
| 705 |
+
382
|
| 706 |
+
],
|
| 707 |
+
"page_idx": 5
|
| 708 |
+
},
|
| 709 |
+
{
|
| 710 |
+
"type": "text",
|
| 711 |
+
"text": "As discussed above, various responses corresponding to the same query appearing in the training data leads to the undesired preference of NRG on universal replies, so an intuitive solution is removing the multiple replies and just keeping one-to-one pairs. However, filtering the training dataset in large scale raises the difficulty of model training. Besides, naively removing the multiple replies is detrimental to the reply diversity, which is important in NRG task. As shown in Table 1, an ideal chatbot agent is prospected to provide all listed replies and build a connection with some keywords such as ‘film’, ‘background’, ‘director’ and ‘book’, rather than other commonly appeared words like ‘I’, ‘him’, ‘a’ and ‘really’. ",
|
| 712 |
+
"bbox": [
|
| 713 |
+
173,
|
| 714 |
+
397,
|
| 715 |
+
825,
|
| 716 |
+
510
|
| 717 |
+
],
|
| 718 |
+
"page_idx": 5
|
| 719 |
+
},
|
| 720 |
+
{
|
| 721 |
+
"type": "text",
|
| 722 |
+
"text": "Thus, under this assumption, we propose a max-marginal ranking loss to emphasize the queries’ impact on these less common but relevant words. During training, as it becomes a necessity to constrain the learned feature space and reinforce related replies with more discriminative information, we classify the candidate responses into two categories: positive (i.e., highly related) and negative (i.e., irrelevant) answers. A training instance is re-constructed as a triplet $( x , y , y ^ { - } )$ , where a tuple $( x , y )$ is the original query-response pair and noise $y ^ { - }$ is uniformly sampled from all of the responses in the training data. Given that, the model’s loss function is reconstructed as: ",
|
| 723 |
+
"bbox": [
|
| 724 |
+
173,
|
| 725 |
+
515,
|
| 726 |
+
825,
|
| 727 |
+
614
|
| 728 |
+
],
|
| 729 |
+
"page_idx": 5
|
| 730 |
+
},
|
| 731 |
+
{
|
| 732 |
+
"type": "equation",
|
| 733 |
+
"img_path": "images/ae29ca2d1c00cc316ae3e1b84a5f68ecb4458d13446e329c7756d85dcc919c5e.jpg",
|
| 734 |
+
"text": "$$\n\\ell _ { \\theta } = - \\log p ( y | x ) + \\lambda \\operatorname* { m a x } \\{ 0 , - \\log p ( y | x ) + \\log p ( y ^ { - } | x ) + \\gamma \\}\n$$",
|
| 735 |
+
"text_format": "latex",
|
| 736 |
+
"bbox": [
|
| 737 |
+
284,
|
| 738 |
+
619,
|
| 739 |
+
712,
|
| 740 |
+
638
|
| 741 |
+
],
|
| 742 |
+
"page_idx": 5
|
| 743 |
+
},
|
| 744 |
+
{
|
| 745 |
+
"type": "text",
|
| 746 |
+
"text": "where $\\gamma > 0$ , $\\log p ( y | x )$ denotes the cross-entropy loss between the model’s prediction and ground truth sequences, and the second part encourages the separation between the irrelevant responses and related replies. Moreover, the hyper-parameter $\\lambda$ defines the penalty for the seq2seq loss, it offers a degree of freedom to control the importance of the max-marginal between the positive and negative instances. The model is trained in the same setting as the conventional model when $\\lambda = 0$ . ",
|
| 747 |
+
"bbox": [
|
| 748 |
+
174,
|
| 749 |
+
643,
|
| 750 |
+
825,
|
| 751 |
+
714
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 5
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "The gradient of $\\ell _ { \\theta }$ is computed using the sub-gradient method, as the second term is nondifferentiable but convex (Agarwal & Collins, 2010). Supposing $\\log p ( y | x ) - \\log p ( y ^ { - } | x ) \\leq \\gamma$ , the gradient of the composed loss function can be formalized as: ",
|
| 758 |
+
"bbox": [
|
| 759 |
+
174,
|
| 760 |
+
720,
|
| 761 |
+
825,
|
| 762 |
+
763
|
| 763 |
+
],
|
| 764 |
+
"page_idx": 5
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"type": "equation",
|
| 768 |
+
"img_path": "images/c038e319de2df1c4cb82bbe194d583692f75b1fb4d235888beb15d88284baec7.jpg",
|
| 769 |
+
"text": "$$\n\\nabla _ { \\boldsymbol { \\theta } } \\ell _ { \\boldsymbol { \\theta } } = - \\nabla _ { \\boldsymbol { \\theta } } \\log { p ( \\boldsymbol { y } | \\boldsymbol { x } ) } ,\n$$",
|
| 770 |
+
"text_format": "latex",
|
| 771 |
+
"bbox": [
|
| 772 |
+
413,
|
| 773 |
+
770,
|
| 774 |
+
580,
|
| 775 |
+
787
|
| 776 |
+
],
|
| 777 |
+
"page_idx": 5
|
| 778 |
+
},
|
| 779 |
+
{
|
| 780 |
+
"type": "text",
|
| 781 |
+
"text": "If $\\log p ( y | x ) - \\log p ( y ^ { - } | x ) > \\gamma$ , then the gradient should be written as: ",
|
| 782 |
+
"bbox": [
|
| 783 |
+
176,
|
| 784 |
+
794,
|
| 785 |
+
643,
|
| 786 |
+
809
|
| 787 |
+
],
|
| 788 |
+
"page_idx": 5
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"type": "equation",
|
| 792 |
+
"img_path": "images/aee8c0277dc7ca3712a1cd4127b3587968485888e56f10253bca2df386ac4de4.jpg",
|
| 793 |
+
"text": "$$\n\\nabla _ { \\boldsymbol { \\theta } } \\ell _ { \\boldsymbol { \\theta } } = - ( \\lambda + 1 ) \\nabla _ { \\boldsymbol { \\theta } } \\log p ( \\boldsymbol { y } | \\boldsymbol { x } ) + \\lambda \\nabla _ { \\boldsymbol { \\theta } } \\log p ( \\boldsymbol { y } ^ { - } | \\boldsymbol { x } ) .\n$$",
|
| 794 |
+
"text_format": "latex",
|
| 795 |
+
"bbox": [
|
| 796 |
+
338,
|
| 797 |
+
816,
|
| 798 |
+
658,
|
| 799 |
+
833
|
| 800 |
+
],
|
| 801 |
+
"page_idx": 5
|
| 802 |
+
},
|
| 803 |
+
{
|
| 804 |
+
"type": "text",
|
| 805 |
+
"text": "The underlying motivation of our proposed loss function is based on three considerations: 1) Universal replies are more likely to be sampled from a statistical perspective, so adding a negative term would directly ease the weight of these generic responses, and the ranking regularization can penalize those irrelevant responses; 2) Positive and negative sentences overall share a same set of generic words, which suggests that the loss optimization should pay more attention on those different words rather than generic ones; 3) Only differentiable loss can solely be served as the model’s optimization goal for the sequence generation model. Furthermore, the newly proposed loss aims to penalize frequent words and irrelevant candidates, rather than repudiating the literal expression included in negative samples. Consequently, based on these considerations, we propose this term as a regularization to constrain the search space of parameters instead of the stand-alone loss function. ",
|
| 806 |
+
"bbox": [
|
| 807 |
+
173,
|
| 808 |
+
839,
|
| 809 |
+
825,
|
| 810 |
+
924
|
| 811 |
+
],
|
| 812 |
+
"page_idx": 5
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"type": "table",
|
| 816 |
+
"img_path": "images/3f4bfe0127a13c891b592ea1b5bdda1a7c049ad5126422dd75aeb4f4d1a1a9c1.jpg",
|
| 817 |
+
"table_caption": [
|
| 818 |
+
"Table 2: Dataset statistics. For multiple replies, the three values represent the percentages of queries with one, two, and more than two responses, respectively. For the out of vocabulary (OOV) columns, the number in front of “/” denotes the percentage rate of the query, and the other one denotes replies. "
|
| 819 |
+
],
|
| 820 |
+
"table_footnote": [],
|
| 821 |
+
"table_body": "<table><tr><td></td><td># train</td><td># valid</td><td>#test</td></tr><tr><td>QA Pairs</td><td>5,982,868</td><td>315,136</td><td>315,136</td></tr><tr><td>Unique Replies</td><td>4,499,176</td><td>298,723</td><td>287,312</td></tr><tr><td>Multi Replies(%)</td><td>70/24/6</td><td>97/2/1</td><td>96/3/1</td></tr><tr><td>0OV (%)</td><td>.90/.90</td><td>.92/.93</td><td>.91/.92</td></tr><tr><td>Vocab Size</td><td></td><td>29241/27859</td><td></td></tr></table>",
|
| 822 |
+
"bbox": [
|
| 823 |
+
328,
|
| 824 |
+
156,
|
| 825 |
+
666,
|
| 826 |
+
246
|
| 827 |
+
],
|
| 828 |
+
"page_idx": 6
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
"type": "text",
|
| 832 |
+
"text": "",
|
| 833 |
+
"bbox": [
|
| 834 |
+
174,
|
| 835 |
+
268,
|
| 836 |
+
825,
|
| 837 |
+
324
|
| 838 |
+
],
|
| 839 |
+
"page_idx": 6
|
| 840 |
+
},
|
| 841 |
+
{
|
| 842 |
+
"type": "text",
|
| 843 |
+
"text": "4 EXPERIMENTAL STUDIES ",
|
| 844 |
+
"text_level": 1,
|
| 845 |
+
"bbox": [
|
| 846 |
+
176,
|
| 847 |
+
344,
|
| 848 |
+
416,
|
| 849 |
+
361
|
| 850 |
+
],
|
| 851 |
+
"page_idx": 6
|
| 852 |
+
},
|
| 853 |
+
{
|
| 854 |
+
"type": "text",
|
| 855 |
+
"text": "4.1 EXPERIMENTAL SETUPS ",
|
| 856 |
+
"bbox": [
|
| 857 |
+
174,
|
| 858 |
+
375,
|
| 859 |
+
383,
|
| 860 |
+
390
|
| 861 |
+
],
|
| 862 |
+
"page_idx": 6
|
| 863 |
+
},
|
| 864 |
+
{
|
| 865 |
+
"type": "text",
|
| 866 |
+
"text": "4.1.1 DATASET DESCRIPTION ",
|
| 867 |
+
"text_level": 1,
|
| 868 |
+
"bbox": [
|
| 869 |
+
174,
|
| 870 |
+
401,
|
| 871 |
+
393,
|
| 872 |
+
416
|
| 873 |
+
],
|
| 874 |
+
"page_idx": 6
|
| 875 |
+
},
|
| 876 |
+
{
|
| 877 |
+
"type": "text",
|
| 878 |
+
"text": "The dataset used in this study contained almost ten million query and response pairs collected from a popular Chinese social media site: Douban Group Chat1. All case studies used in this paper were extracted from this dataset and translated into English. ",
|
| 879 |
+
"bbox": [
|
| 880 |
+
174,
|
| 881 |
+
425,
|
| 882 |
+
825,
|
| 883 |
+
468
|
| 884 |
+
],
|
| 885 |
+
"page_idx": 6
|
| 886 |
+
},
|
| 887 |
+
{
|
| 888 |
+
"type": "text",
|
| 889 |
+
"text": "For easier training and better efficiency, the maximal lengths of queries and replies were set to 30 and 50 respectively. In all of our experiments, our dataset was split into the training, validation and test sets, with detailed statistical characterization given in Table 2. Thirty percent of queries had more than one responses, and each answer appeared about 1.33 times in the training dataset, which is consistent with our hypothesis in the analysis section. ",
|
| 890 |
+
"bbox": [
|
| 891 |
+
174,
|
| 892 |
+
474,
|
| 893 |
+
825,
|
| 894 |
+
545
|
| 895 |
+
],
|
| 896 |
+
"page_idx": 6
|
| 897 |
+
},
|
| 898 |
+
{
|
| 899 |
+
"type": "text",
|
| 900 |
+
"text": "4.1.2 BASELINE MODELS",
|
| 901 |
+
"text_level": 1,
|
| 902 |
+
"bbox": [
|
| 903 |
+
174,
|
| 904 |
+
559,
|
| 905 |
+
366,
|
| 906 |
+
574
|
| 907 |
+
],
|
| 908 |
+
"page_idx": 6
|
| 909 |
+
},
|
| 910 |
+
{
|
| 911 |
+
"type": "text",
|
| 912 |
+
"text": "To validate the performance of the proposed model, the following baselines were considered: ",
|
| 913 |
+
"bbox": [
|
| 914 |
+
169,
|
| 915 |
+
583,
|
| 916 |
+
782,
|
| 917 |
+
598
|
| 918 |
+
],
|
| 919 |
+
"page_idx": 6
|
| 920 |
+
},
|
| 921 |
+
{
|
| 922 |
+
"type": "text",
|
| 923 |
+
"text": "• S2SA: The basic seq2seq model with attention mechanism (Bahdanau et al., 2015) at the target output side. \n• $\\mathrm { S } 2 \\mathrm { S A } + \\mathrm { M M I }$ : The best performing model in Li et al. (2016b) with the length norm based on the same S2SA. \n• Ranking-Reg: The seq2seq model with proposed ranking regularization and attention. In this model, negative samples were uniformly sampled from the corpus, and the process was repeated 4 times for every positive case. The averaged negative loss was calculated as the probability of universal replies. \n• Ranking- $\\mathbf { \\nabla \\cdot R e g + M M I }$ : Ranking-Reg with MMI during inference procedure. ",
|
| 924 |
+
"bbox": [
|
| 925 |
+
173,
|
| 926 |
+
604,
|
| 927 |
+
826,
|
| 928 |
+
744
|
| 929 |
+
],
|
| 930 |
+
"page_idx": 6
|
| 931 |
+
},
|
| 932 |
+
{
|
| 933 |
+
"type": "text",
|
| 934 |
+
"text": "4.1.3 EVALUATION METRICS ",
|
| 935 |
+
"text_level": 1,
|
| 936 |
+
"bbox": [
|
| 937 |
+
174,
|
| 938 |
+
757,
|
| 939 |
+
388,
|
| 940 |
+
772
|
| 941 |
+
],
|
| 942 |
+
"page_idx": 6
|
| 943 |
+
},
|
| 944 |
+
{
|
| 945 |
+
"type": "text",
|
| 946 |
+
"text": "The quality of response was measured using both numeric metrics and human annotators. Firstly, Word Perplexity (PPL) is used to measure the model’s ability to account for the syntactic structure for each utterance (Serban et al., 2016). Secondly, ROGUE score (Lin, 2004), which evaluates the extent of overlapping words between the ground-truth and predicted replies, was also adopted in experiments. Thirdly, we employed the widely used diversity measurements Distinct-1 and Distinct2 to evaluate the number of distinct Unigrams and Bigrams of generated responses (Li et al., 2016b). ",
|
| 947 |
+
"bbox": [
|
| 948 |
+
174,
|
| 949 |
+
782,
|
| 950 |
+
825,
|
| 951 |
+
866
|
| 952 |
+
],
|
| 953 |
+
"page_idx": 6
|
| 954 |
+
},
|
| 955 |
+
{
|
| 956 |
+
"type": "text",
|
| 957 |
+
"text": "Furthermore, we recruited three highly educated human annotators to cross verify the quality of generated responses. We randomly sampled 100 queries and generated 10 replies for each query using different models, with beam size set to 10. The labeled results were categorized into three degree (Xing et al., 2017; Mou et al., 2016): ",
|
| 958 |
+
"bbox": [
|
| 959 |
+
176,
|
| 960 |
+
872,
|
| 961 |
+
823,
|
| 962 |
+
901
|
| 963 |
+
],
|
| 964 |
+
"page_idx": 6
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"type": "table",
|
| 968 |
+
"img_path": "images/e2209b58b070252b6f1128433492f736ddd11a38706893598b60ea5910eb6f29.jpg",
|
| 969 |
+
"table_caption": [
|
| 970 |
+
"Table 3: Summarized results of testing set with metrics: Human Label, ROGUE-1, ROGUE-L, Distinct-1, Distinct-2 and PPL. "
|
| 971 |
+
],
|
| 972 |
+
"table_footnote": [],
|
| 973 |
+
"table_body": "<table><tr><td rowspan=\"2\">Methods</td><td colspan=\"3\">Human Label</td><td colspan=\"2\">ROUGE</td><td colspan=\"2\">Distinct</td><td rowspan=\"2\">PPL</td></tr><tr><td>0</td><td>1</td><td>2</td><td>ROUGE-1</td><td>ROUGE-L</td><td>1</td><td>2</td></tr><tr><td>S2SA</td><td>52.46%</td><td>20.52%</td><td>27.02%</td><td>4.97%</td><td>3.13%</td><td>.129</td><td>.285</td><td>110.0</td></tr><tr><td>S2SA +MMI</td><td>51.88%</td><td>19.92%</td><td>28.20%</td><td>3.96%</td><td>2.77%</td><td>.140</td><td>.312</td><td>110.0</td></tr><tr><td>Rank-Reg</td><td>48.20%</td><td>15.38%</td><td>36.42%</td><td>3.45%</td><td>2.55%</td><td>.163</td><td>.358</td><td>85.6</td></tr><tr><td>Rank-Reg + MMI</td><td>47.40%</td><td>18.75%</td><td>33.85%</td><td>3.43%</td><td>2.63%</td><td>.167</td><td>.345</td><td>85.6</td></tr></table>",
|
| 974 |
+
"bbox": [
|
| 975 |
+
173,
|
| 976 |
+
140,
|
| 977 |
+
859,
|
| 978 |
+
239
|
| 979 |
+
],
|
| 980 |
+
"page_idx": 7
|
| 981 |
+
},
|
| 982 |
+
{
|
| 983 |
+
"type": "text",
|
| 984 |
+
"text": "",
|
| 985 |
+
"bbox": [
|
| 986 |
+
174,
|
| 987 |
+
265,
|
| 988 |
+
825,
|
| 989 |
+
294
|
| 990 |
+
],
|
| 991 |
+
"page_idx": 7
|
| 992 |
+
},
|
| 993 |
+
{
|
| 994 |
+
"type": "text",
|
| 995 |
+
"text": "0: The response cannot be used as a reply to the message. It is either semantically irrelevant or not fluent (e.g., with grammatical errors or UNK). ",
|
| 996 |
+
"bbox": [
|
| 997 |
+
171,
|
| 998 |
+
301,
|
| 999 |
+
825,
|
| 1000 |
+
329
|
| 1001 |
+
],
|
| 1002 |
+
"page_idx": 7
|
| 1003 |
+
},
|
| 1004 |
+
{
|
| 1005 |
+
"type": "text",
|
| 1006 |
+
"text": "1: The response can be used as a reply to the message, which includes the universal replies such as “Yes, I see” , “Me too” and “I dont know”. ",
|
| 1007 |
+
"bbox": [
|
| 1008 |
+
173,
|
| 1009 |
+
335,
|
| 1010 |
+
826,
|
| 1011 |
+
364
|
| 1012 |
+
],
|
| 1013 |
+
"page_idx": 7
|
| 1014 |
+
},
|
| 1015 |
+
{
|
| 1016 |
+
"type": "text",
|
| 1017 |
+
"text": "2: The response is not only relevant and natural, but also informative and interesting. ",
|
| 1018 |
+
"bbox": [
|
| 1019 |
+
174,
|
| 1020 |
+
371,
|
| 1021 |
+
728,
|
| 1022 |
+
386
|
| 1023 |
+
],
|
| 1024 |
+
"page_idx": 7
|
| 1025 |
+
},
|
| 1026 |
+
{
|
| 1027 |
+
"type": "text",
|
| 1028 |
+
"text": "4.1.4 TRAINING PROCEDURES ",
|
| 1029 |
+
"text_level": 1,
|
| 1030 |
+
"bbox": [
|
| 1031 |
+
174,
|
| 1032 |
+
404,
|
| 1033 |
+
398,
|
| 1034 |
+
417
|
| 1035 |
+
],
|
| 1036 |
+
"page_idx": 7
|
| 1037 |
+
},
|
| 1038 |
+
{
|
| 1039 |
+
"type": "text",
|
| 1040 |
+
"text": "For all of the models, LSTM was chosen as the recurrent cell, and there were 512 hidden units for both the encoder and decoder (Greff et al., 2017). Embedding size and batch size were set to 200 and 20 respectively. The Adam algorithm was employed for gradient optimization (Kingma & Ba, 2015), and the initial learning rate was 1e-4. All of the models were implemented in Theano (Theano Development Team, 2016), and each ran on a standalone K40m GPU device for 7 epochs, which took 7 days; twice longer time was required for training models with rank regularization. ",
|
| 1041 |
+
"bbox": [
|
| 1042 |
+
174,
|
| 1043 |
+
428,
|
| 1044 |
+
483,
|
| 1045 |
+
608
|
| 1046 |
+
],
|
| 1047 |
+
"page_idx": 7
|
| 1048 |
+
},
|
| 1049 |
+
{
|
| 1050 |
+
"type": "image",
|
| 1051 |
+
"img_path": "images/8fc8b06cd702efa66c2b2fe0e5839270ac4fee6a86624247e865d2e86d2c501a.jpg",
|
| 1052 |
+
"image_caption": [
|
| 1053 |
+
"Figure 2: Learning curve for the two models. "
|
| 1054 |
+
],
|
| 1055 |
+
"image_footnote": [],
|
| 1056 |
+
"bbox": [
|
| 1057 |
+
514,
|
| 1058 |
+
434,
|
| 1059 |
+
795,
|
| 1060 |
+
580
|
| 1061 |
+
],
|
| 1062 |
+
"page_idx": 7
|
| 1063 |
+
},
|
| 1064 |
+
{
|
| 1065 |
+
"type": "text",
|
| 1066 |
+
"text": "The last two models with the rank regularization share the related hyper-parameters. We set $\\lambda$ to 0.1 and $\\gamma$ to 0.18, according to the model’s performance on the validation set. ",
|
| 1067 |
+
"bbox": [
|
| 1068 |
+
171,
|
| 1069 |
+
616,
|
| 1070 |
+
821,
|
| 1071 |
+
643
|
| 1072 |
+
],
|
| 1073 |
+
"page_idx": 7
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"type": "text",
|
| 1077 |
+
"text": "Fig. 2 shows cross-entropy loss flows vs. training epoch numbers. The model with max-marginal ranking regularization converges faster than S2SA throughout the training. This shows that the additional regularization term helps to speed up the fitting by removing these sub-optimal paths. ",
|
| 1078 |
+
"bbox": [
|
| 1079 |
+
174,
|
| 1080 |
+
650,
|
| 1081 |
+
825,
|
| 1082 |
+
693
|
| 1083 |
+
],
|
| 1084 |
+
"page_idx": 7
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"type": "text",
|
| 1088 |
+
"text": "4.2 RESULTS AND ANALYSIS ",
|
| 1089 |
+
"text_level": 1,
|
| 1090 |
+
"bbox": [
|
| 1091 |
+
174,
|
| 1092 |
+
712,
|
| 1093 |
+
388,
|
| 1094 |
+
726
|
| 1095 |
+
],
|
| 1096 |
+
"page_idx": 7
|
| 1097 |
+
},
|
| 1098 |
+
{
|
| 1099 |
+
"type": "text",
|
| 1100 |
+
"text": "4.2.1 EXPERIMENTAL RESULTS. ",
|
| 1101 |
+
"text_level": 1,
|
| 1102 |
+
"bbox": [
|
| 1103 |
+
176,
|
| 1104 |
+
738,
|
| 1105 |
+
410,
|
| 1106 |
+
752
|
| 1107 |
+
],
|
| 1108 |
+
"page_idx": 7
|
| 1109 |
+
},
|
| 1110 |
+
{
|
| 1111 |
+
"type": "text",
|
| 1112 |
+
"text": "The performance of four models on existing metrics is summarized in Table 3. The model with the max-marginal ranking regularization outperforms the model with primary loss function on the target loss PPL. As the MMI method is performing during inference, losses of models with MMI are identical to those without revision. ",
|
| 1113 |
+
"bbox": [
|
| 1114 |
+
174,
|
| 1115 |
+
763,
|
| 1116 |
+
825,
|
| 1117 |
+
819
|
| 1118 |
+
],
|
| 1119 |
+
"page_idx": 7
|
| 1120 |
+
},
|
| 1121 |
+
{
|
| 1122 |
+
"type": "text",
|
| 1123 |
+
"text": "However, the results are opposite regarding the ROGUE scores. The generated responses by the S2SA model contain more words appearing in the ground truth answers. These experimental results can be attributed to mainly two factors. a) The very low ROUGE scores reflect few words shared by any predictions and the ground truth. Most n-gram overlaps belonging to the common words, such as “I”, “are”, “that”. b) A certain proportion of replies in the test set are universal themselves. Therefore, S2SA has achieved higher ROUGE score as its’ results are more consistent with those common ground truth responses. ",
|
| 1124 |
+
"bbox": [
|
| 1125 |
+
173,
|
| 1126 |
+
825,
|
| 1127 |
+
825,
|
| 1128 |
+
924
|
| 1129 |
+
],
|
| 1130 |
+
"page_idx": 7
|
| 1131 |
+
},
|
| 1132 |
+
{
|
| 1133 |
+
"type": "text",
|
| 1134 |
+
"text": "University are far away, and the city's most famous commercial street are near to me.Query: ",
|
| 1135 |
+
"bbox": [
|
| 1136 |
+
254,
|
| 1137 |
+
106,
|
| 1138 |
+
733,
|
| 1139 |
+
117
|
| 1140 |
+
],
|
| 1141 |
+
"page_idx": 8
|
| 1142 |
+
},
|
| 1143 |
+
{
|
| 1144 |
+
"type": "text",
|
| 1145 |
+
"text": "Replies from $\\mathbf { S } 2 \\mathbf { S } + .$ Attention: ",
|
| 1146 |
+
"text_level": 1,
|
| 1147 |
+
"bbox": [
|
| 1148 |
+
251,
|
| 1149 |
+
128,
|
| 1150 |
+
408,
|
| 1151 |
+
140
|
| 1152 |
+
],
|
| 1153 |
+
"page_idx": 8
|
| 1154 |
+
},
|
| 1155 |
+
{
|
| 1156 |
+
"type": "text",
|
| 1157 |
+
"text": "Replies from Ranking Loss : ",
|
| 1158 |
+
"text_level": 1,
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
553,
|
| 1161 |
+
128,
|
| 1162 |
+
709,
|
| 1163 |
+
140
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 8
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"type": "text",
|
| 1169 |
+
"text": "1) Where is your home? \n2) Where is your city? \n3) Where is your location? \n4) Where is your hometown? \n5) Where is your city, hn? \n6) Where is your location? \n7) Where is your home, mine \n1) Joy City Shopping mall? \n2) Is shopping mall? \n3) Joy City Shopping mall! \n4) Where is your location? \n5) Where? \n6) Near that <unk> road. \n7) That Joy City shopping mall is great. ",
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
250,
|
| 1172 |
+
143,
|
| 1173 |
+
405,
|
| 1174 |
+
226
|
| 1175 |
+
],
|
| 1176 |
+
"page_idx": 8
|
| 1177 |
+
},
|
| 1178 |
+
{
|
| 1179 |
+
"type": "image",
|
| 1180 |
+
"img_path": "images/3b2e47389a847a796095a8c79881c02c38f1920d30519ec9896cad5bc3effa78.jpg",
|
| 1181 |
+
"image_caption": [],
|
| 1182 |
+
"image_footnote": [],
|
| 1183 |
+
"bbox": [
|
| 1184 |
+
416,
|
| 1185 |
+
143,
|
| 1186 |
+
547,
|
| 1187 |
+
223
|
| 1188 |
+
],
|
| 1189 |
+
"page_idx": 8
|
| 1190 |
+
},
|
| 1191 |
+
{
|
| 1192 |
+
"type": "text",
|
| 1193 |
+
"text": "",
|
| 1194 |
+
"bbox": [
|
| 1195 |
+
549,
|
| 1196 |
+
143,
|
| 1197 |
+
756,
|
| 1198 |
+
227
|
| 1199 |
+
],
|
| 1200 |
+
"page_idx": 8
|
| 1201 |
+
},
|
| 1202 |
+
{
|
| 1203 |
+
"type": "text",
|
| 1204 |
+
"text": "Most Banks are not reliable.Query: ",
|
| 1205 |
+
"bbox": [
|
| 1206 |
+
253,
|
| 1207 |
+
244,
|
| 1208 |
+
441,
|
| 1209 |
+
256
|
| 1210 |
+
],
|
| 1211 |
+
"page_idx": 8
|
| 1212 |
+
},
|
| 1213 |
+
{
|
| 1214 |
+
"type": "text",
|
| 1215 |
+
"text": "Replies from $\\mathbf { S } 2 \\mathbf { S } +$ Attention: ",
|
| 1216 |
+
"text_level": 1,
|
| 1217 |
+
"bbox": [
|
| 1218 |
+
254,
|
| 1219 |
+
257,
|
| 1220 |
+
413,
|
| 1221 |
+
267
|
| 1222 |
+
],
|
| 1223 |
+
"page_idx": 8
|
| 1224 |
+
},
|
| 1225 |
+
{
|
| 1226 |
+
"type": "text",
|
| 1227 |
+
"text": "Replies from Ranking Loss : ",
|
| 1228 |
+
"text_level": 1,
|
| 1229 |
+
"bbox": [
|
| 1230 |
+
555,
|
| 1231 |
+
253,
|
| 1232 |
+
712,
|
| 1233 |
+
266
|
| 1234 |
+
],
|
| 1235 |
+
"page_idx": 8
|
| 1236 |
+
},
|
| 1237 |
+
{
|
| 1238 |
+
"type": "image",
|
| 1239 |
+
"img_path": "images/e8da83c5892a411d243219eeb0836a90fd8fd134b0a5e006851e31825d17e2cd.jpg",
|
| 1240 |
+
"image_caption": [
|
| 1241 |
+
"Figure 3: Response re-rank capability. Responses generated by the basic model and model with rank loss are linked by arrows, and same topics are typeset using the same color. Some ungrammatical and incomprehensible sentences exist due to the translating try to keep the word order. "
|
| 1242 |
+
],
|
| 1243 |
+
"image_footnote": [],
|
| 1244 |
+
"bbox": [
|
| 1245 |
+
253,
|
| 1246 |
+
271,
|
| 1247 |
+
740,
|
| 1248 |
+
366
|
| 1249 |
+
],
|
| 1250 |
+
"page_idx": 8
|
| 1251 |
+
},
|
| 1252 |
+
{
|
| 1253 |
+
"type": "text",
|
| 1254 |
+
"text": "The human evaluation is the most important metric, and it is clear from Table 3 that the models with rank regularization beat S2SA with a large margin. It increases the number of meaningful responses by around $10 \\%$ and reduces the number of irrelevant cases by around $4 \\%$ . Meanwhile, most the acceptable replies (labeled as “1” or “2”) of S2SA is labeled as “1”, which indicates the model prefer the safe responses. We attribute the gaps to the promotion of highly related words and reducing of the universal replies. Same trend can be also spotted on Distinct-1 and Distinct-2, it reveals the model’s ability to generate diverse responses (Li et al., 2016b; Serban et al., 2015). The seq2seq model yields lower levels of unigram and bigram diversity than the rank loss model. ",
|
| 1255 |
+
"bbox": [
|
| 1256 |
+
174,
|
| 1257 |
+
450,
|
| 1258 |
+
825,
|
| 1259 |
+
563
|
| 1260 |
+
],
|
| 1261 |
+
"page_idx": 8
|
| 1262 |
+
},
|
| 1263 |
+
{
|
| 1264 |
+
"type": "text",
|
| 1265 |
+
"text": "As another comparison, we note that the improvement introduced by MMI is much smaller than that introduced by the ranking regularization, whereas MMI is a widely used mechanism for promoting diverse responses during inference. Besides, performing it upon the regularization reduces the rate of informative and interesting responses. This observation indicates that the fundamental reason behind generating tasteless or inappropriate replies is that Seq2Seq model learned from conversational corpora prefers universal replies. Moreover, the revision during the greedy search is less effective on solving the underlying problems than the proposed ranking regularization. ",
|
| 1266 |
+
"bbox": [
|
| 1267 |
+
174,
|
| 1268 |
+
569,
|
| 1269 |
+
825,
|
| 1270 |
+
667
|
| 1271 |
+
],
|
| 1272 |
+
"page_idx": 8
|
| 1273 |
+
},
|
| 1274 |
+
{
|
| 1275 |
+
"type": "text",
|
| 1276 |
+
"text": "4.2.2 RANKING LOSS FOR GENERIC RESPONSES. ",
|
| 1277 |
+
"text_level": 1,
|
| 1278 |
+
"bbox": [
|
| 1279 |
+
174,
|
| 1280 |
+
683,
|
| 1281 |
+
529,
|
| 1282 |
+
696
|
| 1283 |
+
],
|
| 1284 |
+
"page_idx": 8
|
| 1285 |
+
},
|
| 1286 |
+
{
|
| 1287 |
+
"type": "text",
|
| 1288 |
+
"text": "From the generated results, it is found that the seq2seq model with the ranking regularization term prefers meaningful content when the query contains sufficient amount of information. We present top responses for two queries generated by different models in Fig. 3. As shown in the first case, user posts a query which initiates a complicated discussion about locations. It is observed that S2SA converges to a typical “where is your” pattern of replies when discussing locations, which is an example of universal replies. As the greedy beam search strategy is utilized during inference, many location-related constraints further promote these relevant universal replies instead of more varied results from different beams. In contrast, some of the responses in the right column captured the “commercial street” clues and inferred a possible location “Joy City shopping mall” demoting the generic beams results. We attributed this to the boosting ability associated with semantically relevant words, as mentioned in Section 3. ",
|
| 1289 |
+
"bbox": [
|
| 1290 |
+
174,
|
| 1291 |
+
708,
|
| 1292 |
+
825,
|
| 1293 |
+
861
|
| 1294 |
+
],
|
| 1295 |
+
"page_idx": 8
|
| 1296 |
+
},
|
| 1297 |
+
{
|
| 1298 |
+
"type": "text",
|
| 1299 |
+
"text": "The second case is quite different. In this case, the seq2seq model did not perform satisfactorily. Even though the subject “bank” was extracted into the generated candidates, we cannot perceive the results aligned with the same “not reliable” topic, and most of them were just chosen from two beams. Inspecting the replies generated by the rank loss model, we found that more complicated and diverse sentences that discuss “unreliable” can be generated, and irrelevant answers about “bank” are lower-ranked. To further investigate the difference brought by the max-marginal ranking regularization, we randomly sampled more cases shown in the Fig. 4 as appendix. Even though some of them were bad cases and contained some grammatical errors, overall the model with rank regularization tends to generate more informative and interesting sentences compared with baselines. ",
|
| 1300 |
+
"bbox": [
|
| 1301 |
+
174,
|
| 1302 |
+
867,
|
| 1303 |
+
823,
|
| 1304 |
+
924
|
| 1305 |
+
],
|
| 1306 |
+
"page_idx": 8
|
| 1307 |
+
},
|
| 1308 |
+
{
|
| 1309 |
+
"type": "text",
|
| 1310 |
+
"text": "",
|
| 1311 |
+
"bbox": [
|
| 1312 |
+
176,
|
| 1313 |
+
103,
|
| 1314 |
+
823,
|
| 1315 |
+
174
|
| 1316 |
+
],
|
| 1317 |
+
"page_idx": 9
|
| 1318 |
+
},
|
| 1319 |
+
{
|
| 1320 |
+
"type": "text",
|
| 1321 |
+
"text": "In conclusion, the seq2seq model with rank regularization can not only formulate the conditional language model but also boost related answers to higher ranks than the rest of universal or inappropriate replies. ",
|
| 1322 |
+
"bbox": [
|
| 1323 |
+
176,
|
| 1324 |
+
180,
|
| 1325 |
+
823,
|
| 1326 |
+
223
|
| 1327 |
+
],
|
| 1328 |
+
"page_idx": 9
|
| 1329 |
+
},
|
| 1330 |
+
{
|
| 1331 |
+
"type": "text",
|
| 1332 |
+
"text": "5 RELATED WORK ",
|
| 1333 |
+
"text_level": 1,
|
| 1334 |
+
"bbox": [
|
| 1335 |
+
176,
|
| 1336 |
+
246,
|
| 1337 |
+
344,
|
| 1338 |
+
263
|
| 1339 |
+
],
|
| 1340 |
+
"page_idx": 9
|
| 1341 |
+
},
|
| 1342 |
+
{
|
| 1343 |
+
"type": "text",
|
| 1344 |
+
"text": "Recent years have witnessed the rapid development of data-driven dialog models with the help of accumulated conversational data from online communities. Query-response pairs are modeled by Seq2Seq models with attention mechanism (Sutskever et al., 2014; Serban et al., 2016; Bahdanau et al., 2015), and NRG model are designed to maximize the likelihood of target response given the source query. As there exist various reasonable responses given a query, some researches conclude that the limited information in many queries constrains the model inference, which makes the NRG models prefer universal replies (Shao et al., 2017; Mou et al., 2016). ",
|
| 1345 |
+
"bbox": [
|
| 1346 |
+
174,
|
| 1347 |
+
281,
|
| 1348 |
+
825,
|
| 1349 |
+
378
|
| 1350 |
+
],
|
| 1351 |
+
"page_idx": 9
|
| 1352 |
+
},
|
| 1353 |
+
{
|
| 1354 |
+
"type": "text",
|
| 1355 |
+
"text": "To address this issue, various works are conducted on bringing more information to Seq2Seq models. Some works focus on constraining the replies with topic information or keywords (Mou et al., 2016; Xing et al., 2017; Wang et al., 2017; Wu et al., 2018). Other researchers argue that diverse responses are buried by the greedy beam-search rules (Li et al., 2016b), so their works mainly focus on involving more punishment or randomness in the inference stages. For example, Li et al. (2016b) constrain the search space using mutual information with the query, while Shao et al. (2017) randomly chose candidate words from top beams to constrain short phrases. These existing works mainly focus on the generation strategies during inference, in contrast, the model’s architecture and loss function have rarely been explored. ",
|
| 1356 |
+
"bbox": [
|
| 1357 |
+
174,
|
| 1358 |
+
386,
|
| 1359 |
+
825,
|
| 1360 |
+
511
|
| 1361 |
+
],
|
| 1362 |
+
"page_idx": 9
|
| 1363 |
+
},
|
| 1364 |
+
{
|
| 1365 |
+
"type": "text",
|
| 1366 |
+
"text": "Serban et al. (2017) introduce to model the underlying distribution over possible replies directly with supposing various latent variables to affect the response generation. Shen et al. (2017) further constructs a variational lower bound for response constraint. During inference, these models generate responses by first sampling an assignment of latent variables, so that models can generate more diverse responses. Such methods attempt to improve the diversity of responses by modifying the Seq2Seq architecture, and our analysis may be also helpful to design more effective latent variable based models to restrain current problems. Besides, the ranking penalty has also been used by Wiseman & Rush (2016), they employ a word-level margin to promote ground-truth sequences appearing in the beam search results. Different from our method, they directly optimize the beam search procedure to fine-tune the trained model. ",
|
| 1367 |
+
"bbox": [
|
| 1368 |
+
174,
|
| 1369 |
+
517,
|
| 1370 |
+
825,
|
| 1371 |
+
656
|
| 1372 |
+
],
|
| 1373 |
+
"page_idx": 9
|
| 1374 |
+
},
|
| 1375 |
+
{
|
| 1376 |
+
"type": "text",
|
| 1377 |
+
"text": "6 CONCLUSION ",
|
| 1378 |
+
"text_level": 1,
|
| 1379 |
+
"bbox": [
|
| 1380 |
+
174,
|
| 1381 |
+
681,
|
| 1382 |
+
318,
|
| 1383 |
+
696
|
| 1384 |
+
],
|
| 1385 |
+
"page_idx": 9
|
| 1386 |
+
},
|
| 1387 |
+
{
|
| 1388 |
+
"type": "text",
|
| 1389 |
+
"text": "Eliminating generic responses is the essence for the widely practical utilization of the Seq2Seq based neural response generation architectures, and thus, this paper has conducted a thorough investigation on the cause of such uninformative responses and proposed the solution from the statistical perspective. The main contributions of this work can be summarized as follows: a) The theoretical analysis is performed to capture the root reason of NRG models producing generic responses through the optimization goal of models and the statistical characteristics of human-to-human conversational corpora, which has been little studied currently. In detail, we have decomposed the goal of NRG into the optimizations of word selection and word ordering, and finally derived that NRG models tend to select common words as responses and order words from the language model perspective which ignores queries. b) According to the analysis, a max-marginal ranking regularization term is proposed to cooperate with the learning target of Seq2Seq, so as to help NRG models converge to the status of producing informative responses, rather than merely manipulating the decoding procedure to constrain the generation of universal replies. Furthermore, the empirical experiments on the conversation dataset indicate that the models utilizing this strategy notably outperform the current baseline models. ",
|
| 1390 |
+
"bbox": [
|
| 1391 |
+
174,
|
| 1392 |
+
715,
|
| 1393 |
+
825,
|
| 1394 |
+
922
|
| 1395 |
+
],
|
| 1396 |
+
"page_idx": 9
|
| 1397 |
+
},
|
| 1398 |
+
{
|
| 1399 |
+
"type": "text",
|
| 1400 |
+
"text": "REFERENCES ",
|
| 1401 |
+
"text_level": 1,
|
| 1402 |
+
"bbox": [
|
| 1403 |
+
174,
|
| 1404 |
+
102,
|
| 1405 |
+
287,
|
| 1406 |
+
118
|
| 1407 |
+
],
|
| 1408 |
+
"page_idx": 10
|
| 1409 |
+
},
|
| 1410 |
+
{
|
| 1411 |
+
"type": "text",
|
| 1412 |
+
"text": "Shivani Agarwal and Michael Collins. Maximum margin ranking algorithms for information retrieval. In Proc. of ECIR, pp. 332–343, 2010. ",
|
| 1413 |
+
"bbox": [
|
| 1414 |
+
173,
|
| 1415 |
+
126,
|
| 1416 |
+
823,
|
| 1417 |
+
155
|
| 1418 |
+
],
|
| 1419 |
+
"page_idx": 10
|
| 1420 |
+
},
|
| 1421 |
+
{
|
| 1422 |
+
"type": "text",
|
| 1423 |
+
"text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proc. of ICLR, 2015. ",
|
| 1424 |
+
"bbox": [
|
| 1425 |
+
171,
|
| 1426 |
+
165,
|
| 1427 |
+
823,
|
| 1428 |
+
194
|
| 1429 |
+
],
|
| 1430 |
+
"page_idx": 10
|
| 1431 |
+
},
|
| 1432 |
+
{
|
| 1433 |
+
"type": "text",
|
| 1434 |
+
"text": "Stephen Boyd and Lieven Vandenberghe. Convex Optimization. Cambridge University Press, New York, NY, USA, 2004. ISBN 0521833787. ",
|
| 1435 |
+
"bbox": [
|
| 1436 |
+
173,
|
| 1437 |
+
203,
|
| 1438 |
+
823,
|
| 1439 |
+
233
|
| 1440 |
+
],
|
| 1441 |
+
"page_idx": 10
|
| 1442 |
+
},
|
| 1443 |
+
{
|
| 1444 |
+
"type": "text",
|
| 1445 |
+
"text": "Klaus Greff, Rupesh K Srivastava, Jan Koutn´ık, Bas R Steunebrink, and Jurgen Schmidhuber. Lstm: ¨ A search space odyssey. IEEE transactions on neural networks and learning systems, 28(10): 2222–2232, 2017. ",
|
| 1446 |
+
"bbox": [
|
| 1447 |
+
176,
|
| 1448 |
+
242,
|
| 1449 |
+
823,
|
| 1450 |
+
286
|
| 1451 |
+
],
|
| 1452 |
+
"page_idx": 10
|
| 1453 |
+
},
|
| 1454 |
+
{
|
| 1455 |
+
"type": "text",
|
| 1456 |
+
"text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. international conference on learning representations, 2015. ",
|
| 1457 |
+
"bbox": [
|
| 1458 |
+
173,
|
| 1459 |
+
295,
|
| 1460 |
+
821,
|
| 1461 |
+
325
|
| 1462 |
+
],
|
| 1463 |
+
"page_idx": 10
|
| 1464 |
+
},
|
| 1465 |
+
{
|
| 1466 |
+
"type": "text",
|
| 1467 |
+
"text": "Chaozhuo Li, Yu Wu, Wei Wu, Chen Xing, Zhoujun Li, and Ming Zhou. Detecting context dependent messages in a conversational environment. In Proc. of COLING, pp. 1990–1999, 2016a. ",
|
| 1468 |
+
"bbox": [
|
| 1469 |
+
173,
|
| 1470 |
+
333,
|
| 1471 |
+
820,
|
| 1472 |
+
364
|
| 1473 |
+
],
|
| 1474 |
+
"page_idx": 10
|
| 1475 |
+
},
|
| 1476 |
+
{
|
| 1477 |
+
"type": "text",
|
| 1478 |
+
"text": "Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. A diversity-promoting objective function for neural conversation models. In Proc. of NAACL-HLT, pp. 110–119, 2016b. ",
|
| 1479 |
+
"bbox": [
|
| 1480 |
+
173,
|
| 1481 |
+
372,
|
| 1482 |
+
823,
|
| 1483 |
+
402
|
| 1484 |
+
],
|
| 1485 |
+
"page_idx": 10
|
| 1486 |
+
},
|
| 1487 |
+
{
|
| 1488 |
+
"type": "text",
|
| 1489 |
+
"text": "Jiwei Li, Michel Galley, Chris Brockett, Georgios P. Spithourakis, Jianfeng Gao, and William B. Dolan. A persona-based neural conversation model. In Proc. of ACL, pp. 994–1003, 2016c. ",
|
| 1490 |
+
"bbox": [
|
| 1491 |
+
173,
|
| 1492 |
+
411,
|
| 1493 |
+
825,
|
| 1494 |
+
441
|
| 1495 |
+
],
|
| 1496 |
+
"page_idx": 10
|
| 1497 |
+
},
|
| 1498 |
+
{
|
| 1499 |
+
"type": "text",
|
| 1500 |
+
"text": "Jiwei Li, Will Monroe, and Dan Jurafsky. A simple, fast diverse decoding algorithm for neural generation. CoRR, abs/1611.08562, 2016d. ",
|
| 1501 |
+
"bbox": [
|
| 1502 |
+
171,
|
| 1503 |
+
450,
|
| 1504 |
+
825,
|
| 1505 |
+
479
|
| 1506 |
+
],
|
| 1507 |
+
"page_idx": 10
|
| 1508 |
+
},
|
| 1509 |
+
{
|
| 1510 |
+
"type": "text",
|
| 1511 |
+
"text": "Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Proc. of ACL workshop, volume 8, 2004. ",
|
| 1512 |
+
"bbox": [
|
| 1513 |
+
171,
|
| 1514 |
+
489,
|
| 1515 |
+
823,
|
| 1516 |
+
518
|
| 1517 |
+
],
|
| 1518 |
+
"page_idx": 10
|
| 1519 |
+
},
|
| 1520 |
+
{
|
| 1521 |
+
"type": "text",
|
| 1522 |
+
"text": "Christopher Maning, Prabhaker Raghavan, and Hinrich Schtze. An introduction to information retrieval. 2009. ",
|
| 1523 |
+
"bbox": [
|
| 1524 |
+
171,
|
| 1525 |
+
529,
|
| 1526 |
+
823,
|
| 1527 |
+
558
|
| 1528 |
+
],
|
| 1529 |
+
"page_idx": 10
|
| 1530 |
+
},
|
| 1531 |
+
{
|
| 1532 |
+
"type": "text",
|
| 1533 |
+
"text": "Lili Mou, Yiping Song, Rui Yan, Ge Li, Lu Zhang, and Zhi Jin. Sequence to backward and forward sequences: A content-introducing approach to generative short-text conversation. In Proc. of COLING, pp. 3349–3358, 2016. ",
|
| 1534 |
+
"bbox": [
|
| 1535 |
+
174,
|
| 1536 |
+
566,
|
| 1537 |
+
825,
|
| 1538 |
+
611
|
| 1539 |
+
],
|
| 1540 |
+
"page_idx": 10
|
| 1541 |
+
},
|
| 1542 |
+
{
|
| 1543 |
+
"type": "text",
|
| 1544 |
+
"text": "Ramesh Nallapati, Bowen Zhou, C´ıcero Nogueira dos Santos, C¸ aglar Gulc¸ehre, and Bing Xiang. ¨ Abstractive text summarization using sequence-to-sequence rnns and beyond. In Proc. of CoNLL, pp. 280–290, 2016. ",
|
| 1545 |
+
"bbox": [
|
| 1546 |
+
171,
|
| 1547 |
+
619,
|
| 1548 |
+
823,
|
| 1549 |
+
664
|
| 1550 |
+
],
|
| 1551 |
+
"page_idx": 10
|
| 1552 |
+
},
|
| 1553 |
+
{
|
| 1554 |
+
"type": "text",
|
| 1555 |
+
"text": "Alan Ritter, Colin Cherry, and William B. Dolan. Data-driven response generation in social media. In Proc. of EMNLP, pp. 583–593, 2011. ",
|
| 1556 |
+
"bbox": [
|
| 1557 |
+
173,
|
| 1558 |
+
672,
|
| 1559 |
+
823,
|
| 1560 |
+
703
|
| 1561 |
+
],
|
| 1562 |
+
"page_idx": 10
|
| 1563 |
+
},
|
| 1564 |
+
{
|
| 1565 |
+
"type": "text",
|
| 1566 |
+
"text": "Alexander M Rush, Sumit Chopra, and Jason Weston. A neural attention model for abstractive sentence summarization. empirical methods in natural language processing, pp. 379–389, 2015. ",
|
| 1567 |
+
"bbox": [
|
| 1568 |
+
173,
|
| 1569 |
+
712,
|
| 1570 |
+
823,
|
| 1571 |
+
741
|
| 1572 |
+
],
|
| 1573 |
+
"page_idx": 10
|
| 1574 |
+
},
|
| 1575 |
+
{
|
| 1576 |
+
"type": "text",
|
| 1577 |
+
"text": "Iulian Vlad Serban, Ryan Lowe, Peter Henderson, Laurent Charlin, and Joelle Pineau. A survey of available corpora for building data-driven dialogue systems. CoRR, abs/1512.05742, 2015. ",
|
| 1578 |
+
"bbox": [
|
| 1579 |
+
171,
|
| 1580 |
+
750,
|
| 1581 |
+
825,
|
| 1582 |
+
780
|
| 1583 |
+
],
|
| 1584 |
+
"page_idx": 10
|
| 1585 |
+
},
|
| 1586 |
+
{
|
| 1587 |
+
"type": "text",
|
| 1588 |
+
"text": "Iulian Vlad Serban, Alessandro Sordoni, Yoshua Bengio, Aaron C. Courville, and Joelle Pineau. Building end-to-end dialogue systems using generative hierarchical neural network models. In Proc. of AAAI, pp. 3776–3784, 2016. ",
|
| 1589 |
+
"bbox": [
|
| 1590 |
+
173,
|
| 1591 |
+
790,
|
| 1592 |
+
825,
|
| 1593 |
+
833
|
| 1594 |
+
],
|
| 1595 |
+
"page_idx": 10
|
| 1596 |
+
},
|
| 1597 |
+
{
|
| 1598 |
+
"type": "text",
|
| 1599 |
+
"text": "Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron C Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. In AAAI, pp. 3295–3301, 2017. ",
|
| 1600 |
+
"bbox": [
|
| 1601 |
+
173,
|
| 1602 |
+
842,
|
| 1603 |
+
823,
|
| 1604 |
+
886
|
| 1605 |
+
],
|
| 1606 |
+
"page_idx": 10
|
| 1607 |
+
},
|
| 1608 |
+
{
|
| 1609 |
+
"type": "text",
|
| 1610 |
+
"text": "Lifeng Shang, Zhengdong Lu, and Hang Li. Neural responding machine for short-text conversation. In Proc. of ACL, pp. 1577–1586, 2015. ",
|
| 1611 |
+
"bbox": [
|
| 1612 |
+
174,
|
| 1613 |
+
895,
|
| 1614 |
+
820,
|
| 1615 |
+
924
|
| 1616 |
+
],
|
| 1617 |
+
"page_idx": 10
|
| 1618 |
+
},
|
| 1619 |
+
{
|
| 1620 |
+
"type": "text",
|
| 1621 |
+
"text": "Yuanlong Shao, Stephan Gouws, Denny Britz, Anna Goldie, Brian Strope, and Ray Kurzweil. Generating high-quality and informative conversation responses with sequence-to-sequence models. In Proc. of EMNLP, pp. 2210–2219, 2017. ",
|
| 1622 |
+
"bbox": [
|
| 1623 |
+
176,
|
| 1624 |
+
103,
|
| 1625 |
+
821,
|
| 1626 |
+
145
|
| 1627 |
+
],
|
| 1628 |
+
"page_idx": 11
|
| 1629 |
+
},
|
| 1630 |
+
{
|
| 1631 |
+
"type": "text",
|
| 1632 |
+
"text": "Xiaoyu Shen, Hui Su, Yanran Li, Wenjie Li, Shuzi Niu, Yang Zhao, Akiko Aizawa, and Guoping Long. A conditional variational framework for dialog generation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, pp. 504–509, 2017. ",
|
| 1633 |
+
"bbox": [
|
| 1634 |
+
173,
|
| 1635 |
+
155,
|
| 1636 |
+
825,
|
| 1637 |
+
212
|
| 1638 |
+
],
|
| 1639 |
+
"page_idx": 11
|
| 1640 |
+
},
|
| 1641 |
+
{
|
| 1642 |
+
"type": "text",
|
| 1643 |
+
"text": "Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proc. of NIPS, pp. 3104–3112, 2014. ",
|
| 1644 |
+
"bbox": [
|
| 1645 |
+
173,
|
| 1646 |
+
219,
|
| 1647 |
+
821,
|
| 1648 |
+
250
|
| 1649 |
+
],
|
| 1650 |
+
"page_idx": 11
|
| 1651 |
+
},
|
| 1652 |
+
{
|
| 1653 |
+
"type": "text",
|
| 1654 |
+
"text": "Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016. ",
|
| 1655 |
+
"bbox": [
|
| 1656 |
+
173,
|
| 1657 |
+
257,
|
| 1658 |
+
821,
|
| 1659 |
+
287
|
| 1660 |
+
],
|
| 1661 |
+
"page_idx": 11
|
| 1662 |
+
},
|
| 1663 |
+
{
|
| 1664 |
+
"type": "text",
|
| 1665 |
+
"text": "Oriol Vinyals and Quoc V. Le. A neural conversational model. arXiv preprint arXiv:1506.05869, 2015. ",
|
| 1666 |
+
"bbox": [
|
| 1667 |
+
173,
|
| 1668 |
+
295,
|
| 1669 |
+
823,
|
| 1670 |
+
325
|
| 1671 |
+
],
|
| 1672 |
+
"page_idx": 11
|
| 1673 |
+
},
|
| 1674 |
+
{
|
| 1675 |
+
"type": "text",
|
| 1676 |
+
"text": "Oriol Vinyals, Samy Bengio, and Manjunath Kudlur. Order matters: Sequence to sequence for sets. In Proc. of ICLR, 2016. ",
|
| 1677 |
+
"bbox": [
|
| 1678 |
+
173,
|
| 1679 |
+
333,
|
| 1680 |
+
821,
|
| 1681 |
+
363
|
| 1682 |
+
],
|
| 1683 |
+
"page_idx": 11
|
| 1684 |
+
},
|
| 1685 |
+
{
|
| 1686 |
+
"type": "text",
|
| 1687 |
+
"text": "Di Wang, Nebojsa Jojic, Chris Brockett, and Eric Nyberg. Steering output style and topic in neural response generation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2140–2150, 2017. ",
|
| 1688 |
+
"bbox": [
|
| 1689 |
+
173,
|
| 1690 |
+
371,
|
| 1691 |
+
823,
|
| 1692 |
+
414
|
| 1693 |
+
],
|
| 1694 |
+
"page_idx": 11
|
| 1695 |
+
},
|
| 1696 |
+
{
|
| 1697 |
+
"type": "text",
|
| 1698 |
+
"text": "Sam Wiseman and Alexander M. Rush. Sequence-to-sequence learning as beam-search optimization. In Proc. of EMNLP, pp. 1296–1306, 2016. ",
|
| 1699 |
+
"bbox": [
|
| 1700 |
+
173,
|
| 1701 |
+
422,
|
| 1702 |
+
823,
|
| 1703 |
+
452
|
| 1704 |
+
],
|
| 1705 |
+
"page_idx": 11
|
| 1706 |
+
},
|
| 1707 |
+
{
|
| 1708 |
+
"type": "text",
|
| 1709 |
+
"text": "Yu Wu, Wei Wu, Zhoujun Li, Can Xu, and Dejian Yang. Neural response generation with dynamic vocabularies. national conference on artificial intelligence, 2018. ",
|
| 1710 |
+
"bbox": [
|
| 1711 |
+
174,
|
| 1712 |
+
460,
|
| 1713 |
+
823,
|
| 1714 |
+
489
|
| 1715 |
+
],
|
| 1716 |
+
"page_idx": 11
|
| 1717 |
+
},
|
| 1718 |
+
{
|
| 1719 |
+
"type": "text",
|
| 1720 |
+
"text": "Chen Xing, Wei Wu, Yu Wu, Jie Liu, Yalou Huang, Ming Zhou, and Wei-Ying Ma. Topic aware neural response generation. In Proc. of AAAI, pp. 3351–3357, 2017. ",
|
| 1721 |
+
"bbox": [
|
| 1722 |
+
173,
|
| 1723 |
+
498,
|
| 1724 |
+
825,
|
| 1725 |
+
527
|
| 1726 |
+
],
|
| 1727 |
+
"page_idx": 11
|
| 1728 |
+
},
|
| 1729 |
+
{
|
| 1730 |
+
"type": "text",
|
| 1731 |
+
"text": "George Kingsley Zipf. The psychobiology of language. 1935. ",
|
| 1732 |
+
"bbox": [
|
| 1733 |
+
173,
|
| 1734 |
+
536,
|
| 1735 |
+
581,
|
| 1736 |
+
551
|
| 1737 |
+
],
|
| 1738 |
+
"page_idx": 11
|
| 1739 |
+
},
|
| 1740 |
+
{
|
| 1741 |
+
"type": "text",
|
| 1742 |
+
"text": "A CASES ",
|
| 1743 |
+
"text_level": 1,
|
| 1744 |
+
"bbox": [
|
| 1745 |
+
176,
|
| 1746 |
+
103,
|
| 1747 |
+
266,
|
| 1748 |
+
117
|
| 1749 |
+
],
|
| 1750 |
+
"page_idx": 12
|
| 1751 |
+
},
|
| 1752 |
+
{
|
| 1753 |
+
"type": "text",
|
| 1754 |
+
"text": "What should I do?Query: ",
|
| 1755 |
+
"bbox": [
|
| 1756 |
+
287,
|
| 1757 |
+
142,
|
| 1758 |
+
423,
|
| 1759 |
+
152
|
| 1760 |
+
],
|
| 1761 |
+
"page_idx": 12
|
| 1762 |
+
},
|
| 1763 |
+
{
|
| 1764 |
+
"type": "text",
|
| 1765 |
+
"text": "Replies form S2S+Attention: ",
|
| 1766 |
+
"text_level": 1,
|
| 1767 |
+
"bbox": [
|
| 1768 |
+
287,
|
| 1769 |
+
156,
|
| 1770 |
+
436,
|
| 1771 |
+
166
|
| 1772 |
+
],
|
| 1773 |
+
"page_idx": 12
|
| 1774 |
+
},
|
| 1775 |
+
{
|
| 1776 |
+
"type": "text",
|
| 1777 |
+
"text": "1) Do nothing. \n2) Go on. \n3) Do nothing, hm. \n4) How? \n5) Do nothing do nothing. \n6) Then go ahead. \n7) So how do you do? ",
|
| 1778 |
+
"bbox": [
|
| 1779 |
+
289,
|
| 1780 |
+
167,
|
| 1781 |
+
416,
|
| 1782 |
+
246
|
| 1783 |
+
],
|
| 1784 |
+
"page_idx": 12
|
| 1785 |
+
},
|
| 1786 |
+
{
|
| 1787 |
+
"type": "text",
|
| 1788 |
+
"text": "Replies from Ranking Loss : ",
|
| 1789 |
+
"text_level": 1,
|
| 1790 |
+
"bbox": [
|
| 1791 |
+
534,
|
| 1792 |
+
156,
|
| 1793 |
+
683,
|
| 1794 |
+
166
|
| 1795 |
+
],
|
| 1796 |
+
"page_idx": 12
|
| 1797 |
+
},
|
| 1798 |
+
{
|
| 1799 |
+
"type": "text",
|
| 1800 |
+
"text": "1) Do nothing. \n2) Do nothing. \n3) Go to sleep. \n4) Don’t worry. \n5) You should keep on. \n6) Then go ahead. \n7) Keep finding. ",
|
| 1801 |
+
"bbox": [
|
| 1802 |
+
535,
|
| 1803 |
+
169,
|
| 1804 |
+
650,
|
| 1805 |
+
247
|
| 1806 |
+
],
|
| 1807 |
+
"page_idx": 12
|
| 1808 |
+
},
|
| 1809 |
+
{
|
| 1810 |
+
"type": "text",
|
| 1811 |
+
"text": "How about the salary?Query: ",
|
| 1812 |
+
"bbox": [
|
| 1813 |
+
289,
|
| 1814 |
+
266,
|
| 1815 |
+
439,
|
| 1816 |
+
276
|
| 1817 |
+
],
|
| 1818 |
+
"page_idx": 12
|
| 1819 |
+
},
|
| 1820 |
+
{
|
| 1821 |
+
"type": "text",
|
| 1822 |
+
"text": "Replies from S2S+Attention: ",
|
| 1823 |
+
"text_level": 1,
|
| 1824 |
+
"bbox": [
|
| 1825 |
+
287,
|
| 1826 |
+
279,
|
| 1827 |
+
437,
|
| 1828 |
+
289
|
| 1829 |
+
],
|
| 1830 |
+
"page_idx": 12
|
| 1831 |
+
},
|
| 1832 |
+
{
|
| 1833 |
+
"type": "text",
|
| 1834 |
+
"text": "1) negotiable \n2) Salary negotiable. \n3) Salary negotiable. \n4) Salary negotiable! \n5) Salary and payment negotiable. \n6) Payment is nice. \n7) Payment is nice, and salary negotiable. ",
|
| 1835 |
+
"bbox": [
|
| 1836 |
+
285,
|
| 1837 |
+
291,
|
| 1838 |
+
490,
|
| 1839 |
+
369
|
| 1840 |
+
],
|
| 1841 |
+
"page_idx": 12
|
| 1842 |
+
},
|
| 1843 |
+
{
|
| 1844 |
+
"type": "text",
|
| 1845 |
+
"text": "Replies from Ranking Loss : ",
|
| 1846 |
+
"text_level": 1,
|
| 1847 |
+
"bbox": [
|
| 1848 |
+
532,
|
| 1849 |
+
276,
|
| 1850 |
+
679,
|
| 1851 |
+
286
|
| 1852 |
+
],
|
| 1853 |
+
"page_idx": 12
|
| 1854 |
+
},
|
| 1855 |
+
{
|
| 1856 |
+
"type": "text",
|
| 1857 |
+
"text": "1) Salary negotiable. \n2) Salary negotiable. \n3) High salary. \n4) Basic salary and plus \n5) Salary negotiable! \n6) Salary and payment negotiable. \n7) Payment is nice, send your CV. ",
|
| 1858 |
+
"bbox": [
|
| 1859 |
+
531,
|
| 1860 |
+
291,
|
| 1861 |
+
699,
|
| 1862 |
+
369
|
| 1863 |
+
],
|
| 1864 |
+
"page_idx": 12
|
| 1865 |
+
},
|
| 1866 |
+
{
|
| 1867 |
+
"type": "text",
|
| 1868 |
+
"text": "I’m 23, why I’m still in growth?Query: ",
|
| 1869 |
+
"bbox": [
|
| 1870 |
+
289,
|
| 1871 |
+
386,
|
| 1872 |
+
488,
|
| 1873 |
+
397
|
| 1874 |
+
],
|
| 1875 |
+
"page_idx": 12
|
| 1876 |
+
},
|
| 1877 |
+
{
|
| 1878 |
+
"type": "text",
|
| 1879 |
+
"text": "Replies from S2S+Attention: ",
|
| 1880 |
+
"text_level": 1,
|
| 1881 |
+
"bbox": [
|
| 1882 |
+
289,
|
| 1883 |
+
398,
|
| 1884 |
+
439,
|
| 1885 |
+
409
|
| 1886 |
+
],
|
| 1887 |
+
"page_idx": 12
|
| 1888 |
+
},
|
| 1889 |
+
{
|
| 1890 |
+
"type": "text",
|
| 1891 |
+
"text": "1) 23 \n2) 22. \n3) 21. \n4) 20. \n5) 25. \n6) 23 years old. \n7) 22 years old. ",
|
| 1892 |
+
"bbox": [
|
| 1893 |
+
285,
|
| 1894 |
+
411,
|
| 1895 |
+
364,
|
| 1896 |
+
489
|
| 1897 |
+
],
|
| 1898 |
+
"page_idx": 12
|
| 1899 |
+
},
|
| 1900 |
+
{
|
| 1901 |
+
"type": "text",
|
| 1902 |
+
"text": "Replies from Ranking Loss : ",
|
| 1903 |
+
"text_level": 1,
|
| 1904 |
+
"bbox": [
|
| 1905 |
+
532,
|
| 1906 |
+
396,
|
| 1907 |
+
679,
|
| 1908 |
+
406
|
| 1909 |
+
],
|
| 1910 |
+
"page_idx": 12
|
| 1911 |
+
},
|
| 1912 |
+
{
|
| 1913 |
+
"type": "text",
|
| 1914 |
+
"text": "1) 23. \n2) 23. \n3) just 23. \n4) just 22. \n5) 23 years old are not \n6) 23 years old are not old \n7) 23 years old are not old! ",
|
| 1915 |
+
"bbox": [
|
| 1916 |
+
531,
|
| 1917 |
+
411,
|
| 1918 |
+
661,
|
| 1919 |
+
489
|
| 1920 |
+
],
|
| 1921 |
+
"page_idx": 12
|
| 1922 |
+
},
|
| 1923 |
+
{
|
| 1924 |
+
"type": "text",
|
| 1925 |
+
"text": "Where are you graduate?Query: ",
|
| 1926 |
+
"bbox": [
|
| 1927 |
+
289,
|
| 1928 |
+
506,
|
| 1929 |
+
450,
|
| 1930 |
+
517
|
| 1931 |
+
],
|
| 1932 |
+
"page_idx": 12
|
| 1933 |
+
},
|
| 1934 |
+
{
|
| 1935 |
+
"type": "text",
|
| 1936 |
+
"text": "Replies from S2S+Attention: ",
|
| 1937 |
+
"text_level": 1,
|
| 1938 |
+
"bbox": [
|
| 1939 |
+
289,
|
| 1940 |
+
518,
|
| 1941 |
+
437,
|
| 1942 |
+
529
|
| 1943 |
+
],
|
| 1944 |
+
"page_idx": 12
|
| 1945 |
+
},
|
| 1946 |
+
{
|
| 1947 |
+
"type": "text",
|
| 1948 |
+
"text": "1) Xi’an. \n2) Wuhan. \n3) <unk>. \n4) Nanjing. \n5) Junior. \n6) In Junior. \n7) In junior junior Shanghai. ",
|
| 1949 |
+
"bbox": [
|
| 1950 |
+
285,
|
| 1951 |
+
531,
|
| 1952 |
+
426,
|
| 1953 |
+
609
|
| 1954 |
+
],
|
| 1955 |
+
"page_idx": 12
|
| 1956 |
+
},
|
| 1957 |
+
{
|
| 1958 |
+
"type": "text",
|
| 1959 |
+
"text": "Replies from Ranking Loss : ",
|
| 1960 |
+
"text_level": 1,
|
| 1961 |
+
"bbox": [
|
| 1962 |
+
532,
|
| 1963 |
+
516,
|
| 1964 |
+
681,
|
| 1965 |
+
527
|
| 1966 |
+
],
|
| 1967 |
+
"page_idx": 12
|
| 1968 |
+
},
|
| 1969 |
+
{
|
| 1970 |
+
"type": "text",
|
| 1971 |
+
"text": "1) Peking. \n2) Chengdu. \n3) Xi’an. \n4) In Chengdu. \n5) I study in Chengdu. \n6) I study in Shanghai. \n7) I study in Beijing. ",
|
| 1972 |
+
"bbox": [
|
| 1973 |
+
531,
|
| 1974 |
+
531,
|
| 1975 |
+
642,
|
| 1976 |
+
609
|
| 1977 |
+
],
|
| 1978 |
+
"page_idx": 12
|
| 1979 |
+
},
|
| 1980 |
+
{
|
| 1981 |
+
"type": "text",
|
| 1982 |
+
"text": "My child is born.Query: ",
|
| 1983 |
+
"bbox": [
|
| 1984 |
+
287,
|
| 1985 |
+
626,
|
| 1986 |
+
411,
|
| 1987 |
+
636
|
| 1988 |
+
],
|
| 1989 |
+
"page_idx": 12
|
| 1990 |
+
},
|
| 1991 |
+
{
|
| 1992 |
+
"type": "text",
|
| 1993 |
+
"text": "Replies from S2S+Attention: ",
|
| 1994 |
+
"text_level": 1,
|
| 1995 |
+
"bbox": [
|
| 1996 |
+
287,
|
| 1997 |
+
638,
|
| 1998 |
+
434,
|
| 1999 |
+
648
|
| 2000 |
+
],
|
| 2001 |
+
"page_idx": 12
|
| 2002 |
+
},
|
| 2003 |
+
{
|
| 2004 |
+
"type": "text",
|
| 2005 |
+
"text": "Replies from Ranking Loss : ",
|
| 2006 |
+
"text_level": 1,
|
| 2007 |
+
"bbox": [
|
| 2008 |
+
529,
|
| 2009 |
+
636,
|
| 2010 |
+
678,
|
| 2011 |
+
647
|
| 2012 |
+
],
|
| 2013 |
+
"page_idx": 12
|
| 2014 |
+
},
|
| 2015 |
+
{
|
| 2016 |
+
"type": "text",
|
| 2017 |
+
"text": "1) <unk>. \n2) born. \n3) born baby. \n4) children born. \n5) born born children. \n6) born born born children. \n7) born children born children. \n1) ok \n2) Cheers! \n3) Em. \n4) ok, born child. \n5) cheers, congulations! \n6) born born born children. \n7) born children born children. ",
|
| 2018 |
+
"bbox": [
|
| 2019 |
+
284,
|
| 2020 |
+
651,
|
| 2021 |
+
434,
|
| 2022 |
+
729
|
| 2023 |
+
],
|
| 2024 |
+
"page_idx": 12
|
| 2025 |
+
},
|
| 2026 |
+
{
|
| 2027 |
+
"type": "text",
|
| 2028 |
+
"text": "",
|
| 2029 |
+
"bbox": [
|
| 2030 |
+
529,
|
| 2031 |
+
651,
|
| 2032 |
+
679,
|
| 2033 |
+
729
|
| 2034 |
+
],
|
| 2035 |
+
"page_idx": 12
|
| 2036 |
+
},
|
| 2037 |
+
{
|
| 2038 |
+
"type": "text",
|
| 2039 |
+
"text": "Figure 4: Cases for comparing the S2SA and the model with ranking regularization, and the topics or expressions of the generated replies marked with blue are excluded in the responses generated by SASA. ",
|
| 2040 |
+
"bbox": [
|
| 2041 |
+
174,
|
| 2042 |
+
750,
|
| 2043 |
+
823,
|
| 2044 |
+
791
|
| 2045 |
+
],
|
| 2046 |
+
"page_idx": 12
|
| 2047 |
+
}
|
| 2048 |
+
]
|
parse/train/H1eqviAqYX/H1eqviAqYX_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1eqviAqYX/H1eqviAqYX_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1xaJn05FQ/H1xaJn05FQ.md
ADDED
|
@@ -0,0 +1,469 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SLICED-WASSERSTEIN AUTO-ENCODERS
|
| 2 |
+
|
| 3 |
+
Soheil Kolouri, Phillip E. Pope, & Charles E. Martin,
|
| 4 |
+
|
| 5 |
+
Gustavo K. Rohde
|
| 6 |
+
|
| 7 |
+
Information and Systems Sciences Laboratory HRL Laboratories, LLC.
|
| 8 |
+
Malibu, CA, USA
|
| 9 |
+
{skolouri,pepope,cemartin}@hrl.com
|
| 10 |
+
|
| 11 |
+
Department of Electrical Engineering University of Virginia Charlottesville, VA, USA gustavo@virginia.edu
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
In this paper we use the geometric properties of the optimal transport (OT) problem and the Wasserstein distances to define a prior distribution for the latent space of an auto-encoder. We introduce Sliced-Wasserstein Auto-Encoders (SWAE), that enable one to shape the distribution of the latent space into any samplable probability distribution without the need for training an adversarial network or having a likelihood function specified. In short, we regularize the auto-encoder loss with the sliced-Wasserstein distance between the distribution of the encoded training samples and a samplable prior distribution. We show that the proposed formulation has an efficient numerical solution that provides similar capabilities to Wasserstein Auto-Encoders (WAE) and Variational Auto-Encoders (VAE), while benefiting from an embarrassingly simple implementation. We provide extensive error analysis for our algorithm, and show its merits on three benchmark datasets.
|
| 16 |
+
|
| 17 |
+
Scalable generative models that capture the rich and often nonlinear distribution of high-dimensional data, (i.e., image, video, and audio), play a central role in various applications of machine learning, including transfer learning Isola et al. (2017); Murez et al. (2018), super-resolution Ledig et al. (2016); Kolouri & Rohde (2015), image inpainting and completion Yeh et al. (2017), and image retrieval Creswell & Bharath (2016), among many others. The recent parametric generative models, including Generative Adversarial Networks (GANs) Goodfellow et al. (2014); Radford et al. (2015); Arjovsky et al. (2017); Berthelot et al. (2017) and Variational auto-encoders (VAE) Kingma & Welling (2013); Mescheder et al. (2017); Bousquet et al. (2017) enable an unsupervised and end-to-end modeling of the high-dimensional distribution of the training data.
|
| 18 |
+
|
| 19 |
+
Learning such generative models boils down to minimizing a dissimilarity measure between the data distribution and the output distribution of the generative model. To this end, and following the work of Arjovsky et al. (2017) and Bousquet et al. (2017), we approach the problem of generative modeling from the optimal transport point of view. The optimal transport problem Villani (2008); Kolouri et al. (2017) provides a way to measure the distances between probability distributions by transporting (i.e., morphing) one distribution into another. Moreover, and as opposed to the common information theoretic dissimilarity measures (e.g., $f$ -divergences), the p-Wasserstein dissimilarity measures that arise from the optimal transport problem: 1) are true distances, and 2) metrize a weak convergence of probability measures (at least on compact spaces). Wasserstein distances have recently attracted a lot of interest in the learning community Frogner et al. (2015); Gulrajani et al. (2017); Bousquet et al. (2017); Arjovsky et al. (2017); Kolouri et al. (2017) due to their exquisite geometric characteristics Santambrogio (2015). See the supplementary material for an intuitive example showing the benefit of the Wasserstein distance over commonly used $f$ -divergences.
|
| 20 |
+
|
| 21 |
+
In this paper, we introduce a new type of auto-encoders for generative modeling (Algorithm 1), which we call Sliced-Wasserstein auto-encoders (SWAE), that minimize the sliced-Wasserstein distance between the distribution of the encoded samples and a samplable prior distribution. Our work is most closely related to the recent work by Bousquet et al. (2017) and more specifically the follow-up work by Tolstikhin et al. (2017). However, our approach avoids the need to perform adversarial training in the encoding space and is not restricted to closed-form distributions, while still benefiting from a Wasserstein-like distance measure in the latent space. Calculating the Wasserstein distance can be computationally expensive, but our approach permits a simple numerical solution to the problem. Finally, we note that there has been several concurrent papers, including the work by Deshpande et al. (2018) and ¸Sim¸sekli et al. (2018), that also looked into the application of sliced-Wasserstein distance in generative modeling. Regardless of the concurrent nature of these papers, our work remains novel and is distinguished from these methods. Deshpande et al. (2018) use the sliced-Wasserstein distance to match the distributions of high-dimensional reconstructed images, which require large number of slices, $\mathcal { O } ( 1 0 ^ { 4 } )$ , while in our method and due to the distribution matching in the latent space we only need $\mathcal { O } ( 1 0 )$ slices. We also note that Deshpande et al. (2018) proposed to learn discriminative slices to mitigate the need for a very large number of random projections that is in essence similar to the adversarial training used in GANs, which contradicts with our goal of not using adversarial training. ¸Sim¸sekli et al. (2018), on the other hand, take an interesting but different approach of parameter-free generative modeling via sliced-Wasserstein flows.
|
| 22 |
+
|
| 23 |
+
# 1 NOTATION AND PRELIMINARIES
|
| 24 |
+
|
| 25 |
+
Let $X$ denote the compact domain of a manifold in Euclidean space and let $x _ { n } \in X$ denote an individual input data point. Furthermore, let $\rho _ { X }$ be a Borel probability measure defined on $X$ . We define the probability density function $p _ { X } ( x )$ for input data $x$ to be:
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
d \rho _ { X } ( x ) = p _ { X } ( x ) d x
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
Let $\phi : X \to Z$ denote a deterministic parametric mapping from the input space to a latent space $Z$ (e.g., a neural network encoder). To obtain the density of the push forward of $\rho _ { X }$ with respect to $\phi$ , i.e., $\rho _ { Z } = \phi _ { * } ( \rho _ { X } )$ , we use Random Variable Transformation (RVT) Gillespie (1983)). In short, the probability density function of the encoded samples $z$ can be expressed in terms of $\phi$ and $p _ { X }$ by:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
p _ { Z } ( z ) = \int _ { X } p _ { X } ( x ) \delta ( z - \phi ( x ) ) d x ,
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
where $\delta$ denotes the Dirac distribution function. Similar to variational Auto-Encoders (VAEs) Kingma $\&$ Welling (2013) and the Wasserstein Auto-Encoders (WAE) Tolstikhin et al. (2017), our main objective is to encode the input data points $x \in X$ into latent codes $z \in Z$ such that: 1) $x$ can be recovered/approximated from $z$ , and 2) the probability density function of the encoded samples, $p _ { Z }$ , follows a prior distribution $q _ { Z }$ . Let $\psi : Z \to X$ be the decoder that maps the latent codes back to the original space such that
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
p _ { Y } ( y ) = \int _ { X } p _ { X } ( x ) \delta ( y - \psi ( \phi ( x ) ) ) d x ,
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $y$ denotes the decoded samples. It is straightforward to see that when $\psi = \phi ^ { - 1 }$ (i.e. $\psi ( \phi ( \cdot ) ) =$ $i d ( \cdot ) )$ , the distribution of the decoder $p _ { Y }$ and the input distribution $p _ { X }$ are identical. Hence, in its most general form, the objective of such auto-encoders simplifies to learning $\phi$ and $\psi$ , so that they minimize a dissimilarity measure between $p _ { Y }$ and $p _ { X }$ , and between $p _ { Z }$ and $q _ { Z }$ . In what follows, we briefly review the existing dissimilarity measures for these distributions.
|
| 44 |
+
|
| 45 |
+
# 1.1 MINIMIZING DISSIMILARITY BETWEEN $p _ { X }$ AND $p _ { Y }$
|
| 46 |
+
|
| 47 |
+
We first emphasize that the VAE often assumes stochastic encoders and decoders Kingma & Welling (2013), while we consider the case of only deterministic mappings. Although, we note that, similar to WAE, SWAE can also be formulated with stochastic encoders. Different measures have been used previously to compute the dissimilarity between $p _ { X }$ and $p _ { Y }$ . Most notably, Nowozin et al. (2016) showed that for the general family of $f$ -divergences, $D _ { f } ( p _ { X } , p _ { Y } )$ , (including the KL-divergence, JensenShannon, etc.), using the Fenchel conjugate of the convex function $f$ and minimizing $D _ { f } ( p _ { X } , p _ { Y } )$ leads to a min-max problem that is equivalent to the adversarial training widely used in the generative modeling literature Goodfellow et al. (2014); Makhzani et al. (2015); Mescheder et al. (2017).
|
| 48 |
+
|
| 49 |
+
Others have utilized the rich mathematical foundation of the OT problem and Wasserstein distances Arjovsky et al. (2017); Gulrajani et al. (2017); Bousquet et al. (2017); Tolstikhin et al. (2017) to define a distance between $p _ { X }$ and $p _ { Y }$ . In Wasserstein-GAN, Arjovsky et al. (2017) utilized the Kantorovich-Rubinstein duality for the 1-Wasserstein distance, $W _ { 1 } ( p _ { X } , p _ { Y } )$ , and reformulated the problem as a min-max optimization that is solved through an adversarial training scheme.
|
| 50 |
+
|
| 51 |
+
Inspired by the work of Bousquet et al. (2017) and Tolstikhin et al. (2017), it can be shown that (see supplementary material for a proof):
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\begin{array} { r c l } { W _ { c } ( p _ { X } , p _ { Y } ) \leq W _ { c } ^ { \dagger } ( p _ { X } , p _ { Y } ) } & { : = } & { \mathbb { E } _ { p _ { X } } \left( c ( x , \psi ( \phi ( x ) ) ) \right) } \\ & { = } & { \displaystyle \int _ { X } c ( x , \psi ( \phi ( x ) ) ) p _ { X } ( x ) d x , } \end{array}
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
Furthermore, the r.h.s. of equation 3 supports a simple implementation where for i.i.d samples of the input distribution, $\{ x _ { n } \} _ { n = 1 } ^ { N }$ , the upper bound can be approximated as:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
W _ { c } ^ { \ddagger } ( p _ { X } , p _ { Y } ) \approx \frac { 1 } { N } \sum _ { n = 1 } ^ { N } c ( x _ { n } , \psi ( \phi ( x _ { n } ) ) )
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
The r.h.s of equation 3 and equation 4 take advantage of the existence of pairs $x _ { n }$ and $y _ { n } = \psi { \bigl ( } \phi ( x _ { n } ) { \bigr ) }$ , which make $f ( \cdot ) = \psi ( \phi ( \cdot ) )$ a transport map between $p _ { X }$ and $p _ { Y }$ (but not necessarily the optimal transport map). In this paper, we minimize $W _ { c } ^ { \ddagger } ( p _ { X } , p _ { Y } )$ following equation 4 to minimize the discrepancy between $p _ { X }$ and $p _ { Y }$ . Next, we focus on the discrepancy measures between $p _ { Z }$ and $q _ { Z }$ .
|
| 64 |
+
|
| 65 |
+
# 1.2 MINIMIZING DISSIMILARITY BETWEEN $p _ { Z }$ AND $q _ { Z }$
|
| 66 |
+
|
| 67 |
+
If $q _ { Z }$ is a known distribution with an explicit formulation (e.g. Normal distribution) the most straightforward approach for measuring the (dis)similarity between $p _ { Z }$ and $q _ { Z }$ is the log-likelihood of $z = \phi ( x )$ with respect to $q _ { Z }$ , formally:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
s u p _ { \phi } \int _ { X } p _ { X } ( x ) l o g ( q _ { Z } ( \phi ( x ) ) ) d x
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
maximizing the log-likelihood is equivalent to minimizing the KL-divergence between $p _ { Z }$ and $q _ { Z }$ , $D _ { K L } ( p _ { Z } , q _ { Z } )$ (see supplementary material for more details and derivation of Equation equation 5). This approach has two major limitations: 1) The KL-Divergence and in general $f$ -divergences do not provide meaningful dissimilarity measures for distributions supported on non-overlapping lowdimensional manifolds Arjovsky et al. (2017); Kolouri et al. (2018) (see supplementary material), which is common in hidden layers of neural networks, and therefore they do not provide informative gradients for training $\phi$ , and 2) we are limited to distributions $q _ { Z }$ that have known explicit formulations, which is restrictive as it eliminates the ability to use the much broader class of samplable distributions.
|
| 74 |
+
|
| 75 |
+
Various alternatives exist in the literature to address the above-mentioned limitations. These methods often sample $\tilde { \mathcal { Z } } \ = \ \{ \tilde { z } _ { j } \} _ { j = 1 } ^ { N }$ from $q _ { Z }$ and $\mathcal Z \ = \ \{ z _ { n } \ = \ \phi ( x _ { n } ) \} _ { n = 1 } ^ { N }$ from $p _ { X }$ and measure the discrepancy between these sets (i.e. point clouds). Note that there are no one-to-one correspondences between $\tilde { z } _ { j } \mathrm { s }$ and $z _ { n } \mathbf { S }$ . In their influential WAE paper, Tolstikhin et al. (2017) proposed two different approaches for measuring the discrepancy between $\tilde { \mathcal { Z } }$ and $\mathcal { Z }$ , namely the GAN-based and the maximum mean discrepancy (MMD)-based approaches. The GAN-based approach proposed in Tolstikhin et al. (2017) defines a discriminator network, $D _ { Z } ( p _ { Z } , q _ { Z } )$ , to classify $\tilde { z } _ { j } \mathrm { s }$ and $z _ { n } s$ as coming from ‘true’ and ‘fake’ distributions correspondingly, and proposes a min-max adversarial optimization for learning $\phi$ and $D _ { Z }$ . The MMD-based approach, utilizes a positive-definite reproducing kernel $k : Z \times Z \to \mathbb { R }$ to measure the discrepancy between $\tilde { \mathcal { Z } }$ and $\mathcal { Z }$ . The choice of the kernel and its parameterization, however, remain a data-dependent design parameter.
|
| 76 |
+
|
| 77 |
+
An interesting alternative approach is to use the Wasserstein distance between $p _ { Z }$ and $q _ { Z }$ . Following the work of Arjovsky et al. (2017), this can be accomplished utilizing the Kantorovich-Rubinstein duality and through introducing a min-max problem, which leads to yet another adversarial training scheme similar to the GAN-based method in Tolstikhin et al. (2017). Note that, since elements of $\tilde { \mathcal { Z } }$ and $\mathcal { Z }$ are not paired, an approach similar to equation 4 could not be used to minimize the discrepancy. In this paper, we propose to use the sliced-Wasserstein metric, Rabin & Peyré (2011); Rabin et al. (2011); Bonneel et al. (2015); Kolouri et al. (2016b); Carriere et al. (2017); Kolouri et al. (2018), to measure the discrepancy between $p _ { Z }$ and $q _ { Z }$ . We show that using the sliced-Wasserstein distance ameliorates the need for training an adversary network or choosing a data-dependent kernel (as in WAE-MMD), and provides an efficient, stable, and simple numerical implementation.
|
| 78 |
+
|
| 79 |
+
Before explaining our proposed approach, it is worthwhile to point out the major difference between learning auto-encoders as generative models and GANs. In GANs, one needs to minimize a distance between {ψ(˜zj )|z˜j ∼ qZ}Mj=1 and $\{ x _ { n } \} _ { n = 1 } ^ { M }$ , which are high-dimensional point clouds for which there are no correspondences between $\psi ( \tilde { z } _ { j } ) \mathrm { s }$ and $x _ { n } s$ . For the auto-encoders, on the other hand, there exists correspondences between the high-dimensional point clouds $\{ x _ { n } \} _ { n = 1 } ^ { M }$ and $\{ y _ { n } = \psi ( \phi ( x _ { n } ) ) \} _ { n = 1 } ^ { M }$ and the problem simplifies to matching the lower-dimensional point clouds $\{ { \bar { \phi } } ( x _ { n } ) \} _ { n = 1 } ^ { M }$ and $\{ \tilde { z } _ { j } \sim$ $q _ { Z } \} _ { j = 1 } ^ { M }$ . In other words, the encoder performs a nonlinear dimensionality reduction, that enables us to solve a simpler problem compared to GANs. Next we introduce the details of our approach.
|
| 80 |
+
|
| 81 |
+
# 2 PROPOSED METHOD
|
| 82 |
+
|
| 83 |
+
In what follows we first provide a brief review of the necessary equations to understand the Wasserstein and sliced-Wasserstein distances and then present our Sliced Wasserstein auto-encoder (SWAE).
|
| 84 |
+
|
| 85 |
+
# 2.1 WASSERSTEIN DISTANCES
|
| 86 |
+
|
| 87 |
+
The Wasserstein distance between probability measures $\rho _ { X }$ and $\rho _ { Y }$ , with corresponding densities $d \rho _ { X } = p _ { X } ( x ) d x$ and $d \rho _ { Y } = p _ { Y } ( y ) d y$ is defined as:
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
W _ { c } ( p _ { X } , p _ { Y } ) = i n f _ { \gamma \in \Gamma ( \rho _ { X } , \rho _ { Y } ) } \int _ { X \times Y } c ( x , y ) d \gamma ( x , y )
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
where $\Gamma ( \rho _ { X } , \rho _ { Y } )$ is the set of all transportation plans (i.e. joint measures) with marginal densities $p _ { X }$ and $p _ { Y }$ , and $c : X \times Y \to \mathbb { R } ^ { + }$ is the transportation cost. equation 6 is known as the Kantorovich formulation of the optimal mass transportation problem, which seeks the optimal transportation plan between $p _ { X }$ and $p _ { Y }$ . If there exist diffeomorphic mappings, $f : X \to Y$ (i.e. transport maps) such that $y = f ( x )$ and consequently,
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
p _ { Y } ( y ) = \int _ { X } p _ { X } ( x ) \delta ( y - f ( x ) ) d x { \xrightarrow [ { \mathrm { ~ u i f f e o m o r p h i s m } } ] { \mathrm { W h e n ~ f ~ i s } } } ~ p _ { Y } ( y ) = d e t ( D f ^ { - 1 } ( y ) ) p _ { X } ( f ^ { - 1 } ( y ) )
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $d e t ( D \cdot )$ is the determinant of the Jacobian, then the Wasserstein distance could be defined based on the Monge formulation of the problem (see Villani (2008) and Kolouri et al. (2017)) as:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
W _ { c } ( p _ { X } , p _ { Y } ) = m i n _ { f \in M P } \int _ { X } c ( x , f ( x ) ) d \rho _ { X } ( x )
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
where $M P$ is the set of all diffeomorphisms that satisfy equation 7. As can be seen from equation 6 and equation 8, obtaining the Wasserstein distance requires solving an optimization problem. We note that various efficient optimization techniques have been proposed in the past (e.g. Cuturi (2013); Solomon et al. (2015); Oberman $\&$ Ruan (2015)) to solve this optimization. For one-dimensional probability densities, $p _ { X }$ and $p _ { Y }$ , however, the Wasserstein distance has a closed-form solution. Let $P _ { X }$ and $P _ { Y }$ be the cumulative distributions of one-dimensional probability distributions $p _ { X }$ and $p _ { Y }$ , correspondingly. The Wassertein distance can then be calculated as below (see Kolouri et al. (2017) for more details):
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
W _ { c } ( p _ { X } , p _ { Y } ) = \int _ { 0 } ^ { 1 } c ( P _ { X } ^ { - 1 } ( \tau ) , P _ { Y } ^ { - 1 } ( \tau ) ) d \tau ,
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
This closed-form solution motivates the definition of sliced-Wasserstein distances.
|
| 112 |
+
|
| 113 |
+
# 2.2 SLICED-WASSERSTEIN DISTANCES
|
| 114 |
+
|
| 115 |
+
Sliced-Wasserstein distance has similar qualitative properties to the Wasserstein distance, but it is much easier to compute. The sliced-Wasserstein distance was used in Rabin & Peyré (2011); Rabin et al. (2011) to calculate barycenter of distributions and point clouds. Bonneel et al. (2015) provided a nice theoretical overview of barycenteric calculations using the sliced-Wasserstein distance. Kolouri et al. (2016b) used it to define positive definite kernels for distributions and Carriere et al. (2017) to define a kernel for persistence diagrams. Sliced-Wasserstein was recently used for learning Gaussian mixture models in Kolouri et al. (2018), and it was also used as a measure of goodness of fit for GANs in Karras et al. (2017).
|
| 116 |
+
|
| 117 |
+
The main idea behind the sliced-Wasserstein distance is to slice (i.e., project) higher-dimensional probability densities into sets of one-dimensional marginal distributions and compare these marginal distributions via the Wasserstein distance. The slicing/projection process is related to the field of Integral Geometry and specifically the Radon transform (see Helgason (2011)). The relevant result to our discussion is that a d-dimensional probability density $p _ { X }$ can be uniquely represented as the set of its one-dimensional marginal distributions following the Radon transform and the Fourier slice theorem Helgason (2011). These one dimensional marginal distributions of $p _ { X }$ are defined as:
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\mathcal { R } p _ { X } ( t ; \theta ) = \int _ { X } p _ { X } ( x ) \delta ( t - \theta \cdot x ) d x , \forall \theta \in \mathbb { S } ^ { d - 1 } , \forall t \in \mathbb { R }
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
where $\mathbb { S } ^ { d - 1 }$ is the $\mathrm { d }$ -dimensional unit sphere. Note that for any fixed $\theta \in \mathbb { S } ^ { d - 1 }$ , $\mathcal { R } p _ { X } ( \cdot ; \theta )$ is a one-dimensional slice of distribution $p _ { X }$ . In other words, $\mathcal { R } p _ { X } ( \cdot ; \theta )$ is a marginal distribution of $p _ { X }$
|
| 124 |
+
|
| 125 |
+
that is obtained from integrating $p _ { X }$ over the hyperplane orthogonal to $\theta$ .Utilizing these marginal distributions in equation 10, the sliced Wasserstein distance could be defined as:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
S W _ { c } ( p _ { X } , p _ { Y } ) = \int _ { \mathbb { S } ^ { d - 1 } } W _ { c } ( \mathscr { R } p _ { X } ( \cdot ; \theta ) , \mathscr { R } p _ { Y } ( \cdot ; \theta ) ) d \theta
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
Given that $\mathcal { R } p _ { X } ( \cdot ; \theta )$ and $\mathcal { R } p _ { Y } ( \cdot ; \theta )$ are one-dimensional, the Wasserstein distance in the integrand has a closed-form solution (see equation 9). Moreover, it can be shown that $S W _ { c }$ is a true metric (Bonnotte (2013) and Kolouri et al. (2016a)), and it induces the same topology as $W _ { c }$ , at least on compact sets Santambrogio (2015). A natural transportation cost that has extensively studied in the past is the $\ell _ { 2 } ^ { 2 }$ , $c ( x , y ) { \overset { \cdot } { = } } \| x - y \| _ { 2 } ^ { 2 }$ , for which there are theoretical guarantees on existence and uniqueness of transportation plans and maps (see Santambrogio (2015) and Villani (2008)). When $c ( \bar { x , y } ) = \| x - y \| _ { p } ^ { p }$ for $p \geq 2$ , the following upper bound hold for the SW distance:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
S W _ { p } ^ { p } ( p _ { X } , p _ { Y } ) \leq \alpha _ { d , p } W _ { p } ^ { p } ( p _ { X } , p _ { Y } )
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
where, $\begin{array} { r } { \alpha _ { d , p } = \frac { 1 } { d } \int _ { \mathbb { S } ^ { d - 1 } } \| \theta \| _ { p } ^ { p } d \theta \leq 1 } \end{array}$ . Chapter 5 in Bonnotte (2013) proves this inequality. In our paper, we are interested in $p = 2$ , for which $\begin{array} { r } { \alpha _ { p , d } = \frac { 1 } { d } } \end{array}$ , and we have:
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
S W _ { 2 } ( p _ { X } , p _ { Y } ) \leq \frac { 1 } { \sqrt { d } } W _ { 2 } ( p _ { X } , p _ { Y } )
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
In the Numerical Implementation Section, we provide a numerical experiment to compare $W _ { 2 }$ and $S W _ { 2 }$ , that confirms the above equation.
|
| 144 |
+
|
| 145 |
+
# 2.3 SLICED-WASSERSTEIN AUTO-ENCODER (SWAE)
|
| 146 |
+
|
| 147 |
+
Our proposed formulation for the SWAE is as follows:
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\begin{array} { r } { \operatorname * { a r g m i n } _ { \phi , \psi } W _ { c } ^ { \ddagger } ( p _ { X } , p _ { Y } ) + \lambda S W _ { c } ( p _ { Z } , q _ { Z } ) } \end{array}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
where $\phi$ is the encoder, $\psi$ is the decoder, $p _ { X }$ is the data distribution, $p _ { Y }$ is the data distribution after encoding and decoding ( equation 2), $p _ { Z }$ is the distribution of the encoded data ( equation 1), $q _ { Z }$ is a predefined samplable distribution, and $\lambda$ indicates the relative importance of the loss functions. To further clarify why we use the sliced-Wasserstein distance to measure the difference between $p _ { Z }$ and $q _ { Z }$ , we reiterate that due to the lack of correspondences between $\tilde { z } _ { i } \mathbf { s }$ and $z _ { j } \mathbf { s }$ , one cannot minimize the upper-bound in equation 4, and calculation of the Wasserstein distance requires an additional optimization step to obtain the optimal coupling between $p _ { Z }$ and $q _ { Z }$ . To avoid this additional optimization, while maintaining the favorable characteristics of the Wasserstein distance, we use the sliced-Wasserstein distance to measure the discrepancy between $p _ { Z }$ and $q _ { Z }$ .
|
| 154 |
+
|
| 155 |
+
# 3 NUMERICAL IMPLEMENTATION
|
| 156 |
+
|
| 157 |
+
We now describe the numerical details of our approach.
|
| 158 |
+
|
| 159 |
+
# 3.1 NUMERICAL IMPLEMENTATION OF THE WASSERSTEIN DISTANCE IN 1D
|
| 160 |
+
|
| 161 |
+
The Wasserstein distance between two one-dimensional probability densities $p _ { X }$ and $p _ { Y }$ is obtained from equation 9. The integral in equation 9 can be numerically estimated using the midpoint Riemann sum, $\begin{array} { r } { \frac { 1 } { M } \sum _ { m = 1 } ^ { M } a _ { m } } \end{array}$ , where $a _ { m } = c ( P _ { X } ^ { - 1 } ( \tau _ { m } ) , P _ { Y } ^ { - 1 } ( \tau _ { m } ) )$ and $\begin{array} { r } { \tau _ { m } = \frac { 2 m - 1 } { 2 M } } \end{array}$ (see Fig. 1). In scenarios re only samples from s can be estimated as $x _ { m } \sim p _ { X }$ $y _ { m } \sim p _ { Y }$ cal den-, where $\begin{array} { r } { p _ { X } \approx p _ { X , M } = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \delta _ { x _ { m } } } \end{array}$ $\begin{array} { r } { p _ { Y } \approx p _ { Y , M } = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \delta _ { y _ { m } } } \end{array}$ $\delta _ { x _ { m } }$ is the Dirac delta function centered at $x _ { m }$ . Therefore the corresponding empirical distribution function of $p _ { X }$ is $\begin{array} { r } { P _ { X } ( t ) \approx P _ { X , M } ( t ) = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } u ( t - x _ { m } ) } \end{array}$ where $u ( . )$ is the step function $( P _ { Y , M } ( t )$ is defined similarly). From Glivenko-Cantelli Theorem we have that $\operatorname* { s u p } _ { t } | P _ { X , M } ( t ) - P _ { X } ( t ) | \xrightarrow { a . s . } 0 ,$ where the convergence behavior is achieved via Dvoretzky–Kiefer–Wolfowitz inequality bound: $\begin{array} { r } { P r o b ( \operatorname* { s u p } _ { t } | P _ { X , M } ( t ) - P _ { X } ( t ) | > \epsilon ) \leq 2 \exp \left( - 2 M \epsilon ^ { 2 } \right) . } \end{array}$ . Calculating the Wasserstein distance with the empirical distribution function is computationally attractive. Sorting $x _ { m } s$ in an ascending order, such that $x _ { i [ m ] } ~ \leq ~ x _ { i [ m + 1 ] }$ and where $i [ m ]$ is the index of the sorted $x _ { m } s$ , it is straightforward to see that $P _ { X , M } ^ { - 1 } ( \tau _ { m } ) = x _ { i [ m ] }$ (see Fig. 1 for a visualization). The Wasserstein distance can be approximated by first sorting $x _ { m } s$ and $y _ { m } \mathbf { s }$ and then calculating:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
W _ { c } ( p _ { X } , p _ { Y } ) \approxeq W _ { c } ( p _ { X , M } , p _ { Y , M } ) = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } c ( x _ { i [ m ] } , y _ { j [ m ] } )
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 1: The Wasserstein distance for one-dimensional probability distributions $p _ { X }$ and $p _ { Y }$ (top left) is calculated based on equation 9. For a numerical implementation, the integral in equation 9 is substituted with 1 PMm= M 1 am where, am = c(P −1X (τm), P −1Y (τm)) (top right). When only samples from the distributions are available $x _ { n } \sim p _ { X }$ and $y _ { n } \sim Y$ (bottom left), the Wasserstein distance is approximated by sorting $x _ { m } s$ and $y _ { m } \mathbf { s }$ and letting $a _ { m } = c ( x _ { i [ m ] } , y _ { j [ m ] } )$ , where $i [ m ]$ and $j [ m ]$ are the sorted indices (bottom right).
|
| 169 |
+
|
| 170 |
+
The problem of calculating the Wasserstein distance between samples from one-dimensional densities simplifies to solving two sorting problems (solved in $\mathcal { O } ( M ) / \mathcal { O } ( \bar { M } l o g ( M ) )$ best/worst case).
|
| 171 |
+
|
| 172 |
+
We need to address one final question here. How well does equation 15 approximate the Wasserstein distance, $W _ { c } ( p _ { X } , p _ { Y } ) ?$ We first note that the rates of convergence of empirical distributions, for the $\boldsymbol { \mathrm { p } }$ -Wasserstein metric (i.e., $c ( x , y ) = | x - y | ^ { p } )$ of order $p \geq 1$ , have been extensively studied in the mathematics and statistics communities (see for instance Bobkov & Ledoux (2014) and Dedecker et al. (2015)). A detailed description of these rates is, however, beyond the scope of this paper, especially since these rates are dependent on the choice of $p$ . In short, for $p = 1$ it can be shown that E(W1(pX,M , pX ) ≤ √CM where $C$ is an absolute constant. Similar results are achieved for $\mathbb { E } ( W _ { p } ( p _ { X , M } , p _ { X } ) )$ and $( \mathbb { E } ( W _ { p } ^ { p } ( p _ { X , M } , p _ { X } ) ) ) ^ { \frac { 1 } { p } }$ , although under more strict assumptions on $p _ { X }$ (i.e., slightly stronger assumptions than having a finite second moment). Using the triangle inequality together with the convergence rates of empirical distributions with respect to the p-Wasserstein distance, see Bobkov $\&$ Ledoux (2014), for $W _ { 1 } ( p _ { X , M } , p _ { X } )$ (or more generally $W _ { p } ( p _ { X , M } , p _ { X } ) )$ ) we can show that (see supplementary material):
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\mathbb { E } ( W _ { 1 } ( p _ { X } , p _ { Y } ) - W _ { 1 } ( p _ { X , M } , p _ { Y , M } ) ) \leq \frac { C } { \sqrt { M } }
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
for some absolute constant, $C$ . We reiterate that similar bounds could be found for $W _ { p }$ although with slightly more strict assumptions on $p _ { X }$ and $p _ { Y }$ .
|
| 179 |
+
|
| 180 |
+
# 3.2 SLICING EMPIRICAL DISTRIBUTIONS
|
| 181 |
+
|
| 182 |
+
In scenarios where only samples from the $\mathrm { d }$ -dimensional distribution, $p _ { X }$ , are available, $x _ { m } \sim p _ { X }$ , the empirical density can be estimated as $\begin{array} { r } { p _ { X , M } = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \delta _ { x _ { m } } } \end{array}$ . Following equation 10 it is straightforward to show that the marginal densities (i.e. slices) are obtained from:
|
| 183 |
+
|
| 184 |
+
$$
|
| 185 |
+
\mathcal { R } p _ { X } ( t , { \boldsymbol { \theta } } ) \approx \mathcal { R } p _ { X , M } ( t , { \boldsymbol { \theta } } ) = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \delta ( t - { \boldsymbol { x } } _ { m } \cdot { \boldsymbol { \theta } } ) , \ \forall { \boldsymbol { \theta } } \in \mathbb { S } ^ { d - 1 } , \mathrm { a n d } \ \forall t \in \mathbb { R }
|
| 186 |
+
$$
|
| 187 |
+
|
| 188 |
+
see the supplementary material for a proof. The Dvoretzky–Kiefer–Wolfowitz upper bound holds for $\mathcal { R } p _ { X } ( t , { \theta } )$ and $\mathcal { R } p _ { X , M } ( t , \theta )$ .
|
| 189 |
+
|
| 190 |
+
# 3.3 MINIMIZING SLICED-WASSERSTEIN VIA RANDOM SLICING
|
| 191 |
+
|
| 192 |
+
Minimizing the sliced-Wasserstein distance (i.e., as in the second term of 14) requires an integration over the unit sphere in $\mathbb { R } ^ { d }$ , i.e., $\mathbb { S } ^ { d - 1 }$ . In practice, this integration is approximated by using a simple Monte Carlo scheme that draws uniform samples from $\bar { \mathbb { S } } ^ { d - 1 }$ and replaces the integral with a
|
| 193 |
+
|
| 194 |
+
finite-sample average,
|
| 195 |
+
|
| 196 |
+
$$
|
| 197 |
+
S W _ { c } ( p _ { Z } , q _ { Z } ) \approx \frac { 1 } { | \Theta | } \sum _ { \theta _ { l } \in \Theta } W _ { c } ( \mathcal { R } p _ { Z } ( \cdot ; \theta _ { l } ) , \mathcal { R } q _ { Z } ( \cdot ; \theta _ { l } ) )
|
| 198 |
+
$$
|
| 199 |
+
|
| 200 |
+
Such Monte Carlo estimation was used in Rabin & Peyré (2011), and later used in Bonneel et al. (2015); Kolouri et al. (2018); ¸Sim¸sekli et al. (2018); Deshpande et al. (2018). Moreover, the global minimum for $S W _ { c } ( p _ { Z } , q _ { Z } )$ is also a global minimum for each $W _ { c } ( \mathcal { \bar { R } } p _ { Z } ( \cdot ; \theta _ { l } ) , \mathcal { R } q _ { Z } ( \cdot ; \theta _ { l } ) )$ . Note that $\begin{array} { r l r l } { S W _ { c } ( p z , q z ) } & { { } } & { = } & { { } } \end{array}$ $\mathbb { E } _ { \mathbb { S } ^ { ( d - 1 ) } } ( W _ { c } ( \mathcal { R } p _ { Z } ( \cdot ; \theta ) , \mathcal { R } q _ { Z } ( \cdot ; \theta ) ) )$ .
|
| 201 |
+
|
| 202 |
+
A fine sampling of $\mathbb { S } ^ { d - 1 }$ , however, is required for a good approximation of $S W _ { c } ( p _ { Z } , q _ { Z } )$ . Intuitively, if $p _ { Z }$ and $q _ { Z }$ are similar, then their projections with respect to any finite subset of $\mathbb { S } ^ { d - 1 }$ would also be similar. This
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
Figure 2: SW approximations (scaled by $1 . 2 2 { \sqrt { d } } )$ of the Wdistance in different dimensions, $d \in \{ 2 ^ { \bar { n } } \} _ { n = 1 } ^ { 1 0 }$ , and different number of random slices, $L$ .
|
| 206 |
+
|
| 207 |
+
leads to a stochastic gradient descent scheme where in addition to the random sampling of the input data, we also random sample the projection angles from $\mathbb { S } ^ { d - 1 }$ .
|
| 208 |
+
|
| 209 |
+
A natural question arises on the effect of the number of random slices, $L = | \Theta |$ , on the approximation of the SW distance. Here, we devised a simple experiment that demonstrates the effect of $L$ on aa $d$ proximating the SW distan-dimensional space, where $d \in \{ 2 ^ { \overline { { n } } } \} _ { n = 1 } ^ { 1 0 }$ ted two ran, to serve as $p _ { X } = \mathcal { N } ( \mu _ { X } , \Sigma _ { X } )$ aussand $p _ { X } = \mathcal { N } ( \mu _ { Y } , \Sigma _ { Y } )$
|
| 210 |
+
|
| 211 |
+
$$
|
| 212 |
+
W _ { 2 } ^ { 2 } ( p _ { X } , p _ { Y } ) = \| \mu _ { X } - \mu _ { Y } \| _ { 2 } ^ { 2 } + t r a c e ( \Sigma _ { X } + \Sigma _ { Y } - 2 ( \Sigma _ { X } ^ { \frac { 1 } { 2 } } \Sigma _ { Y } \Sigma _ { X } ^ { \frac { 1 } { 2 } } ) ^ { \frac { 1 } { 2 } } ) ,
|
| 213 |
+
$$
|
| 214 |
+
|
| 215 |
+
which served as the ground-truth distance between the distributions. We then measured the SW distance between $M = 1 0 0 0$ samples generated from the two Gaussian distributions using $L \in$ $\{ 1 , 1 0 , 5 0 , 1 0 0 , 5 0 0 , 1 0 0 0 \}$ random slices. We repeated the experiment for each $L$ and $d$ , a thousand times and report the means and standard deviations in Figure 2. Following equation 13 we scaled the SW distance by $\sqrt { d }$ . Moreover we found out empirically that $1 . 2 2 \sqrt { d } \mathbb { E } ( S W _ { 2 } ( p _ { X , M } , p _ { Y , M } ) ) \approx$ $W _ { 2 } ( p _ { X } , p _ { Y } )$ . It can be seen from Figure 2 that the expected value of the scaled $S W$ -distance closely follows the true Wasserstein distance. A more interesting observation is that the variance of estimation increases for higher dimensions $d$ and decreases as the number of random projections, $L$ , increases. Hence, calculating the SW distance in the image space, as in Deshpande et al. (2018), requires a very large number of projections $L$ to get a less variant approximation of the distance.
|
| 216 |
+
|
| 217 |
+
# 3.4 PUTTING IT ALL TOGETHER
|
| 218 |
+
|
| 219 |
+
To optimize the proposed SWAE objective function in equation 14 we use a stochastic gradient m Xrandom samples from the input data and the predefined distribution, $\{ x _ { m } \sim p _ { X } \} _ { m = 1 } ^ { M }$ $q _ { Z }$ 1 m Z m=, correspondingly. Let $\{ \theta _ { l } \} _ { l = 1 } ^ { L }$ be i.i.d be randomly sampled from a uniform distribution on $\mathbb { S } ^ { d - 1 }$ . Then using the numerical approximations described in this section, the loss function in equation 14 can be rewritten as:
|
| 220 |
+
|
| 221 |
+
$$
|
| 222 |
+
\mathcal { L } ( \phi , \psi ) = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } c ( x _ { m } , \psi ( \phi ( x _ { m } ) ) ) + \frac { \lambda } { L M } \sum _ { l = 1 } ^ { L } \sum _ { m = 1 } ^ { M } c ( \theta _ { l } \cdot \tilde { z } _ { i [ m ] } , \theta _ { l } \cdot \phi ( x _ { j [ m ] } ) )
|
| 223 |
+
$$
|
| 224 |
+
|
| 225 |
+
where $i [ m ]$ and $j [ m ]$ are the indices of sorted $\theta _ { l } { \cdot } \tilde { z } _ { m } s$ and $\theta _ { l } { \cdot } \phi ( x _ { m } )$ with respect to $m$ , correspondingly. The steps of our proposed method are presented in Algorithm 1. It is worth pointing out that sorting is by itself an optimization problem (which can be solved very efficiently), and therefore the sorting followed by the gradient descent update on $\phi$ and $\psi$ is in essence a min-max problem, which is being solved in an alternating fashion. Finally, we point out that each iteration of SWAE costs $\mathcal { O } ( \bar { L M l o g } ( M ) )$ operations.
|
| 226 |
+
|
| 227 |
+
# Algorithm 1 Sliced-Wasserstein Auto-Encoder (SWAE)
|
| 228 |
+
|
| 229 |
+
<table><tr><td>Require:Regularization coefficient 入,and number of random projections,L.</td></tr><tr><td>Initialize the parameters of the encoder,Φ,and decoder,</td></tr><tr><td>whileand have not converged do</td></tr><tr><td>Sample{x1,..,xm} from training set(i.e. px)</td></tr><tr><td>Sample{≥1,..,zm} fromqz</td></tr><tr><td>Sample {01,.,} from Sk-1</td></tr><tr><td>Sort0t·zM such that0t· i[m]≤0t·Zi[m+1]</td></tr><tr><td>Sort0t·Φ(xm) such that0t:Φ(xj[m])≤0t·(xj[m+1])</td></tr><tr><td>M</td></tr><tr><td>end while</td></tr></table>
|
| 230 |
+
|
| 231 |
+
# 4 EXPERIMENTS
|
| 232 |
+
|
| 233 |
+
In our experiments we used three image datasets, namely the MNIST dataset by LeCun (1998), the CelebFaces Attributes Dataset (CelebA) by Liu et al. (2015), and the LSUN Bedroom Dataset by Yu et al. (2015). For the MNIST dataset we used a simple auto-encoder with mirrored classic deep convolutional neural networks with 2D average poolings, leaky rectified linear units (Leaky-ReLu) as the activation functions, and upsampling layers in the decoder. For the CelebA and LSUN datasets we used the DCGAN Radford et al. (2015) architecture similar to Tolstikhin et al. (2017).
|
| 234 |
+
|
| 235 |
+
To test the capability of our proposed algorithm in shaping the latent space of the encoder, we started with the MNIST dataset and trained SWAE to encode this dataset to a two-dimensional latent space (for the sake of visualization) while enforcing a match between $p _ { X }$ and $p _ { Y }$ and $p _ { Z }$ and $q _ { Z }$ . We chose four different samplable distributions as shown in Figure 3. It can bee seen that SWAE can successfully embed the dataset into the latent space while enforcing $p _ { Z }$ to closely follow $q _ { Z }$ . In addition, we sample the two-dimensional latent spaces on a $2 5 \times 2 5$ grid in $[ - 1 , 1 ] ^ { 2 }$ and decode these points to visualize their corresponding images in the digit/image space.
|
| 236 |
+
|
| 237 |
+
To get a sense of the convergence behavior of SWAE, and similar to the work of Karras et al. (2017), we calculate the Sliced Wasserstein distance between $p _ { Z }$ and $q _ { Z }$ as well as $p _ { X }$ and $p _ { Y }$ at each batch iteration where we used p-LDA Wang et al. (2011) to calculate projections (See supplementary material). We compared the convergence behavior of SWAE with the closest related work, WAE Tolstikhin et al. (2017) (specifically WAE-GAN) where an adversarial training is used to match $p _ { Z }$ to $q _ { Z }$ , while the loss function for $p _ { X }$ and $p _ { Y }$ remains exactly the same between the two methods. We repeated the experiments 100 times and report the summary of results in Figure 4. We mention that the exact same models and optimizers were used for both methods in this experiment. An interesting observation, here is that while WAE-GAN provides good or even slightly better generated random samples for MNIST (lower sliced-Wasserstein distance between $p _ { X }$ and $p _ { Y . }$ ), it fails to provide a good match between $p _ { Z }$ and $q _ { Z }$ for the choice of the prior distribution reported in Figure 4. This phenomenon seems to be related to the mode-collapse problem of GANs, where the adversary fails to sense that the distribution is not fully covered. Finally, in our experiments we did not notice a significant difference between the computational time for SWAE and WAE-GAN. For the MNIST experiment and on a single NVIDIA Tesla $P 1 0 0$ GPU, each batch iteration (batchsize $\mathord { \vert \kern - delimiterspace } = 5 0 0$ ) of WAEGAN took $0 . 2 5 7 1 \pm 0 . 0 4 3 5 ( \mathrm { s e c } )$ while SWAE (with $L = 5 0$ projections) took $0 . 2 4 3 7 \pm 0 . 0 3 9 1 ( \mathrm { s e c } )$ .
|
| 238 |
+
|
| 239 |
+

|
| 240 |
+
Figure 5: Interpolation in the latent space, $\psi ( t \phi ( I _ { 0 } ) + ( 1 - t ) \phi ( I _ { 1 } ) )$ for $t \in [ 0 , 1 ]$ .
|
| 241 |
+
|
| 242 |
+
<table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>Iteration ·10-4</td><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>logSW(pz,qz)</td><td rowspan=1 colspan=1>logSW(px,Py)</td><td rowspan=1 colspan=1>NLL(Z|qz)·10</td></tr><tr><td rowspan=12 colspan=1>CelebA</td><td rowspan=4 colspan=1>1</td><td rowspan=1 colspan=1>SWAE</td><td rowspan=1 colspan=1>-0.81±0.05</td><td rowspan=1 colspan=1>-2.19±0.04</td><td rowspan=1 colspan=1>3.14±0.05</td></tr><tr><td rowspan=1 colspan=1>WAE-GAN</td><td rowspan=1 colspan=1>-0.78 ± 0.05</td><td rowspan=1 colspan=1>-2.04±0.05</td><td rowspan=1 colspan=1>3.25 ± 0.15</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(IMQ)</td><td rowspan=1 colspan=1>-1.44± 0.19</td><td rowspan=1 colspan=1>-2.51 ± 0.05</td><td rowspan=1 colspan=1>3.66±0.12</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(RBF)</td><td rowspan=1 colspan=1>3.26±0.02</td><td rowspan=1 colspan=1>-2.60±0.02</td><td rowspan=1 colspan=1>2392±89</td></tr><tr><td rowspan=4 colspan=1>5</td><td rowspan=1 colspan=1>SWAE</td><td rowspan=1 colspan=1>-1.80 ±0.03</td><td rowspan=1 colspan=1>-2.63±0.03</td><td rowspan=1 colspan=1>3.22±0.02</td></tr><tr><td rowspan=1 colspan=1>WAE-GAN</td><td rowspan=1 colspan=1>-1.37±0.12</td><td rowspan=1 colspan=1>-2.42±0.05</td><td rowspan=1 colspan=1>3.47±0.13</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(IMQ)</td><td rowspan=1 colspan=1>-2.15 ±0.02</td><td rowspan=1 colspan=1>-2.86±0.01</td><td rowspan=1 colspan=1>3.51± 0.04</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(RBF)</td><td rowspan=1 colspan=1>3.28±0.02</td><td rowspan=1 colspan=1>-2.89±0.02</td><td rowspan=1 colspan=1>2469±79</td></tr><tr><td rowspan=4 colspan=1>10</td><td rowspan=1 colspan=1>SWAE</td><td rowspan=1 colspan=1>-2.01 ±0.04</td><td rowspan=1 colspan=1>-2.75 ±0.03</td><td rowspan=1 colspan=1>3.24 ±0.00</td></tr><tr><td rowspan=1 colspan=1>WAE-GAN</td><td rowspan=1 colspan=1>-2.33±0.14</td><td rowspan=1 colspan=1>-2.55 ± 0.06</td><td rowspan=1 colspan=1>3.42 ± 0.04</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(IMQ)</td><td rowspan=1 colspan=1>-2.23±0.00</td><td rowspan=1 colspan=1>-2.97±0.01</td><td rowspan=1 colspan=1>3.50± 0.01</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(RBF)</td><td rowspan=1 colspan=1>3.23±0.02</td><td rowspan=1 colspan=1>-2.99±0.02</td><td rowspan=1 colspan=1>2227±88</td></tr><tr><td rowspan=12 colspan=1>LSUNBedroom</td><td rowspan=4 colspan=1>1</td><td rowspan=1 colspan=1>SWAE</td><td rowspan=1 colspan=1>-0.98 ± 0.17</td><td rowspan=1 colspan=1>-1.88 ±0.06</td><td rowspan=1 colspan=1>3.12 ±0.07</td></tr><tr><td rowspan=1 colspan=1>WAE-GAN</td><td rowspan=1 colspan=1>-1.18 ± 0.16</td><td rowspan=1 colspan=1>-1.90±0.07</td><td rowspan=1 colspan=1>3.31±0.16</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(IMQ)</td><td rowspan=1 colspan=1>-1.72 ±0.07</td><td rowspan=1 colspan=1>-2.13±0.02</td><td rowspan=1 colspan=1>3.61 ±0.04</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(RBF)</td><td rowspan=1 colspan=1>3.45± 0.02</td><td rowspan=1 colspan=1>-2.16±0.04</td><td rowspan=1 colspan=1>3446±152</td></tr><tr><td rowspan=4 colspan=1>5</td><td rowspan=1 colspan=1>SWAE</td><td rowspan=1 colspan=1>-1.94 ± 0.12</td><td rowspan=1 colspan=1>-2.34 ±0.04</td><td rowspan=1 colspan=1>3.22 ±0.02</td></tr><tr><td rowspan=1 colspan=1>WAE-GAN</td><td rowspan=1 colspan=1>-2.34 ± 0.04</td><td rowspan=1 colspan=1>-2.30 ± 0.04</td><td rowspan=1 colspan=1>3.40±0.08</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(IMQ)</td><td rowspan=1 colspan=1>-2.21 ±0.02</td><td rowspan=1 colspan=1>-2.47±0.02</td><td rowspan=1 colspan=1>3.48±0.04</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(RBF)</td><td rowspan=1 colspan=1>3.53±0.03</td><td rowspan=1 colspan=1>-2.47±0.02</td><td rowspan=1 colspan=1>4009±258</td></tr><tr><td rowspan=4 colspan=1>10</td><td rowspan=1 colspan=1>SWAE</td><td rowspan=1 colspan=1>-2.08 ±0.11</td><td rowspan=1 colspan=1>-2.46±0.03</td><td rowspan=1 colspan=1>3.23±0.01</td></tr><tr><td rowspan=1 colspan=1>WAE-GAN</td><td rowspan=1 colspan=1>-2.49±0.02</td><td rowspan=1 colspan=1>-2.41±0.03</td><td rowspan=1 colspan=1>3.35± 0.05</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(IMQ)</td><td rowspan=1 colspan=1>-2.25±0.02</td><td rowspan=1 colspan=1>-2.59±0.02</td><td rowspan=1 colspan=1>3.50±0.01</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(RBF)</td><td rowspan=1 colspan=1>3.48± 0.04</td><td rowspan=1 colspan=1>-2.60±0.02</td><td rowspan=1 colspan=1>3624±282</td></tr></table>
|
| 243 |
+
|
| 244 |
+
Table 1: Quantitative comparison of the SWAE and WAE-GAN using the sliced-Wasserstein distance with discriminant slices in the latent space, $S W ( p _ { Z } , q _ { Z } )$ , and the output space, $S W ( p _ { X } , p _ { Y } )$ . The distribution in the 64-dimensional latent space, $q _ { Z }$ , was set to Normal. We also report the negative log-likelihood of $\{ z _ { i } = \phi ( x _ { i } ) \}$ with repect to $q _ { Z }$ for 1000 testing samples for both datasets. We did not use Nowizin’s trick for the GAN models.
|
| 245 |
+
|
| 246 |
+
Table 2: FID score statistics $N = 5$ ) at final iteration of training. Lower is better. Scores were computed with $1 0 ^ { 4 }$ random samples from the testing set against an equivalent amount of generated samples.
|
| 247 |
+
|
| 248 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>FID -CelebA</td><td rowspan=1 colspan=1>FID -LSUN Bedroom</td></tr><tr><td rowspan=1 colspan=1>SWAE</td><td rowspan=1 colspan=1>79±6</td><td rowspan=1 colspan=1>225±7</td></tr><tr><td rowspan=1 colspan=1>WAE-GAN</td><td rowspan=1 colspan=1>53±2</td><td rowspan=1 colspan=1>232±2</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(IMQ)</td><td rowspan=1 colspan=1>55±1</td><td rowspan=1 colspan=1>226±2</td></tr><tr><td rowspan=1 colspan=1>WAE-MMD(RBF)</td><td rowspan=1 colspan=1>363±17</td><td rowspan=1 colspan=1>378±12</td></tr><tr><td rowspan=1 colspan=1>True Data</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>3</td></tr></table>
|
| 249 |
+
|
| 250 |
+
The CelebA face and the LSUN bedroom datasets contain higher degrees of variations compared to the MNIST dataset and therefore a two-dimensional latent-space does not suffice to capture the variations in these datasets (See supplementary material for more details on the dimensionality of the latent space). We used a $K = 6 4$ dimensional latent spaces for both the CelebA and the LSUN Bedroom datasets, and also used a larger auto-encoder (i.e., DCGAN, following the work of Tolstikhin et al. (2017)). For these datasets SWAE was trained with $q _ { Z }$ being the Normal distribution to enable the calculation of the negative log likelihood (NLL). Table 1 shows the comparison between SWAE and WAE for these two datasets. We note that all experimental parameters were kept the same to enable an apples to apples comparison. Finally, Figure 5 demonstrates the interpolation between two sample points in the latent space, i.e. ${ \psi } ( t \dot { \phi } ( { I _ { 0 } } ) { ^ { - } } + ( 1 - t ) { \phi } ( { I _ { 1 } } ) )$ for $t \in [ 0 , 1 ]$ , for all three datasets.
|
| 251 |
+
|
| 252 |
+
# 5 CONCLUSIONS
|
| 253 |
+
|
| 254 |
+
We introduced Sliced Wasserstein auto-encoders (SWAE), which enable one to shape the distribution of the encoded samples to any samplable distribution without the need for adversarial training or having a likelihood function specified. In addition, we provided a simple and efficient numerical scheme for this problem, which only relies on few inner products and sorting operations in each SGD iteration. We further demonstrated the capability of our method on three image datasets, namely the MNIST, the CelebA face, and the LSUN Bedroom datasets, and showed competitive performance, in the sense of matching distributions $p _ { Z }$ and $q _ { Z }$ , to the techniques that rely on additional adversarial trainings. Finally, we envision SWAE could be effectively used in transfer learning and domain adaptation algorithms where $q _ { Z }$ comes from a source domain and the task is to encode the target domain $p _ { X }$ in a latent space such that the distribution follows the distribution of the target domain.
|
| 255 |
+
|
| 256 |
+

|
| 257 |
+
Figure 3: The results of SWAE on the MNIST dataset with a two-dimensional embedding space for four different distributions as , ${ \mathbf { } } q z$ , namely the ring distribution (top left), the uniform distribution (bottom left), the uniform polar distribution (top right), and a custom polar distribution (bottom right). Note that the far right visualization demonstrates the decoding of a $2 5 \times 2 5$ grid in $[ - 1 , 1 ] ^ { 2 }$ .
|
| 258 |
+
|
| 259 |
+

|
| 260 |
+
Figure 4: Sample convergence behavior for our method compared to the WAE-GAN, where $q _ { Z }$ is set to a ring distribution (Figure 3, top left). The columns represent batch iterations (batchsize $= 5 0 0$ ). The top half of the table shows results of $\psi ( z )$ for $z \sim q _ { Z }$ , and the bottom half shows $z \sim q _ { Z }$ and $\phi ( x )$ for $x \sim p _ { X }$ . It can be seen that the adversarial loss in the latent space does not provide a full coverage of the distribution, which is a similar problem to the well-known ‘mode collapse’ problem in the GANs. It can be seen that SWAE provides a superior match between $p _ { Z }$ and $q _ { Z }$ while it does not require adversarial training.
|
| 261 |
+
|
| 262 |
+
# REFERENCES
|
| 263 |
+
|
| 264 |
+
Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein GAN. arXiv preprint arXiv:1701.07875, 2017.
|
| 265 |
+
|
| 266 |
+
David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017.
|
| 267 |
+
|
| 268 |
+
Sergey Bobkov and Michel Ledoux. One-dimensional empirical measures, order statistics and kantorovich transport distances. preprint, 2014.
|
| 269 |
+
|
| 270 |
+
Nicolas Bonneel, Julien Rabin, Gabriel Peyré, and Hanspeter Pfister. Sliced and Radon Wasserstein barycenters of measures. Journal of Mathematical Imaging and Vision, 51(1):22–45, 2015.
|
| 271 |
+
|
| 272 |
+
Nicolas Bonnotte. Unidimensional and evolution methods for optimal transportation. PhD thesis, Paris 11, 2013.
|
| 273 |
+
|
| 274 |
+
Olivier Bousquet, Sylvain Gelly, Ilya Tolstikhin, Carl-Johann Simon-Gabriel, and Bernhard Schoelkopf. From optimal transport to generative modeling: the VEGAN cookbook. arXiv preprint arXiv:1705.07642, 2017.
|
| 275 |
+
|
| 276 |
+
Mathieu Carriere, Marco Cuturi, and Steve Oudot. Sliced wasserstein kernel for persistence diagrams. arXiv preprint arXiv:1706.03358, 2017.
|
| 277 |
+
|
| 278 |
+
Antonia Creswell and Anil Anthony Bharath. Adversarial training for sketch retrieval. In European Conference on Computer Vision, pp. 798–809. Springer, 2016.
|
| 279 |
+
|
| 280 |
+
Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in neural information processing systems, pp. 2292–2300, 2013.
|
| 281 |
+
|
| 282 |
+
Jérôme Dedecker, Aurélie Fischer, Bertrand Michel, et al. Improved rates for wasserstein deconvolution with ordinary smooth error in dimension one. Electronic journal of statistics, 9(1):234–265, 2015.
|
| 283 |
+
|
| 284 |
+
Ishan Deshpande, Ziyu Zhang, and Alexander Schwing. Generative modeling using the sliced wasserstein distance. In IEEE Conference on Computer Vision and Pattern Recognition, 2018.
|
| 285 |
+
|
| 286 |
+
Charlie Frogner, Chiyuan Zhang, Hossein Mobahi, Mauricio Araya, and Tomaso A Poggio. Learning with a wasserstein loss. In Advances in Neural Information Processing Systems, pp. 2053–2061, 2015.
|
| 287 |
+
|
| 288 |
+
Daniel T Gillespie. A theorem for physicists in the theory of random variables. American Journal of Physics, 51(6):520–533, 1983.
|
| 289 |
+
|
| 290 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 291 |
+
|
| 292 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems, pp. 5769–5779, 2017.
|
| 293 |
+
|
| 294 |
+
Sigurdur Helgason. The radon transform on rn. In Integral Geometry and Radon Transforms, pp. 1–62. Springer, 2011.
|
| 295 |
+
|
| 296 |
+
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. arXiv preprint, 2017.
|
| 297 |
+
|
| 298 |
+
Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. arXiv preprint arXiv:1710.10196, 2017.
|
| 299 |
+
|
| 300 |
+
Diederik $\mathrm { \bf P }$ Kingma and Max Welling. Auto-encoding variational Bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 301 |
+
|
| 302 |
+
Soheil Kolouri and Gustavo K Rohde. Transport-based single frame super resolution of very low resolution face images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4876–4884, 2015.
|
| 303 |
+
|
| 304 |
+
Soheil Kolouri, Se Rim Park, and Gustavo K Rohde. The radon cumulative distribution transform and its application to image classification. IEEE transactions on image processing, 25(2):920–934, 2016a.
|
| 305 |
+
|
| 306 |
+
Soheil Kolouri, Yang Zou, and Gustavo K Rohde. Sliced Wasserstein kernels for probability distributions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5258–5267, 2016b.
|
| 307 |
+
|
| 308 |
+
Soheil Kolouri, Se Rim Park, Matthew Thorpe, Dejan Slepcev, and Gustavo K Rohde. Optimal mass transport: Signal processing and machine-learning applications. IEEE Signal Processing Magazine, 34(4):43–59, 2017.
|
| 309 |
+
|
| 310 |
+
Soheil Kolouri, Gustavo K Rohde, and Heiko Hoffman. Sliced Wasserstein distance for learning Gaussian mixture models. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 3427–, 2018.
|
| 311 |
+
|
| 312 |
+
Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998.
|
| 313 |
+
|
| 314 |
+
Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photo-realistic single image super-resolution using a generative adversarial network. arXiv preprint, 2016.
|
| 315 |
+
|
| 316 |
+
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), December 2015.
|
| 317 |
+
|
| 318 |
+
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015.
|
| 319 |
+
|
| 320 |
+
Lars Mescheder, Sebastian Nowozin, and Andreas Geiger. Adversarial variational Bayes: Unifying variational autoencoders and generative adversarial networks. arXiv preprint arXiv:1701.04722, 2017.
|
| 321 |
+
|
| 322 |
+
Zak Murez, Soheil Kolouri, David Kriegman, Ravi Ramamoorthi, and Kyungnam Kim. Image to image translation for domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 4500–4509, 2018.
|
| 323 |
+
|
| 324 |
+
Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-GAN: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems, pp. 271–279, 2016.
|
| 325 |
+
|
| 326 |
+
Adam M Oberman and Yuanlong Ruan. An efficient linear programming method for optimal transportation. arXiv preprint arXiv:1509.03668, 2015.
|
| 327 |
+
|
| 328 |
+
Julien Rabin and Gabriel Peyré. Wasserstein regularization of imaging problem. In Image Processing (ICIP), 2011 18th IEEE International Conference on, pp. 1541–1544. IEEE, 2011.
|
| 329 |
+
|
| 330 |
+
Julien Rabin, Gabriel Peyré, Julie Delon, and Marc Bernot. Wasserstein barycenter and its application to texture mixing. In International Conference on Scale Space and Variational Methods in Computer Vision, pp. 435–446. Springer, 2011.
|
| 331 |
+
|
| 332 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 333 |
+
|
| 334 |
+
Filippo Santambrogio. Optimal transport for applied mathematicians. Birkäuser, NY, pp. 99–102, 2015.
|
| 335 |
+
|
| 336 |
+
Umut ¸Sim¸sekli, Antoine Liutkus, Szymon Majewski, and Alain Durmus. Sliced-wasserstein flows: Nonparametric generative modeling via optimal transport and diffusions. arXiv preprint arXiv:1806.08141, 2018.
|
| 337 |
+
|
| 338 |
+
Justin Solomon, Fernando De Goes, Gabriel Peyré, Marco Cuturi, Adrian Butscher, Andy Nguyen, Tao Du, and Leonidas Guibas. Convolutional wasserstein distances: Efficient optimal transportation on geometric domains. ACM Transactions on Graphics (TOG), 34(4):66, 2015.
|
| 339 |
+
|
| 340 |
+
Ilya Tolstikhin, Olivier Bousquet, Sylvain Gelly, and Bernhard Schoelkopf. Wasserstein auto-encoders. arXiv preprint arXiv:1711.01558, 2017.
|
| 341 |
+
|
| 342 |
+
Cédric Villani. Optimal transport: old and new, volume 338. Springer Science & Business Media, 2008.
|
| 343 |
+
|
| 344 |
+
Wei Wang, Yilin Mo, John A Ozolek, and Gustavo K Rohde. Penalized fisher discriminant analysis and its application to image-based morphometry. Pattern recognition letters, 32(15):2128–2135, 2011.
|
| 345 |
+
|
| 346 |
+
Raymond A Yeh, Chen Chen, Teck Yian Lim, Alexander G Schwing, Mark Hasegawa-Johnson, and Minh N Do. Semantic image inpainting with deep generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5485–5493, 2017.
|
| 347 |
+
|
| 348 |
+
Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. Lsun: Construction of a largescale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015.
|
| 349 |
+
|
| 350 |
+

|
| 351 |
+
Figure 6: These plots show $W _ { 1 } ( p , q _ { \tau } )$ and $J S ( p , q _ { \tau } )$ where $p$ is a uniform distribution around zero and $\boldsymbol { q } _ { \ u { \tau } } ( \boldsymbol { x } ) = \boldsymbol { p } ( \boldsymbol { x } - \boldsymbol { \tau } )$ . It is clear that JS divergence does not provide a usable gradient when distributions are supported on non-overlapping domains.
|
| 352 |
+
|
| 353 |
+
# SUPPLEMENTARY MATERIAL
|
| 354 |
+
|
| 355 |
+
COMPARISON OF DIFFERENT DISTANCES
|
| 356 |
+
|
| 357 |
+
Following the example by Arjovsky et al. (2017) and later Kolouri et al. (2018) here we show a simple example comparing the Jensen-Shannon divergence with the Wasserstein distance. First note that the Jensen-Shannon divergence is defined as,
|
| 358 |
+
|
| 359 |
+
$$
|
| 360 |
+
J S ( p , q ) = K L ( p , { \frac { p + q } { 2 } } ) + K L ( q , { \frac { p + q } { 2 } } )
|
| 361 |
+
$$
|
| 362 |
+
|
| 363 |
+
where $\begin{array} { r } { K L ( p , q ) = \int _ { X } p ( x ) l o g ( \frac { p ( x ) } { q ( x ) } ) d x } \end{array}$ is the Kullback-Leibler divergence. Now consider the following densities, $p ( x )$ be a uniform distribution around zero and let $\begin{array} { r } { q _ { \tau } ( x ) = p ( x - \tau ) } \end{array}$ be a shifted version of the $p$ . Figure 6 show $W _ { 1 } ( p , q _ { \tau } )$ and $J S ( p , q _ { \tau } )$ as a function of $\tau$ . As can be seen the JS divergence fails to provide a useful gradient when the distributions are supported on non-overlapping domains.
|
| 364 |
+
|
| 365 |
+
# LOG-LIKELIHOOD
|
| 366 |
+
|
| 367 |
+
To maximize (minimize) the similarity (dissimilarity) between $p _ { Z }$ and $q _ { Z }$ , we can write :
|
| 368 |
+
|
| 369 |
+
$$
|
| 370 |
+
\begin{array} { r c l } { { \mathrm { a r g m a x } _ { \phi } \displaystyle \int _ { Z } p _ { Z } ( z ) l o g ( q _ { Z } ( z ) ) d z } } & { { = } } & { { \displaystyle \int _ { Z } \int _ { X } p _ { X } ( x ) \delta ( z - \phi ( x ) ) l o g ( q _ { Z } ( z ) ) d x d z } } \\ { { } } & { { = } } & { { \displaystyle \int _ { X } p _ { X } ( x ) l o g ( q _ { Z } ( \phi ( x ) ) ) d x } } \end{array}
|
| 371 |
+
$$
|
| 372 |
+
|
| 373 |
+
where we replaced $p _ { Z }$ with equation 1. Furthermore, it is straightforward to show:
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
\begin{array} { l l l } { { \mathrm { a r g m a x } _ { \phi } \displaystyle \int _ { Z } p _ { Z } ( z ) l o g ( q _ { Z } ( z ) ) d z } } & { { = } } & { { \mathrm { a r g m a x } _ { \phi } \displaystyle \int _ { Z } p _ { Z } ( z ) l o g ( \frac { q _ { Z } ( z ) } { p _ { Z } ( z ) } ) d z } } \\ { { } } & { { = } } & { { \mathrm { a r g m i n } _ { \phi } D _ { K L } ( p _ { Z } , q _ { Z } ) } } \end{array}
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
PROOF OF EQUATION 3
|
| 380 |
+
|
| 381 |
+
The Wasserstein distance between the two probability measures $\rho _ { X }$ and $\rho _ { Y }$ with respective densities $p _ { X }$ and $p _ { Y }$ , can be measured via the Kantorovich formulation of the optimal mass transport problem:
|
| 382 |
+
|
| 383 |
+
$$
|
| 384 |
+
W _ { c } ( p _ { X } , p _ { Y } ) = \operatorname* { i n f } _ { \gamma \in \Gamma } \int _ { X } \int _ { Y } c ( x , y ) \gamma ( x , y ) d x d y
|
| 385 |
+
$$
|
| 386 |
+
|
| 387 |
+
where $\Gamma : = \{ \gamma : X \times Y \to \mathbb { R } ^ { + } | \int _ { Y } \gamma ( x , y ) d y = p _ { X } ( x ) , \int _ { X } \gamma ( x , y ) d x = p _ { Y } ( y ) \}$ is the set of all transportation plans (i.e., couplings or joint distributions) over $p _ { X }$ and $p _ { Y }$ . Now, note that the two step process of encoding $p _ { X }$ into the latent space $Z$ and decoding it to $p _ { Y }$ , provides a unique decomposition of $\gamma$ as $\gamma _ { 0 } ( x , y ) = \delta ( y - \psi ( \phi ( x ) ) ) p _ { X } ( x ) \in \Gamma$ .
|
| 388 |
+
|
| 389 |
+

|
| 390 |
+
Figure 7: The optimal coupling (i.e., transport plan) between $p _ { X }$ and $p _ { Y }$ could be equal or different from $\gamma ( x , y ) = \bar { \delta } ( y - \psi ( \phi ( x ) ) ) p _ { X } ( x )$ . This leads to the scenario on the right where $\bar { W _ { c } } ( p _ { X } , p _ { Y } ) = 0$ but $W _ { c } ^ { \ddagger } ( p _ { X } , p _ { Y } ) > 0$ .
|
| 391 |
+
|
| 392 |
+
Therefore we can write:
|
| 393 |
+
|
| 394 |
+
$$
|
| 395 |
+
\begin{array} { l } { \displaystyle { W _ { c } ( p _ { X } , p _ { Y } ) = \operatorname* { i n f } _ { \gamma \in \Gamma } \int _ { X } \int _ { Y } c ( x , y ) \gamma ( x , y ) d x d y \le } } \\ { \displaystyle { W _ { c } ^ { \dagger } ( p _ { X } , p _ { Y } ) : = \int _ { X } \int _ { Y } c ( x , y ) \gamma _ { 0 } ( x , y ) d x d y = \int _ { X } c ( x , \psi ( \phi ( x ) ) ) p _ { X } ( x ) d x } } \end{array}
|
| 396 |
+
$$
|
| 397 |
+
|
| 398 |
+
which proves equation 3. Finally, taking the infimum of the two sides of the inequality, with respect to $\phi$ and $\psi$ , we have:
|
| 399 |
+
|
| 400 |
+
$$
|
| 401 |
+
\begin{array} { l } { { \operatorname* { i n f } _ { \psi , \phi } W _ { c } ( p _ { X } , p _ { Y } ) = \operatorname* { i n f } _ { \psi , \phi } \operatorname* { i n f } _ { \gamma \in \Gamma _ { \psi , \phi } } \displaystyle \int _ { X } \int _ { Y } c ( x , y ) \gamma ( x , y ) d x d y \le } } \\ { { \operatorname* { i n f } _ { \psi , \phi } W _ { c } ^ { \dagger } ( p _ { X } , p _ { Y } ) = \operatorname* { i n f } _ { \psi , \phi } \displaystyle \int _ { X } c ( x , \psi ( \phi ( x ) ) ) p _ { X } ( x ) d x } } \end{array}
|
| 402 |
+
$$
|
| 403 |
+
|
| 404 |
+
where $\begin{array} { r } { \Gamma _ { \psi , \phi } : = \{ \gamma | \int _ { Y } \gamma ( x , y ) d y = p _ { X } ( x ) , \int _ { X } \gamma ( x , y ) d x = \int _ { X } p _ { X } ( x ) \delta ( y - \psi ( \phi ( x ) ) ) d x \} } \end{array}$ . Figure 7 demonstrates a simple scenario were the Wasserstein distance, $W _ { c } ( p _ { X } , p _ { Y } )$ , is zero however, $W _ { c } ^ { \ddagger } ( p _ { X } , p _ { Y } )$ is non-zero. Finally, we note that $\psi ( \phi ( \cdot ) ) = i d ( \cdot )$ is a global optima for both $W _ { c } ( p _ { X } , p _ { Y } )$ and $W _ { c } ^ { \ddagger } ( p _ { X } , p _ { Y } )$ .
|
| 405 |
+
|
| 406 |
+
# SLICING EMPIRICAL DISTRIBUTIONS
|
| 407 |
+
|
| 408 |
+
Following equation 10 a distribution can be sliced via:
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
\mathcal { R } p _ { X } ( t , \theta ) = \int _ { X } p _ { X } ( x ) \delta ( t - \theta \cdot x ) d x
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
Figure 8 visualizes two sample slices for an example distribution $p _ { X }$ . Here we calculate a Radon slice of the empirical distribution $\begin{array} { r } { p _ { X } ( x ) = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \delta ( x - x _ { m } ) } \end{array}$ with respect to $\theta \in \mathbb { S } ^ { d - 1 }$ . Using the definition of the Radon transform in equation 10 and RVT in equation 1 we have:
|
| 415 |
+
|
| 416 |
+
$$
|
| 417 |
+
\begin{array} { l l l } { \mathcal { R } p _ { X } ( t , { \boldsymbol { \theta } } ) } & { = } & { \displaystyle \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \int _ { X } \delta ( { \boldsymbol { x } } - { \boldsymbol { x } } _ { m } ) \delta ( t - { \boldsymbol { \theta } } \cdot { \boldsymbol { x } } ) d { \boldsymbol { x } } } \\ & { = } & { \displaystyle \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \delta ( { \boldsymbol { t } } - { \boldsymbol { \theta } } \cdot { \boldsymbol { x } } _ { m } ) } \end{array}
|
| 418 |
+
$$
|
| 419 |
+
|
| 420 |
+

|
| 421 |
+
Figure 8: Visualization of the slicing process defined in equation 10
|
| 422 |
+
|
| 423 |
+

|
| 424 |
+
Figure 9: Trained SWAE outputs for sample input images with different embedding spaces of size $K = 2$ and $K = 1 2 8$ .
|
| 425 |
+
|
| 426 |
+
DIMENSIONALITY OF THE LATENT SPACE
|
| 427 |
+
|
| 428 |
+
Figure 9 demonstrates the outputs of trained SWAEs with $K = 2$ and $K = 1 2 8$ for sample input images. The input images were resized to $6 4 \times 6 4$ and then fed to our auto-encoder structure. This effect can also be seen for the MNIST dataset as shown in Figure 10. When the dimensionality of the latent-space (i.e. information bottleneck) is too low the latent space will not contain enough information to reconstruct crisp images. Increasing the dimensionality of the latent space leads to crisper images.
|
| 429 |
+
|
| 430 |
+
# CALCULATING THE SLICED WASSERSTEIN DISTANCE AS A MEASURE OF GOODNESS OF FIT
|
| 431 |
+
|
| 432 |
+
In this paper we also used the sliced Wasserstein distance as a measure of goodness of fit (for convergence analysis). To provide a fair comparison between different methods, we avoided random projections for this comparison. Instead, we calculated a discriminant subspace to separate $\psi ( z )$ from $\psi ( \phi ( x ) )$ for $z \sim q z$ and $x \sim p _ { X }$ , and set the projection parameters $\theta \mathrm { s }$ to the calculated discriminant components. This will lead to only slices that contain discriminant information. We point out that the linear discriminant analysis (LDA) is not a good choice for this task as it only leads to one discriminant component (because we only have two classes). We used the penalized linear discriminant analysis (p-LDA) that utilizes a combination of LDA and PCA. In short, p-LDA solves the following objective function:
|
| 433 |
+
|
| 434 |
+
$$
|
| 435 |
+
\operatorname { a r g m a x } _ { \theta } \quad { \frac { \theta ^ { T } S _ { T } \theta } { \theta ^ { T } ( S _ { W } + \alpha I ) \theta } }
|
| 436 |
+
$$
|
| 437 |
+
|
| 438 |
+

|
| 439 |
+
Figure 10: Interpolation results for on the MNIST dataset with various dimensions of the latent space. The parameter $t \in [ 0 , 1 ]$ indicates the interpolation parameter.
|
| 440 |
+
|
| 441 |
+
where $S _ { W }$ is the within class covariance matrix, $S _ { T }$ is the data covariance matrix, $I$ is the identity matrix, and $\alpha$ identifies the interpolation between PCA and LDA (i.e. $\alpha = 0$ leads to LDA and $\alpha \to \infty$ leads to PCA).
|
| 442 |
+
|
| 443 |
+
# ERROR ANALYSIS OF WASSERSTEIN DISTANCE
|
| 444 |
+
|
| 445 |
+
For $p \geq 1$ we can use the triangle inequality and write
|
| 446 |
+
|
| 447 |
+
$$
|
| 448 |
+
\begin{array} { l l l } { { W _ { p } ( p _ { X } , p _ { Y } ) } } & { { \le } } & { { W _ { p } ( p _ { X } , p _ { X , M } ) + W _ { p } ( p _ { Y } , p _ { X , M } ) } } \\ { { } } & { { \le } } & { { W _ { p } ( p _ { X } , p _ { X , M } ) + W _ { p } ( p _ { Y } , p _ { Y , M } ) + W _ { p } ( p _ { X , M } , p _ { Y , M } ) } } \end{array}
|
| 449 |
+
$$
|
| 450 |
+
|
| 451 |
+
which leads to
|
| 452 |
+
|
| 453 |
+
$$
|
| 454 |
+
\begin{array} { r l r } { W _ { p } ( p _ { X } , p _ { Y } ) - W _ { p } ( p _ { X , M } , p _ { Y , M } ) } & { \leq } & { W _ { p } ( p _ { X } , p _ { X , M } ) + W _ { p } ( p _ { Y } , p _ { Y , M } ) } \end{array}
|
| 455 |
+
$$
|
| 456 |
+
|
| 457 |
+
Taking the expectation of both sides of the inequality and using the empirical convergence bounds of $W _ { p }$ (in this case $W _ { 1 }$ ) we have,
|
| 458 |
+
|
| 459 |
+
$$
|
| 460 |
+
\begin{array} { r c l } { \mathbb { E } ( W _ { 1 } ( p _ { X } , p _ { Y } ) - W _ { 1 } ( p _ { X , M } , p _ { Y , M } ) ) } & { \leq } & { \mathbb { E } ( W _ { 1 } ( p _ { X } , p _ { X , M } ) ) + \mathbb { E } ( W _ { 1 } ( p _ { Y } , p _ { Y , M } ) ) } \\ & { \leq } & { \displaystyle \frac { C } { \sqrt { M } } } \end{array}
|
| 461 |
+
$$
|
| 462 |
+
|
| 463 |
+
for some absolute constant $C$ , where the last line comes from the empirical convergence bounds of distributions with respect to the Wasserstein distance, see Bobkov & Ledoux (2014).
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
|
| 467 |
+
<table><tr><td rowspan=2 colspan=11>WAARJDPPPE 00OT WAARA DPP-PPS 000T(SANN)IISSNAAAAA(SALIIUSSMAA-AAA80ywewvvomzb~z'xd ~x'(z)p'x)ms)b01 zb~z'Xd ~x'(z'(x)Φ)Ms)b0100 0090020200 xd~x'(x)Φ0 0 ●zb~z26802101210 1 1</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2></td></tr><tr><td rowspan=1 colspan=1>0000</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=4></td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>:</td><td rowspan=1 colspan=1>:</td><td rowspan=1 colspan=4>:</td><td rowspan=1 colspan=2>:</td><td rowspan=1 colspan=1>:</td><td rowspan=1 colspan=1>:</td><td rowspan=1 colspan=1>:</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=4></td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=4></td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=4></td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=4></td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=4></td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>茶</td></tr><tr><td rowspan=1 colspan=1>rtigen</td><td rowspan=1 colspan=1>o</td><td rowspan=1 colspan=4>MAAAAA</td><td rowspan=1 colspan=2>MAA-MAD</td><td rowspan=1 colspan=1>o</td><td rowspan=1 colspan=1>AAA-AAA</td><td rowspan=1 colspan=1>MAA-MARBBB)</td></tr></table>
|
| 468 |
+
|
| 469 |
+
SWAE provides a superior match between φ(x (i.e. pZ and qZwhile being less computationally expensive a ))
|
parse/train/H1xaJn05FQ/H1xaJn05FQ_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1xaJn05FQ/H1xaJn05FQ_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H1xaJn05FQ/H1xaJn05FQ_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SJgwNerKvB/SJgwNerKvB_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/SJgwNerKvB/SJgwNerKvB_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|