Imitation Learning by Estimating Expertise of Demonstrators

Mark Beliaev, Andy Shih, Stefano Ermon, Dorsa Sadigh, Ramtin Pedarsani

TL;DR

ILEED (Imitation Learning by Estimating Expertise of Demonstrators) is a new framework that allows AI agents to learn from diverse, "noisy" datasets without being told which demonstrators are experts. By jointly learning a task policy and estimating the state-dependent expertise of each demonstrator in an unsupervised way, the model can filter out mistakes and combine the strengths of different teachers to outperform even the best individual in the dataset.

What Problem Does This Paper Address?

Modern machine learning thrives on massive datasets, often collected via crowdsourcing. In the world of Imitation Learning (IL)—where an agent learns to perform a task by watching others—this presents a major hurdle. Standard algorithms like Behavioral Cloning (BC) typically treat all demonstrations as equally "expert."

However, a dataset of 50 different humans teaching a robot to pick up a block will inevitably contain a mix of skilled operators and clumsy novices. If an algorithm treats them all as homogeneous, it ends up "averaging" their behaviors, effectively absorbing the weaknesses and mistakes of the suboptimal demonstrators. The authors ask: Can we use the identity of the demonstrator to improve learning, even if we don't know their skill level beforehand?

Methods

The authors propose ILEED, which treats expertise as a latent variable to be discovered. The core of the approach is a joint model that optimizes three things simultaneously:

  1. The Optimal Policy ($\pi_\theta$): The "gold standard" behavior the agent is trying to learn.
  2. State Embeddings ($f_\phi$): A way to represent the environment that captures which "skills" are relevant in a given situation.
  3. Demonstrator Embeddings ($\omega_i$): A vector for each demonstrator representing their aptitude across different skills.
Figure 1. Left: State embeddings encode the skills associated with states of the environment. Middle: A demonstrator’s expertise ρ at a state is a function of the state embedding and the demonstrator embedding. Right: Using the expertise levels, the model improves the learned policy πθ, which in turn helps better estimate the state/demonstrator embeddings (ϕ and ω) and the expertise level (ρ).

The "expertise level" ($\rho$) of a demonstrator at a specific state is calculated as the inner product of the state and demonstrator embeddings. If a demonstrator has high expertise in a state, the model trusts their action more; if expertise is low, the model assumes the action was closer to random noise.

Technically, the model uses a Maximum Likelihood approach. For discrete actions, it interpolates between the optimal policy and a uniform random policy. For continuous actions, it scales the variance of a Gaussian Mixture Model. They also incorporate an auxiliary loss from the DeepMDP framework to help the model learn better state embeddings by predicting environment dynamics.

Figure 2. We observe the state, action, and demonstrator index i. Diamond nodes are deterministically computed. From the state embedding fϕ(s) and the demonstrator embedding ωi, we compute the expertise level ρ. We combine ρ with the estimate πθ of the optimal policy to obtain the demonstrator policy π. The loss L (Eq. 4) of π on state s and action a is back-propagated to update the parameters θ, ϕ, ω.

Datasets

The researchers evaluated ILEED across three distinct domains:

  • MiniGrid: A simulated grid-world environment where they injected varying levels of synthetic noise into pre-trained policies to create "novice" and "expert" demonstrators.
  • Robomimic (Multi-Human): A real-world dataset for robotic continuous control (specifically a "Square" nut-and-bolt task) featuring 50 demonstrations from six humans with varying proficiency levels.
  • Lichess Chess Endgames: A massive dataset of ~10 million human chess games. They focused on king-and-pawn endgames, binning players by their Elo ratings to see if the model could recover their relative expertise.

Key Insights and Ideas

  • Expertise is State-Dependent: This is the paper's most critical "aha" moment. A demonstrator might be a "Grandmaster" at the opening of a chess game but a "novice" at specific endgames. ILEED doesn't just give a demonstrator a single score; it learns where they are good.
  • Unsupervised Ranking: Without any ground-truth labels on who was an expert, ILEED was able to recover the rankings of demonstrators. In the chess experiment, the model's estimated expertise levels perfectly aligned with the players' actual Elo-based percentiles.
  • Surpassing the Best Teacher: Because ILEED can identify the specific states where a mediocre demonstrator happens to perform well, it can combine those "flashes of brilliance" with the strengths of others. This allows the learned policy to achieve higher rewards than even the single best demonstrator in the training set.

Key Results

ILEED outperformed competing methods (like standard BC, GAIL, and IRIS) in 21 out of 23 experimental settings.

  • Robotics: On the Robomimic dataset, ILEED showed an average 4.8% increase in final reward over the strongest baseline (BC-RNN) and was significantly more robust when trained on "worse" or "okay" human data.
  • Chess: The model achieved a lower "pawn loss per move" compared to standard BC, suggesting it learned a more effective strategy by identifying higher-quality moves in the noisy human data.
  • Multi-Skill Learning: In environments requiring multiple independent skills (Unlock, Lava, Empty), ILEED was the only model able to successfully combine expertise from different demonstrators to solve the full sequence of tasks.

Limitations and Future Work

The authors note that the model's success relies heavily on recovering effective state embeddings. If the demonstrators don't explore enough of the state space, the model may struggle to accurately estimate expertise in those "dark" regions.

Additionally, the current model uses a relatively simple "single-valued" expertise level at each state. The authors suggest that future work could explore more complex demonstrator models to capture different types of suboptimality (e.g., systematic bias vs. random fumbling) and incorporate uncertainty estimation into the expertise levels.

Summary updated

Abstract

Many existing imitation learning datasets are collected from multiple demonstrators, each with different expertise at different parts of the environment. Yet, standard imitation learning algorithms typically treat all demonstrators as homogeneous, regardless of their expertise, absorbing the weaknesses of any suboptimal demonstrators. In this work, we show that unsupervised learning over demonstrator expertise can lead to a consistent boost in the performance of imitation learning algorithms. We develop and optimize a joint model over a learned policy and expertise levels of the demonstrators. This enables our model to learn from the optimal behavior and filter out the suboptimal behavior of each demonstrator. Our model learns a single policy that can outperform even the best demonstrator, and can be used to estimate the expertise of any demonstrator at any state. We illustrate our findings on real-robotic continuous control tasks from Robomimic and discrete environments such as MiniGrid and chess, out-performing competing methods in $21$ out of $23$ settings, with an average of $7\%$ and up to $60\%$ improvement in terms of the final reward.
BibTeX
@inproceedings{beliaev2022imitation,
  author = {Mark Beliaev and Andy Shih and Stefano Ermon and Dorsa Sadigh and Ramtin Pedarsani},
  title = {{Imitation Learning by Estimating Expertise of Demonstrators}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
}
Figure