Learning from a Learner

Alexis Jacq, Matthieu Geist, Ana Paiva, Olivier PietquinICML 2019

This paper introduces a refreshing twist on a classic problem in AI: how to learn a task by watching someone else do it. Instead of learning from a perfect "expert"—the standard approach in Inverse Reinforcement Learning (IRL)—this research proposes Learning from a Learner (LfL). By observing an agent that is still figuring things out and improving over time, an observer can deduce the underlying goal and eventually perform the task better than the agent it was watching.

The "Expert Bottleneck" in Standard IRL

In standard Reinforcement Learning (RL), we give an agent a mathematical reward function and tell it to maximize it. Inverse Reinforcement Learning (IRL) tries to do the opposite: it watches an agent perform and tries to figure out what that reward function was.

However, standard IRL suffers from an "Expert Bottleneck" because it assumes the demonstrator is already optimal. This is problematic for several reasons:

  1. Experts are rare: In many real-world scenarios, such as a human learning a new motor skill, we don't have access to perfect demonstrations.
  2. The "Ceiling" Effect: If you only watch an expert, the best you can usually do is mimic them. You rarely surpass them.
  3. Ambiguity: Many different reward functions can explain a single "perfect" action, making it hard to find the true goal.
Conceptual comparison of learner and expert trajectories

The authors argue that watching someone improve is actually more informative than watching someone who is already perfect. A learner makes mistakes, and those mistakes—along with their subsequent corrections—provide a rich gradient signal about what the environment actually rewards.

The LfL Framework and Methodology

The authors frame the LfL problem within entropy-regularized reinforcement learning (often associated with algorithms like Soft Actor-Critic). This framework assumes agents aren't just greedy; they maintain some randomness (entropy) in their actions to explore the environment.

The core technical contribution is Soft Policy Improvement Inversion. The authors mathematically prove that if you observe two consecutive versions of a learner's strategy ($\pi_1$ and $\pi_2$), you can recover the reward function that motivated that improvement, up to a "shaping" factor.

They introduce an algorithm that works in three main stages:

  1. Policy Inference: The observer watches trajectories of the learner and uses likelihood maximization to estimate the learner's strategy at different points in time.
  2. Target Reward Learning: It calculates the "improvement signal" between these evolving strategies.
  3. Consistency Optimization: It finds a single, consistent reward function that explains the entire sequence of improvements while filtering out temporary biases the learner might have had.

A key insight of this approach is that it is algorithm agnostic. The observer doesn't need to know how the learner is learning (e.g., whether they use Q-learning or Policy Gradients). As long as the learner is generally improving, the LfL framework can extract the reward.

Experimental Setup

The researchers evaluated their approach on two types of environments:

  • Discrete Grid World: A custom-built grid where an agent must navigate to a goal while avoiding specific "reset" tiles. This verified if the algorithm could recover the exact ground-truth reward.
  • Continuous Control (MuJoCo): Standard benchmarks from the OpenAI Gym suite, specifically Reacher, Hopper, HalfCheetah, and Ant. These involve simulated robots learning to move or reach targets in high-dimensional spaces.

Key Results: Surpassing the Teacher

The results demonstrate that the "student" can indeed become the "master." Because the observer recovers the intent (the reward function) rather than just mimicking the behavior, it can continue to optimize that reward long after the original learner has stopped improving.

Performance of the observer vs. the learner across four MuJoCo environments
  • Outperforming the Learner: In the Reacher, HalfCheetah, and Ant environments, the observer reached a higher final score than the best performance ever achieved by the learner it observed. For example, on the Reacher task, the observer achieved a normalized score of 1.54, significantly higher than the learner's final score (normalized to 1.0).
  • Comparison to Standard IRL: The authors compared LfL to state-of-the-art IRL methods like AIRL and DAC. While those methods require near-optimal expert data to reach a score of 1.0, LfL achieved higher scores using only the messy, sub-optimal trajectories of a learning agent.
  • Reward Recovery: In the Grid World, the algorithm successfully recovered a state-only reward function that was almost identical to the ground truth.

Limitations and Future Work

While highly effective in most tested environments, the approach has limitations:

  • The "Hopper" Failure: As seen in the performance graphs, the algorithm failed on the Hopper environment (a one-legged jumping robot). The authors attribute this to "absorbing states"—when the robot falls, the episode ends immediately. This creates a bias in the recovered reward that makes the observer incorrectly think "falling" is the goal.
  • Assumption of Improvement: The mathematics rely on the assumption that the observed agent is actually getting better. If the learner is erratic or regresses, the reward recovery might fail.

Future work could focus on handling absorbing states better and exploring different models of policy improvement beyond the entropy-regularized framework. Ultimately, this paper shifts the focus of imitation learning from "copying the best" to "understanding the process of getting better," mirroring how humans often learn by watching others overcome challenges.

Summary updated

BibTeX
@inproceedings{jacq2019learning,
  author = {Alexis Jacq and Matthieu Geist and Ana Paiva and Olivier Pietquin},
  title = {{Learning from a Learner}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
  url = {https://openreview.net/forum?id=RCBw7kzJyOv},
}
Figure