L EARNING T RANSFERABLE M OTOR S KILLS WITH H IERARCHICAL L ATENT M IXTURE P OLICIES
A BSTRACT
For robots operating in the real world, it is desirable to learn reusable behaviours that can effectively be transferred and adapted to numerous tasks and scenarios.
We propose an approach to learn abstract motor skills from data using a hierarchical mixture latent variable model.
In contrast to existing work, our method exploits a three-level hierarchy of both discrete and continuous latent variables, to capture a set of high-level behaviours while allowing for variance in how they are executed.
We demonstrate in manipulation domains that the method can effectively cluster ofﬂine data into distinct, executable behaviours, while retaining the ﬂexibility of a continuous latent variable model.
The resulting skills can be transferred and ﬁne-tuned on new tasks, unseen objects, and from state to vision-based policies, yielding better sample efﬁciency and asymptotic performance compared to existing skill- and imitation-based methods.
We further analyse how and when the skills are most beneﬁcial: they encourage directed exploration to cover large regions of the state space relevant to the task, making them most effective in chal lenging sparse-reward settings.
I NTRODUCTION
Reinforcement learning is a powerful and ﬂexible paradigm to train embodied agents, but relies on large amounts of agent experience, computation, and time, on each individual task.
Learning each task from scratch is inefﬁcient: it is desirable to learn a set of skills that can efﬁciently be reused and adapted to related downstream tasks.
This is particularly pertinent for real-world robots, where interaction is expensive and data-efﬁciency is crucial.
There are numerous existing approaches to learn transferable embodied skills, usually formulated as a two-level hierarchy with a high-level controller and low-level skills.
These methods predominantly represent skills as being either continuous, such as goal-conditioned (Lynch et al., 2019;
Pertsch et al., 2020b) or latent space policies (Haarnoja et al., 2018; Merel et al., 2019; Singh et al., 2021); or discrete, such as mixture or option-based methods (Sutton et al., 1999; Daniel et al., 2012; Florensa et al., 2017; Wulfmeier et al., 2021).
Our goal is to combine these perspectives to leverage their complementary advantages.
We propose an approach to learn a three-level skill hierarchy from an ofﬂine dataset, capturing both discrete and continuous variations at multiple levels of behavioural abstraction.
The model comprises a low-level latent-conditioned controller that can learn motor primitives, a set of continuous latent mid-level skills, and a discrete high-level controller that can compose and select among these abstract mid-level behaviours.
Since the mid- and high-level form a mixture, we call our method
Hierarchical Latent Mixtures of Skills (HeLMS).
We demonstrate on challenging object manipulation tasks that our method can decompose a dataset into distinct, intuitive, and reusable behaviours.
We show that these skills lead to improved sample efﬁciency and performance in numerous transfer scenarios: reusing skills for new tasks, generalising across unseen objects, and transferring from state to vision-based policies.
Further analysis and ablations reveal that both continuous and discrete components are beneﬁcial, and that the learned hierarchical skills are most useful in sparse-reward settings, as they encourage directed exploration of task-relevant parts of the state space.
Our main contributions are as follows:
• We propose a novel approach to learn skills at different levels of abstraction from an ofﬂine dataset.
The method captures both discrete behavioural modes and continuous variation using a hierarchical mixture latent variable model.
• We present two techniques to reuse and adapt the learned skill hierarchy via reinforcement learning in downstream tasks, and perform extensive evaluation and benchmarking in different transfer settings: to new tasks and objects, and from state to vision-based policies.
• We present a detailed analysis to interpret the learned skills, understand when they are most beneﬁcial, and evaluate the utility of both continuous and discrete skill representations.
R ELATED WORK
A long-standing challenge in reinforcement learning is the ability to learn reusable motor skills that can be transferred efﬁciently to related settings.
One way to learn such skills is via multi-task reinforcement learning (Heess et al., 2016; James et al., 2018;
Hausman et al., 2018; Riedmiller et al., 2018), with the intuition that behaviors useful for a given task should aid the learning of related tasks.
However, this often requires careful curation of the task set, where each skill represents a separate task.
Some approaches avoid this by learning skills in an unsupervised manner using intrinsic objectives that often maximize the entropy of visited states while keeping skills distinguishable (Gregor et al., 2017;
Eysenbach et al., 2019; Sharma et al., 2019; Zhang et al., 2020).
A large body of work explores skills from the perspective of unsupervised segmentation of repeatable behaviours in temporal data (Niekum & Barto, 2011; Ranchod et al., 2015; Kr ¨ uger et al., 2016;
Lioutikov et al., 2017; Shiarlis et al., 2018; Kipf et al., 2019; Tanneberg et al., 2021).
Other works investigate movement or motor primitives that can be selected or sequenced together to solve complex manipulation or locomotion tasks (M¨ulling et al., 2013; Rueckert et al., 2015; Lioutikov et al., 2015; Paraschos et al., 2018; Merel et al., 2020; Tosatto et al., 2021;
Dalal et al., 2021).
Some of these methods also employ mixture models to jointly model low-level motion primitives and a high-level primitive controller (Muelling et al., 2010; Colom ´ e & Torras, 2018; Pervez & Lee, 2018).
Several existing approaches employ architectures in which the policy is comprised of two (or more) levels of hierarchy.
Typically, a low-level controller represents the learned set of skills, and a high-level policy instructs the low-level controller via a latent variable or goal.
Such latent variables can be discrete (Florensa et al., 2017; Wulfmeier et al., 2020) or continuous (Nachum et al., 2018;
Haarnoja et al., 2018) and regularization of the latent space is often crucial (Tirumala et al., 2019).
The latent variable can represent the behaviour for one timestep, for a ﬁxed number of timesteps (Ajay et al., 2021), or options with different durations (Sutton et al., 1999; Bacon et al., 2017; Wulfmeier et al., 2021).
One such approach that is particularly relevant (Florensa et al., 2017) learns a diverse set of skills, via a discrete latent variable that interacts multiplicatively with the state to enable continuous variation in a Stochastic Neural Network policy; this skill space is then transferred to locomotion tasks by learning a new categorical controller.
Our method differs in a few key aspects: our proposed three-level hierarchical architecture explicitly models abstract discrete skills while allowing for temporal dependence and lower-level latent variation in their execution, enabling diverse object-centric behaviours in challenging manipulation tasks.
Our work is related to methods that learn robot policies from demonstrations (LfD, e.g. (Rajeswaran et al., 2018;
Shiarlis et al., 2018; Strudel et al., 2020)) or more broadly from logged data (ofﬂine
RL, e.g. (Wu et al., 2019; Kumar et al., 2020; Wang et al., 2020)).
While many of these focus on learning single-task policies, several approaches learn skills ofﬂine that can be transferred online to new tasks (Merel et al., 2019; Lynch et al., 2019;
Pertsch et al., 2020a; Ajay et al., 2021; Singh et al., 2021).
These all train a two-level hierarchical model, with a high-level encoder that maps to a continuous latent space, and a low-level latent-conditioned controller.
The high-level encoder can encode a whole trajectory (Pertsch et al., 2020a; 2021; Ajay et al., 2021); a short look-ahead state sequence (Merel et al., 2019); the current and ﬁnal goal state (Lynch et al., 2019); or can even be simple isotropic Gaussian noise (Singh et al., 2021) that can be ﬂexibly transformed by a ﬂow-based low-level controller.
At transfer time, a new high-level policy is learned from scratch: this can be more efﬁcient with skill priors (Pertsch et al., 2020a) or temporal abstraction (Ajay et al., 2021).
[Figure]
HeLMS builds on this large body of work by explicitly modelling both discrete and continuous behavioural structure via a three-level skill hierarchy.
We use similar information asymmetry to
Neural Probabilistic Motor Primitives (NPMP) (Merel et al., 2019; 2020), conditioning the highlevel encoder on a short look-ahead trajectory.
However HeLMS explicitly captures discrete modes of behaviour via the high-level controller, and learns an additional mid-level which is able to transfer abstract skills to downstream tasks, rather than learning a continuous latent policy from scratch.
M ETHOD
This paper examines a two-stage problem setup: an ofﬂine stage where a hierarchical skill space is learned from a dataset, and an online stage where these skills are transferred to a reinforcement learning setting.
The dataset D comprises a set of trajectories, each a sequence of state-action pairs { x t , a t } Tt =0 .
The model incorporates a discrete latent variable y t ∈ { 1 , . .
, K } as a high-level skill selector (for a ﬁxed number of skills K ), and a mid-level continuous variable z t ∈ R n z conditioned on y t which parameterises each skill.
Marginally, z t is then a latent mixture distribution representing both a discrete set of skills and the variation in their execution.
A sample of z t represents an abstract behaviour, which is then executed by a low-level controller p ( a t | z t , x t ) .
The learned skill space can then be transferred to a reinforcement learning agent π in a Markov Decision Process deﬁned by tuple {S , A , T , R , γ } : these represent the state, action, and transition distributions, reward function, and discount factor respectively.
When transferring, we train a new high-level controller that acts either at the level of discrete skills y t or continuous z t , and freeze lower levels of the policy.
We explain our method in detail in the following sections.
3. L ATENT M IXTURE S KILL S PACES FROM O FFLINE D ATA
Our method employs the generative model in Figure 1a.
As shown, the state inputs can be different for each level of the hierarchy, but to keep notation uncluttered, we refer to all state inputs as x t and the speciﬁc input can be inferred from context.
The joint distribution of actions and latents over a trajectory is decomposed into a latent prior p ( y 0: T , z 1: T ) and a low-level controller p ( a t | z t , x t ) :
[Equation]
Intuitively, the categorical variable y t can capture discrete modes of behaviour, and the continuous latent z t is conditioned on this to vary the execution of each behaviour.
Thus, z t follows a mixture distribution, encoding all the relevant information on desired abstract behaviour for the low-level controller p ( a t | z t , x t ) .
Since each categorical latent y t is dependent on y t − 1 , and z t is only dependent on y t , this prior can be thought of as a Hidden Markov model over the sequence of z 1: T .
To perform inference over the latent variables, we introduce the variational approximation:
[Equation]
Here, the selection of a skill y t ∼ q ( y t | y t − 1 , x t ) is dependent on that of the previous timestep (allowing for temporal consistency), as well as the input.
The mid-level skill is then parameterised by z t ∼ q ( z t | y t , x t ) based on the chosen skill and current input.
p ( y 0 ) and p ( y t | y t − 1 ) model a skill prior and skill transition prior respectively, while p ( z t | y t ) represents a skill parameterisation prior to regularise each mid-level skill.
While all of these priors can be learned in practice, we only found it necessary to learn the transition prior, with a uniform categorical for the initial skill prior and a simple ﬁxed N (0 , I ) prior for p ( z t | y t ) .
Training via the Evidence
Lower Bound
The proposed model contains a number of components with trainable parameters: the prior parameters ψ = { ψ a , ψ y } for the low-level controller and categorical transition prior respectively; and posterior parameters φ = { φ y , φ z } for the high-level controller and mid-level skills.
For a trajectory { x 1: T , a 1: T } ∼ D , we can compute the Evidence Lower Bound for the state-conditional action distribution, ELBO ≤ p ( a 1: T | x 1: T ) , as follows: [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation] [Table] [Equation] [Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
where ˜ z { y t } t ∼ q ( z t | y t , x t ) .
The coefﬁcients β y and β z can be used to weight the KL terms, and the cumulative component probability q ( y t | x 1: t ) can be computed iteratively as q ( y t | x 1: t )
= (cid:80) y t − 1 q φ y
( y t | y t − 1 , x t ) q ( y t − 1 | x 1: t − 1 ) .
In other words, for each timestep t and each mixture component, we compute the latent sample and the corresponding action log-probability, and the
KL-divergence between the component posterior and prior.
This is then marginalised over all y t , with an additional KL over the categorical transitions.
For more details, see Appendix C.
Information-asymmetry As noted in previous work (Tirumala et al., 2019; Galashov et al., 2019), hierarchical approaches often beneﬁt from information-asymmetry, with higher levels seeing additional context or task-speciﬁc information.
This ensures that the high-level remains responsible for abstract, task-related behaviours, while the low-level executes simpler motor primitives.
We employ similar techniques in HeLMS: the low-level inputs x LL comprise the proprioceptive state of the embodied agent; the mid-level inputs x ML also include the poses of objects in the environment; and the high-level x HL concatenates both object and proprioceptive state for a short number of lookahead timesteps.
The high- and low-level are similar to (Merel et al., 2019), with the low-level controller enabling motor primitives based on proprioceptive information, and the high-level using the lookahead information to provide additional context regarding behavioural intent when specifying which skill to use.
The key difference is the categorical high-level and the additional mid-level, with which
HeLMS can learn more object-centric skills and transfer these to downstream tasks.
Network architectures The architecture and information ﬂow in HeLMS are shown in Figure 1b.
The high-level network contains a gated head , which uses the previous skill y t − 1 to index into one of
K categorical heads, each of which specify a distribution over y t .
For a given y t , the corresponding mid-level skill network is selected and used to sample a latent action z t , which is then used as input for the latent-conditioned low-level controller, which parameterises the action distribution.
The skill transition prior p ( y t | y t − 1 ) is also learned, and is parameterised as a linear softmax layer which takes in a one-hot representation of y t − 1 and outputs the distribution over y t .
All components are trained end-to-end via the objective in Equation 3.
3. R EINFORCEMENT LEARNING WITH RELOADED SKILLS
Once learned, we propose two methods to transfer the hierarchical skill space to downstream tasks.
Following previous work (e.g. (Merel et al., 2019; Singh et al., 2021)), we freeze the low-level controller p ( a t | z t , x t ) , and learn a policy for either the continuous ( z t ) or discrete ( y t ) latent.
Categorical agent One simple and effective technique is to additionally freeze the mid-level components q ( z t | y t , x t ) , and learn a categorical high-level controller π ( y t | x t ) for the downstream task.
The learning objective is given by:
[Equation]
where the standard discounted return objective in RL is augmented by an additional term performing
KL-regularisation to some prior π 0 scaled by coefﬁcient η y .
This could be any categorical distribution such as the previously learned transition prior p
( y t | y t − 1 ) , but in this paper we regularise to the uniform categorical prior to encourage diversity.
While any RL algorithm could be used to optimize π ( y t | x t ) , in this paper we use MPO (Abdolmaleki et al., 2018) with a categorical action distribution (see Appendix B for details).
We hypothesise that this method improves sample efﬁciency by converting a continuous control problem into a discrete abstract action space, which may also aid in credit assignment.
However, since both the mid-level components and low-level are frozen, it can limit ﬂexibility and plasticity, and also requires that all of the mid- and low-level input states are available in the downstream task.
We call this method HeLMS-cat .
Mixture agent A more ﬂexible method of transfer is to train a latent mixture policy, π ( z t | x t ) =
[Equation]
y t π ( y t | x t ) π ( z t | y t , x t ) .
In this case, the learning objective is given by:
[Equation]
where in addition to the categorical prior, we also regularise each mid-level skill to a corresponding prior π 0 ( z t | y t , x t ) .
While the priors could be any policies, we set them to be the skill posteriors q ( z t | y t , x t ) learned ofﬂine, to ensure the mixture components remain close to the pre-learned skills.
This is related to (Tirumala et al., 2019), which also applies KL-regularisation at multiple levels of a hierarchy.
While the high-level controller π ( y t | x t ) is learned from scratch, the mixture components can also be initialised to q ( z t | y t , x t ) , to allow for initial exploration over the space of skills.
Alternatively, the mixture components can use different inputs, such as vision: this setup allows vision-based skills to be learned efﬁciently by regularising to state-based skills learned ofﬂine.
We optimise this using RHPO (Wulfmeier et al., 2020), which employs a similar underlying optimisation to MPO for mixture policies (see Appendix B for details).
We call this HeLMS-mix .
E XPERIMENTS
Our experiments focus on the following questions: (1) Can we learn a hierarchical latent mixture skill space of distinct, interpretable behaviours?
(2) How do we best reuse this skill space to improve sample efﬁciency and performance on downstream tasks?
(3) Can the learned skills transfer effectively to multiple downstream scenarios: (i) different objects; (ii) different tasks; and (iii) different modalities such as vision-based policies?
(4) How exactly do these skills aid learning of downstream manipulation tasks?
Do they aid exploration?
Are they useful in sparse or dense reward scenarios?
4. E XPERIMENTAL SETUP
Environment and Tasks We focus on manipulation tasks, using a MuJoCo-based environment with a single Sawyer arm, and three objects coloured red, green, and blue.
We follow the challenging object stacking benchmark of Lee et al.
(2021), which speciﬁes ﬁve object sets (Figure 2), carefully designed to have diverse geometries and present different challenges for a stacking agent.
These range from simple rectangular objects (object set 4), to geometries such as slanted faces (setsand 2) that make grasping or stacking the objects more challenging.
This environment allows us
[Figure] [Figure]
to systematically evaluate generalisation of manipulation behaviours for different tasks interacting with geometrically different objects.
For further information, we refer the reader to Appendix D.1 or to (Lee et al., 2021).
Details of the rewards for the different tasks are also provided in Appendix F.
Datasets To evaluate our approach and baselines in the manipulation settings, we use two datasets:
• red_on_blue_stacking : this data is collected by an agent trained to stack the red object on the blue object and ignore the green one, for the simplest object set, set4.
all_pairs_stacking : similar to the previous case, but with all six pairwise stacking combinations of { red, green, blue } , and covering all of the ﬁve object sets.
Baselines For evaluation in transfer scenarios, we compare HeLMS with a number of baselines:
• From scratch :
We learn the task from scratch with MPO, without an ofﬂine learning phase.
• NPMP+KL : We compare against NPMP (Merel et al., 2019), which is the most similar skill-based approach in terms of information-asymmetry and policy conditioning.
We make some small changes to the originally proposed method, and also apply additional KL-regularisation to the latent prior: we found this to improve performance signiﬁcantly in our experiments.
For more details and an ablation, see Appendix A.2.
• Behaviour Cloning (BC) : We apply behaviour cloning to the dataset, and ﬁne-tune this policy via MPO on the downstream task.
While the actor is initialised to the solution obtained via BC, the critic still needs to be learned from scratch.
• Hierarchical BC : We evaluate a hierarchical variant of BC with a similar latent space z to NPMP using a latent Gaussian high-level controller.
However, rather than freezing the low-level and learning just a high-level policy, Hierarchical BC ﬁne-tunes the entire model.
• Asymmetric actor-critic :
For state-to-vision transfer, HeLMS uses prior skills that depend on object states to learn a purely vision-based policy.
Thus, we also compare against a variant of MPO with an asymmetric actor-critic (Pinto et al., 2017) setup, which uses object states differently: to speed up learning of the critic, while still learning a vision-based actor.
4. L EARNING SKILLS FROM OFFLINE DATA
We ﬁrst aim to understand whether we can learn a set of distinct and interpretable skills from data (question (1)).
For this, we train HeLMS on the red_on_blue_stacking dataset with 5 skills.
[Figure] [Figure]
Figure 3a shows some example episode rollouts when the learned hierarchical agent is executed in the environment, holding the high-level categorical skill constant for an episode.
Each row represents a different skill component, and the resulting behaviours are both distinct and diverse: for example, a lifting skill (row 1) where the gripper closes and rises up, a reaching skill (row 2) where the gripper moves to the red object, or a grasping skill (row 3) where the gripper lowers and closes its ﬁngers.
Furthermore, without explicitly encouraging this, the emergent skills capture temporal consistency: Figure 3b shows the learned prior p ( y t | y t − 1 ) (visualised as a transition matrix) assigns high probability along the diagonal (remaining in the same skill).
Finally, Figure 3c demonstrates that all skills are used, without degeneracy.
4. T RANSFER TO DOWNSTREAM TASKS
Generalising to different objects We next evaluate whether the previously learned skills (i.e. trained on the simple objects in set 4) can effectively transfer to more challenging object interaction scenarios: the other four object sets proposed by (Lee et al., 2021).
The task uses a sparse staged reward, with reward incrementally given after completing each sub-goal of the stacking task.
As shown in Figure 4, both variants of HeLMS learn signiﬁcantly faster than baselines on the different object sets.
Compared to the strongest baseline (NPMP), HeLMS reaches better average asymptotic performance (and much lower variance) on two object sets (1 and 3), performs similarly on set 5, and does poorer on object set 2.
The performance on object set 2 potentially highlights a trade-off between incorporating higher-level abstract behaviours and maintaining low-level ﬂexibility: this object set often requires a reorientation of the bottom object due to its slanted faces, a behaviour that is not common in the ofﬂine dataset, which might require greater adaptation of mid- and low-level skills.
This is an interesting investigation we leave for future work.
Compositional reuse of skills To evaluate whether the learned skills are composable for new tasks, we train HeLMS on the all_pairs_stacking dataset with 10 skills, and transfer to a pyramid task.
In this setting, the agent has to place the red object adjacent to the green object, and stack the blue object on top to construct a pyramid.
The task is speciﬁed via a sparse staged reward
[Figure]
for each stage or sub-task: reaching, grasping, lifting, and placing the red object, and subsequently the blue object.
In Figure 5(a), we plot the performance of both variants of our approach, as well as
NPMP and MPO; we omit the BC baselines as this involves transferring to a fundamentally different task.
Both HeLMS-mix and HeLMS-cat reach a higher asymptotic performance than both NPMP and MPO, indicating that the learned skills can be better transferred to a different task.
We show an episode rollout in Figure 5(b) in which the learned agent can successfully solve the task.
From state to vision-based policies While our method learns skills from proprioception and object state, we evaluate whether these skills can be used to more efﬁciently learn a vision-based policy.
This is invaluable for practical real-world scenarios, since the agent acts from pure visual observation at test time without requiring privileged and often difﬁcult-to-obtain object state information.
We use the HeLMS-mix variant to transfer skills to a vision-based policy, by reusing the low-level controller, initialising a new high-level controller and mid-level latent skills (with vision and proprioception as input), and KL-regularising these to the previously learned state-based skills.
While the learned policy is vision-based, this KL-regularisation still assumes access to object states during training.
For a fair comparison, we additionally compare our approach with a version of MPO using an asymmetric critic (Pinto et al., 2017), which exploits object state information instead of vision in the critic, and also use this for HeLMS.
As shown in Figure 6, learning a vision-based policy with
MPO from scratch is very slow and computationally intensive, but an asymmetric critic signiﬁcantly speeds up learning, supporting the empirical ﬁndings of Pinto et al.
However, HeLMS once again demonstrates better sample efﬁciency, and reaches slightly better asymptotic performance.
We note that this uses the same ofﬂine model as for the object generalisation experiments, showing that the same state-based skill space can be reused in numerous settings, even for vision-based tasks.
4. W HERE AND HOW CAN HIERARCHICAL SKILL REUSE BE EFFECTIVE ?
Sparse reward tasks We ﬁrst investigate how HeLMS performs for different rewards: a dense shaped reward, the sparse staged reward from the object generalisation experiments, and a fully sparse reward that is only provided after the agent stacks the object.
For this experiment, we use the skill space trained on red_on_blue_stacking and transfer it to the same RL task of stacking on object set 4.
The results are shown in Figure 7.
With a dense reward (and no object transfer required), all of the approaches can successfully learn the task.
With the sparse staged reward, the baselines all plateau at a lower performance, with the exception of NPMP, as previously discussed.
However, for the challenging fully-sparse scenario, HeLMS is the only method that achieves nonzero reward.
This neatly illustrates the beneﬁt of the proposed hierarchy of skills: it allows for directed exploration which ensures that even sparse rewards can be encountered.
This is consistent with observations from prior work in hierarchical reinforcement learning (Florensa et al., 2017;
Nachum et al., 2019), and we next investigate this claim in more depth for our manipulation setting.
Exploration To measure whether the proposed approach leads to more directed exploration, we record the average coverage in state space at the start of RL (i.e. zero-shot transfer).
This is computed as the variance (over an episode) of the state x t , separated into three interpretable groups:
[Table]
[Figure]
joints (angles and velocity), grasp (a simulated grasp sensor), and object poses.
We also record the total reward (dense and sparse staged).
The results are reported in Table 1.
While all approaches achieve some zero-shot dense reward (with BC the most effective), HeLMS 1 receives a sparse staged reward an order of magnitude greater.
Further, in this experiment we found it was able to achieve the fully sparse reward (stacked) in one episode.
Analysing the state coverage results, while other methods are able to cover the joint space more (e.g. by randomly moving the joints), HeLMS is nearly two orders of magnitude higher for grasp states.
This indicates the utility of hierarchical skills: by acting over the space of abstract skills rather than low-level actions, HeLMS performs directed exploration and targets particular states of interest, such as grasping an object.
4. A BLATION S TUDIES
Capturing continuous and discrete structure To evaluate the beneﬁt of both continuous and discrete components, we train our method with a ﬁxed variance of zero for each latent component (i.e.
‘discrete-only’) and transfer to the stacking task with sparse staged reward in an easy case (object set 4) and hard case (object set 3), as shown in Figure 8(a) and (b).
We also evaluate the ‘continuousonly’ case with just a single Gaussian to represent the high- and mid-level skills: this is equivalent to the NPMP+KL baseline.
We observe the the discrete component alone leads to improved sample efﬁciency in both cases, but modelling both discrete and continuous latent behaviours makes a signiﬁcant difference in the hard case.
In other words, when adapting to challenging objects, it is important to capture discrete skills, but allow for latent variation in how they are executed.
KL-regularisation We also perform an ablation for KL-regularisation during the ofﬂine phase (via β z ) and online RL (via η z ), to gauge the impact on transfer; see Appendix A.1 for details.
C ONCLUSION
We present HeLMS, an approach to learn transferable and reusable skills from ofﬂine data using a hierarchical mixture latent variable model.
We analyse the learned skills to show that they effectively cluster data into distinct, interpretable behaviours.
We demonstrate that the learned skills can be ﬂexibly transferred to different tasks, unseen objects, and to different modalities (such as from state to vision).
Ablation studies indicate that it is beneﬁcial to model both discrete modes and continuous variation in behaviour, and highlight the importance of KL-regularisation when transferring to RL and ﬁne-tuning the entire mixture of skills.
We also perform extensive analysis to understand where and how the proposed skill hierarchy can be most useful:
we ﬁnd that it is particularly invaluable in sparse reward settings due to its ability to perform directed exploration.
There are a number of interesting avenues for future work.
While our model demonstrated temporal consistency, it would be useful to more actively encourage and exploit this for sample-efﬁcient transfer.
It would also be useful to extend this work to better ﬁne-tune lower level behaviours, to allow for ﬂexibility while exploiting high-level behavioural abstractions. A CKNOWLEDGMENTS
The authors would like to thank Coline Devin for detailed comments on the paper and for generating the all_pairs_stacking dataset.
We would also like to thank Alex X. Lee and Konstantinos
Bousmalis for help with setting up manipulation experiments.
We are also grateful to reviewers for their feedback