# Ergodic imitation: Learning from what to do and what not to do

arXiv: https://arxiv.org/abs/2103.17098 · HTML: https://mlsanity.com/paper/2103.17098/

## Key facts

- Cited by 8 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 31 Mar 2021.

## Built on by (most cited first, 8 of 8)

- [Continual Learning from Demonstration of Robotics Skills](https://mlsanity.com/paper/2202.06843/) (2022)
- [Scalable and Efficient Continual Learning from Demonstration via a Hypernetwork-generated Stable Dynamics Model](https://mlsanity.com/paper/2311.03600/) (2023)
- [Fast Ergodic Search with Kernel Functions](https://mlsanity.com/paper/2403.01536/) (2024)
- [Flow Matching Ergodic Coverage](https://mlsanity.com/paper/2504.17872/) (2025)
- [Credit Assignment Safety Learning from Human Demonstrations](https://mlsanity.com/paper/2110.04633/) (2021)
- [Extended Reality System for Robotic Learning from Human Demonstration](https://mlsanity.com/paper/2409.12862/) (2024)
- [Addressing Ambiguity in Imitation Learning through Product of Experts based Negative Feedback](https://mlsanity.com/paper/2603.26467/) (2026)
- [Where Success Breaks: Failure-Boundary Learning for Robust Vision-Language-Action Models](https://mlsanity.com/paper/2609.06114/) (2026)

## Abstract (arXiv)

With growing access to versatile robotics, it is beneficial for end users to be able to teach robots tasks without needing to code a control policy. One possibility is to teach the robot through successful task executions. However, near-optimal demonstrations of a task can be difficult to provide and even successful demonstrations can fail to capture task aspects key to robust skill replication. Here, we propose a learning from demonstration (LfD) approach that enables learning of robust task definitions without the need for near-optimal demonstrations. We present a novel algorithmic framework for learning tasks based on the ergodic metric -- a measure of information content in motion. Moreover, we make use of negative demonstrations -- demonstrations of what not to do -- and show that they can help compensate for imperfect demonstrations, reduce the number of demonstrations needed, and highlight crucial task elements improving robot performance. In a proof-of-concept example of cart-pole inversion, we show that negative demonstrations alone can be sufficient to successfully learn and recreate a skill. Through a human subject study with 24 participants, we show that consistently more information about a task can be captured from combined positive and negative (posneg) demonstrations than from the same amount of just positive demonstrations. Finally, we demonstrate our learning approach on simulated tasks of target reaching and table cleaning with a 7-DoF Franka arm. Our results point towards a future with robust, data-efficient LfD for novice users.
