Many useful robot tasks are sequences with rules: fetch the cup, then the spoon, in either order, never cross the wet floor, and start over if something is dropped. People can demonstrate such tasks, but their demonstrations are few, finite, and often suboptimal. Someone may pick a slow order, do one stage well and another badly, or never show how to recover when progress is undone. A policy that copies these demonstrations inherits every one of those flaws. We propose a short-horizon planner that learns from such demonstrations and then outperforms them. It predicts a few steps ahead with a learned dynamics model, and it tracks the task's progress through a small state machine compiled from the rule, advancing that machine inside every imagined rollout. At the end of each rollout it scores the result with a value function learned separately for each stage of the task. Because the machine supplies the reward (a point for every stage completed), the value functions can be trained by bootstrapping, without success labels, and can stitch together good fragments from different demonstrations.
In two sentences: let the planner model the discrete jump in task progress explicitly over its short look-ahead, and keep one smooth long-range value function per task stage instead of forcing one network to learn a value surface that jumps at every stage boundary. We expect this combination to beat the demonstrator on order choice and stage efficiency, to recover from disturbances that undo task progress, and to act as a cheap automatic teacher for a fast reactive policy.
Core Claim
Two terms need defining first. A terminal value is a learned estimate of long-run return placed at the end of a truncated planning rollout. A temporally extended goal is a specification over the order and history of events, usually written in linear temporal logic (LTL) and compiled into an automaton, a finite state machine whose state $q$ records task progress. With both in hand, the planner solves
$$\max_{a_{0:H-1}} \sum_{t=0}^{H-1} \gamma^t\, r(q_t, q_{t+1}) + \gamma^H V_{q_H}(s_H), \qquad q_{t+1} = \delta(q_t, L(\hat s_{t+1})).$$
Here $a_{0:H-1}$ are the planned actions over horizon $H$. The states $\hat s_t$ are predicted by the learned dynamics model, and $\gamma$ is the discount. $L$ maps a predicted state to the atomic propositions true in it (for example, "holding cup"), and $\delta$ is the automaton's transition function. The reward $r(q_t,q_{t+1})$ is positive only when the automaton moves toward acceptance. $V_q$ is a separate value head for each automaton state $q$.
The claim is that this factorization matters. The true value over the combined physical-and-automaton state is discontinuous in $s$ wherever a proposition flips. Putting the jump inside the rollout means the value function only has to approximate each stage's value, which is smooth by comparison. The error bound from Plan Online, Learn Offline says planning damps value error by $\gamma^H$, and that bound then applies within each stage rather than being wasted on the boundaries.
We expect three consequences. First, over-performance: bootstrapping over the combined state space stitches demonstrated stage fragments into better wholes. Second, recovery: a disturbance that reverts $q$ simply hands the planner a different value head, with no special recovery demonstrations needed. Third, cheap teaching: the planner can label any state a learner visits, which makes interactive imitation cheap.
Position Relative to Prior Work
Three papers already join pairs of these directions, and each leaves out exactly what we add.
Imitation Learning with Temporal Logic Constraints (TiLoIL) is the closest. It learns LTL tasks from about five demonstrations. It segments them at accepting automaton states, trains one discriminator per stage to give dense rewards, and pins Q-targets high at accepting states inside Soft Actor-Critic, which lets it improve on incomplete demonstrations. It is model-free, though. It has no look-ahead to handle immediate constraints, no mechanism for disturbances that regress progress, and it depends on discriminators that degrade when demonstrations are flawed. We keep its insight that automaton structure should shape value targets, but we move that structure into an online planner and drop the discriminator in favor of rewards generated by the automaton itself.
Model Predictive Adversarial Imitation Learning (MPAIL) supplies our method template. It runs a sampling-based planner, Model Predictive Path Integral control (MPPI), with a learned terminal value, imitates from observations alone, and gets disturbance rejection from replanning. Its value is conditioned only on physical state, so it cannot represent ordering or history. We add the automaton inside the rollout and the per-stage heads.
Temporal Logic Imitation (LTL-DS) motivates our recovery tests. It shows on a physical scooping task that mode-level replanning plus stable per-mode dynamical systems survives human perturbations. By design it stays within demonstrated kinematics and has no value functions, so it cannot choose a better order or stitch.
The method draws on three further sources. TD-MPC supplies the latent dynamics model that predicts rewards and values instead of pixels, and short MPPI rollouts terminated by a value. We extend its heads to predict propositions. POLO supplies the two-way loop in which the planner produces value targets and the value shortens the horizon. Deep Value MPC supplies evidence that longer horizons tolerate critic error. On the task side, GCRL-LTL shows that learned goal-to-goal values over an automaton graph can pick efficient task orders. It plans only at the level of the automaton graph and executes with a separately trained reward-driven goal-reaching policy. We plan in continuous space with the automaton embedded.
On the ceiling and interactive-imitation side, Q-Planning shows that a critic rescoring a frozen imitation policy's proposals breaks the demonstration ceiling. Its own limitation constrains our design: it cannot propose actions outside the prior's support, and it needs success labels. FORWARD shows that querying a model-predictive expert on the learner's own states removes distribution shift where plain behavior cloning explodes. DART shows that injecting noise into the supervisor during collection matches on-policy querying at lower cost. We reuse both, with our planner as the supervisor.
Research Program
The system has three learned parts trained jointly from a small set of possibly suboptimal demonstrations plus autonomous interaction in simulation.
The first part is a TD-MPC-style latent dynamics model. Its extra heads predict the propositions in $L$, so the automaton can be stepped on imagined states. We assume proposition labels are available on real simulator states for training. The grounding bottleneck is real, and we keep it out of scope by measuring how proposition-prediction error propagates into planning.
The second part is the set of per-stage value heads $V_q$. They are trained by temporal-difference learning on automaton-derived rewards. The targets come from demonstration segments, planner rollouts, and replayed disturbance states, and TiLoIL's high fixed target at accepting states handles cyclic, infinite-horizon specifications.
The third part is a demonstration-derived proposal distribution for MPPI. We use a behavior-cloned policy conditioned on $q$, following the idea of seeding the planner with a prior, as in A KL-regularization framework for learning to plan with adaptive priors. The prior is a sampling aid only. Mixing in Gaussian samples keeps actions outside its support reachable, which is the coverage gap that limits Q-Planning.
The interactive stage distills the planner into a reactive policy, because MPPI's latency is a known cost. Following FORWARD, we roll out the student policy and label each visited combined state $(s,q)$ with planner actions. Following DART, we perturb the planner's own execution during collection, and we bias the perturbations toward events that regress the automaton, such as dropping a held object or pushing the agent into a forbidden region. The same visited states feed the value heads, which closes POLO's loop.
The analysis side has two measurements. We measure value error as a function of distance to a proposition boundary, for stage-indexed heads versus a single network taking $q$ as input. We also measure how much of the planner's over-performance survives distillation.
Baselines
The naive reference is behavior cloning on the combined state $(s,q)$ from the same demonstrations, alongside filtered behavior cloning retrained on the method's own successful rollouts. The latter is the self-improvement approach that stalled well below Q-Planning in its physical experiments.
The strongest existing method for this question is TiLoIL. It is the only cited method that learns LTL tasks from few demonstrations and claims to exceed them. We will reimplement it from the paper and run it with the same demonstrations, the same environment-step budget, and an equal hyperparameter search. The file gives no numeric result for it, so there is no reported result found on Lacuna for TiLoIL success rates on our benchmarks. Beating it means higher specification-satisfaction rate and lower cost-to-satisfy at matched environment steps, with the largest gap expected under progress-regressing disturbances.
Second, we run GCRL-LTL on its own benchmarks as a check on order selection. It reports 99.6% success on partially ordered LetterWorld tasks, 98.6% under out-of-distribution task depth (against 47.7% for LTL2Action), and about 90% across 8 Ant-16rooms tasks after 3 million total steps. Those numbers are for its reward-driven setting. We will rerun it with the automaton reward and our step budget, and treat matching roughly 90% on Ant-16rooms while using demonstrations and fewer steps as parity.
Third, Q-Planning with an automaton-conditioned critic over a frozen $q$-conditioned cloned policy serves as the ceiling-breaking competitor. On LIBERO-10 it reports 93% rising to 99% success, and 83.8% rising to 91.4% on RoboTwin. We give it the same labels our automaton provides.
Two ablations isolate the key ingredient. The first is MPAIL-style planning with a single value network taking $q$ as an input feature, where the rollout never steps the automaton; this is the monolithic variant. The second keeps the per-stage heads but freezes $q$ during rollouts. A third ablation removes the interactive recovery data. All planner variants share the same model, horizon, sample count, and wall-clock planning budget.
Why not just…?
Why not just run TiLoIL, which already exceeds its demonstrations? This is the most serious threat. On undisturbed tasks with smooth dynamics, a model-free actor-critic may match us. TiLoIL has no look-ahead, and its discriminators inherit demonstration flaws. Our stitching split (below) and our progress-regression disturbances are designed to separate the two methods. If TiLoIL matches us on both, the planning component is not justified, and we will report that.
Why not just add the automaton state as an input to MPAIL's value function? Networks can in principle learn the discontinuity. We believe that in practice the jump in value at proposition boundaries is exactly where short-horizon planners get misled. The monolithic ablation tests this directly, along with the measurement of value error against distance to a boundary. If the two variants perform the same, our core claim fails.
Why not just plan over the automaton graph with goal values, as GCRL-LTL does? Graph search picks good orders. However, its low-level executor reaches single goal states and does not look ahead against invariants such as "never enter C while D holds" within a stage. It also needs reward-driven pretraining rather than demonstrations. On pure reach-sequence navigation it may tie us, and the Ant-16rooms comparison settles where it does.
Why not just rescore a cloned policy's proposals with a critic, as Q-Planning does? Rescoring can only reorder what the prior proposes. If every demonstration used a slow task order, the prior rarely proposes the fast one. The ordering-suboptimal demonstration split tests whether our mixed sampling escapes this limit.
Proposed Experiments
The main testbeds are Ant-16rooms and LetterWorld with LTL specifications covering sequencing, partial orders, reach-avoid rules, and cyclic surveillance. We will also run a stretch set of LIBERO-10 long-horizon tasks, which we rewrite as finite-trace LTL.
Demonstrations are deliberately flawed in three controlled ways. In the ordering split, every demonstration follows a costlier admissible order. In the stitching split, no single demonstration completes the task, but each stage is shown well in some demonstration. In the recovery split, no demonstration contains a regression event.
The metrics are specification-satisfaction rate and cost-to-satisfy relative to the best demonstration, which we call the ceiling ratio. We also measure recovery rate after an injected regression, planner compute per step, and the distilled policy's retention of planner performance at a fraction of its latency.
Three checks are decisive. First, on the stitching split, the full method should exceed a ceiling ratio of 1 where behavior cloning cannot. Second, the monolithic-value ablation should lose most of its advantage near stage boundaries, with the loss visible in the boundary value-error curve. Third, under progress regressions, the full method should recover more often than TiLoIL at matched steps. The claim is falsified if the monolithic ablation matches the full method, or if TiLoIL matches it on the recovery split.
References
- Plan Online, Learn Offline: Efficient Learning and Exploration via Model-Based Control
- Imitation Learning with Temporal Logic Constraints
- Model Predictive Adversarial Imitation Learning for Planning from Observation
- Temporal Logic Imitation: Learning Plan-Satisficing Motion Policies from Demonstrations
- Temporal Difference Learning for Model Predictive Control
- Deep Value Model Predictive Control
- Instructing Goal-Conditioned Reinforcement Learning Agents with Temporal Logic Objectives
- Beyond Imitation: Self-Improving Robot Policies via Off-Policy Q-Planning
- Model Predictive Control via On-Policy Imitation Learning
- DART: Noise Injection for Robust Imitation Learning
- A KL-regularization framework for learning to plan with adaptive priors