Customizing Sequence Generation with Multi-Task Dynamical Systems
Authors: Alex Bird
Christopher K. I. Williams
Venue:  (2020)
Keywords: Time-series modelling
Dynamical systems
RNNs
Multi-task learning

Abstract: Dynamical system models (including RNNs) often lack the ability to adapt the sequence generation or prediction to a given context, limiting their real-world application. In this paper we show that hierarchical multi-task dynamical systems (MTDSs) provide direct user control over sequence generation, via use of a latent  code z that specifies the customization to the
individual data sequence. This enables style transfer, interpolation and morphing within generated sequences. We show the MTDS can improve predictions via latent code interpolation, and avoid the long-term performance degradation of standard RNN approaches.

Under review as a conference paper at ICLR 2020
CUSTOMIZING SEQUENCE GENERATION WITH MULTI- TASK DYNAMICAL SYSTEMS
Anonymous authors Paper under double-blind review
ABSTRACT
Dynamical system models (including RNNs) often lack the ability to adapt the sequence generation or prediction to a given context, limiting their real-world application. In this paper show that hierarchical multi-task dynamical systems (MTDSs) provide direct user control over sequence generation, via use of a latent code that specifies the customization to the individual data sequence. This enables style transfer, interpolation and morphing within generated sequences. We show the MTDS can improve predictions via latent code interpolation, and avoid the long-term performance degradation of standard RNN approaches.
INTRODUCTION
Time series data often arise related 'family' of sequences, where certain characteristic differences exist between the sequences in a dataset. Examples include the style of handwritten text (Graves, 2013), the response of patient to an anaesthetic (Bird al., 2019), or the style of locomotion in motion capture (mocap) data (Ghosh et al., 7). In this paper, we will consider how such variation may be modelled, and effectively controlled by an end user.
Such related data is often pooled to train single dynamical system, despite the internal variation. For simple model, such as a linear dynamical system (LDS), this will result in learning only an average effect. In contrast, recurrent neural network (RNN) may model this variation, but in an implicit and opaque manner. Such 'black-box' approach prohibits end-user control, and may suffer from mode drift, such as in Ghosh et al. (2017), where generated mocap sequence performs an unprompted transition from walking to drinking. Some of these problems may be alleviated by appending 'context labels' to the inputs (see e.g. Goodfellow et al., 2016, $ $10.2.4) which describe the required customization. However, such labels are often unavailable, and the approach may fail to model the variation adequately even when they are.
To move beyond these approaches, we consider latent variable models, where a latent variable z characterizes each sequence. This may be seen form of multi-task learning (MTL, see Zhang & Yang, 2017), from which we derive the name multi-task dynamical system (MTDS), with each sequence treated as a task. A straightforward approach is append the latent the inputs of the model, similarly to the 'context label' approach, thereby providing customization of the various bias (or offset) parameters the model. A number of examples of this have been proposed recently, e.g. in Yingzhen & Mandt (2018) and Miladinović et al. (2019). Nevertheless, this 'bias customization' has limited expressiveness and is often unsuitable for customizing simple models.
In this paper we investigate a more powerful form of customization which modulates all the system and emission parameters. In this approach, the parameters of each task are constrained lie on a learned low dimensional manifold, indexed by the latent z. Our experiments show that this approach results in improved performance and/or greater data efficiency than existing approaches, as well as greater robustness to unfamiliar test inputs. Further, varying can generate a continuum of models, allowing interpolation between sequence predictions (see Figure lb for an example), and potentially morphing of sequence characteristics over time.
In this paper propose the MTDS, which goes beyond existing work by allowing full adaptation of all parameters of general dynamical systems via use of a learned nonlinear manifold. We show how the approach may be applied to various popular models, and provide general purpose
Contributions

---

Under review as a conference paper at ICLR 2020
(a)
(b)
Figure (a) Graphical Model the multi-tast dynamical system. (b) Right elbow joint during human locomotion measured in (top) vertical, and (bottom) horizontal directions, obtained varying between 'childlike' (blue) and 'proud' (red) styles.
learning and inference algorithms. Our experimental studies use synthetic data (sum two damped harmonic oscillators) and real-world human locomotion mocap data. We illuminate various properties of the MTDS formulation in our experiments, such as data efficiency, user control, and robustness to dataset shift, and show how these go beyond existing approaches time series modelling. We finally utilize the increased user control in the context of mocap data to demonstrate style morphing.
To this end, we introduce the model in Section 2, giving examples and discussing the particular chal- lenges learning and inference. We discuss the relation to existing work Section 3. Experimental setup and results given in Section 4 with conclusion in Section 5.
MULTI-TASK DYNAMICAL SYSTEMS
Consider a collection of input-output sequences D = (,, U with inputs y (u u
(1) ) 1,..., N. where T; denotes the length of sequence i. Each sequence i is described by a different dynamical system, whose parameter ( depends on the hierarchical latent variable (1)) E Z:
(1) and outputs ( {y
(6) hx(2
( p(z)
x, (8) ~ p(x
x X;-1 1 ((0)
(2)
yt ply x u 0())
(3)
fort I...., T. starting from Xo == 0 (other choices initial state are possible). See Figure Ia for a graphical model. In this paper assume 2 IR* which the vector-valued function h*(-) transforms to conformable model parameters 0 E Rd f d >> k. Note that h& may keep some dimensions of 0 constant with respect to z. We call this Multi-Tane Dynamical System, going beyond the usage in Bird et al. (2019).
The state variables ( {x]"
J. X X follow the latent dynamics (2)
An MTDS model under this framework must specify three key quantities:
1. The base model (e.g. LDS RNN).
2. The nature of the interaction between the latent variable and the parameter vectors (e.g. if only the dynamics (eq. 2) depend on Ø).
3. The choice prior p(z) and transformation h
Where the of constant of maximum length L. When L is small enough, this effectively permits a time-varying z, as we will in section 4.2.
time is inappropriate, each sequence be broken into segments
2

---

Under review as a conference paper at ICLR 2020
2.1 EXAMPLES
In order to make the framework more concrete we will describe two general choices of the base model. In what follows we will write each parameter with a subscript z to denote dependence on z (e.g. A₂ := A(z)) to reduce notational clutter. The choice of p(z) and h& will depend on the application, but fairly general choice a deep latent Gaussian model (Kingma & Welling, 2014; Rezende et al., 2014). See section A.I.I 1.1 in the supplementary material for further discussion.
2.1.1 MULTI-TASK LINEAR DYNAMICAL SYSTEM
For a given z, a multi-task linear dynamical system (MTLDS) can be described by:
X A2Xt-1 1 BRu, bx Wts
(4)
Y: = C2x: + D2 + dz t
(5)
Wi N (O, ~ (O, S2), with 6₂ {Ag. Bz. b2, Cz. Dz, d2. R2) (z). The purameterization of 02 must satisfy the constraints of positive definite Rs and S₂ and stable A, (i.e.
A S 1) for all z, hence projection methods such as Siddiqi et al. (2008) are not applicable.
We choose an alternative formulation of the LDSS, replacing the latent dynamics in eq. (4) by:
X = -2 + Bzu, + b2 + Wt
(6)
where Eg is diagonal matrix and Q₂ orthogonal with no loss of generality (proof in supp. mat.). Since |x || < || 1 = |Σz||_ stability can be enforced e.g. by Σ = diag (lanh (v)} for
some vector For more details section 1.1.2 in the supplementary material.
2.1.2 MULTI- TASK RECURRENT NEURAL NETWORK
Due to the nonlinearity of an RNN, enforcing stability of Ag is not strictly required (sec e.g. Miller & Hardt, 2019, $4.4), although bounding the spectral radius may be useful for learning (e.g. Pascanu al., 2013). The dynamics of multi-task RNN (MT-RNN) are described by:
X = tanh (Axx, + Bzu, + bz).
Combined with the emission model of eq. (5), have 0₂ (Az: B2, bz: Cz. Dz, dz). long-term dependencies are important we may consider an orthogonal transition matrix (parameterized as for the MTLDS) to create multi-task version of the Orthogonal RNN (ORNN, Helfrich et al., 2018).
2.2 LEARNING
The parameters & of an MTDS can be learned from dataset D = marginal likelihood: 6² arg max Σi= log d(g 1o69, Φ). where
via maximum
lY U. log
p( hz(z)) p(z) dz.
The first term in the integrand, PU hz = SXT p(Y U, (z(z)) P(XIU, (z) dX is gen- erally intractable for stochastic dynamics (with notable exceptions of discrete and models). A common approach is to use variational evidence lower bound (ELBO) see e.g. Fraccaro et al. (2016); Goyal et al. (201)); Miladinović et al. (2019) or a Monte Carlo objective (MCO) e.g. Maddison al. (2017); Le et al. (2018); Naesseth al. (2018). For clarity of exposition we only consider models with deterministic state, which extends to the MTRNN and MTLDS above (in the case w, for all t). This also avoids the interaction effect with the choice of approximate marginalization over X.
Equation (8) also cannot be computed in closed form in general, and so resort to approximate learning. A natural choice is via the ELBO (see an alternative MCO approach for unsupervised tasks in Section 1.1.3, supp. mat.). We write the ELBO of eq. (8) as:
C(Y: Φ. X) (2) Pog((Y he (x)) DKL. (4x Uz)(
where DKL is the Kullback-Leible divergence and ga (Z) an approximate posterior for z. We optimize lower bound of the marginal likelihood via arg max EN (() ()))
3

---

Under review as a conference paper at ICLR 2020
where low variance unbiased gradients of eq. (9) are available via reparamettrrization (Kingma & Welling, 2014; Rezende et al., 2014) and minibatches of size Muach < N.. Optimization via Adam (Kingma & Ba, 2014) proved adequate in our experiments without resorting to any specialized RNN optimization tricks. A standard choice of q> (2(2)), U) is N (Y,)Y, sx(YUU) U)), where μa,. 8x are inference networks (e.g. Fabius & van Amersfoort, 2015).
It can be difficult to learn a sensible latent representation if the base model is a powerful RNN. When each output can be identified unambiguously via the inputs preceding it, larger ELBO can be obtained by the RNN learning the relationship without using the latent variable (see e.g. Chen et al., 2017). A useful heuristic for avoiding such optima KL annealing (e.g. Bowman al., 2016). In our experiments we perform an initial optimization without the KL penalty (second term in eq. 9), initializing sx U) to a small constant value.
2.3 INFERENCE
For an unseen test sequence {Y', "U"), the posterior predictive distribution is p(y 1+1:T Vy "/r)) = Jz ply'+1:T " 2) p(z Yi., n' dz, usually estimated via Monte Carlo. The key quantity is the posterior over z. which may be approximated by the inference networks μx SA. However, for novel test sequences, the inference networks may perform poorly and standard approximate inference techniques may be preferred. For further discussion and a description of our inference approach, see sections A.1.4, A.1.5 in the supp. mat. We note that may not require inference, for instance by using the posterior of a sequence in the the training set. This may be useful for artistic control, style transfer, embedding domain knowledge or overriding misleading observations. We also note that the latent code can be varied during the state rollout to simulate a task which varies over time.
3 RELATED WORK
number of dynamical models following the 'bias customization' approach have been proposed recently. Miladinović et al. (2019) and Hsu et al. (2017) propose models where the biases of an LSTM cell depend on (hierarchical) latent variable. Yingzhen & Mandt (2018) propose a dynamical system where the latent dynamics are concatenated with a time-constant latent variable. In contrast, our MTDS model performs full parameter customization, and this on both the dynamics and emission distributions. A number of other proposals may be considered specialized applications of the MTDS. Bird et al. (2019) use a small deterministic nonlinear dynamical system for the base model whose parameters depend on z using nonlinear factor analysis structure. Spieckermann et al. (2015) use small RNN as the base model, where the transition matrix depends on z via multilinear decomposition. Lin al. (2019) use a small stochastic nonlinear dynamical system with h& a set of parameter vectors chosen discretely (or in convex combination) via z.
Controlling and customizing sequence prediction has received much attention in the case of video data. As in the MTDS, these approaches learn features that are constant (or slowly varying) within a subsequence. Denton & Birodkar (2017) and Villegas et al. (2017) propose methods for disentangling time-varying and static features, but do not provide a useful density over the latter, nor an obvious way to customize the underlying dynamics. Tulyakov al. (2018) use a GAN architecture where factorizes into content and motion components. Hsieh et al. (2018) force parts-based decomposition of the scene before inferring the latent content z. However, as before, the dynamic evolution cannot be easily customized with these methods.
Hierarchical approaches for dynamical systems with time-varying parameters are proposed in Luttinen et al. (2014) (corresponding to non-stationary assumptions) and in Karl et al. (2017) (for the purposes of local LDS approximation). These models, like the MTDS can adapt all the parameters, but are linear and correspond single task problems. Rangapuram et al. (2018) predict the parameters of simple time-varying LDS models directly via an RNN. While this is a multi-task problem, it is assumed that all necessary variation can be inferred from the inputs U.
Multi-task GPs are commonly used for sequence prediction. Examples include those in Osborne et al. (2008); Titsias & Lázaro-Green Gredilla (2011); Álvarez et al. (2012); Roberts et al. (2013). MTGPs however can only be linear combinations of (a small number of) latent functions, further, predictions depend critically upon often unknown mean functions, and inputs are not easily integrated. Note that an MTDS with no inputs, LDS base model, linear-Gaussian prior over the emission parameters
4

---

Under review as a conference paper at ICLR 2020
Training
Test
An mm An Wmm Mn pm0
25
40 60 80
80
(a)
(d)
Figure 2: (a) Example DHO data for N 4 training sequences and two test sequences. (b) Samples from the MTLDS trained on the sequences in 2a, conditioned on the shaded region test sequence I up to 15. (c) Posterior predictive density of the same data and model at 30. Posterior mean and 95% C.I. shown orange, true values shown in dotted blue. (d) Posterior mean and C.I. for the second test sequence.
and fixed dynamics is an MTGP. In contrast to MTGPs, an MTDS allows much greater flexibility of the dynamic variation. The MT GP dynamical system of Korkinof & Demiris (2017) mitigates some of these limitations, but it retains simple linear combination of latent dynamics with a Gaussian density over the combination.
Style transfer has been widely explored for mocap data e.g. Hsu et al. (2005); Min et al. (2010); Xia al. (2015); Holden et (2017a), but in most previous work, generating sequences conditioned on trajectory is not possible. For recurrent sequence generation, Fragkiadaki et al. (2015) proposed (2017),
multilayer L.TTM approaches with an encoding and decoding network. Martinez introduced the idea of open loop or 'sampled' training (cf. Bengio et al., 2015) in order to avoid recurrent models converging quickly towards mean pose. However, style transfer unavailable with these methods. A phase-varying nonlinear autoregressive approach was introduced in Holden et al. (201 7b) which was extended in Mason et al. (2018) to provide style transfer, but no quantitative results available. We not aware of any existing work which allows style interpolation.
EXPERIMENTS
We investigate the performance of the MTDS on two datasets. The first experiment investigates the performance of the MTDS synthetic data generated by linear superposition of damped harmonic oscillation (DHO). The second experiment considers real-world mocap data for human locomotion.
4.1 DAMPED HARMONIC OSCILLATION
Data The generative model for J oscillators with constant amplitudes and variable frequency and decay factors, R4,, P (0, 1] is y Σ 75 ( sin(w (() 1, .,. 80 for tasks 1,2, .......... ... N. The emission noise is distributed iid as e( N 0.05") and the amplitudes 7 [1.0. 0.5]. We use J = oscillators with the 'sequence family' thus parameterized by 4-d space. Details of the generating distribution for w and are given in supplementary material sec. A.2.1. See Figure 2(a) for example traces.
Model We model the DHO data using an MTLDS with deterministic state X = R and a A = 4 latent variable z. All LDS parameters were adapted via the latent except D == and the emission variance s², which was learned. For optimization, we use the MCO algorithm of section A.1.3. This can obtain a tighter bound than the ELBO, and is useful to investigate convergence to the true model over increasing N. We contrast this with a bias customization approach (e.g. Miladinović al., 2019), implemented similarly, but such that only the parameter b (eq. 6) depends on z. We also train a Pooled LDS, which is the standard approach, using the same parameters for all tasks, and single-task (STL) LDS which is learned from scratch using Bayesian inference over all parameters for each task. The Pooled-LDD LD was initialized using spectral methods (see Van Overschee & De Moor,

---

Under review as a conference paper at ICLR 2020
DHO RMSE
N 4'
N 16
N 128
Model
f = 20
t = 40
t= 20
= 40
t = 20
t == 40
Pooled LDS
0.37
0.31
0.36
0.31
0.36
0.31
STL LDS
0.36
0.11
LDS MT Bias
0.41
0.33
0.37
0.30
0.33 0.09
0.27
LDS MT Full
0.18
0.12
0.11
0.07
0.06
Table 1: DHO results using LDS models, with training size N shown. Predictive RMSE after t t= 20, 40. (*) The STL model trains from scratch, and hence on N 0 sequences.
2012) and then fine tuned using Adam. The STL model requires no training as it is inferred directly on test data. More details are given in section A.2 in the supplementary material.
Evaluation We assess how quickly and effectively the models adapt to novel test sequences with a training set size of N 2 ......... 2". (The STL approach effectively uses N = 0.) The test set comprises 20 additional sequences drawn from the generating distribution. For an initial subsequence yiat, we estimate the predictive posterior p(yt+1:T (8:.z) for various t and assess the predictions via root mean squared error (RMSE) and negative log likelihood (NLL). For MTL we use the Monte Carlo inference method described in supp. mat. 1. and for STL we use Hamiltonian Monte Carlo (NUTS, Hoffman & Gelman, 2014). Each experiment is repeated 10 times estimate sampling variance.
Results The results, shown in Table and supp. mat. section A.2.2, show substantial advantage of using the MTLDS ('MT Full') over single-task or pooled approaches. The MTLDS consistently outperforms the Pooled-LDS for all training sizes N 2 4. Merely performing bias customization ('MT Bias') is insufficient to perform much better than a pooled approach. An example of MTLDS test time prediction is shown in Figure 2, with Figures 2c and 2d demonstrating effective generalization from the N 4 training examples (Figure 2a). Even after 40 observations, the STI. approach (which is capable of fitting each sequence exactly) does not significantly outperform the N 4 MTLDS. Furthermore, the runtime was approx. 1000 times longer since STL inference is higher dimensional and poorly conditioned, and requires more expensive algorithm. Note that with larger training set size of N = 128, the MLTDS approaches the likelihood of the true model (Figure 7, supp. mat.).
4.2 MOCAP DATA
The dataset consists of 31 sequences from Mason et al. (2018) (ca. 2000 frames average at 30fps) in 8 styles: angry, childlike, depressed, neutral, old, proud, sexy, strutting. In this case the family of possible sequences corresponds to differing walking styles. Each observation represents 21-joint skeleton in a Lagrangian frame, y, RR where the root movement is represented by smoothed component and its remainder. Following Mason et al. (2018) we represent joints by their spatial position rather than their rotation. We also provide inputs that an animator may wish to control: the root trajectory over the next second, the gait cycle and a boolean value determining whether the skeleton turns around the inside or outside of a corner. See section A.3.1 in the supplementary materials for more details.
Data
Model We use a recurrent 2-layer base model where the first hidden layer is 1024 unit GRU (Cho et al., 2014) and the second hidden layer is a 128 unit standard RNN, follwed by a linear decoding layer. The first-layer GRU does not vary with z, i.e. it learns shared representation of the input sequence across all i. Explicitly, omitting index i, the model for a given z is:
[2b2, C, d] = (z)2),
(10)
X1,1 GRUCell1021
1024 (state= X1,t-1, imput= Uni v1). X2.1 RNNCell state== X2,1-1, imput= HxI,0-1; 4/21
(11)
(12)
ý, CX2,1 d,
(13)

---

Under review as a conference paper at ICLR 2020
STL GIUALL Open lous) Poo GRI ispen oop)
Target
MT Bias
MTDS
Angry
0.78
0.86
Child
0.59
0.95
Depr.
0.65
0.81
0.6
Neut.
0.79
0.93
Old
0.55
0.86
6.4-
65-
Proud
0.71
0.82
Sexy
0.55
0.90
GHASL Come lagg M1DS
Strut
0.71
0.92
0.0
0.1
2.3
6-4
0.5
20
10
66
60
100
Tractoo tranning and
Prockttoo hame
(a)
(b)
(c)
Figure 3: (a) Mocap Experiment out-of-sample MSE by % of training set seen. The performance achieved by the GRU models for the entire training set is shown as the 'Optimal' dashed line. (b) Experiment 2: MSE performance (avg over LOO), truncated for clarity, see supp. mat. for the full range. (c) Experiment 3: Classifier probability of target style averaged over all input styles.
for I...., T. The parameters are 0= ( 1/2. H, C, d} where के and are constant wrt. z. P
The matrix H E ggfx1021 (E < 1024) induces a bottleneck between layers, forcing z to explain more of the variance. For our experiments, a small can be used (we use é 24). The first layer GRU uses 1024 units since it was observed experimentally to produce smoother animations than smaller networks. The second layer does not use gated architecture, as gates appear to learn style inference more easily, and result in less use of z.
For learning, each sequence was broken into overlapping segments of length 64 (approx. two second intervals), which allows to vary across sequence. We learn the model using an open-loop objective, iee. the y: are not appended to the inputs. This forces the model to recover from its mistakes as in Martinez et al. (2017), although unlike these approaches, we do not append predictions to the inputs either. Our rationale that the state captures the same information as the predictions, and while previous approaches required observations Y1:r as inputs seed the state, we can use the latent z. The model was optimized using the variational procedure in section 2.2, where a slower learning rate (by a factor of 10-50) for the first layer parameters (i.e. 4/1, H) usually resulted in a more descriptive
We also found that standard variational inference for each z worked better in general than using amortized inference.
For comparison, we implement a bias customization model ('MTBias") via deterministic state version of Miladinović et al., 2019, which follows eqs. (10)-(13) but only the RNN bias in eq. (12) is function of We also implement 1-layer and 2-layer GRU without the multi-task apparatus, which serves both as an ablation test and a competitor model (Martinez et al., 2017) on the new dataset. Style inference is performed with the same network given an initial seed sequence Yı.r. We train these in closed-loop (i.e. traditional next step 'teacher forcing' criterion) and open-loop (Martinez al., 2017) settings. For baselines, we use constant predictions of (i) the training set mean and (ii) the last observed frame of the seed sequence ('zero-velocity prediction).
Experiment We test the data efficiency of the MTDS by training the models on subsets of the original dataset. Besides the models described above, 8 'single-task' versions of the GRU models are trained which only see data for single style. We use six training sets of approximate size 28, 29 210 211, 212 213 frames per style, where sampling is stratified carefully across all styles, and major variations thereof. For all experiments, the model fit (MSE) is calculated from the same 32 held out sequences (each of length 64). The results are shown in Figure 3a. As expected, the MTDS, MTBias and Pooled models obtain 'multi-task" gains over STL approaches for small datasets. However, the MTDS demonstrates much greater data efficiency, achieving close to the minimum error with only 7% of the dataset. The MTBias model requires more than twice this amount obtain the same performance, and the Pooled model requires more than four times this amount. More details, with all mocap experiments, be found in supp. mat. section A.2.3.
7

---

Under review as a conference paper at ICLR 2020
We investigate how well the MTDS can generalize to novel sequence styles via use of a leave-one-out (LOO) setup, similar to transfer learning. For each test style, a model is trained on the other 7 styles in the training set, and hence encounters novel sequence characteristics at test time. We average the test error over the I.00 folds as well as 32 different starting locations on each test sequence. The results are given in Figure 3b. We that while the competitor (pooled) models perform well initially, they usually degrade quickly (worse for closed-loop models). In contrast, the multi-task models finds better customization which evidences no obvious worsening over the predictive interval. Unlike inference of their customization, and secondly can 'remember' over long intervals. We note that all models struggle to customize the arms effectively, since their test motions are often entirely novel. Customization to the legs and trunk is easier since less extrapolation is required (see animation videos linked in section 1.
Experiment 2
the MTDS and MTBias models can firstly perform correct
Experiment 3 We investigate the control available in the latent z by performing style transfer. For various inputs ((si) from each source style $1, we generate predictions from the model using target style 82, encoded by z(*2), We use a classifier with multinomial outputs, trained on the styles of the training set, to test whether the target style $2 can be recognized from the data generated by the MTDS. Figure 3c gives the classifier "probability" for each target style 82, averaged over all the inputs (U(()) $1 o 52). Successful style transfer should result in the classifier assigning a high probability to the target style. These results suggest that the prediction style can be well controlled by (*2)) in the case of the full MTDS, but the MTBias demonstrates reduced control for some (source, target) pairs. See the videos linked in section A.4.1 for examples, and sec. A.2.3 for more details.
Qualitative investigation Qualitatively, the MTDS appears to learn sensible manifold of walking styles, which we assess through visualization of the latent space. A l = 2 latent embedding can be seen in Figure where the z for each training segment i coloured by the true style label. Some example motions are plotted in the figure.
The MTDS embedding broadly respects the style label, but learns more nu- anced representation, splitting some la- bels into multiple clusters and coalescing others. These appear broadly valid, e.g. the 'proud' style contains both marching and arm-waving, with the latter similar to an arm-waving motion in the 'child- like' style. This highlights the limitation of relying on task labels. Visualizations such as Fig. 1b indicate that smooth style interpolation
chating
available via interpola- tion in latent space. We take advantage of this in the animations (linked from sec. 1. by morphing styles dynamically.
-20
-15
-1.
-0.
5.0
20
1.2
2.0
Figure 4: k 2 mean embedding of each se- quence segment, coloured by its (unseen) task label.
5 CONCLUSION
In this work we have shown how to extend dynamical systems with general-purpose purppose hierarchical structure for multi-tast learning. Our MTDS framework performs customization at the level of all parameters, not just the biases, and adapts all parameters for general classes of dynamical systems. We have seen that the latent code can learn a fine-grained embedding of sequence variation and can be used to modulate predictions.
Clearly good predictive performance for sequences requires task inference, whether implicit or explicit. There are three advantages of making this inference explicit. Firstly, it enhances control over predictions. This might be used by animators to control the style of predictions for mocap models, or to express domain knowledge, such ensuring certain sequences evolve similarly. Secondly, it can improve generalization from small datasets since task interpolation is available out-of-the-bbo Thirdly, it can be more robust against changes in distribution at test time than pooled model:
8

---

Under review as a conference paper at ICLR 2020
standard inference techniques human supervision guard against poor performance of the implicit inference.
REFERENCES
Mauricio A Álvarez. Lorenzo Rosasco, and Neil D Lawrence. Kernels for Vector- Valued Functions: A Review. Foundations and Trends()) in Machine Learning, 4(3):195-23) 266, 2012.
Samy Bengio, Oriol Vinyals, Navdcep Jaitly, and Noam Shazeer. Scheduled Sampling for Sequenee Prediction with Recurrent Neural Networks. In Advances in Neural Information Processing Systems 28, pp. 1171-1179. 2015.
Alex Bird, Christopher K. I. Williams, and Christopher Hawthorne. Multi-Task Time Series Analysis applied Drug Response Modelling. In The 22nd International Conference on Artificial Intelligence and Statistics, 2019.
Samuel Bowman, Luke Vilnis, Oriol Vinyals, Andrew Dai, Rafal Jozefowicz, and Samy Bengio. Generating Sentences from a Continuous Space. In Proceedings of the Twentieth Conference on Computational Natural Language Learning (CoNLL)., 2016.
Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance Weighted Autocncoders. In Proceedings of the International Conference Learning Representations (ICLR), 2016.
Olivier Cappé, Randal Douc, Amaud Guillin, Jean-Min MaanMMichll Marin, and Christian P Robert. Adaptive Importance Sampling in General Mixture Classes. Statistics and Computing, (5(4):447455) 2008.
Xi Chen, Diederik P Kingma, Tim Salimans, Yan Duan, Prafulla Dhariwal, John Schulman, Ilya Sutskever, and Pieter Abbeel. Variational Lossy Autoencoder. 2017.
Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning Phrase Representations using RNN Encoder-Deeoder for Statistical Machine Translation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2014.
Nicolas Chopin. A Sequential Partiele Filter Method for Static Models. Biometrika, 89(3):339-555 2002.
Pierre Del Moral, Arnaud Doucet, and Ajay Jasra. Sequential Monte Carlo Samplers. Journal of the Royal Statistical Sociery: Series B (Statistical Methodology), 68(3):411-44 1-346,, 2006.
Emily L Denton and Vighnesh Birodkar. Unsupervised Learning of Disentangled Representations from Video. In Guyon, U. V. Luxburg. S. Bengio. H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 4414 4423. 2017.
Otto Fabius and Joost R van Amersfoort. Variational Recurrent Auto-Encoders. In Proceedings of the Interna- tional Conference Learning Representations (ICLR), 2015.
Marco Fraccaro, Spren Kaae Spnderby, Ulrich Paquet, and Ole Winther. Sequential Neural Models with Stochastic Layers. In Advances in Neural Information Processing Systems 29, pp. 2199-2207, 2016.
Katerina Fragkiadaki, Sergey Levine, Panna Felsen, and Jitendra Malik. Recurrent Network Models for Human Dynamies. In Proceedings the IEEE International Conference Computer Vision, pp. 4346 4354, 2015.
Andrew Gelman, John B Carlin, Hal S Stern, David B Dunson, Aki Vehtari, and Donald B Rubin. Bayesian Data Analysis. CRC Press, 3rd edition, 2013.
Partha Ghosh, Jie Song, Emre Aksan, and Otmar Hilliges. Learning Human Motion Models for Long-Term Predictions. In 2017 International Conference 3D Vision (3DV), pp. 458-466. IEEE, 2017.
Walter R Gilks and Carlo Berzuini. Following Moving Target Monte Carlo Inference for Dynamic Bayesian Models. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 63(1):127-146, 2001.
Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT press, 2016.
Anirudh Goyal, Alessandro Sordoni, Marc-Alexandre Côté, Nan Rosemary Ke, and Yoshua Bengio. Z-Forcing: Training Stochastic Recurrent Networks. In Advances Neural Information Processing Syxtems 30, pp. 6713-6723, 2017.
Alex Graves. Generating Sequences with Recurrent Neural Networks. arXiv preprint arXiv: 2013.

---

Under review as a conference paper at ICLR 2020
Kyle Helfrich, Devin Willmott, and Qiang Ye. Orthogonal Recurrent Neural Networks with Scaled Cayley Transform. International Conference on Machine Learning, pp. 1974-1983, 2018.
Matthew D Hoffman and Andrew Gelman. The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research, 15(1):1593-166 2014.
Daniel Holden, Jun Saito, and Taku Komura. A Deep Learning Framework for Character Motion Synthesis and Editing, ACM Transactions on Graphics (TOG), 35(4):138, 2016.
Daniel Holden, Ikhsanul Habibie, Ikuo Kusajima, and Taku Komura. Fast Neural Style Transfer for Motion Data. IEEE Computer Gruphics and Applications, 37(4):42-49, 2017a.
Daniel Holden, Taku Komura, and Jun Saito. Phase-Functioned Neural Networks for Character Control. ACM Transactions on Graphics (TOG), 36(4):42, 2017b.
Jun-Ting Hsieh, Bingbin Liu, De-An Huang. Li F Fei-Fei, and Juan Carlos Niebles. Learning Decompose and Disentangle Representations Video Prediction. In Advances Neural Information Processing Syxtems 31, pp. 517-526, 2018.
Eugene Hsu, Kari Pulli, and Jovan Popović. Style Translation for Human Motion, ACM Transactions on Graphics (TOG), volume 24, pp. 1082-1089. ACM, 2005.
Wei-Ning Hsu, Yu Zhang, and James Glass. Unsupervised Learning of Disentangled and Interpretable Represen- tations from Sequential Data. In Advances in Neural Information Processing Systems 30, pp. 1876-1887. 2017.
Maximilian Karl, Maximilian Soelch, Justin Bayer, and Patrick van der Smagt. Deep Variational Bayes Filters: Unsupervised Learning of State Space Models from Raw Data. In International Conference on Learning Representations, 2017.
Robert E. Kass and Adrian E Raftery. Bayes factors. Journal of the American Statistical Association, 90(430): 773-795, 1995.
D Khuri, I Andre, et al. The Parameterization of Orthogonal Matrices: A Review Mainly for Statisticians. South African Statistical Journal, 23(2):231-250, 1989.
Diederik P Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. In Proceedings of the 2nd International Conference on Leurning Representations (ICLR), 2014.
Diederik P Kingma and Max Welling. Auto-Encoding Variational Bayes. In Second International Conference on Learning Representations, ICLR, 2014.
Dimitrios Korkinof and Yiannis Demiris. Multi-Task and Multi-Kernoe Gaussian Process Dynamical Systems. Pattern Recognition, 66: 190-201, 2017.
Tuan Anh Le, Maximilian Igl, Tom Rainforth, Tom Jin, and Frank Wood. Auto-Encoding Sequential Monte Carlo. In International Conference on Learning Representations, 2018.
Christiane Lemieux. Monte Carlo and Quasi-Monte Carlo Sampling. Springer, 2009.
Alexander Lin, Yingzhuo Zhang, Jeremy Heng, Stephen A Allsop. Kay M Tye. Pierre E Jacob. and Demba Ba. Clustering Time Series with Nonlinear Dynamies: A Bayesian Non-Parametrie and Particle-Basee Approach. In The 22nd International Conference on Artificial Intelligence and Statistics, 2019.
Jaakko Luttinen, Tapani Raiko, and Alexander Ilin. Linear State-Space Model with Time- Varying Dynamics. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 338-353. Springer, 2014.
Chris J Maddison, John Lawson, George Tucker, Nicolas Heess, Mohammad Norouzi, Andriy Mnih, Arnaud Doucet, and Yee Tch. Filtering Variational Objectives. In Advances in Neural Information Processing Systems 30, pp. 6573-6583, 2017.
Julicta Martinez, Michael Black, and Javier Romero. On Human Motion Prediction Using Recurrent Neural Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2891- 2900, 2017.
Ian Mason, Sebastian Starke, He Zhang, Hakan Bilen, and Taku Komura. Few-Shoo Learning of Homogeneous Human Locomotion Styles. In Computer Graphics Forum, volume 37, pp. 143-153. Wiley Online Library, 2018.
10

---

Under review as a conference paper at ICLR 2020
Dorde Miladinović, Muharmaad Waleed Gondal, Bernhard Schölkopf. Joachim M. Buhmann, and Stefan Bauer. Disentangled State Space Representations. arXiv e-prints, art. 1906.03255 Jun 2019.
John Miller and Moritz Hardt. Stable Recurrent Models, In International Conference Learning Representa- tions, 2019.
Jianyuan Min, Huajun Liu, and Jinxiang Chai. Synthesis and Editing of Personalized Stylistic Human Motion. In Proceedings of the 2010 ACM SIGGRAPH Symposium Interactive 3D Graphics and Games. ACM. 2010.
Andriy Mnih and Danilo Rezende. Variational Inference for Monte Carlo Objectives. In International Conference on Machine Learning, pp. 2188-2196, 2016.
Christian Naesseth, Scott Linderman, Rajesh Ranganath, and David Blei. Variational Sequential Monte Carlo. In International Conference on Artificial Intelligence and Statisticx, pp. 968-9777 2018.
Manfred Opper and Ole Winther. A Bayesian Approach to On-line Learning. pp. 363-378 1998.
Michael Osbome,, Stephen Roberts, Alex Rogers, Sarvapali D Ramchur,, and Nicholas Jennings. Towards Real-Time Information Processing of Sensor Network Data Using Computationally Efficient Multi-Output Gaussian Processes. In Proceedings of the 7th International Conference on Information Processing in Sensor Networks, pp. 109-120. IEEE Computer Society, 2008
Art B. Owen, Monte Carlo Theory, Methods and Examples. 2013.
Razvan Pascanu, Tomas Mikolov, Yoshua Bengio. On the Difficulty Training Recurrent Neural Networks. In International Conference on Machine Learning, pp. 1310-1318, 2013.
Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic Diffcrentiation in PyTorch. 2017.
Dario Pavllo, David Grangier, and Michael Auli. Quaternet: A Quaternion Quatermion-Based Recurrent Model for Human Motion. In Proceedings of the British Machine Vision Conference (BMVC), 2018
José Pinheiro and Douglas M Bates. Unconstrained Parametrizations for Variance-Covariance Matrices. Statistics and Computing, 6(3):289-296 1996.
Urs Ramer, An Iterative Procedure for the Polygonal Approximation of Planc Curves. Computer Graphics and Image Processing, 1(3):244 256, 1972.
Syama Sundar Rangapuram, Matthias W Seeger, Jan Gasthaus, Lorenzo Stella, Yuyang Wang, and Tim Januschowski. Deep State Space Models for Time Series Forecasting. In Advances Neural Information Processing Systems 31, pp. 7785-7794, 2018
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference Deep Generative Models. In International Conference on Machine Learning, pp. 1278-1286, 2014.
Stephen Roberts, Michael Osborne, Mark Ebden, Steven Reece, Neale Gibson, and Suzanne Aigrain. Gaussian Processes for Time-Series Modelling. Philosophical Transactions of the Royal Society Mathematical, Physical and Engineering Sciences, 2013.
Sohan Seth, lain Murray, and Christopher Williams. Model Criticism in Latent Space. arXiv preprint
arXiv: 171.04477,, 2017.
Sajid Siddiqi. Byron Boots, and Geoffrey Gordon. Constraint Generation Approach to Learning Stable Linear Dynamical Systems. Technical report, DTIC Document, 2008
Sigurd Spieckermann. Siegmund Dull, Steffen Udluft, Alexander Hentschel, and Thomas Runkler. Exploiting Similarity in System Identification Tasks with Recurrent Neural Networks. Neurocomputing, 169:343-349 349, 2015.
Steven H Strogatz. Nonlinear Dynamics and Chaos: with Applications Physics, Biology, Chemistry, and Engineering. CRC Press, 2018
Johan F.M. Svénsen. GTM: the Generative Topographic Mapping. PhD thesis, Aston University. 1998. URL http://pubblcatiios.sssoo ac. wwtid//prinn/12455/
Michalis K Titsias and Miguel I dizaroGredilla.. Spike and Slab Variational Inference for Multi- Task and Multiple Kemel Learning. In Advances Neural Information Processing Systems 24, pp. 2339-2347, 2011.
11

---

Under review as a conference paper at ICLR 2020
Nathaniel Tomasetti, Catherine Forbes, Anastasios Panagiotelis, al. Updating Variational Bayes: Fast Sequential Posterior Inference. Tochnical report, Monash University, Department of Econometrics and Business Statistics, 2019.
Sergey Tulyakov, Ming- Liu, Xiaodong Yang, and Jan Kautz. MoCoGAN: Decomposing Motion Content Video Generation. In Proceedings of the I.E.E Conference on Computer Vision and Pottern Recognition, pp. 1526-15355 1535, 2018.
Peter Van Overschee and BL De Moor. Subspace Identification for Linear Systems: Applications. Springer Science & Business Media, 2012.
Ruben Villegas, Jimei Yang, Seunghoon Hong. Xunyu Lin, and Honglak Lec. Decomposing Motion and Content for Natural Video Sequence Prediction. In International Conference on Learning Representations, 2017.
Shihong Xia, Congyi Wang. Jinxiang Chai, and Jessica Hodgins. Realtime Style Transfer for Unlabeled Heterogeneous Human Motion. ACM Trunsactions on Graphics (TOG), 34(4):119, 2015.
Lei Xu and Michael Jordan. On Convergence Properties of the EM Algorithm for Gaussian Mixtures. Neural Computation, 8(1):129 1012-151,111 1996.
Li Yingzhen and Stephan Mandt. Disentangled Sequential Autoencoder. In International Conference on Machine Learning, pp. 5656-5666 5665, 2018.
Yu Zhang and Qiang Yang. A Survey on Multi- Task Learning. arXiv preprint arXiv:1007.08114, 2017.
12

---

Under review as a conference paper at ICLR 2020
A SUPPLEMENTARY MATERIAL
A.1 MODEL
In this section we elaborate on some aspects of the MTDS model which were omitted from the main text. We discuss the choice of the prior in section A.I.I, give further details of the MTLDS parameterization in section A.1.2, provide an alternative learning algorithm in section 1. (which especially suited for unsupervised models), and discuss choices of inference algorithm in sections A.1.4.A.1.5.
A.1.1 CHOICE OF PRIOR
The usual choice of p(z) in latent variable models following Kingma & Welling (2014); Rezende et al. (2014) is a unit Gaussian p(z) = .V (0, I). This choice allows simple sampling schemes, and forwad posterior approximations. It is also useful choice for interpolation, since it allows continuous deformation of its outputs. An alternative choice might be uniform distribution over compact set, however posterior approximation is more challenging, see Svénsen (1998) for one approach.
Sensible default choices for h& include affine operators and multilayer perceptrons (MLPs). However, when the parameter space I is large, may be infeasible to predict outputs from an MLP. Consider an RNN with 100k parameters. If an MLP has m = 300 units in the final hidden layer. the expansion to the RNN parameters in the final layer will require approach is to use low rank matrix for this transformation, equivalent to adding extra linear layer of size m where we must have my & mL-1 to reduce the parametcrization sufficiently. Since we will typically need m to be (10), dimensional subspace.
10 parameters alone. practical
restricting the parameter manifold of O to lie in a low
Since MLP approaches with large base model will then usually have restricted final layer, there any advantages over simple Gaasssan model for the prior p(z) and h There may indeed be many situations where this simpler model is reasonable. However, we note some advantages of the MI.P approach:
The MLP parameterization can shift the density in parameter space to more appropriate regions via nonlinear transformation.
2. A linear space of recurrent model parameters can yield highly non-linear changes even to simple dynamical systems (see e.g. the bifurcations in $8 of Strogatz, 2018). We speculate it might be advantageous curve the manifold avoid such phenomena.
3. More expressive choices may help utilization of the latent space (e.g. Chen et al., 2017). This may in fact motivate moving beyond simple MLP for the hş.
A.1.2 MULTI-TASK LINEAR DYNAMICAL SYSTEM PARAMETERIZATIO
The matrices A, B, R, of the MTLDS can benefit from specific parameterizations, which we will discuss in turn.
Degeneracy LDS. will be useful to begin with the well-known over parameterization of linear dynamical systems. The hidden dynamics of a LDS can be transformed by any invertible matrix G while retaining the same distribution over the emissions Y. This follows essentially because the basis used to represent X arbitrary. The distribution over is unchanged under the following parameter transformations:
A AG,
C+ CG, D + D, d + d
B G B,
b G
R +- RG-T
s + S.
(14)
13

---

Under review as a conference paper at ICLR 2020
Parameterization of A. The stability constraint,
|| S 1,
(15)
equivalent to ensuring that the singular values of A lie within the unit hypercube (since singular values are non-negative). Let A = UEVT be the singular value decomposition (SVD) of A. Now we have from the previous result that if LDS has latent dynamics with transition parameter A, may replace the dynamics under the similarity transform AGL Choose G = U. i.c. the left singular values of A, and hence A U =: ΣQ for some orthogonal matrix Q. This follows from the closure of the orthogonal group under multiplication, which is easily verified. Note that in choosing this transformation, no additional constraints are placed on the other parameters in the LDS.
Orthogonal matrices can be parameterized in number of ways (see e.g. Khuri et al., 1989). A dtraihhtforwwad choice is the Cayley transform. From Khuri al. (1989): "if Q is an orthogonal matrix that does not have the eigenvalue -1, then it may be written in Cayley's 's form:
Q = (I () + S)
(16)
where S is skew-symmetrie". In order to permit negative eigenvalues, we can pre-multiply by diagonal matrix E with elements {+1, -11. Since we then have A A= EEQ, can be absorbed into E, and so the stability constraint (15) can be satisfied with the parameterization A = EQ where is a diagonal matrix with elements in [-1, +1] and Q is a Cayley-transform of a symm-symeetric matrix. This follows from the overparameterrization of the LDS, and we emphasise that the system equations (4) and (6) are not equivalent, but any LDS distribution over can be written with latent dynamics of the form (6).
Parameterization of B. Choose G == in eq. (14). may be observed that the scale of the latent system can be chosen arbitrarily without affecting A. We wish to avoid such degeneracies in a hierachical model, since we may otherwise waste statistical strength and computation on learning equivalent representations. We can remove this by fixing the scale of B. An indirect but straight- forward approach is to upper bound the magnitude of each element of B. For predicted by (z) we might choose the transformation B = tanh B) where tanh acts element-wise. If a sparse B is desired, one can use an preererraaettiiitiionn of two matrices B1, B2. and choose B or (Bi) kanh(B2), where is element-wiss multiplication, and a a logistic sigmoid. The former parameterization is unlikely to find sparse representation since the gradient of tanh is greatest O.
Parameterization of R, S. The covariance matrices Rt, S must be in the positive definite cone. Where diagonal covariance will suffice, any parameterization for enforcing positivity can be used, such exponentiation, squaring softplus. A number of parameterizations are available for full covariance matrices (see Pinheiro & Bates, 1996). A simple choice is to decompose the matrix, say R = L.L", where L. is lower triangular Cholseky factor. As before, it is useful to enforce uniqueness, which can be done by ensuring the diagonal is positive.
A.1.3 LEARNING VIA A MONTE CARLO OBJECTIVE
We provide an alternative learning algorithm to the VB approach section 2.2 which obtains a tighter lower bound. This was important for the DHO experiments in order to monitor convergence to the true model. The below is perhaps a novel approach for learning in unsupervised cases (i.e. where U = 2), but cannot be performed efficiently for supervised problems without modification.
Monte Carlo Objectives (MCOs, Mnih & Rezende, 2016) construct a lower bound for marginal likelihoods via transformation of appropriate Monte Carlo estimator. Specifically we consider the logarithmic transformation of:
1
p(Y,zmi p(zm)
M Σ p(Y Zm)
pYY)
for 2m p(z),
(17)
M m=
M
14

---

Under review as a conference paper at ICLR 2020
=,...... M; an importance sampling estimator for pYY). Using Jensen's inequality, show that the following is a lower bound on the log marginal likelihood:
M
M
LMCO == (p(
log M
Σ m=1
p(Y km)
I log Bp(ana))
Σ P(Y m=1
km)
= p(Y)
M
(18)
where p(Z):M) == (..))...((M))) The tightness of the bound can be increased by increasing the number of samples M (Burda al., 2016). Assuming p(z) has been re-parameterized (Kingma easily calculate the gradient (if not, see Mnih & Rezende,
Welling, 2014) to be parameter-free, 2016). By exchanging integration and differentiation, we can calculate the gradient as:
M P(Y Zm)
V VoLMCO = f
V log
p(z1)... p(zz)...p(Zz) dz
(19)
M
m=1
V m== p(Y 2m)
M
= Eptznar)
(20)
1m=1 p(Y mm
m==1 p(Y 3m V log Zm))
MM
= Eptznar)
(21)
Em'=1 p(Y Zmd'
=Ep(zra)
Wm V log mm)
(22)
where Vm pY| km)/ Em P(Y | 2. Note that eq. (22) is an importance sampled version of the Fisher identity.
We might expect this estimator to suffer from high variance, since the prior is a poor proposal for the posterior. However, the prior should not be a poor proposal for the aggregate posterior, i.e. N E p(z ()) (see Seth et al., 2017). fact, importance sampling from the prior may serve as a useful bias in this case, attracting the posterior distributions which have a large DKL (plz) llp()) towards the prior.
1
Our observation is that sampling from the prior be amortized over each sequence y(), i I.....N. N.. Specifically, for each particle zm. the dynamics (2), (3) can be run forward once to calculate Ym. from which the likelihood ( all tasks i = 1,..., N can be calculated inexpensively. The amortized cost of taking M samples (e.g. M E O(103)) now becomes M/N, which may relatively small. We can also take advantage of (ow-discrepancy random variates such as Sobol sequences (Lemieux, 2009) to reduce variance. We propose that each sequence resamples a small number Mrup < 5 of particles from the importance weights for each i to reduce the cost of backpropagation (a similar resampling scheme is suggested in Burda et al., 2016). See Algorithm
In the supervised case (i.e. where each observation ( has different input U()),, running the dynamics forward from particle 2. no longer be amortized over all (YO) since the prediction ÿr()) depends on (+). We can therefore only amortize the parameter generation 0 = h (z). which is often less expensive than running the dynamics forward. For this reason Algorithm is primarily restricted to unsupervised problems. A hybrid approach would essentially result in the importance weighted autoencoder (IWAE) of Burda et al. (2016).
A.1.4 INFERENCE
Inference at test time can be performed by any number of variational Monte Carlo approaches. As in the main text, our focus here is on deterministic state dynamical systems. For stochastic state models, additional reasoning similar to Miladinović et al. (2019) will be required.
gold standard of inference over z may be the No U-Turn Sampler (NUTS) of Hoffman & Gelman (2014) (a form of Hamiltonian Monte Carlo), provided & is not too large and efficiency is not concern. However, given the sequential nature of the model, is natural to consider exploiting the posterior at time for calculating the posterior at time & 1. Bayes' rule suggests an update of the
15

---

Under review as a conference paper at ICLR 2020
Algorithm 1: Importance Sampled Optimization for Unsupervised MTDS
Result: Optimized parameter & Inputs: { ( Φ M, Mampp nepochs, optimizer;
for epoch = I:nepochs do for minibatch S in {I,..., NJ do // calculate posterior samples;
Zm ~ p(z), m = I, I....,M;
Sohol
W + construct tonstruct_weights (logp(Y = //o(h))))))))))).))))))) (zm)) M=
I/ compute gradient;
g 6 for i in S do
for in (1..... Mompp do
i Categorical (W())
g + Meap
Vo log (o)p((())) (2,)));
end end
Opiimize(optimizer, d, g);
end end
following form:
plz|y'a V1a41, u(,e41) ply'+1 u/ p(z Vi.t: u(:e);
(23)
following the conditional independence assumptions of the MTDS. This update (in principle) incor- porates the information Icarned at time in an optimal way, and further suggests a constant time update wrt f. However, evaluation of p(y'+1 1 (z)) usually scales linearly with 1, since the state X must be calculated recursively from Xo given and u1 Nevertheless, sequential incorporation of previous information will perform a kind of annealing (Chopin, 2002) which reduces the difficulty, and hopefully the runtime of inference at each stage.
We first provide some background of the difficulties of such an approach, looking first at Monte Carlo (MC) methods. Naive application of Sequential Monte Carlo (SMC) will result in severe particle depletion over time. To see this, the posterior after time be p(z Yiaes u(,:)) 2m). Then the updated posterior at time will be:
1
plz ( u1a+1)
x
Σ
Wmp(y'+1 M/441 h (z)))((( 2m),
(24)
M
m21
1
plz Vi u(a41)
Wm 8(z 2m),
(25)
M
Wopply (ha
where im EXE, M,,((''+1 he,,,,((,,,)) simply a weiihttttin of existing particles. Over time, the
number of particles with significant weights wm will substantially reduce. But since the model is static with respect to z (see Chopin, 2002), there is no dynamic process to 'jitter' the {zm as in typical particle filter, and hence resampling step cannot improve diversity.
Chopin (2002) discusses two related solutions: firstly using 'rejuvenation steps' (cf. Gilks & Berzuini, 2001) which applies Markov transition kernel each particle. The downside to this approach is the requirement to run until convergence; and the diagnosis thereof, which can result in substantial extra computation. One might instead sample from a fixed proposal distribution (accepting a move with the usual Metropolis-Hastinne Sequential Monte Carlo sampler approach (Del Moral et al., 2006) may be preferred, which permits local moves, and can reduce sample impoverishment via resampling (similar to SMC). However, the approach requires careful choices of both forward and backward Markov kernels which substantially reduces its ease of use.
probability) for which convergence is more easily monitored. A
16

---

Under review as a conference paper at ICLR 2020
A well-known variational approach to problems with the structure of eq. (23) is assumed density filtering (ADF, see e.g. Opper & Winther, 1998). For each t. ADF performs the Bayesian update and the projects the posterior into a parametric family Q. The projection is done with respect to the reverse KL. Divergence, i.e. 9t+1 = arg m DKL (p(z) y (( || g)- Intuitively, the projection finds "outer approximation" of the true posterior, avoiding the 'mode seeking' behaviour of the forward KL, which is particularly problematic if it attaches to the wrong mode. Clearly the performance of ADF depends crucially on the choice of Q Unfortunately, where is expressive enough to capture a good approximation, the optimization problem will usually be challenging, and must resort stochastic gradient approaches, resulting an expensive inner loop. Furthermore, when the changes from qr to g++1 are relatively small, the gradient signal will be weak, resulting perhaps misdiagnosed convergence and hence accumulation of error over increasing l. recent suggestion of Tomasetti et al. (2019) is to improve efficiency via re-use of previous (stale) gradient evaluations. Standard variance reduction techniques may also be considered to improve convergence in the inner loop.
1.5.5 ONLINE INFERENCE - OUR APPROACH
In our experiments, we found sampling approaches faster and more reliable for each update, as well as providing diagnostic information, and so we eschew variational approaches. (Our experiments used fairly small & (S 10); variational approaches may be preferred in higher dimensional problems.) Specifically we use iterated importance sampling (IS) to update the posterior at each t. The key quantity for IS is the proposal distribution 9poo- need proposal that is well-matched to the target distribution. Our observation is that the natural annealing properties of the filtering distributions (eq. 23) allow a slow and reliable adaptation of Oprop-
In order to capture complex multimodal posteriors, we parameterize Spoup by a mixture of Gaussians (MoG). For each t, the proposal distribution is improved over NAIS iterations using adaptive impor- tance sampling (AdaIS), described for mixture models in Cappé et al. (2008). We briefly review the methodology for a target distribution pa. Let the AdaIS procedure at the nihh iteration use the proposal:
J Σ agN (p..E))
Pprop (z) =
(26)
aj E RR, s.t. Σj-1a 1. For iteration n, sample 7m sptop' m 1,..., M, and calculate the (srmf-normalized) importance weights wm oc p- (2m)) / (zm). The resulting empirical dis- tribution is then used to fit u estimating {az#1 14 n+1 Ex } via (weighted) Expectation Maximization (EM, see Cappé et al.. 2008, for details). We monitor the effective sample size (ESS, see ch. 9, Owen, 2013) every iteration and stop once the ESS has reached certain threshold Moss see Algorithm 2.
For experiments, this approach worked robustly and efficiently, and appears superior to the alternatives discussed. Unlike S.MC, we obtain a Qprop which is a good parameteric approximation of the true posterior. We therefore avoid the sample impoverishment problem discussed above (eq. 25). Due to the small number of iterations of AdaIS required (usually < 5 for our problems), is substantially faster than MCMC moves, and since stochastic gradients are avoided, convergence is much faster than variational approaches. The scheme benefits from the observed fast initial convergence rates of the EM algorithm (see e.g. Xu & Jordan, 1996), particularly since early stopping can be used for the initial iterates.
In practice, one may not wish to calculate a posterior at every t, but instead intervals of length T. In our DHO experiments (k- = 4) we use = 5, and usually have ESS > 0.6M after n = 4 inner iterations, with total computation per 4: requiring 250-300ms on a laptop. We observe in our experiments that posteriors are often multimodal for < 20 and sometimes beyond, motivating the MoG parameterization. In these experiments, the MoG appears to capture the salient characteristics of the target distribution well. Note as in section 1.1.3, Sobol or other -wwddiscepaancy sequences may be used to reduce sampling variance from Sprop-
17

---

Under review as a conference paper at ICLR 2020
Algorithm 2: Filtered inference via Iterated AdaIS.
Result: Approximate posteriors {qe ) Inputs: YI,T, u1:T; Φ, M, Mess NAIS; J:
qo p(z); for 1 1:
ess < 0;
Sprop 91-15
for n 1: NAI do
for m = 1:M do
Zm Aprop
Wm ply
uui (#m) (1p(2).
Opop (2m)
end
üm f ΣN we
M;
Uprop WergheelFypeccatooMaxxiiizza (12m M m=11 (um 1M mm= J; init = "proop'
ess EffectiveSammleSize (fim 1M 1):
ess Mess then
break;
end end end
Gprop
A.2
DAMPED HARMONIC OSCILLATION
This section provides further details about the damped harmonic oscillator (DHO) experiments: the data, experimental setup and results.
A.2.1 DATA
We generate data via the model:
yt = (p)))) sin (o) -) 0.5(p!") sin(w + t
(27)
t = l.....
. 80 which is the sum of two damped harmonic oscillators each with angular frequency ,... N. The data are corrupted by iid Gaussian (4) ~ N' (0, 0.05²). The distribution over the random variables is given in Figure 5c. We choose the second component to (in expectation) a higher frequency, faster decaying component. A visualization of these distributions is provided in Figures 5a-5b. The distributions were chosen to achieve good visual diversity of sequences.
wy and decay factor Ps (0, 1] for tasks noise, 6,
It is natural to parameterize P, by its half-life (i.c. t such that o 0.5), since interesting decay factors are concentrated near For instance, Py 0.98 results in a half-life v Rs 34, and pj = 0.99 results in half-life of 69. To generate decay factor, sample half life in relevant interval (Table Sc) and, using the definition of half life, transform via p == exp - log(2)/v))
A.2.2 EXPERIMENTAL SETUP
Parameterization. We use the model:
B, = (2(2)
(28)
X₁ Ax B ut
(29)
Yt N (C xx, 5²)
(30)
'The distributions have support P1 [0.8409, 0.9914), P [0.9170, 0.9885] (4 decimal places) with density p(p1) log(2) in [o1) and p(22)
los(2)
Pi log (p13"
18

---

Under review as a conference paper at ICLR 2020
4-
61 6/
Pi
3-
F2
Wi
U U
2x 2
80
Pi half-life
U[4,80)
2-
50
U 80 8
42 P2 half-lifc
1-
25
U 60)
1.0
1.5
0.80
0.85
0.90
0.95
1.00
(c)
(a)
(b)
Figure 5: Distribution random variables for DHO data generation.
Figure 6: Example data sampled from DHO model.
for t 1, 1,,.,,,,T,.EE IR X E R4, suppressing task index i for elarity. Define X == 0, and for all tasks u = diagonal and orthogonal matrix EQ. The diagonal of Σ is constrained to lie in [-1, +1] using the tanh function, and Q parameterized by the Cayley transform
[,,0,,,,,,,,, [1,0,0,0,...]
A is parameterized as discussed in section A.1.2 using a product of
skew symmetric matrix S. Using an upper triangular matrix I, we have S = r I", and Q (I S) + +)= We parameterize B via the product of logistic sigmoid and tanh functions as in section A.1.2 in order learn a sparse parameterization. C is unconstrained, and the parameter is optimized as a constant wrt. z. The STLDS is parameterized in the same way. The prior p(z) ) unit Gaussian distribution, and h is 2 hidden-layer neural network. We use fixed feature extractor the first layer in order to help encode a rectangular support within spherically symmetric distribution. The second layer fully-connected 300 unit layer with sigmoid activations.
[zT. sin(z"), cos(zT), ||z []]T in
Learning. The output of an MTLDS is very sensitive to the parameter A, and care must be taken to avoid divergence during optimization. The Htaggoal--othoggen stabilize the optimization over a more naïve We also reduced the learning rate by factor of 10 for A. It proved useful artificially elevate the estimate of during training using a prior log s N (-1.5, 0.05) (derived from preliminary experiments) since the MTDS can otherwise overfit small datasets (see also discussion in $3, Svénsen, 1998), with associated instability in optimization. The learning rate schedule is given in Table 2, for which the prior over log s N (m, 0.05) was annealed from m 11.0 m -1.5. The "momentum" parameter 31 (c.f. Kingma & Ba, 2014) is also reduced at the end of optimization. The latter was motivated by oscillation and moderate deviations observed near optima, apparently caused (upon investigation) by strong curvature of the loss surface.
parameterization greatly helped to wawgoona--digggnaloorrrooooo
SVD parameterization.
The latent inferred online using the adaptive IS scheme of section A.1.5. We also perform inference over log s since it is held artificially high for optimization, and its true optimal value is not known. An informative prior close to the learned value log s N (-2.0, 0.12). was
Inference.
19

---

Under review as a conference paper at ICLR 2020
Epoch
31
log s mean
M
Sc-4
0.9
-1.0
1000
200
8e-4
0.9
-1.3
1000
600
4e-4
0.9
-1.5
2.000
1000
2c-4
0.8
-1.5
4.000
Table 2: DHO optimization schedule, see text, 77 is learning rate, M is number of samples in MCO
step (A.1.3).
Parameter
Description
Value
Num. mixture components
NAIS
Max. num. of adaptive IS iterations
M
Num. samples per IS iteration
1 1000
Mo
Num. samples for first proposal
3000
Minal
Num. samples for final proposal
3000
tilt
Exponential tilt of proposal
2.0
Mess
Minimum eff. sample size
100
n_retry
Num. retries if ESS < Mess Num. EM iters in GMM fit Max. kmeans iters for init
EM iters
kmeans iters
100
Table 3: DHO Inference parameters.
nevertheless used since the posterior sometimes approximately singular, causing high condition numbers in the estimated covariance matrix of the proposal. The hyperparameters are given in Table 3. These parameters did not require tuning for optimization, but sensible defaults. These also seem to work well without tuning for other experiments such as the Mocap data. Each posterior for given time took on average approx. 0.3 seconds.
We used the No U-Turn Sampler (Hoffman & Gelman, 2014) for the STL experiments due to poor conditioning and the higher complexity and dimensionality of the posterior (19 dimensions). Tuning is performed using ideas from Hoffman & Gelman (2014, Algorithm 4, 5), and the mass matrix estimated from the warmup phase. 2 The warmup stage lasted 1000 samples and the subsequent 600 samples were used for inference. Each sampler was initialized from MAP value, obtained via optimization with 10 random restarts. For both MAP optimization and sampling, we found it essential to enforce low standard deviation (we used log -2 and log ~ / (-2, 0.22) respectively) similarly to the MTL experiments. The autocorrelation-basee effective sample size (Gelman et al., 2013, ch. 11.5) typically exceeds 100 for each parameter. Each posterior for given time t took average approx. 300 seconds. Note that as discussed in section A.1.4, unlike our AdaIS procedure, cannot make much re-use of previous computation here.
A.2.3 RESULTS
The average results (over the 10 repetitions) are given in Table 4, which extends Table in the main text with the NLL results. The distribution of these results can be seen in the violin plots of Figure The RMSE results of the MTLDS are all significantly better than both the pooled and single-task models according to a Welch's t-test and Mann-Wii Whitney U-test, except for MTLDS-4 at 40. The latter is significantly better than the pooled model, but is indistinguishable from the STLDS at the level 0.05.
We also consider the convergence of the MTLDS to the true model with increasing N. For each experiment, we average the log marginal likelihood of the test sequences estimated via 10000 (Sobol) samples from the prior. As before, the prior should be good proposal for the aggregate posterior, and we amortize the same samples over all test sequences. In order to interpret the difference to the true distribution log p. (Yus)) log ((ees ()) use the Bayes Factor interpretations given by Kass
Implementation https: wtwgggtttbb.o.
http://ctt/pppppp/ppeeeptppep httpp:://githuu.ccmm/
CHMC. j1, author Tamas K. Papp-
20

---

Under review as a conference paper at ICLR 2020
RMSE
NLL
Model
10
20
40
10
20
40
Pooled-LDS-
0.36
0.34
0.29
0.38
0.34
0.22
STLDS
0.43
0.36
0.11
1.98
1.24
-0.37
MTLDS-4
0.30
0.18
0.12
1.47
0.02
-0.54
MTLDS- 16
0.25
0.11
0.07
0.94
-0,43
-0,81
WTLDS-128
0.23
0.09
0.06
0.83
-0.50
-0.85
Table DHO test results. Predictive RMSE and NLL after training set size.
10, 20, 40. Model suffix denotes
logpty)
20
40.0
38.0
-20
36.0
32
128
Figure 7: Marginal likelihood of DHO generating distribution under MTLDS models learned from N examples. Boxes show median, IQR and whiskers show most extreme point within 1.5x IQR above/below each box. True value shown as (uppermost) dotted line. The RHS panel rescaled to show the upper end of the plot with Bayes Factor interpretations overlaid.
& Raftery (1995). For instance a difference of 1.0 is 'barely worth mentioning'. but a difference of 4.0 is 'strong evidence" that the distributions are different. We average over 10000 test examples to avoid sampling variation of the test set. Figure 7 show boxplots of the log marginal likelihood for each model over increasing N, where the boxes show the interquartile range (IQR) over the 10 repetitions. We see convergence towards the true value with increasing N, with the difference of the MTLDS- 128 'barely worth mentioning'.
21

---

Under review as a conference paper at ICLR 2020
0.5
Prodicive RASE
0.4
0.3
0.2
10
20
40
time
(a) RMSE. Reference (dotted) line shows minimum error for s 0.05.
SIL
MTLDS 4
MTLDS-16
MTLDS-128
Prodictve NLL
(b) NLL. Reference (dotted) line shows Gaussian entropy with 0.1.
Figure 8: Improvement predictive performance over time seen (x-axis) for the DHO experiments. Violin plots show a kernel density estimate of the score achieved on RMSE and NLL over sequences the test set. Horizontal bars show min, median and max scores.
22

---

Under review as a conference paper at ICLR 2020
X
(a)
(b)
Figure 9: (a) The 21-joint skeleton. (b) Eulerian representation. (c) Lagrangian representation. (d) Example of rotating towards the outside of a corner.
A.3 HUMAN LOCOMOTION MOTION CAPTURE (MOCAP) EXPERIMENTS
We provide further details about the data, experimental setup and results of the human locomotion experiments below.
A.3.1 HUMAN LOCOMOTION MOTION CAPTURE (MOCAP)
The mocap data of Mason et al. (2018) consists of planar walking and running motion in 8 styles. The original data is recorded at 120 fps, downsample 30 fps as per Martinez et al. (2017); Pavllo et al. (2018). Unlike Mason et al. (2018), we do not perform any data augmentation via mirroring. The data is mapped to 21-joint skeleton used in the codebase of Holden et al. (2016), shown in Figure 9a, which is a subset of the CMU skeleton.
Representation in observation space. We choose Lagrangian representation (Figure 9c) where the coordinate frame is centered at the root joint of the skeleton (joint 1 in Fig. 9a, the pelvis), projected onto the ground. The frame is rotated such that the z-axis points in the "forward" direction, roughly normal to the body. This is in contrast to the Eulerian frame (Figure 9b) which has an absolute fixed position for all I. the Lagrangian frame, the joint positions are always relative to the root joint, which avoids confusing the overall frujectory of the skeleton (typified by the root joint,, and the overall rotation of the skeleton, with the local motions of the joints.
The relative joint positions can be represented by spatial position or by joint angle. For the latter, the spatial positions of all joints can be recovered from the angle made with their parent joint via use of forward kinematics (FK). This construction ensures the constant bone length of the skeleton over time, which is a desirable property. However, it also substantially increases the sensitivity of internal joints. For instance, the rotation of the trunk will disproportionately affect the error of the joints in both arms. For this reason, we have chosen to model the spatial position of joints, which may result in violations of bone length, but avoids these sensitivity issues. See also $2.1 Pavllo et al. (2018).
One can further encode the joint positions via velocity (i.e. differencing) which may result in smoother predictions. We avoid this encoding for the local joint motion (joints 2 to 21) since can suffer from accumulated errors, but we do use it to predict the co-ordinate frame as is standard in mocap models. Hence our per-frame representation consists of the velocity á, i l of the co-ordinate frame, the relative vertical position of the root joint, and 3-d position of the remaining 20 joints, which gives ye R64
Choice of inputs. Our choice of inputs will reflect controls that an animator may wish to manipulate. The first input will be the trajectory that the skeleton to follow. As in Holden et al. (2017b), we provide the trajectory over the next second (30 frames), sampled uniformly every 5 frames. Unlike previous work, there no trajectory history in the inputs since this can be kept in the recurrent state. given wrt. the current co-ordinate frame, and hence can rotate
The (2-d) trajectory co-ordinates rapidly during a tight corner. In order to provide some continuity in the inputs, we also provide a first difference of the trajectory in Fulerian co-ordinates.
23

---

Under review as a conference paper at ICLR 2020
Model
Optimizer
Multi-task n
Regularization
MT-RNN
Adam
3e-5
le-3
le-2
GRU L1
(closed loop)
Adam
5e-4
5e-4
GRU L.2 (closed loop)
Adam
le-4
5e-4
GRU L1 (open loop)
Adam
Se-4
0
GRU L2 (open loop)
Adam
le-4
Table 5: Slyper-parametery of mocap models. denotes the learning rate.
The velocity implied by the differenced trajectory does not disambiguate the gait frequency vs. stride length. The same motion might be achieved with fast short steps, or slower long strides. We therefore provide the gait frequency via a phasor (as in Holden et al., 2017b). whose frequency may be externally controlled. This is provided by sine and cosine components to avoid the discontinuity 2m. A final ambiguity exists from the trajectory at tight corners: the skeleton can rotate either towards the focus of the corner, or towards the outside. Figure 9d demonstrates the latter, which appears not infrequently in the data. We provide boolean indicator alongside the trajectory which identifies corners for which this happens. Altogether we have u, E R32; 12 inputs for the Lagrangian trajectory, 12 inputs for the differenced Fulerian trajectory, inputs for the gait phase and 6 inputs for the turning indicators.
Extracting the root trajectory. The root trajectory computed by projecting the root joint onto the ground. However, this projection may still contain information about the style of locomotion, for instance via swaying. We wish to remove all such information, since a model can otherwise Iearn the style without reference to latent Our goal is to find appropriately smoothed version of the extracted trajectory T. We use a cubic B-spline to control points fitted to the 'corners' of the trajectory. These control points are selected using polygonal approximation Gamer-Douglas-Peuune -Peukkr algorithm (RDP, e.g. Ramer, 1972). Briefly, the RDP algorithm uses a divide-and-conquer approach which greedily chooses points that minimize the Hausdorff distance of T to the polygonal approximation. Some per-style tuning of the RDP parameter, and small number of manually added control points rendered this a semi- aumimautomatic process.
T using the
Extracting the gait phase. Foot contacts are calculated via the code used by Holden et al. (2017b), which is based on thresholding of vertical position and velocity of each foot. As in Mason al. (2018) we check visually for outliers and correct misclassified foot contacts manually. The leading edge of each foot contact is taken to represent (left) and (right), and the gait phase calculated by interpolation.
A.3.2 EXPERIMENTAL SETUP
In this section we discuss elements of the experimental setup, learning and inference common to all experiments. Details particular to each experiment can be found in the following section.
Further Model Details The MTDS architecture is described in section A.3, aside from the choice of prior. We tested both linear and nonlinear h& in preliminary experiments and the performance was often similar. The nonlinear version used one hidden layer MLP with 300 hidden units with tanh activations. For the final affine layer, we used rank 30 matrix which, chosen pragmatically as a trade-off between flexibility and parameter count (see discussion in section 1.1.1). Both choices often performed similarly, however the linear approach was chosen, since optimization of the latent on new data was faster, and apparently more robust to choice of initialization. A nonlinear h& may be more important when the base model is simpler.
The benchmark models use an encoding length of T = 64 frames. The encoder shares parameters with the decoder, i.e. the RNN is simply 'warm started' for 64 frames before prediction. The benchmark models, unlike the MTDS, predict the difference from the previous frame (or "velocity") via a residual architecture, this performs better in Martinez al. (2017).
24

---

Under review as a conference paper at ICLR 2020
Further Learning Details Our primary goal was qualitative: to obtain good style-content separa- tion, high quality animations and smooth interpolation between sequences. Therefore hyperparameter selection for the MTDS proceeded via quantitative means (via the ELBO) and visual inspection of the qualitative criteria. The qualitative desiderata motivated split learning rates between shared and multi-task networks (cf. section 4.2), and the amount of 1.2 regularization. See Table 5 for the chosen values. The main learning rate applies to the fixed parameters wrt. z (i.e. 1/1, H),, and the multi-task learning rate applies the parameter generation parameters & and inference parameters X. Standard variational inference proved more reliable than amortized inference: we used a Gaussian with diagonal covariance (parameterized using softplus) for the variational posterior over each z. L2 regularization was applied to Φ, 1b1, H.
Unless otherwise specified, we optimized each model using a batch size Nbwtch = 16 for 20 000 iterations. The ELBO had often reached a plateau by this time, and training even longer resulted in a worse latent representation at times (as evidenced through poor style transfer). As noted in the main text, we remove the KL penalty of eq. (9) for the initial 2 000 iterations, and enforce small posterior standard deviation (Sx = 3 for the same duration. This is similar to finding a MAP estimate for the {z}. For the remaining iterations, the original ELBO criterion is used, and the constraint on S is removed. The model is implemented in PyTorch (Paszke et al., 2017) and trained on GPUs. Since we use fairly small max. sequence length L 64, truncated backpropagation through time was not necessary.
The paperrpprrmettrs for the benchmark models were found (Table 5) using a grid search over learning rate and regularization, as well as the optimizers [Adam, (vanilla) SGDJ. We performed the search over the pooled data for all 8 styles, with a stratified sample of 12.5% held out for validation set. Once the hyperparameters were chosen, benchmark models were also trained for 20 000 iterations, recording the validation error every 000 iterations on a stratified 12.5% held out sample. The model with the lowest validation error during optimization is chosen.
We standardize the data so that when pooled, each dimension has zero mean and unit variance. Finally, note that as discussed in section 1, the data are represented in Lagrangian form, therefore drifts in the predicted trajectory from the true one are not necessarily heavily penalized. This can be altered by changing the weights on the root velocities, but we did not do this.
Inference. At test time, especially for experiment 2, we cannot expect amortized inference to perform optimally, and we consider standard inference techniques. We want to understand the nature of the posterior distributions, and so we again used the AdaIS approach of section A.1.5. In practice, each posterior was unimodal and approximately Gaussian. Furthermore, the variation in sequence space for different in the posterior was usually fairly small, and the posterior predictive mean performed similarly to using a point estimate. Each observation from which z is inferred is of size 64 64 and hence the posterior is fairly concentrated. Unlike the DHO model, this is more expensive procedure, Our k = 3 experiments took approx. 24 seconds per observation for inference. An optimization approach using standard techniques may be expected to perform similarly reduced computational cost. Hence unless otherwise specified, inference was done via optimization.
A.4 EXPERIMENTS
Experiment MTL The training data for each style uses 4 subsequences chosen carefully to represent the inter-style variation. Obviously it is important that frames are consecutive rather than randomly sampled. Over the increasing size training sets, each of these subsequences a superset of the previous one. The 6 training set sizes (2 29, 210 2n1 212,213 frames per style) are not exact since short subsequences are discarded (e.g. at file boundaries), and the largest set contains all the training data except the test set², where data are not evenly distributed over styles. The test set comprises 4 sequences from each style, each of length 64, and is the same for all experiments. A length-64 seed sequence immediately preceding each test sequence was used for inference for all models. The models are trained as described above, except for the single task (STL) models. The STL models use an identical architecture the pooled 1-layer GRU models, except they trained only on the data for their style. Since there is less data for these models, we train them for a
This final set averages 7680 R 222 frames per style.
25

---

Under review as a conference paper at ICLR 2020
RMSE
Training set size
Model
3%
7%
13%
27%
53%
97%
Training mean
0.76
0.76
0.72
0.73
0.73
0.73
Zero-velocity
1.23
1.23
1.23
1.23
1.23
1.23
Pooled GRU (closed loop)
0.79
0.61
0,82
0.87
0.76
1.21
STL GRU (open loop)
1.11
0.88
0.40
0.33
0.18
0.18
Pooled GRU (open loop)
0.69
0.52
0.36
0.29
0.16
0.16
MT Bias (k 3)
0,93
0.44
0.30
0.21
0.14
0.16
MT Bias (k
0.98
0.44
0.30
0.20
0.14
0.16
MT Bias (k
0.94
0.49
0.30
0.21
0.15
0.16
MTDS (A 3)
0.62
0.34
0.35
0.21
0.21
0.19
MTDS (A 5)
0,53
0.29
0.22
0.19
0.15
0.16
MTDS (A: -)
0.51
0.27
0.24
0.20
0.16
0.18
Table 6: Mocap Experiment (MTL): predictive MSE for length-64 predictions where training sets are given fraction of the original dataset.
maximum of 5 000 iterations. We do not train 2-layer GRUs, since the amount of data is small for most experiments.
The full results are given in Table 6. We use fractions of the dataset instead of absolute training set sizes to aid understanding. The performance of the MTDS appears to increase with larger k and suggests that need >> achieve optimal performance results demonstrate substantial benefit of the MTDS over a pooled RNN model terms of sample efficiency, but not in asymptotic performance, the improvements of the k = MTDS over the (1-layer, open loop) pooled GRU are significant for training set sizes 3%, 7%, 13% and 27%.4 4 At style level, the k MTDS performs at least as well as the pooled GRUs for the first four training set sizes. See Figure 10. Note that the 'angry' and 'childlike' styles appear be harder than the others, most likely due to their relatively high speed. For example animations of the MTL experiments, see the linked video in section A.4.1.
unseen training data. The
might be expected. According
paired t-fest,
Experiment Novel Sequences Table 7 provides the aggregate results experiment for each of the mocap models. A visualization is given in Figure 11. The 2-layer competitors shown here for completeness, but they achieve similar performance to the 1-layer models on aggregate. Figure 12 provides breakdown of these results per-style basis. Styles 5-8 appear be easier from the point of view of the benchmarks, but the MTDS shows equal or better performance on all styles except style 5.
The competitor results achieve hetter short-term performance than the MTDS. However, note that the velooveloctty baseline performs similarly to the open-loop GRUs for the first 5 predictions. This suggests that the MTDS may be improved for these early predictions simply by interpolating from the velociey baseline for small values of We are unable to conclude from these experiments that the benchmark models can represent the style better initially, but simply that they can smooth the transition from the seed sequence better.
Experiment 3 SSyle Transfer The classifier is learned on the original observations distinguish between the 8 styles. We use a 512-unit GRU to encode an observation sequence (usually of 64 frames), and transform the final state via 300-unit hidden layer MLP with sigmoid activations into multinomial emissions. The model is trained via cross-entropy with 20% of the training data held as a validation set; training was stopped the validation error approached O. We perform standardization of the gait frequency across all styles, since some styles can be identified purely by calculating the frequency. The mean frequency across all styles cycle per 33 frames) is applied to all sequences via linear interpolation. In this we make use of the instantancous phase given in the inputs. We use a latent code for the MTDS as the model is trained on all styles.
*A non-parameteric Mann-Whimmn test gives 7%, 13% significant.
26

---

Under review as a conference paper at ICLR 2020
Angry
Old
1.5
0.6
Avg. MSE
1.0
0.4
0.5
0.2
0.0
0.0
1.0
0.0
1.0
Childlike
Proud
2.5
1.25
2.0
Avg. MSE
1.5
0.75
0.50
1.0
0.25
0.5
0.00
0.0
0.0
0.2
0.4
0.6
1.0
0.0
0.2
0.4
0.6
1.0
Depressed
Sexy
0.8
1.00
Avg. MSE
0.6
0.75
0.4
0.50
0.2
0.25
0.0
0.00
0.0
0.2
0.4
0.6
0.8
1.0
0.0
0.2
0.4
0.6
0.8
1.0
Neutral
Strutting
0.8
1.5
STL GRU-1L (open loop)
Pooled GRU-1L (open loop)
0.6
Avg. MSE
MTBias - 7)
1.0
MTDS (k= 7)
0.4
0.5
0.0
0.0
0.0
1.0
0.0
1.0
Fraction training
Fraction training available.
Figure 10: Per style MSE of Experiment 1.
27

---

Under review as a conference paper at ICLR 2020
RMSE
Model
t=
5
10
20
É
50
100
200
Training mean
1.04
1.04
1.05
1.04
1.06
1.07
Zero-velocity
0.69
1.20
1.37
1.21
1.35
1.48
1-layer GRU (closed loop)
0.35
0.64
0.81
1.00
1,45
7.28
2-layer GRU (closed loop)
0.34
0.61
0.79
0.97
1.41
6.34
I-layer GRU (open loop)
0.56
0.56
0.60
0.73
0.83
0,92
2-layer GRU (open loop)
0.53
0.55
0.59
0,73
0.85
0.94
MT Bias (k 3)
0.59
0.64
0.63
MT Bias (k: = 7)
0.50
0.48
0.53
0.57
0.55
0.63
MTDS (k = 3)
0.61
0.62
0.59
0.61
0.63
0,63
MTDS (l: 7)
0.49
0.46
0.50
0.54
0.53
0.61
Table Mocap Experiment 2 (novel sequences): average predictive MSE at t 5, 10, 20, 50, 100, 200.
10'
GRU-IL (closed loog)
MT Blas (K
(closedloos)
MTDS
(apen loep)
(k-7)
1.6
CRU-2L, (opwn koop)
Zaro-edocky
102
MT Blas -31
Training Mean
1.4
MSE
MSE
10f
0.6
10-1
0.4
50
150
200
250
50
100
150
(b)
Figure 11: Results for Experiment 2 for all models on (a) truncated scale, (b) log scale.
28

---

Under review as a conference paper at ICLR 2020
Angry
Old
2.5
0.4
Avg. MSE
1.5
0.3
0.2
/
0.5
0.1
300
200
300
Childlike
Proud
1.5
Mm
M
0.8
An
Mun
Avg. MSE
1.0
0.6
0.4
0.5
0.2
100
200
300
100
200
300
Depressed
Sexy
0.8
1.0
0.8
0.6
Avg. MSE
0.4
0.2
0.2
100
200
300
100
200
300
Neutral
Strutting
0.6
0.8
MMW WV m
Avg. MSE
0.4
GRU-1L (open loop)
0.2
GRU-2L (open loop)
MTDS (k 7)
100
300
200 Prediction
300
Prediction
Figure 12: Per style MSE of Experiment 2.
29

---

Under review as a conference paper at ICLR 2020
0.59
0.95
0.99
0.99
40X0
4025
prcud
0.32
0.51
0.99
0.98
0.46
0.97
0.49
0.98
proud
0.60
1.00
0.99
0.50
0.97
0.99
0.99
0.05
0.93
0.19
0.60
0.50
0.40
0.99
2.43
0.91
0.95
depr.
0.26
0.97
0.63
0.95
0.73
0.73
0.91
depr.
0.37
0.49
0.97
9.90
0.98
0.57
0.93
0.90
child
0.67
0.52
0.66
0.69
0.52
child
0.85
9.95
2.98
0.98
0.95
0.99
angry
0.67
0.77
angry
angry child depr.
neut. old
proud sexy strut.
angry
child
depr.
neut. old
proud sexy strut. source
source
(a)
(b)
Figure 13: Average classification accuracy for style transfer using inputs from source style (columns) and latent code z from target style (rows). There is no style transfer on the diagonal. (a) Results for model with MT bias only. (b) Results for full MTDS model.
The experimental setup is as follows. We carefully choose four segments of length 64 for each of the styles $1 1,...,& 8 which represent the variability within each style. These correspond to the imputs U((0)) for each source style 81, with examples j = 1,...,4 4. We next seek the 'archetypal' latent code 2 associated with each target style 82. For each 82, optimize z over 20 candidate values, obtained from the posterior mean of the style 82 in the training set. Data are generated from all (U(+1) and the z which provides the greatest success in style transfer is chosen. The 32 highly varied input sequences guard against overfitting - the 'archetypal' codes for each style must perform well across much of the variety of the original dataset. We provide scalar measurement of the 'success' of style transfer for each pair (81, $2) by using the resulting 'probability' that the classifier assigns the target style $2, averaged across the four input sequences for the source $1.
The results of these experiments are shown in Figure 13a for the model with multi-task bias, and Figure 13b shows the results for the full MTDS. Table 3e in the main text gives the marginal of these results wrt. the target style. The cells in Figure 13 give the classifier probability for the target style for each (source, target) combination, averaged over the four source inputs. Successful style transfer should result in the classifier assigning high score in every cell of the table. For most (source, target) pairs, the full MTDS model substantially outperforms the MTBias model: it appears that MTDS can control the prediction well in the majority of cases, and the MTBias model offers reduced control in general. However, we observe for both models that it is more difficult when styles are associated with extremes of the input distribution. Specifically, both the 'childlike' and 'angry' styles have unusually high speed inputs, and the 'old' style has unusually low speeds. Note that in order to provide style transfer, the models are mostly ignoring these correlations, even though they are very useful for prediction. Further improvements may be available, perhaps by using an adversarial loss, or applying domain knowledge to the model. This is orthogonal to our contribution, and we leave this to future work.
Providing style transfer from all varieties of source style is challenging task. For instance, some styles include sources with widely varying speeds and actions, which may be mismatched to the target style. To understand what may be more typical use of the model, we provide an easier variant of this experiment where only one example of each source style is provided, rather than four. Note nevertheless that the same z (52) is still used across all sources $1. The results of this secondary experiment provided in Figure 14. In this case, style transfer is successful for almost all (source, target) pairs in the case of the MTDS, except for the angry style. The MTBias model still has many notable failures.
30

---

Under review as a conference paper at ICLR 2020
1.00
0.99
1.00
40X0
prcud
0.58
0.99
1.00
1.00
0.74
0.99
0.55
1.00
proud
0.97
0.95
1.00
1.00
1.00
1.00
1,00
1.00
0.80
0.7
0.91
0.99
1.00
1.00
1.00
1.00
depr.
0.02
0.49
0.59
1.00
1.00
0.99
0.98
1.00
depr.
0.58
1.00
1.00
3.00
1.00
0.54
0.99
1.00
child
0.98
0.14
0.41
0.89
0.01
child
0.99
0.95 2.99 0.99 0.95
angry
0.94
angry
angry child
depr. neut. old
proud sexy
strut.
angry child depr. neut. old proud sexy strut. source
source
(a)
(b)
Figure 14: Average classification accuracy for style transfer where only single source input is used for each (source, target) pair. The configuration the matrix is the same as Figure 13. (a) Results for model with MT bias only. (b) Results for full MTDS model.
A.4.1 GENERATED ANIMATIONS
A selection of animations are available online. We provide link and a brief description of each set below. Where applicable, the animations show a comparison between the ground truth, the relevant MTDS model, and the (1 layer, open loop) pooled-GRU model. The latter was chosen by virtue of being the best competitor model in all experiments. In all cases, animations are a complete predictive rollout with no access the ground truth.
1. In-sample predictions https://vimeo http:://imeo..com/662222 com/362069486. possible performance of the models by predicting from inputs in the training set.
The goal is showcase the best
2. MTL examples https://vimeo. https//vimeo.com/3322 22224444. Examples from Experiment We compare the quality of animations and fit to the ground truth for limited training sizes (6.7 66.7% and 13.3% of the full data). For both models, MSE to the ground truth is given, averaged over the entire predictive window (length 256). This is different to the experimental setup which uses only the first 64 frames.
3. Novel test examples https://vimeo.cm wttviimoocco/3620655444/ Examples from Experiment 2. We show the adaptions obtained by each model to novel sequences, in partieular showcasing examples of the pooled GRU models inferring suboptimal styles wrt. MSE Again, MSE to the ground truth given averaged over the predictive window (length 256).
4. Style morphing https//vimee.com// www.ccommmmm1.. 106490 This animation demonstrates the effect changing the latent code over time. This also demonstrates style transfer and style interpolation from experiment 3.
For style morphing, we found useful fix the dynamical bias of the second layer (parameter b in eq. 7) wrt. z since it otherwise resulted in 'jumps' while interpolating between sequences. We speculate that shifting the bias induces bifurcations in the state space, whereas adapting the transition matrix allows for smooth interpolation.
31


Reviews:
[{"review_id": "rkxX8W0k5r", "reviewer": "AnonReviewer2", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "This paper proposes a multi-task dynamical system for sequence generation. The model learns a number of parameters that represents the latent code z. The learned model can generate the customized individual data sequence and provide the smooth interpolation in the sequence space. The experiments on the synthetic data and the ocap dataset show the customization is beneficial for prediction tasks and enables for style transfer and morphing within generated sequences. \n\nThe mathematical definition and the proof in this paper are well justified. However, I had a hard time understanding the contribution of this paper. \n\n- The main motivation of this paper is to treat each sequence as a task in the training set (customization of the individual data sequence). What are the advantages of this setting for sequence generation?\n\n- Separate parameterization of the latent variable z for different tasks seems to be a key idea in this paper. What is the main benefit of parameterizing each latent variable? Does it improve diversity?\n\n- If not, what is the key idea that the proposed model can generate diverse sequences compare to other generative models (e.g., GAN or VAE-based models). \n\n- The authors claim that the proposed approach provides grater data efficiency. How is it compare to other generative models?\n\n- Overall, it is not clear the benefit of the proposed model over existing algorithms. This paper needs to provide comparisons with any other existing models, especially on Mocap data, \n\n- What are the differences between pooled models and single-task models?\n\n---- \nI increase the rating after rebuttal, since the idea is interesting and the paper has been improved. However, I still think the experiments and the comparisons are unconvincing. ", "extra_scores": {"experience_assessment": "I have published one or two papers in this area.", "review_assessment:_checking_correctness_of_experiments": "I assessed the sensibility of the experiments.", "review_assessment:_thoroughness_in_paper_reading": "I read the paper thoroughly.", "review_assessment:_checking_correctness_of_derivations_and_theory": "I assessed the sensibility of the derivations and theory."}, "extra_text": {}}, {"review_id": "r1xY4V9cFH", "reviewer": "AnonReviewer3", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "<Strengths> \n+ This paper proposes a new dynamic model named hierarchical multi-task dynamical systems (MTDSs) as a latent sequence model that enables users to directly  control the output of data sequence via a latent code z. \n+ The proposed model adopts the multi-task learning idea to represent each sequence in the training set. Another strength of the model is flexibility as different base models and latent models can be chosen. In experiments, it can achieve reasonable performance using hierarchical RNN as a base model and VAE for latent modeling. \n+ The new formulation is well-explained in the thorough appendix.\n\n\n<Weakness>\nIn my opinion, the major weakness of this paper is weak experiments, although many results of different types of tests are reported. \n\n1. The experiments are carried out with a simple toy dataset DHO and MOCAP data. As done in previous related papers, some challenging video datasets can be used for more convincing evaluation.\n\n2. The compared baseline models are too weak, given that no state-of-the-art model is compared. \n- Throughout the papers, only single-task version and pooped version of the model are compared. It may not be surprising that the multi-task version is better than these two weak baselines. \n -In section 3, several latent sequential models are introduced, including Miladinovic et al. (2019),  Hsu et al. (2017), Yingzhen & Mandt (2018), Bird et al. (2019). I strongly recommend a couple of them may need to be implemented and investigated in some sets of experiments.\n\n<Conclusion>\nMy initial rate is borderline with slightly leaning toward accept. I am willing to adjust my rate more favorably if more experiments are conducted as mentioned above. \n", "extra_scores": {"experience_assessment": "I have published one or two papers in this area.", "review_assessment:_checking_correctness_of_derivations_and_theory": "I assessed the sensibility of the derivations and theory.", "review_assessment:_checking_correctness_of_experiments": "I carefully checked the experiments.", "review_assessment:_thoroughness_in_paper_reading": "I read the paper thoroughly."}, "extra_text": {}}, {"review_id": "S1laleLf9r", "reviewer": "AnonReviewer1", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "\nThis paper proposes to add a latent variable to a dynamical, thereby encoding the notion of \"task\", eg, in Mocap, the latent variable could encode the walking style in an unsupervised manner.\nFurthermore, it is then possible to generate new series conditioning of chosen latent variables.\n\nThe paper is clear and well written, the idea is interesting and the experiments seem well designed and convincing.\n\nI do have just a couple of clarifications:\n- in sec 2.1.1, you say that the diagonal*orthongal parametrization is valid without any loss of generality. If I understood well, to get to this for, you would still need to multiply the input x_t by U^{-1}. Therefore, any MTDLS can be written in this simplified form, correct, for a given input x_{1:T}, the formulation using the diagonal is more restrictive I believe. U^{-1} x could be of this form, but not necessarily x.\n- in 2.3, the estimation of the posterior using your method of AIS with MoG seem quite involved, even though you mention it converges fast. What happened for simpler methods of estimating the posterior, did you see a drop in performance, run-tine only?\n\nOverall I think this is an interesting paper, however I am not familiar with all the related work.", "extra_scores": {"experience_assessment": "I do not know much about this area.", "review_assessment:_thoroughness_in_paper_reading": "I read the paper thoroughly.", "review_assessment:_checking_correctness_of_experiments": "I assessed the sensibility of the experiments.", "review_assessment:_checking_correctness_of_derivations_and_theory": "I assessed the sensibility of the derivations and theory."}, "extra_text": {}}]

Author rebuttal:

Meta-review: This work proposes a dynamical systems model to allow the user to better control sequence generation via the latent z. Reviewers all agreed the that the proposed method is quite interesting. However, reviewers also felt that current evaluations were weak and were ultimately unconvinced by the author rebuttal. I recommend the authors resubmit with a stronger set of experiments as suggested by Reviewers 2 and 3.
Decision: Reject