# Elaborating on Learned Demonstrations with Temporal Logic Specifications

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

## Key facts

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

## 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, 14 of 14)

- [Adversarial Training is Not Ready for Robot Learning](https://mlsanity.com/paper/2103.08187/) (2021)
- [Embedding Symbolic Temporal Knowledge into Deep Sequential Models](https://mlsanity.com/paper/2101.11981/) (2021)
- [Temporal Logic Imitation: Learning Plan-Satisficing Motion Policies from Demonstrations](https://mlsanity.com/paper/2206.04632/) (2022)
- [Follow The Rules: Online Signal Temporal Logic Tree Search for Guided Imitation Learning in Stochastic Domains](https://mlsanity.com/paper/2209.13737/) (2022)
- [Conformance Checking of Fuzzy Logs against Declarative Temporal Specifications](https://mlsanity.com/paper/2406.12078/) (2024)
- [Risk-Driven Design of Perception Systems](https://mlsanity.com/paper/2205.10677/) (2022)
- [Learning Temporal Rules from Noisy Timeseries Data](https://mlsanity.com/paper/2202.05403/) (2022)
- [From Abstraction to Reality: DARPA's Vision for Robust Sim-to-Real Autonomy](https://mlsanity.com/paper/2503.11007/) (2025)
- [Neural Controller Synthesis for Signal Temporal Logic Specifications Using Encoder-Decoder Structured Networks](https://mlsanity.com/paper/2212.05200/) (2022)
- [Learning to Bridge the Gap: Efficient Novelty Recovery with Planning and Reinforcement Learning](https://mlsanity.com/paper/2409.19226/) (2024)
- [WFA-IRL: Inverse Reinforcement Learning of Autonomous Behaviors Encoded as Weighted Finite Automata](https://mlsanity.com/paper/2103.05895/) (2021)
- [Constrained Training of Neural Networks via Theorem Proving](https://mlsanity.com/paper/2207.03880/) (2022)
- [Learning from Imperfect Demonstrations via Temporal Behavior Tree-Guided Trajectory Repair](https://mlsanity.com/paper/2604.04225/) (2026)
- [Neuro-Symbolic Injection of LTLf Constraints in Autoregressive Reinforcement Learning Policies](https://mlsanity.com/paper/2606.08312/) (2026)

## Abstract (arXiv)

Most current methods for learning from demonstrations assume that those demonstrations alone are sufficient to learn the underlying task. This is often untrue, especially if extra safety specifications exist which were not present in the original demonstrations. In this paper, we allow an expert to elaborate on their original demonstration with additional specification information using linear temporal logic (LTL). Our system converts LTL specifications into a differentiable loss. This loss is then used to learn a dynamic movement primitive that satisfies the underlying specification, while remaining close to the original demonstration. Further, by leveraging adversarial training, our system learns to robustly satisfy the given LTL specification on unseen inputs, not just those seen in training. We show that our method is expressive enough to work across a variety of common movement specification patterns such as obstacle avoidance, patrolling, keeping steady, and speed limitation. In addition, we show that our system can modify a base demonstration with complex specifications by incrementally composing multiple simpler specifications. We also implement our system on a PR-2 robot to show how a demonstrator can start with an initial (sub-optimal) demonstration, then interactively improve task success by including additional specifications enforced with our differentiable LTL loss.
