Show me the Way: Intrinsic Motivation from Demonstrations

Léonard Hussenot, Robert Dadashi, Matthieu Geist, Olivier Pietquin

Abstract

The study of exploration in the domain of decision making has a long history but remains actively debated. From the vast literature that addressed this topic for decades under various points of view (e.g., developmental psychology, experimental design, artificial intelligence), intrinsic motivation emerged as a concept that can practically be transferred to artificial agents. Especially, in the recent field of Deep Reinforcement Learning (RL), agents implement such a concept (mainly using a novelty argument) in the shape of an exploration bonus, added to the task reward, that encourages visiting the whole environment. This approach is supported by the large amount of theory on RL for which convergence to optimality assumes exhaustive exploration. Yet, Human Beings and mammals do not exhaustively explore the world and their motivation is not only based on novelty but also on various other factors (e.g., curiosity, fun, style, pleasure, safety, competition, etc.). They optimize for life-long learning and train to learn transferable skills in playgrounds without obvious goals. They also apply innate or learned priors to save time and stay safe. For these reasons, we propose to learn an exploration bonus from demonstrations that could transfer these motivations to an artificial agent with little assumptions about their rationale. Using an inverse RL approach, we show that complex exploration behaviors, reflecting different motivations, can be learnt and efficiently used by RL agents to solve tasks for which exhaustive exploration is prohibitive.

Introduction

In Reinforcement Learning (RL), the exploration-exploitation trade-off is a fundamental challenge. To discover rewards in complex, sparse environments, agents must explore effectively. Traditional methods often rely on "intrinsic rewards" based on novelty—bonuses for visiting unvisited states. However, exhaustive exploration is often impractical due to the scale of state spaces, safety concerns in real-world applications, and the lack of efficiency compared to human-like purposeful exploration. Humans leverage priors and specific "styles" of exploration that avoid dangerous or irrelevant states. This paper introduces Show me the Way (SmtW), a framework that learns an exploration bonus directly from expert demonstrations, capturing structured motivation rather than simple novelty.

Methodology: Learning the Exploration Bonus

The SmtW framework treats exploration as a behavior to be imitated via Inverse Reinforcement Learning (IRL). It assumes an expert optimizes a total reward comprising the environment's task reward and an internal exploration bonus. The authors propose a two-stage "Cascaded Supervised" approach to recover this bonus.

The SmtW architecture: a two-stage process involving Behavioral Cloning and Bonus Regression.

First, a Behavioral Cloning (BC) stage trains a recurrent neural network (LSTM) to predict expert actions from trajectories. The unnormalized logits of this classifier are interpreted as implicit Q-values ($Q_\phi$). Second, a Bonus Regression stage uses the Bellman optimality equation to solve for the hidden bonus ($B_\theta$). By regressing this bonus using a second network, it can be integrated into any standard RL agent. The use of LSTMs ensures the bonus is history-dependent, allowing the agent to maintain context of its exploration progress within an episode.

Experimental Setup: The KeysDoors Environment

To evaluate SmtW, the authors utilized KeysDoors, a procedurally generated grid-world environment. In this task, an agent must find a specific key among $N$ keys to open a corresponding door among $N$ doors. The environment provides a sparse reward (+100 for the correct door) and a small penalty (-1) for every move to discourage idling. This setup creates a "lazy agent" trap where agents might prefer to stay still to avoid penalties. Success requires a systematic exploration strategy that persists through multiple "failed" attempts. Crucially, models are tested on unseen layouts to evaluate their ability to generalize exploration priors.

Analysis and Results

SmtW demonstrates a significant advantage in capturing expert-like exploration styles compared to standard novelty-seeking methods like Random Network Distillation (RND) or count-based bonuses.

Comparison of intrinsic reward distributions for SmtW, Count-Based, and RND methods.

As shown in the reward distribution analysis, SmtW effectively distinguishes between expert (demonstrator) behavior and random noise. In contrast, RND often assigns higher rewards to random, "noisy" movements than to structured expert trajectories. SmtW also successfully learns safety constraints; for instance, it penalizes dropping a key—an action an expert avoids—even if the resulting state is novel. In the KeysDoors(N=5) benchmark, agents using the SmtW bonus solved tasks significantly faster than those using count-based methods, effectively overcoming the negative reward trap.

Conclusion

Show me the Way (SmtW) provides a robust method for transferring complex exploration motivations from experts to RL agents. By learning from demonstrations, agents can adopt efficient, safe, and structured exploration priors that generalize to new environments. While the current work focuses on grid-worlds, future research could explore scaling SmtW to high-dimensional visual environments and investigating behavioral style-transfer for more nuanced agent personalities.

Summary updated

BibTeX
@inproceedings{hussenot2021show,
  author = {Léonard Hussenot and Robert Dadashi and Matthieu Geist and Olivier Pietquin},
  title = {{Show me the Way: Intrinsic Motivation from Demonstrations}},
  booktitle = {AAMAS},
  year = {2021},
  url = {https://openreview.net/forum?id=HxWVvkwLgq},
}
Figure