Source-linked AI summary
InfoGAIL: Interpretable Imitation Learning from Visual Demonstrations
Yunzhu Li, Jiaming Song, Stefano Ermon
TL;DR
Imitation learning seeks to learn from expert demonstrations without an explicit reward, but human demonstrations can contain substantial latent behavioral variation. The paper extends GAIL with latent codes and mutual-information maximization to discover and imitate those behaviors, including from raw visual inputs. In TORCS, the method distinguishes certain human driving behaviors and learns policies that imitate and can outperform human experts.
Problem
Method
InfoGAIL extends GAIL with a discrete latent code and mutual-information maximization to identify salient variation and imitate corresponding expert policies.
Source: §3 · p. 3, §3.1 · p. 4Results
In TORCS, the method distinguishes certain human driving behaviors and learns a policy that can imitate and even outperform human experts using visual information alone.
Source: §6 · p. 9Takeaways & Limitations
The experiments show that latent behavioral factors can be recovered from expert demonstrations without direct supervision beyond those demonstrations.
Source: §3.1 · p. 4, §6 · p. 9GAIL's state-action-pair discriminator can permit blended trajectories; discrete InfoGAIL latent codes can alleviate this issue.
Source: §4.4 · p. 8
Abstract
from arXiv · showhide
The goal of imitation learning is to mimic expert behavior without access to an explicit reward signal. Expert demonstrations provided by humans, however, often show significant variability due to latent factors that are typically not explicitly modeled. In this paper, we propose a new algorithm that can infer the latent structure of expert demonstrations in an unsupervised way. Our method, built on top of Generative Adversarial Imitation Learning, can not only imitate complex behaviors, but also learn interpretable and meaningful representations of complex behavioral data, including visual demonstrations. In the driving domain, we show that a model learned from human demonstrations is able to both accurately reproduce a variety of behaviors and accurately anticipate human actions using raw visual inputs. Compared with various baselines, our method can better capture the latent structure underlying expert demonstrations, often recovering semantically meaningful factors of variation in the data.
1 Introduction
Imitation learning can avoid hand-designed rewards, but human demonstrations vary because of latent factors such as expertise and strategy. The paper extends GAIL to discover those factors without supervision and to imitate complex behavior from visual inputs.
1 Introduction
- Reinforcement learning optimizes a predefined reward, which can be difficult to design for complex settings such as autonomous driving.Driving may require balancing safety, comfort, and efficiency.Source: §1 · p. 1
- GAIL imitates expert trajectories by jointly training a stochastic policy and a discriminator to distinguish generated from expert behavior.Imitation learning instead learns directly from expert demonstrations, without requiring an explicit reward signal.Source: §1 · p. 1
- Human demonstrations vary across experts and can reflect latent factors such as skill and habits that the environment does not explicitly capture.The paper aims to discover and disentangle these factors without supervision, analogously to learning interpretable factors in image generation.Source: §1 · p. 1
- The method extends GAIL with mutual-information maximization so high-level latent variables can control low-level actions and represent distinct behaviors.It also extends GAIL to raw-pixel inputs and demonstrates the approach in TORCS highway driving.Source: §1 · p. 2
2 Background
The background defines the MDP and imitation-learning setting, then introduces GAIL as policy learning through expert-distribution matching rather than direct reward estimation.
2.1 Preliminaries
- An infinite-horizon discounted MDP is specified by state and action spaces, transitions, reward, initial-state distribution, and discount factor.The expert policy is available through demonstrations consisting of state-action sequences.Source: §2.1 · p. 2
2.2 Imitation learning
- Behavior cloning learns from expert state-action pairs but can generalize poorly due to compounding errors and covariate shift; apprenticeship learning recovers a reward but nests an expensive RL problem.Apprenticeship learning can use its learned reward to score trajectories.Source: §2.2 · p. 2
2.3 Generative Adversarial Imitation Learning
- GAIL matches generated and expert state-action distributions using a discriminator, avoiding direct reward estimation while optimizing the policy with RL techniques.Its objective uses Jensen-Shannon divergence and causal-entropy regularization; training alternates discriminator updates with TRPO policy updates because the environment is treated as a black box.Source: §2.3 · p. 3
3 Interpretable Imitation Learning through Visual Inputs
The section proposes unsupervised discovery of latent behavioral factors and policies that produce corresponding trajectories from visual inputs. InfoGAIL extends GAIL with latent codes and mutual-information regularization, with reward augmentation and optimization changes for complex, high-dimensional tasks.
3 Interpretable Imitation Learning through Visual Inputs
- InfoGAIL targets unsupervised discovery of salient behavioral variation and policies that produce trajectories corresponding to those factors, using visual inputs as the only external perceptual information.The motivation includes variation across experts and distinct decisions by the same expert.Source: §3 · p. 3
3.1 Interpretable Imitation Learning
- GAIL alone lacks an incentive to separate behaviors in mixed-expert demonstrations, so InfoGAIL conditions the policy on a latent code and regularizes mutual information with trajectories.A variational lower bound uses an approximate posterior; this encourages the latent code to represent salient trajectory factors while adversarial training imitates expert behavior.Source: §3.1 · pp. 3–4
3.2 Reward Augmentation
- Collision and off-road penalties significantly improve the learned driving policy’s average rollout distance by adding a surrogate reward alongside imitation.The surrogate state-based reward expresses a bias about desired behavior; the paper frames this as a hybrid of imitation and reinforcement learning.Source: §3.2 · p. 5
3.3 Improved Optimization
- For high-dimensional inputs such as images, the method uses Wasserstein GAN training to address vanishing gradients and mode collapse in complex trajectory distributions.The training procedure also uses variance-reduction techniques and separate discriminator and posterior networks because WGAN training constraints would interfere with an expressive shared posterior network.Source: §3.3 · p. 5
4 Experiments
Experiments test whether InfoGAIL can recover distinct expert behaviors in synthetic and visual driving tasks. The results show mode separation from demonstrations, including raw visual inputs, while ablations highlight the contribution of optimization choices.
4.2 Utilizing Raw Visual Inputs via Transfer Learning
- The driving policy used raw visual inputs, with ImageNet-pretrained ResNet features transferred to the task because visual inputs make policy learning sample-intensive.The policy also received auxiliary information, including velocity, the two previous actions, and car damage.Source: §4 · p. 5, §4.2 · p. 6, §4.3 · p. 6
4.1 Learning to Distinguish Trajectories
- In the synthetic 2D task, InfoGAIL distinguished and imitated all three trajectory modes, while behavior cloning deviated and GAIL failed to separate them.The demonstrations were unlabeled, and the methods used the same architecture; only InfoGAIL regularized the latent code.Source: §4.1 · p. 6
4.3 Network Structure
- The policy combines convolutional visual features with auxiliary information and, for InfoGAIL, the latent code; the discriminator scores image, auxiliary, and action inputs, while Q estimates the latent code.Q uses a softmax output for discrete latent variables or a factored Gaussian for continuous ones.Source: §4.3 · p. 7
4.4 Interpretable Imitation Learning from Visual Demonstrations
- The driving experiments targeted two modes in each task: inside- versus outside-lane turns and left- versus right-side passing, using 80 expert trajectories per task.The two-state latent code had a uniform prior; a constant per-step reward encouraged the car to stay alive.Source: §4.4 · p. 7
- InfoGAIL separated the two driving modes, correctly classifying over 81% of pass state-action pairs and almost all turn pairs; average rollout distance rose during training.Original GAIL learned pass trajectories as a whole and did not distinguish the two modes.Source: §4.4 · pp. 7–8
4.5 Ablation Experiments
- Removing the replay buffer significantly worsened average rollout distance, while removing reward augmentation or WGANs yielded performance slightly below the expert.The authors attribute the replay-buffer result to increased variance in gradient estimation.Source: §4.5 · p. 8
5 Related work
Prior vision-based driving work includes both scene-mediated systems and direct visual-to-action approaches. The paper positions its approach as end-to-end imitation learning from raw visual input, contrasting it with methods that rely on LIDAR-like measurements or transfer learning over a critic.
5 Related work
- Mediated-perception systems first extract scene information, while behavior-reflex systems map visual inputs directly to driving actions.The paper notes that many current autonomous-driving methods use the mediated approach and hand-crafted features.Source: §5 · p. 9
- A prior visual imitation method uses behavior cloning and is described as generalizing poorly to lane-changing or vehicle-passing tasks, unlike this paper’s GAIL approach.Another TORCS approach uses DAgger, which queries reference policies during training.Source: §5 · p. 9
- Many end-to-end driving methods rely on LIDAR-like distance measurements, whereas this paper’s policy requires only raw visual information as external input.Source: §5 · p. 9
- Prior work uses pre-trained networks to learn dense reward functions, transferring over the critic rather than the policy as in this paper’s approach.The authors suggest combining those rewards with their approach through reward augmentation.Source: §5 · p. 9
6 Conclusion
The paper presents an imitation-learning method that identifies latent factors of variation in complex demonstrations without direct supervision beyond the demonstrations. In TORCS, the authors report that it distinguishes human driving behaviors and imitates and can outperform human experts using visual input alone.
6 Conclusion
- The method imitates complex behaviors while identifying salient latent factors of variation in demonstrations.Source: §6 · p. 9
- Discovering those factors requires no direct supervision beyond expert demonstrations, and training uses standard policy optimization algorithms.Source: §6 · p. 9
- In TORCS, the method automatically distinguishes certain human driving behaviors and learns a policy that can imitate and even outperform human experts using visual information as its sole external input.Source: §6 · p. 9
A Details for Experiment in Section 4.1
The 2D synthetic experiment uses an InfoGAIL network initialized from behavior cloning, with Wasserstein GAN training and no replay buffer. Figure 4 presents the network architecture for this environment.
A Details for Experiment in Section 4.1
- The 2D synthetic experiment uses 10-dimensional observations and 2-dimensional actions, with InfoGAIL initialized from behavior cloning.Source: A Details for Experiment in Section 4.1 · p. 12
- Training uses Wasserstein GANs, and the experiment omits replay buffers because rollouts are cheap in this setting.Source: A Details for Experiment in Section 4.1 · p. 12
- Figure 4 depicts the network architecture for the 2D synthetic environment.Source: Figure 4 · p. 12
B Architectural Details For TORCS Experiment
For the driving experiments, the discriminator receives a lower-resolution image to improve training speed, which the authors say does not reduce performance. Figure 5 presents the driving network architecture.
B Architectural Details For TORCS Experiment
- Lower-resolution discriminator inputs improve training speed without performance loss because high-level action inference does not require fine-grained image details.Source: B Architectural Details For TORCS… · p. 12
- Figure 5 depicts the network architecture for the driving experiments.Source: Figure 5 · p. 12
C Algorithm Outline for InfoGAIL
Algorithm 2 takes expert trajectories and initial policy, discriminator, and posterior parameters, then iteratively samples latent-conditioned rollouts and updates the model components. Its policy step uses TRPO, with an option for reward augmentation.
- The algorithm takes expert trajectories and initial policy, discriminator, and posterior parameters, and returns a learned policy.Source: C Algorithm Outline for InfoGAIL · p. 13
- Each iteration samples a latent code, rolls out the policy with that code fixed, adds trajectories to a replay buffer, and samples generated and expert batches.Source: C Algorithm Outline for InfoGAIL · p. 13
- The algorithm clips discriminator weights to [−0.01, 0.01] and updates posterior parameters by descending gradients.Source: C Algorithm Outline for InfoGAIL · p. 13
- It takes a TRPO policy step using an objective specified with or without reward augmentation.Source: C Algorithm Outline for InfoGAIL · p. 13
D.1 InfoGAIL Policies
Figure 6 presents visual inputs for InfoGAIL policies in the pass and turn experiments, illustrating policies under different latent codes. The latent code controls policy behavior.
- Figure 6 presents visual inputs for the InfoGAIL policies in the pass and turn experiments.Source: Figure 6 · p. 13
- The latent code controls the behavior of the policies shown.Source: Figure 6 · p. 13
- The figure illustrates learned policies under different latent codes.Source: §D.1 · p. 13, Figure 6 · p. 13
D.2 InfoGAIL Policies for Ablation Experiments
The ablation policy is shown passing several cars during rollout, with driving designed around 80 km/h and requiring precise control. A reward-augmentation failure occurs when collision-avoidance reward is excessively high.
D.2 InfoGAIL Policies for Ablation Experiments
- The agent is designed to drive around 80 km/h, so its control must be very precise.Source: §D.2 · p. 13
- During the ablation rollout, the policy passes several other cars.Source: Figure 7 · p. 14
D.3 Failure Case for Reward Augmentation
- Excessively high reward for avoiding collision causes the agent to repeatedly turn to increase friction and slow down dramatically.Source: §D.3 · p. 14