Temporal Logic Imitation: Learning Plan-Satisficing Motion Policies from Demonstrations

Yanwei Wang, Nadia Figueroa, Shen Li, Ankit Shah, Julie Shah

Abstract

Learning from demonstration (LfD) has successfully solved tasks featuring a long time horizon. However, when the problem complexity also includes human-in-the-loop perturbations, state-of-the-art approaches do not guarantee the successful reproduction of a task. In this work, we identify the roots of this challenge as the failure of a learned continuous policy to satisfy the discrete plan implicit in the demonstration. By utilizing modes (rather than subgoals) as the discrete abstraction and motion policies with both mode invariance and goal reachability properties, we prove our learned continuous policy can simulate any discrete plan specified by a linear temporal logic (LTL) formula. Consequently, an imitator is robust to both task- and motion-level perturbations and guaranteed to achieve task success.

Introduction

Presented at CoRL 2022, this research addresses a critical limitation in Learning from Demonstration (LfD): the lack of robustness to real-world perturbations. While robots can learn complex multi-step tasks, they often fail when physical interference or object slips occur. A standard imitation policy might continue its trajectory toward a goal even if the task's logical preconditions are no longer met—such as attempting to "pour" from a spoon that has already spilled its contents.

This failure stems from a fundamental mismatch between continuous motion (the physical trajectory) and the discrete plan (the sequence of logical states like "scooping" or "transporting"). Most LfD methods do not guarantee that a robot's motion will satisfy the high-level task requirements, especially under covariate shift—when the robot enters a state not encountered during training.

Robot task execution showing successful replay, perturbation recovery, and the difference between invariance failure and successful modulation.

Methods: The LTL-DS Framework

The authors propose LTL-DS, a framework that integrates high-level symbolic planning with low-level continuous control. The system operates in two distinct phases:

1. Offline Learning

  • LTL Specification: A human provides a high-level task "recipe" using Linear Temporal Logic (e.g., "You must scoop before you transport"). This is synthesized into a task automaton—a state machine that defines all valid sequences to complete the task.
  • Motion Policies: Human demonstrations are segmented into "modes" (logical states), and a stable Dynamical System (DS) is learned for each mode. These policies provide mathematical guarantees that the robot will reach its local goal within that mode.

2. Online Iteration and Modulation

  • Mode Invariance: The system monitors for "invariance failures," where perturbations push the robot out of its current logical mode (e.g., tilting the spoon too far).
  • Iterative Boundary Estimation: Upon failure, the system calculates "cutting planes"—mathematical boundaries that define the safe region for a specific mode—without requiring additional human data.
  • DS Modulation: The continuous motion policy is warped in real-time. It acts as a virtual barrier, preventing the robot from entering states that would cause task failure while still driving it toward the goal.
The LTL-DS framework: (a) Synthesis of a task automaton from LTL specifications; (b) The offline learning and online iterative modulation loop.

Experimental Results

The framework was evaluated using 2D simulated environments and real-world demonstrations on a Franka Emika robot arm performing a soup-scooping task. Robustness was tested through 25 trials involving unbiased human-in-the-loop perturbations.

  • 100% Success Rate: In real-world experiments with human interference, LTL-DS achieved a 100% success rate.
  • Superiority over Baselines: Standard Behavior Cloning (BC) and unmodulated Dynamical Systems failed significantly as perturbations increased. BC often diverged or hit "spurious attractors" (getting stuck), while standard DS would complete the motion but fail the underlying task logic.
  • Learning Efficiency: The system required only about four "modulation cuts" to achieve a perfect success rate in single-mode reaching tasks, demonstrating rapid acquisition of task constraints.

Discussion and Future Work

A key insight of this work is that mathematical stability is insufficient for task success; motion must also be plan-satisfying. By utilizing "modes" (regions of state space) rather than simple subgoals, the system enables automatic replanning. If a task-level failure occurs (e.g., dropping material), the automaton triggers a recovery plan, such as returning to the "scoop" mode before attempting to "transport" again.

Currently, the system requires human-defined "Atomic Propositions" to trigger mode transitions. Future work aims to learn these logical abstractions and mode boundaries directly from raw sensory data, such as video streams, to reduce the need for expert-defined LTL formulas.

Summary updated

BibTeX
@inproceedings{wang2022temporal,
  author = {Yanwei Wang and Nadia Figueroa and Shen Li and Ankit Shah and Julie Shah},
  title = {{Temporal Logic Imitation: Learning Plan-Satisficing Motion Policies from Demonstrations}},
  booktitle = {Conference on Robot Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=ndYsaoyzCWv},
}
Figure