S TATE A LIGNMENT - BASED I MITATION L EARNING
Anonymous authors
Paper under double-blind review
A BSTRACT
Consider an imitation learning problem that the imitator and the expert have different dynamics models.
Most of the current imitation learning methods fail because they focus on imitating actions.
We propose a novel state alignment based imitation learning method to train the imitator to follow the state sequences in expert demonstrations as much as possible.
The state alignment comes from both local and global perspectives and we combine them into a reinforcement learning framework by a regularized policy update objective.
We show the superiority of our method on standard imitation learning settings and imitation learning settings where the expert and imitator have different dynamics models.
I NTRODUCTION
Learning from demonstrations (imitation learning, abbr.
as IL) is a basic strategy to train agents for solving complicated tasks.
Imitation learning methods can be generally divided into two categories: behavior cloning (BC) and inverse reinforcement learning (IRL).
Behavior cloning (Ross et al., 2011b) formulates a supervised learning problem to learn a policy that maps states to actions using demonstration trajectories.
Inverse reinforcement learning (Russell, 1998; Ng et al., 2000) tries to ﬁnd a proper reward function that can induce the given demonstration trajectories.
GAIL (Ho &
Ermon, 2016) and its variants (Fu et al.; Qureshi et al., 2018; Xiao et al., 2019) are the recently proposed IRL-based methods, which uses a GAN-based reward to align the distribution of stateaction pairs between the expert and the imitator.
Although state-of-the-art BC and IRL methods have demonstrated compelling performance in standard imitation learning settings, e.g. control tasks (Ho & Ermon, 2016; Fu et al.
; Qureshi et al., 2018;
Xiao et al., 2019) and video games (Aytar et al., 2018b), these approaches are developed based on a strong assumption: the expert and the imitator share the same dynamics model; speciﬁcally, they have the same action space, and any feasible state-action pair leads to the same next state in probability for both agents.
The assumption brings severe limitation in practical scenarios: Imagine that a robot with a low speed limit navigates through a maze by imitating another robot which moves fast, then, it is impossible for the slow robot to execute the exact actions as the fast robot.
However, the demonstration from the fast robot should still be useful because it shows the path to go through the maze.
We are interested in the imitation learning problem under a relaxed assumption:
Given an imitator that shares the same state space with the expert but their dynamics may be different, we train the imitator to follow the state sequence in expert demonstrations as much as possible.
This is a more general formulation since it poses fewer requirements on the experts and makes demonstration collection easier.
Due to the dynamics mismatch, the imitator becomes more likely to deviate from the demonstrations compared with the traditional imitation learning setting.
Therefore, it is very important that the imitator should be able to resume to the demonstration trajectory by itself.
Note that neither BC-based methods nor GAIL-based IRL methods have learned to handle dynamics misalignment and deviation correction.
To address the issues, we propose a novel approach with four main features: 1) State-based .
Compared to the majority of literature in imitation learning, our approach is state-based rather than action-based.
Not like BC and IRL that essentially match state-action pairs between the expert and the imitator, we only match states.
An inverse model of the imitator dynamics is learned to recover the action; 2) Deviation Correction .
A state-based β -VAE (Higgins et al., 2017) is learned as the prior for the next state to visit.
Compared with ordinary behavior cloning, this VAE-based next state predictor can advise the imitator to return to the demonstration trajectory when it deviates.
The robustness beneﬁts from VAE’s latent stochastic sampling; 3) Global State Alignment .
While the
VAE can help the agent to correct its trajectory to some extent, the agent may still occasionally enter states that are far away from demonstrations, where the VAE has no clue how to correct it.
So we have to add a global constraint to align the states in demonstration and imitation.
Inspired by GAIL that uses reward to align the distribution of state-action pairs, we also formulate an IRL problem whose maximal cumulative reward is the Wasserstein Distance between states of demonstration and imitation.
Note that we choose not to involve state-action pairs as in GAIL(Ho & Ermon, 2016), or state-state pairs as in an observation-based GAIL (Torabi et al., 2018a), because our state-only formulation imposes weaker constraints than the two above options, thus providing more ﬂexibility to handle different agent dynamics; 4) Regularized Policy Update .
We combine the prior for next state learned from VAE and the Wasserstein distance-based global constraint from IRL in a uniﬁed framework, by imposing a Kullback-Leibler divergence based regularizer to the policy update in the
Proximal Policy Optimization algorithm.
To empirically justify our ideas, we conduct experiments in two different settings.
We ﬁrst show that our approach can achieve similar or better results on the standard imitation learning setting, which assumes the same dynamics between the expert and the imitator.
We then evaluate our approach in the more challenging setting that the dynamics of the expert and the imitator are different.
In a number of control tasks, we either change the physics properties of the imitators or cripple them by changing their geometries.
Existing approaches either fail or can only achieve very low rewards, but our approach can still exhibit decent performance.
Finally, we show that even for imitation across agents of completely different actuators, it is still possible for the state-alignment based method to work.
Surprisingly, a point mass and an ant in MuJoCo (Todorov et al., 2012) can imitate each other to navigate in a maze environment.
Our contributions can be summarized as follows:
• Propose to use a state alignment based method in the imitation learning problems where the expert’s and the imitator’s dynamics are different.
• Propose a local state alignment method based on β -VAE and a global state alignment method based on Wasserstein distance.
• Combine
the local alignment and global alignment components into a reinforcement learning framework by a regularized policy update objective.
R ELATED WORK
Imitation learning is widely used in solving complicated tasks where pure reinforcement learning might suffer from high sample complexity, like robotics control (Le et al., 2017; Ye & Alterovitz, 2017; Pathak et al., 2018), autonomous vehicle (Fu et al.
; Pomerleau, 1989), and playing video game (Hester et al., 2018; Pohlen et al., 2018; Aytar et al., 2018a).
Behavioral cloning (Bain & Sommut, 1999) is a straight-forward method to learn a policy in a supervised way.
However, behavioral cloning suffers from the problem of compounding errors as shown by (Ross & Bagnell, 2010), and this can be somewhat alleviated by interactive learning, such as DAGGER (Ross et al., 2011b).
Another important line in imitation learning is inverse reinforcement learning (Russell, 1998;
Ng et al., 2000; Abbeel & Ng, 2004; Ziebart et al., 2008; Fu et al.), which ﬁnds a cost function under which the expert is uniquely optimal.
Since IRL can be connected to min-max formulations, works like GAIL, SAM (Ho & Ermon, 2016;
Blond´e & Kalousis, 2018) utilize this to directly recover policies.
Its connections with GANs (Goodfellow et al., 2014) also lead to f -divergence minimization (Ke et al., 2019; Nowozin et al., 2016) and Wasserstein distance minimization (Xiao et al., 2019).
One can also extend the framework from matching state-action pairs to state distribution matching, such as Torabi et al.
(2018a); Sun et al.
; Schroecker & Isbell (2017).
Other works (Aytar et al., 2018b; Liu et al., 2018; Peng et al., 2018; Lee et al., 2019; Lee et al.) also learn from observation alone, by deﬁning reward on state and using RL to solve the tasks.
Torabi et al.
(2018b)
; Edwards et al.
(2018) will recover actions from observations by learning an inverse model or latent actions.
However, our work aims to combine the advantage of global state distribution matching and local state transition alignment, which combines the advantage of BC and IRL through a novel framework.
B ACKGROUNDS
Variational Autoencoders Kingma & Welling (2013);
Rezende et al.
(2014) provides a framework to learn both a probabilistic generative model p θ ( x | z ) as well as an approximated posterior distribution q φ ( z | x ) .
β -VAE is a variant VAE that introduces an adjustable hyperparameter β to the original objective:
[Equation]
Larger β will penalize the total correlation (Chen et al., 2018) to encourage more disentangled latent representations, while smaller β often results in sharper and more precise reconstructions.
Wasserstein distance The Wasserstein distance between two density functions p ( x ) and q ( x ) with support on a compact metric space ( M, d ) has an alternative form due to Kantorovich-Rubenstein duality (Villani, 2008):
[Equation]
Here, L 1 is the set of all 1-Lipschitz functions from M to R .
Compared with the prevalent KLdivergence and its extension, the f-divergence family, Wasserstein distance has a number of advantages theoretically and numerically.
Please refer to Arjovsky et al.
(2017) and Solomon (2018)
for a detailed discussion.
SAIL: S TATE A LIGNMENT B ASED I MITATION L EARNING 4. O VERVIEW
Our imitation learning method is based on state alignment from both local and global perspectives.
For local alignment, the goal is to follow the transition of the demonstration as much as possible, and allow the return to the demonstration trajectory whenever the imitation deviates.
To achieve both goals, we use a β -VAE (Higgins et al., 2017) to generate the next state (Figure 1 Left).
For global alignment, we set up an objective to minimize the Wasserstein distance between the states in the current trajectory and the demonstrations (Figure 1 Right).
There has to be a framework to naturally combine the local alignment and global alignment components.
We resort to the reinforcement learning framework by encoding the local alignment as policy prior and encoding the global alignment as reward over states.
Using Proximal Policy Optimization (PPO) by Schulman et al.
(2017) as the backbone RL solver, we derive a regularized policy update.
To maximally exploit the knowledge from demonstrations and reduce interactions with the environment, we adopt a pre-training stage to produce a good initialization based on the same policy prior induced by the local alignment.
Our method is summarized in Algorithm 1.
In the rest parts of this section, we will introduce all the components of our method in details.
4. L OCAL A LIGNMENT BY S TATE P REDICTIVE VAE
To align the transition of states locally, we need a predictive model to generate the next state which the agent should target at.
And then we can train an inverse dynamics model to recover the corresponding action, so as to provide a direct supervision for policy.
It is worth-noting that, while training an inverse dynamics model is generally challenging, it is not so hard if we only focus on the agent dynamics, especially when the low-dimensional control states are accessible as in many practical scenarios.
The problem of how to learn high-quality inverse/forward dynamics models is an active research topic.
Instead of using an ordinary network to memorize the subsequent states, which will suffer from the same is-
Require: Expert trajectories τ e : [ s 1 , a 1 , s 2 , a 2 , ... ] ∼ π e , initial policy π , inverse dynamics model g , discriminator φ , total episode T , memory capacity S 1: if Imitator and Expert have the same dynamics model then 2:
Pre-train g using τ e and transitions collected by a random policy 3: else 4:
Pre-train g using transitions collected by a random policy 5: end if 6: Pre-train VAE using τ e , and obtain the policy prior (cid:46) Pre-train VAE and obtain policy prior 7: Pretrain π using policy prior as described in Sec 4.
8: while episode ≤ T do 9: while | τ | ≤ S do (cid:46) τ is the collected trajectories 10:
Collect trajectory { ( s, a, s (cid:48) , r, done ) } using π 11:
Update r using (4) 12:
Add { ( s, a, s (cid:48) , r, done ) } to τ 13: end while 14:
Train φ using max φ ∈L 1 E s ∼ τ e [ φ ( s )] − E s ∼ τ [ φ ( s )]
(cid:46) Calculate Wasserstein Distance 15:
Update inverse dynamics model g 16:
Update policy using (5) 17: end while sue of compounding errors as behavioral cloning (Ross & Bagnell, 2010; Ross et al., 2011a), we propose to use VAE to generate the next state based on the following two reasons.
First, as shown in (Dai et al., 2018), VAE is more robust to outliers and regularize itself to ﬁnd the support set of a data manifold, so it will generalize better for unseen data.
Second, because of the latent stochastic sampling, the local neighborhood of a data point will have almost the same prediction, which is self-correctable when combined with a precise inverse dynamics model as illustrated in Figure 2.
We can also use a VAE to generate action based on the current state.
But if the agent deviated from the demonstration trajectory a little bit, this predicted action is not necessarily guide the agent back to the trajectory, as shown in Figure 2.
And in Sec 5.3.2, we conduct experiments to compare the state predictive VAE and the action predictive VAE.
Instead of the vanilla VAE, we use β -VAE to balance the KL penalty and prediction error, with formulation shown in (1).
In Sec 5, we discuss the effects of the hyper-parameter β in different experiment settings as one of the ablation studies.
4. G LOBAL A LIGNMENT BY W ASSERSTEIN D ISTANCE
Due to the difference of dynamics between the expert and the imitator, the VAE-based local alignment cannot fully prevent the imitator from deviating from demonstrations.
In such circumstances, we still need to assess whether the imitator is making progress in learning from the demonstrations.
We, therefore, seek to control the difference between the state visitation distribution of the demonstration and imitator trajectories, which is a global constraint.
Note that using this global constraint alone will not induce policies that follow from the demonstration.
Consider the simple case of learning an imitator from experts of the same dynamics.
The expert takes cyclic actions.
If the expert runs for 100 cycles with a high velocity and the imitator runs for only 10 cycles with a low velocity within the same time span, their state distribution would still roughly align.
That is why existing work such as GAIL aligns state-action occupancy measure.
However, as shown later, our state-based distribution matching will be combined with the local alignment component, which will naturally resolve this issue.
The advantage of this state-based distribution matching over state-action pair matching as in GAIL or state-next-state pair matching in (Torabi et al., 2018a) is that the constraint becomes loosened.
We use IRL approach to achieve the state distribution matching by introducing a reinforcement learning problem.
Our task is to design the reward to train an imitator that matches the state distribution of the expert.
Before introducing the reward design, we ﬁrst explain the computation of the Wasserstein distance between the expert trajectories { τ e } and imitator trajectory { τ } using the Kantorovich duality:
[Equation]
where φ is the Kantorovich’s potential, and serves as the discriminator in WGAN (Arjovsky et al., 2017).
φ is trained with a gradient penalty term as WGAN-GP introduced in (Gulrajani et al., 2017)
After the rollout of imitator policy is obtained, the potential φ will be updated by (3).
Assume a transition among an imitation policy rollout of length T is ( s i , s i +1 ) .
To provide a dense signal every timestep, we assign the reward as:
[Equation]
We now explain the intuition of the above reward.
By solving (3), those states of higher probability in demonstration will have a larger φ value.
The reward in (4) will thus encourage the imitator to visit such states.
Maximizing the curriculum reward will be equivalent to
[Equation]
In other words, the optimal policy of this MDP best matches the state visitation distributions w.r.t
Wasserstein distance.
Compared with AIRL (Fu et al.)
that also deﬁnes rewards on states only, our approach indeed enjoys certain advantages in certain cases.
We provide a theoretical justiﬁcation in the Appendix D.
4. R EGULARIZED PPO P OLICY U PDATE O BJECTIVE
As mentioned in the second paragraph of Sec 4.3, the global alignment has to be combined with local alignment.
This is achieved by adding a prior to the original clipped PPO objective.
We maximize the following uniﬁed objective function:
[Equation]
We will explain the two terms in detail.
L CLIP ( θ ) denotes the clipped surrogate objective used in the original PPO algorithm:
[Equation]
where ˆ A t is an estimator of the advantage function at timestep t .
The advantage function is calculated based on a reward function described in Sec 4.3.
The D KL term in (5) serves as a regularizer to keep the policy close to a learned policy prior p a .
This policy prior p a is derived from the state predictive VAE and an inverse dynamics model.
Assume the β -VAE is f ( s t )
=
s t
+1 and the inverse dynamics model is g inv ( s t , s t +1 )
= a .
To solve the case when the agents have different dynamics, we learn a state prediction network and use a learned inverse dynamics to decode the action.
We deﬁne the action prior as
[Equation]
where the RHS is a pre-deﬁned policy prior, a Gaussian distribution centered at g inv ( s t , f ( s t )) .
σ controls how strong the action prior is when regularizing the policy update, which is a hyperparameter.
Note that the inverse model can be further adjusted during interactions.
L CLIP is computed through the advantage ˆ A t and reﬂects the global alignment.
The policy prior is obtained from the inverse model and local β -VAE, which makes the D KL serve as a local alignment constraint.
Furthermore, our method can be regard as a combination of BC and IRL because our KLdivergence based action prior encodes the BC policy and we update the policy leveraging reward.
We would note that our state-alignment method augments state distribution matching by taking relationships of two consecutive states into account with robustness concern.
4. P RE - TRAINING
We pretrain the state predictive VAE and the inverse dynamics model, and then obtain the policy prior in (7), which is a Gaussian distribution.
For pre-training, we want to initialize PPO’s
Gaussian policy π by this prior p a , by minimizing the KL-divergence between them.
Practically, we use direct supervision from g inv ( s t , f ( s t )) and σ in (7) to directly train both the mean and variance of the policy network, which is more efﬁcient during the pre-training stage.
During the online interaction, the update rule of PPO’s policy is by optimizing (5), and the variance will be further adjusted for all the dimensions of the action space.
E XPERIMENTS
We conduct two different kinds of experiments to show the superiority of our method.
In Sec 5.1, we compare our method with behavior cloning (Bain & Sommut, 1999), GAIL (Ho & Ermon, 2016), and AIRL (irl) in control setting where the expert and the imitator have different dynamics model, e.g., both of them are ant robots but the imitator has shorter legs.
In Sec 5.1, we further evaluate in the traditional imitation learning setting.
Finally, in Sec 5.3, we conduct ablation study to show the contribution of the components.
5. I MITATION L EARNING ACROSS A GENTS OF D IFFERENT A CTION D YNAMICS 5.1. A CTORS OF M ODIFIED P HYSICS AND G EOMETRY P ROPERTIES
We create environments using MuJoCo (Todorov et al., 2012) by changing some properties of experts, such as density and geometry of the body.
We choose 2 environments, Ant and Swimmer, and augment them to 6 different environments: Heavy/Light/Disabled Ant/Swimmer.
The Heavy/Light agents have modiﬁed density, and the disabled agents have modiﬁed head/tail/leg lengths.
The demonstrations are collected from the standard Ant-v2 and Swimmer-v2.
More descriptions of the environments and the demonstration collection process can be founded in the Appendix.
We then evaluate our method on them.
Figure 3 demonstrates the superiority of our methods over all the baselines.
Our approach is the most stable in all the 6 environments and shows the leading performance in each of them.
GAIL seems to be the most sensitive to dynamics difference.
AIRL, which is designed to solve imitation learning for actors of different dynamics, can perform on par with our method in two swimmer-based environments (DisabledSwimmer and HeavySwimmer) that have relatively lower dimensional action space (2D for swimmer versus 8D for ants).
Interestingly, the stability and performance of vanilla behavior cloning are quite reasonable in 4 of the environments, although it failed to move about in the DisabledAnt and HeavyAnt environments.
For these two tasks, the agent will reach dangerous states by cloning actions, yet our method will not approach these states by using state-based imitation.
In the other four games, BC agents do not die but just move less efﬁciently, so they have a sub-optimal yet still reasonable score.
     6WHSV
      6 F R U H
[Figure]
DisabledAnt       6WHSV      6 F R U H
[Figure]
      6WHSV          6 F R U H
[Figure]
      6WHSV  

     6 F R U H (d) DisabledSwimmer       6WHSV  

      6 F R U H (e) LightSwimmer       6WHSV  

     6 F R U H 6$,/2XUV $,5/*$,/%&
[Figure]
5.1. A CTORS OF H ETEROGENEOUS A CTION D YNAMICS
We consider an extremely challenging setting that the imitator and demonstrator are functionally different.
One typical example of expert/imitator pair in practice would be a human and a humanoid robot.
We consider a much simpliﬁed version but with similar nature – a Point and an Ant in
MuJoCo.
In this task, even if the state space cannot be exactly matched, there are still some shared dimensions across the state space of the imitator and the actor, e.g., the location of the center of mass, and the demonstration should still teach the imitator in these dimensions.
We use the same setting as many hierarchical RL papers, such as HIRO and Near-Optimal RL (Nachum et al., 2018a;b).
The agent need to reach a goal position in a maze, which is represented by (x,y) coordinates.
We also know that the ﬁrst two dimensions of states are the position of the agent.
The prior knowledge includes: (1) the goal space (or the common space that need to be matched) (2) the projection from the state space to the goal space (select the ﬁrst two dimensions of the states).
[Figure]
The ﬁrst task is that the Ant should reach the other side of the maze from several successful demonstrations of a Point robot.
As shown in Figure 4(c) and Figure 4(d), the maze structure for the ant and point mass is exactly the same.
To solve this problem, we ﬁrst pre-train an VAE on the demonstrations, and use this VAE to propose the next “subgoal” for the Ant.
This VAE is trained on the goal space (i.e. the ﬁrst two dimensions) of the Point robot’s trajectory.
Then we train an inverse model for Ant, which will generate an action based on the Ant’s current state (high dimensional) and goal predicted by VAE (2 dimensional).
Our performance is shown in Figure 5(c).
After 1M training steps, the agent has success rate of 0.
to reach the other side of the maze.
5. A CTORS OF THE S AME D YNAMICS (S TANDARD I MITATION L EARNING )
We also evaluate our algorithm on 6 non-trivial control tasks in MuJoCo: Swimmer, Hopper, Walker,
Ant, HalfCheetach, and Humanoid.
We ﬁrst collect demonstration trajectories with Soft ActorCritic, which can learn policies that achieve high scores in most of these environments 2 .
For comparison, we evaluate our method against 3 baselines: behavior cloning, GAIL, and AIRL 3 .
Also, to create even stronger baselines for the cumulative reward and imitator run-time sample complexity, we initialize GAIL with behavior cloning, which would obtain higher scores in Swimmer and
Walker.
Lastly, to evaluate how much each algorithm depends on the amount of demonstrations, we sampled demonstration trajectories of ten and ﬁfty episodes.
Table 1 depicts representative results in Hopper and HalfCheetah 4 .
The advantage of our methods over BC should be attributed to the inherent data augmentation by VAE.
On Hopper-v2, we are signiﬁcantly better with 10 demos but are just on par if the demos are increased to 50.
On
HalfCheetah-v2, the demo cheetah runs almost perfectly ( 12294 scores); in other words, the demo provides limited instruction when the imitator is even slightly off the demo states, thus the robustness from VAE becomes critical.
[Table]
[Table]
5. A BLATION STUDY 5.3. C OEFFICIENT β IN β -VAE
β -VAE introduces an additional parameter to the original VAE.
It controls the variance of the randomly sampled latent variable sampling, which subsequently affects the reconstruction quality and robustness.
Theoretically, a smaller β leads to better state prediction quality, with the cost of losing the deviation correction ability (Dai et al., 2018)
[Table]
To empirically show the role of beta and check the sensitivity of our algorithm with respect to beta, we evaluate VAE in settings of both the imitator has the same dynamics and has different dynamics.
We select HalfCheetah-v2 and HeavyAnt as an example.
For HalfCheetah-v2, we pretrain the inverse dynamics and VAE using given demonstrations so that the initial performance will tell the quality of the VAE’s prediction.
For DisabledAnt, we pretrain the dynamics with random trials, which results in forward/inverse dynamics estimation of less accuracy.
In this case, we examine both its initialized performance and ﬁnal performance.
The results are shown in Table 2.
We ﬁnd out that for β in [0 . 01 , 0 . 1] , the performance is better.
Speciﬁcally, when the imitator is different from the expert, a smaller β will result in poor performance as it overﬁts the demonstration data.
We also compare our method with an ordinary MLP trained by MSE loss.
We ﬁnd out that VAE outperforms MLP in all settings.
Note that the MLP-based approach is very similar to the state-based behavior cloning work of (Torabi et al., 2018b).
5.3. A CTION P REDICTIVE β -VAE
In Figure 2, we mentioned that a VAE to predict the next action is less favorable.
To justify the claim, we compare a VAE-based BC with a vanilla BC that both predict actions, as shown in Table 3.
Experiments show that VAE-BC is even outperformed by a vanilla BC, especially when β is larger than 0.001.
Compared with the last line in Table 2, we can conclude that VAE is more useful when predicting state, which consolidates that the advantage really comes from our state-based approach but not only the
[Table]
[Table]
5.3. E FFECT OF W ASSERSTEIN D ISTANCE AND KL REGULARIZATION
[Figure]
As shown in Figure 5(a)(b)
Wasserstein distance combined with KL regularization performs the best.
Wasserstein objective is used in our inverse RL based mechanism that would signiﬁcantly penalize the exploration when the agent deviates from the demonstration far away.
However, using this objective alone lacks constraints over consecutive states, thus performing the worst.
The KL objective adds constraints over consecutive states using a VAE prior; however, VAE is unable to extrapolate to states when the imitator deviates far from the demo (green line gradually fails as in
Fig 5 (b)) but this is the scenario when the Wasserstein distance would not favor, thus the reward from the Wasserstein distance will push the imitator back to the demonstration states.
C ONCLUSION
We proposed SAIL, a ﬂexible and practical imitation learning algorithms that use state alignment from both local and global perspective.
We demonstrate the superiority of our method using MuJoCo environments, especially when the action dynamics are different from the demonstrations
A L EARNING ACROSS DIFFERENT ENVIRONMENTS
PointMaze & AntMaze As shown in Figure 4, a point mass or an ant is put in a 24 × 24 U-maze.
The task is to make the agent reach the other side of U-maze with the demonstration from the point mass.
The ant is trained to reach a random goal in the maze from a random location, and should reach the other side of the maze.
The state space of ant is 30 -dim, which contains the positions and velocities.
HeavyAnt Two times of original Ant’s density.
Two times of original gear of the armature.
LightAnt One tenth of original Ant’s density.
DisabledAnt Two front legs are 3 quarters of original Ant’s legs.
HeavySwimmer 2.5 times of original Swimmer’s density.
LightSwimmer One twentieth of original Swimmer’s density.
DisabledSwimmer Make the last joint 1.2 times longer and the ﬁrst joint 0.7 times of the original length
The exact results of these environments are listed in Table 4, 5.
All the statistics are calculated from 20 trails.
[Table]
[Table]
B I MITATION B ENCHMARK E XPERIMENTS SETTINGS AND RESULTS
We use six MuJoCo (Todorov et al., 2012) control tasks.
The name and version of the environments are listed in Table 6, which also list the state and action dimension of the tasks with expert performance and reward threshold to indicate the minimum score to solve the task.
All the experts are trained by using SAC (Haarnoja et al., 2018) except Swimmer-v2 where TRPO (Schulman et al., 2015) get higher performance.
[Table]
The exact performance of all methods are list in Table 7, 8, 9, 10, 11, 12.
We compare GAIL(Ho &
Ermon, 2016), behavior cloning, GAIL with behavior cloning initilization and AIRL to our method containing.
Means and standard deviations are calculated from 20 trajectories after the agents converge and the number total interactions with environments is less than one million environment steps.
[Table]
[Table]
[Table] [Table]
[Table] [Table]
C H YPER - PARAMETER AND NETWORK ARCHITECTURE
When we pretrain the policy network with our methods
[Table]
we choose β = 0 .
in β -VAE.
We use
Adam with learning rate 3e-4 as the basic optimization algorithms for all the experiments.
The policy network and value network used in the algorithms all use a three-layer relu network with hidden size 256 .
We choose σ = 0 .
1 in the policy prior for all the environments.
D C OMPARISON WITH AIRL (F U ET AL .) FROM A T HEORETICAL P ERSPECTIVE
Here we illustrate the theoretical advantage of our SAIL algorithm over AIRL in certain scenarios by an example.
The theory of AIRL shows that it is able to recover the groundtruth reward of an MDP up to a constant if the reward of this MDP is deﬁne on states only, when the adversarial learning reaches the equilibrium.
Next we show a basic case that violates the theoretical assumption of AIRL but can be solved by our algorithm.
[Figure]
Figure 6 shows the states and transition of an MDP.
The demonstration policy jumps back and forth between s 1 and s 2 periodically.
Because our algorithm has the action prior (local alignment), it is clear that we can solve this problem.
The dynamics of many periodic games, such as Walker and
HalfCheetah in MuJoco, are extension of this two-ring graph.
It is easy to show that it is impossible for the adversarial game in AIRL to solve this problem at equilibrium.
According to Sec 6 of Fu et al., the reward family of AIRL is parameterized as
[Equation]
For simplicity of notation, let φ ( s ) =
g ( s ) − h ( s ) and ψ ( s )
=
γh ( s ) , then
[Equation]
In other words, the reward of AIRL is decomposible to the sum of two functions deﬁned on states only.
Again, for simplicity, we omit the arguments of functions but use subscripts to represent states.
For example, f 12 = f
( s 1 , s 2 ) and φ 1 = φ ( s 1 ) .
Then,
[Equation]
[Equation]
Assume that AIRL has reached the equilibrium and learned the optimal policy, then it must be true that f 12 > f 11 and f 21 > f 22 (otherwise, there exists other optimal policies). But f 12 > f 11 implies that ψ 2 > ψ 1 , while f 21 > f 22 implies that ψ 1 > ψ 2 , which is a contradiction.