# Learning from Successful and Failed Demonstrations via Optimization

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

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Placed in Robot learning from demonstration, one of 13 directions in Offline RL and imitation learning from data.
- First posted on arXiv 26 Jul 2021.

## Placed in

- Offline RL and imitation learning from data / [Robot learning from demonstration](https://mlsanity.com/offlinerl/robot-learning-from-demonstration/)

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

- [Similarity-Aware Skill Reproduction based on Multi-Representational Learning from Demonstration](https://mlsanity.com/paper/2110.14817/) (2021)
- [Robot Learning from Demonstration Using Elastic Maps](https://mlsanity.com/paper/2208.02207/) (2022)
- [How to Utilize Failure Demo Data?: Effective Data Selection for Imitation Learning Using Distribution Differences in Attention Mechanism](https://mlsanity.com/paper/2605.07560/) (2026)

## Abstract (arXiv)

Learning from Demonstration (LfD) is a popular approach that allows humans to teach robots new skills by showing the correct way(s) of performing the desired skill. Human-provided demonstrations, however, are not always optimal and the teacher usually addresses this issue by discarding or replacing sub-optimal (noisy or faulty) demonstrations. We propose a novel LfD representation that learns from both successful and failed demonstrations of a skill. Our approach encodes the two subsets of captured demonstrations (labeled by the teacher) into a statistical skill model, constructs a set of quadratic costs, and finds an optimal reproduction of the skill under novel problem conditions (i.e. constraints). The optimal reproduction balances convergence towards successful examples and divergence from failed examples. We evaluate our approach through several 2D and 3D experiments in real-world using a UR5e manipulator arm and also show that it can reproduce a skill from only failed demonstrations. The benefits of exploiting both failed and successful demonstrations are shown through comparison with two existing LfD approaches. We also compare our approach against an existing skill refinement method and show its capabilities in a multi-coordinate setting.
