Standard Inverse Reinforcement Learning (IRL) assumes you are watching a perfect expert. However, waiting for an agent to achieve mastery before trying to understand its goals is often impractical. This paper introduces LOGEL (Learning Observing a Gradient not-Expert Learner), an algorithm that recovers an agent's reward function by observing them while they are still learning. By assuming the learner follows a gradient-based update rule, LOGEL infers intentions faster and more accurately than methods that rely solely on optimal behavior.
The Problem with "Perfection"
Most IRL algorithms operate on a strict requirement: they need demonstrations from an expert who has already mastered a task. This poses two major challenges:
- Efficiency: In many real-world scenarios, such as multi-agent systems, we cannot afford to wait for an agent to reach optimality before we start inferring their goals.
- Information Scarcity: Experts are predictable and tend to stay in "safe" regions of the state space. A learner, conversely, makes mistakes and explores "dangerous" or sub-optimal areas. These mistakes provide crucial information about what the reward function penalizes—information that is often invisible in expert-only data.
While existing "Learning from a Learner" (LfL) approaches attempt to solve this, they often assume the agent improves monotonically (i.e., every step is strictly better than the last). Real learning is messy and involves regressions. This paper tackles the challenge of inferring rewards from a non-stationary, potentially "clumsy" learner.
The LOGEL Approach
The core insight behind LOGEL is simple but powerful: assume the learner is moving in the direction of the gradient of their expected return.
- The Gradient Assumption: If a learner is at policy state $\theta_t$ and moves to $\theta_{t+1}$, they are likely following the gradient $\nabla_\theta J(\theta, \omega)$. LOGEL looks for the reward weights $\omega$ that best explain these observed parameter updates.
- Two-Step Inference: Because an agent's internal neural network weights are rarely directly observable, LOGEL operates in two stages:
- Policy Recovery: It uses Behavioral Cloning on the observed trajectories to estimate the learner’s policy parameters ($\theta$) at different points in time.
- Reward & Rate Estimation: It uses alternating optimization (block-coordinate descent) to simultaneously deduce the learner's learning rate ($\alpha$) and the reward weights ($\omega$) that minimize the distance between the observed policy update and the predicted gradient update.
Unlike previous methods, LOGEL does not require the learner to actually improve at every step; it only requires that they are trying to improve via gradient descent.
Key Insights
- Mistakes are Features, Not Bugs: Observing a learner provides a more "global" view of the reward landscape. Because the learner visits sub-optimal states, the observer learns not just what to do, but what not to do.
- Gradient Direction > Performance Gain: By focusing on the direction of the update rather than the magnitude of improvement, LOGEL remains robust even when the learner makes a "bad" update that temporarily decreases performance.
- Single-Step Recovery: Theoretically and experimentally, if you have a highly accurate estimate of the gradient, you can recover the reward function by observing as little as one single learning step.
Experimental Results
The authors evaluated LOGEL across discrete navigation tasks (GridWorld) and standard continuous control environments (MuJoCo).
Robustness to Non-Gradient Learners
Interestingly, LOGEL performed exceptionally well even when the observed learner used algorithms that aren't strictly gradient-based, such as Q-learning or Value Iteration. Because these algorithms share similar update characteristics, LOGEL was able to recover the true reward weights much more accurately than the LfL baseline.
Success in Continuous Control
In MuJoCo environments, the learner used Proximal Policy Optimization (PPO), a complex algorithm that technically violates some of LOGEL's simpler gradient assumptions. Despite this, LOGEL demonstrated strong robustness. In the "Reacher" environment, LOGEL successfully identified the reward function where the state-of-the-art LfL baseline failed. In "Hopper," it matched or exceeded the performance of T-REX without needing the explicit trajectory rankings that T-REX requires.
Limitations and Future Work
While LOGEL presents a significant step forward, it has a few limitations:
- Linear Reward Model: The current mathematical framework assumes the reward is a linear combination of features ($R = \omega^T \phi$). Extending this to purely non-linear, deep reward functions is a natural next step.
- Observability: The method relies on seeing a sequence of policies. If you only have a single snapshot of a learner, LOGEL cannot be applied.
- Uncertainty: Future iterations of the algorithm could better account for the uncertainty inherent in estimating policy gradients from limited trajectory data.
Summary updated