acceptodds
Published as a conference paper at NeurIPS 2026

Learning When to Stop: Selective Imitation Learning Under Arbitrary Dynamics Shift

Surbhi Goel, Jonathan Pei, James Wang

Abstract

Behavior cloning provides strong imitation learning guarantees when training and test environments share the same dynamics. However, in many deployment settings the test environment's transitions differ from training, and classical offline IL offers no recourse: the learner must commit to an action at every state, even when its demonstrations are uninformative and could lead to arbitrary degradation of performance. This motivates the study of _selective_ imitation, where the learner may choose to _stop_ when it cannot act reliably. We introduce a model for selective imitation under arbitrary dynamics shift: given labeled expert demonstrations from a training environment and unlabeled state trajectories from the same expert in a test environment, the learner outputs a _selective policy_ that is _complete_ (rarely stops in training) and _sound_ (incurs low regret before stopping in test). Our algorithm, , constructs a stopping rule using a small set of _validator policies_ whose size is independent of the horizon or policy class. For deterministic policies, this yields horizon-free sample complexity, assuming sparse costs. For stochastic policies, we obtain analogous horizon-free guarantees using a cumulative Hellinger stopping time. We extend the framework to misspecified experts and different expert policies across train and test and obtain results that gracefully degrade with the amount of misspecification.

Keywords:
Sydney, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 17%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.00 over 3 reviews, above 17% of the others.
Reviewer_Eje3OpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

The paper proposes a new solution to a key problem in imitation learning that is how should the learner behave in shifted environments. Utilizing a set of validators, the method constructs a stoping rule that abstains before the learner's behavior diverges from a plausible expert demonstration. They provide a theoretical guarantees for deterministic policies and stochastic policy, and extend to misspecified policy classes. A small LunerLander example is used as a proof of concept to illustrate the idea.

Strengths and weaknesses

This is a well-formulated problem with an attractive theoretical solution. The horizon-free sample complexity guarantee in the deterministic section is the main technical contribution. The result is interesting and appears to be correct. The extensions to the stochastic and misspecified cases offer a more comprehensive view of the approach.

Empirical validation is the paper's main weakness. A single environment (LunarLander) with 20 trials, m=n=30, is reasonable for a proof of concept, but it provides limited evidence that the approach would work beyond a toy setting with hand-tuned heuristics. Additional examples showing how sensitive the results are to different parameter choices would be helpful.

Questions

Could the authors run SeqRejection on at least 2 additional environments with qualitatively different shifts (e.g., different physical parameter changes, or discrete/tabuiar domains where the exact algorithm from Sec. 3 -- not the heuristic -- can be run directly)? This would help answer where the completeness/soundness tradeoff in Fig. 1 is a general phenomenon or specific to LunnarLander's dynamics and cost structure.

Limitations

Yes

Paper formatting concerns

No concern

Final justification

My concerns have been addressed, and I will keep my score unchanged.

Reviewer_pp4tOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
4
Quality
3
Significance
3
Read review
Summary

This paper studies imitation learning under dynamics shift, where the learner has access to labeled expert demonstrations from a training environment, but only unlabeled expert state trajectories from a potentially different test environment. Authros highlight arbitrary dynamical shifts as a key issue when deploying an expert policy, which works well on a training environment, on a test environment. In particular, a standard behavior cloning policy or imitation learning policy may be deployed or implemented on states where expert’s doesn't have a reliable control input or action, leading to scenarios with arbitrary poor perfmances.

Addressing this issue, authors proposes a selective imitation learning framework in which the learner stops execution or implementation of a base policy when it is no longer confident that imitation is justified. The goal is to learn a selective policy that is complete, meaning that it does not stop unnecessarily in the training environment, and sound, meaning that when acting in the test environment before stopping, incur low regret.

In their selective imition learning framework, authors propose SeqRejectron which introduces a class of policies that are consistent with expert's learning in the training environment, not necessarily optimal however. Then, when deploying in the test environment, learner follows a base policy, and as soon as any of the policy from the validator policy class disagree with action from the base policy, learner stops implemnting the base policy. The intuition is that these validators represent alternative policies that are still consistent with the training demonstrations. If such a policy disagrees with the base policy on a test trajectory, then it is not justifies to consider the base policy’s action at that point.

Authors first develop the above methodology for deterministic policies and show that a sparse set of validator policies is enough to certify trajectory prefixes. This leads to finite-sample guarantees which does not scale with the horizon explicitily, and is dependent on the horizon implicitily through the objective scale and the complexity of the policy class. The paper then extends the framework to stochastic policies using a hellinger-distance stopping rule. Finally, they even consider the case with misspecified policy classes where the expert may not lie in the learner’s policy class.

In summary, I find the main contribution of the paper to be the formulation of selective imitation learning under arbitrary shifts with algorithms that considers all the relevant classes of policies. The idea is well motivated, that instead of following imitation everywhere, which is generally impossible under arbitrary shift, authors propose a method for decidingmechanism for when the learner should stop before making unsupported decisions. While the theory seems well developed and mathematically sound, I have converns over how practical it is when deploying in real world.

Strengths and weaknesses

Strengths

  1. This paper studies an important limitation of standard imitation learning: behavior cloning can fail under dynamics shift because the learner may encounter test-time states where the source demonstrations provide no useful information. I find the selective imitation learning formulation to be a relevant and justified framework, with well defined notions of comepleteness and soundness. I like the idea of using validator policies from the version space to detect when the base policy is no longer justified. In particular, the stopping rule based on validator disagreement gives a clear interpretation of when the learner should abstain.

  2. For deterministic policies, the analysis consider certifying trajectory prefixes, insetad of consider per time-step comparison. This leads to a horizon-free sample complexity bound, with implicit horizon dependence through the objective scale and policy class complexity. This trajectory-level analysis is a meaningful contribution, when compared to a straightforward application of selective classification at each time step, as it leads to a in general horizon free results.

  3. Authos have done a good job considering a wide variety of scenarios as they extended their framework to stochastic policies using hellinger distance, and to misspecified policy classes where the expert may not lie in the learner’s policy class. These extensions make the framework more robust and show that the main idea is not limited to an overly idealized setting.

  4. Although the empirical section is not the main contribution, the LunarLander experiment helps illustrate the intended behavior of the method. The observed tradeoff between source handoff rate, target handoff rate, and threshold choice is consistent with the theory and helps make the framework more concrete.

Weaknesses

  1. While the the contibutions are theoretical in nature, I have concerns on how these results translate to real-world policies and scenarios. E.g., in the deterministic case, the validator construction relies on oracle-style procedures, and in the stochastic case, aurhors leave open the development of efficient computational oracles for the hellinger objective. I am not sure how well the proposed method can be extended to large neural net policy classes.

  2. The LunarLander experiment uses a posterior-sampling and greedy validator-selection heuristic rather than the exact game-theoretic construction used in the theory. While this is understandable for tractability, it weakens the empirical validation of the proposed algorithm. The experiment supports the intuition behind the method, but it does not fully test the theoretical procedure.

  3. Authors include only a proof-of-concept experiment in LunarLander. Given the motivation from robotics, autonomous driving, and healthcare, it would be useful to see additional environments and stronger baselines with well-motivated out of distribution case.

  4. The proposed framework use the stopping mechansim to stop and then to hand it off. However, in many real control settings stopping is itself a nontrivial action. For example, a robot or autonomous vehicle may need a certified safe fallback controller after stopping, which is not convincingly discussed in my understanding.

  5. The stochastic extension is technically interesting, but the resulting rates are less clean than in the deterministic case. The paper provides a lower bound matching part of the upper bound, but there remains a gap in the variance-dependent rate, prompting the question whether there's more analysis needed or is it very hard to provide further theory.

  6. The method can decide when the learner should stop, but it does not solve the shifted task after stopping. While understabale, this draft should be careful not to oversell the method as a complete solution to imitation learning under dynamics shift. Its main strength is in certifying when imitation is still justified, not in adapting the policy to the new environment.

Questions
  1. The paper’s main guarantee controls the stopping rate in the training environment and the stopped regret in the test environment. Could you clarify how one should interpret the test-time usefulness of the learned policy when the test-side stopping rate may be very high under arbitrary dynamics shift? In particular, are there natural conditions under which the proposed method can guarantee not only low regret before stopping, but also nontrivial coverage in the test environment?

  2. The deterministic result is quite clean and avoids the horizon dependence of a stepwise selective-classification reduction. However, this relies on constructing validator sets from the version space. Could you comment more concretely on how practical this construction is for large policy classes, especially neural net class of policies? Is the intended implementation closer to the oracle construction, or closer to the heuristic used in the experiments?

  3. In the stochastic setting, a hellinger-distance stopping rule is utilized. Could you provide more intuition for how the threshold θ\theta should be selected in practice? Is there a principled validation procedure for choosing θ\theta, or is it expected to be tuned empirically based on the desired handoff or stopping rate?

  4. The poc uses posterior sampling and greedy validator selection rather than the exact game-theoretic validator construction. Could you clarify which parts of the theoretical guarantee, if any, should be expected to carry over to this practical heuristic? If no formal guarantee is intended, it would be helpful to state this more explicitly.

  5. The method is motivated by safety-critical examples such as autonomous driving and healthcare, but the formal notion of stopping is somewhat abstract. In a real control setting, stopping or handing off may itself require a certified fallback mechanism. Could you discuss how this framework would interact with a safe backup controller or intervention policy?

  6. The propose method compares the proposed trajectory-level construction to a stepwise PQ-learning reduction and shows that the stepwise approach incurs an avoidable horizon factor. Could you clarify whether this separation is purely an artifact of the analysis, or whether there is an example where the stepwise reduction is genuinely statistically worse than the proposed trajectory-level method?

  7. In the misspecified setting, the guarantee degrades with the best-in-class misspecification parameter delta. Could you provide more intuition about when this delta is expected to be small? For example, are there natural examples where the expert is outside the policy class but this delta remains small enough for the bound to be meaningful?

  8. The stochastic-policy rates appear weaker than the deterministic rates, and the paper notes that the variance-dependent exponent may not be tight. Could you elaborate on whether this gap is believed to be due to the algorithm, the analysis, or an inherent difficulty of selective imitation with stochastic policies?

  9. Could you comment on how sensitive the method is to the quality of the test trajectories, e.g. when subjected to noisy observations? Another example, what happens if the unlabeled target trajectories are generated by a policy that is only approximately expert, or by a mixture of different demonstrators?

  10. Given that the paper's poc is limited to LunarLander, do you expect the method to scale to more complex continuous-control environments, and what the main computational bottleneck would be in such settings?

Limitations

yes

Paper formatting concerns

NA

Final justification

Authors have addressed my concerns well. However, a few of the limitations still remain in my view, therefore I maintain my score.

Reviewer_prCxOpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

The paper tackles offline imitation learning when the test environment's dynamics can differ arbitrarily from training. The learner has labeled (state, action) demonstrations from a training MDP MM but only unlabeled, state-only expert trajectories from a test MDP NN whose transitions may be completely different. Since acting everywhere is hopeless under arbitrary shift, the learner is allowed to abstain partway through a trajectory. The central object is a selective policy (π,τ)(\pi,\tau), a policy plus a stopping time on the observed history, and the paper asks for two things. The first is completeness, meaning it rarely stops in MM. The second is soundness, meaning low stopped regret in NN, measured against the expert run up to the same τ\tau.

The algorithm, SeqRejectron, keeps a base policy π0\pi_0 running and checks it against a set of "validator" policies, which are alternative explanations of the expert that stay consistent with the training labels. It abstains the moment any validator disagrees with π0\pi_0. The key technical claim is that a small validator set (size ∼1/ρ\sim 1/\rho, independent of horizon, state/action space, and ∣Π∣|\Pi|) is always enough, which gives horizon-free O~(log⁡∣Π∣/ϵ2)\tilde O(\log|\Pi|/\epsilon^2) sample complexity in the deterministic case, with the horizon entering only through the cost bound Cmax⁡C_{\max}. The paper then extends this to stochastic policies, swapping the binary disagreement test for a cumulative-Hellinger budget and giving upper and lower bounds on the rates, and to misspecified policy classes via a regularized game. A small LunarLander experiment serves as a proof of concept.

Strengths and weaknesses

Strengths

  • Novel, well-motivated framing. Treating abstention as a principled, distribution-free response to arbitrary dynamics shift is genuinely new for the sequential setting, and it addresses a real gap, since plain offline imitation learning is vacuous once dynamics move.
  • An appealing core result. A validator set whose size is independent of horizon, state/action space, and policy-class size is a surprising and elegant idea, and the horizon-free flavor connects well to the recent behavior-cloning theory line.
  • Impressive scope. Deterministic, stochastic, and misspecified settings, plus a lower bound, make for a broad and coherent package in one paper.

Weaknesses

  • The guarantees can be met by a useless policy. Always-stop has zero stopped regret by construction (the paper concedes this), so the only guard against a degenerate solution is completeness, which is measured on the training environment. A policy that acts on training-like histories but abstains across the test environment satisfies both criteria while doing nothing useful where it's deployed. Under large shift this is exactly what the method does, and the paper would score it as a success.
  • Right metric, wrong environment. The objective scores stopping rate in MM and pre-stop regret in NN, and in each case it penalizes the easy quantity and ignores the hard one. The practically relevant quantity, coverage in NN, meaning how often you can safely act, sits entirely outside the guarantee, except under an appendix assumption that quietly reintroduces the bounded shift the paper claims to avoid.
  • The stochastic case is essentially unimplementable as analyzed. The deterministic case has a real oracle-efficient reduction, but the stochastic validator search has no known computational oracle. The experiment quietly substitutes the very ensemble/posterior heuristics the paper argues against, with no guarantee they inherit the needed property.
  • Dense presentation. It's well-organized but notation-heavy, and the key conceptual point, what the guarantees actually buy and where they stop, is underplayed relative to the algorithm and rates. As one concrete fix, Definition 3 is far more intuitive than its statement, and a "small committee of plausible experts, certified almost as vigilant as the whole pool" gloss would help readers a lot.
Questions
  1. A policy that is near-optimal on MM and stops immediately on NN-like histories appears to satisfy both completeness and soundness while being useless on NN. Can SeqRejectron output such a thing when NN is sufficiently novel, and is there any control on the test-side stopping rate (or a lower bound on useful action in NN) that does not go through the bounded-TV appendix assumption?
  2. Soundness only counts cost incurred before stopping, so stopping early makes it trivially easy, and a policy that stops immediately has zero regret. Why does the objective not also require the policy to act a reasonable fraction of the time in NN, and why is the cost of stopping (halting the system mid-task) never counted? Relatedly, since the absence of test-environment action labels is exactly what leaves coverage uncontrolled, would a small number of such labels suffice to guarantee a non-trivial stopping rate in NN and rule out the abstain-everywhere solution?
  3. On the stochastic implementation: does the cumulative-Hellinger validator search admit any computational oracle, or is the obstruction fundamental? And can the posterior-sampling/greedy-Hellinger surrogate used in the experiments be shown to inherit (even approximate) ρ\rho-validity? A positive answer to either would substantially close the gap between the analyzed algorithm and anything deployable.
  4. Under genuinely unstructured shift, doesn't a policy class rich enough for non-trivial coverage in NN require log⁡∣Π∣=Ω(H)\log|\Pi|=\Omega(H), so that in the sparse-cost regime (where horizon-freeness is the selling point) HH is relocated into log⁡∣Π∣\log|\Pi| rather than eliminated? Could you characterize the class complexity needed for non-trivial coverage as a function of HH, and clarify whether "horizon-free" should be read as "no excess HH beyond Cmax⁡C_{\max} and the cost of a useful class"?
Limitations

The authors are very upfront about the computational gaps (no oracle-efficient stochastic implementation, the H2H^2 penalty in the naive stepwise reduction) and the ϵ−5\epsilon^{-5} vs ϵ−3\epsilon^{-3} rate gap. But the limitations I care about most aren't surfaced in the main text. The first is that the completeness/soundness pair can be met by a policy that abstains across the entire test environment, with completeness, the only guard, checked in the wrong environment (MM, not the deployment environment NN) and test-side coverage reined in only by an appendix assumption that reintroduces the shift the paper claims to avoid. The second is that "horizon-free" really means "no excess HH beyond Cmax⁡C_{\max} and the statistical cost of the class," which a useful class under unstructured shift may not enjoy. The third is that in the stochastic case the deployable surrogate carries none of the guarantees while the guaranteed object cannot be computed. I'd encourage the authors to state these plainly and to spell out the regime in which the guarantees are actually meaningful.

Paper formatting concerns

None

Comments on the paper

1 comment
Meta-review

This paper studies reliable imitation learning under environment shifts, which generalizes earlier problem of "reliable classification under distribution shifts" to the sequential decision making setting. The paper proposes an algorithm, SeqRejectron, that satisfies completeness (when the test environment is the same as training it has low probability of stopping) and soundness (its stopped regret in any test environment is small). The paper provides a sample complexity bound that only depends on the total return in the deterministic realizable expert setting; it then extends this to stochastic policies, and to misspecified policy classes setting. Experiments in LunarLander environment validates the theory.

Strengths:

  • New problem formulation that extends reliable learning to learning in sequential decision making settings
  • the results are quite comprehensive: well-specified stochastic policies and misspecified settings are both considered
  • Experiments are helpful

Weaknesses (and weaknesses the meta-review would like to see addressed):

  • The paper establishes the completeness guarantee mostly in the original environment, with extension to the bounded shift only appearing in the appendix. Can we establish completeness guarantee in broader settings?
  • the algorithm in the stochastic setting may be hard to implement in practice -- how to make it practical?
  • Experiments can be done in more environments beyond LunarLander (Eje3, pp4t)

In the rebuttal stage the authors satisfactorily addressed the questions and weaknesses concerns; specifically with additional completeness guarantees in broader environments; the rebuttal isolated the computational challenge in the stochastic policy setting and tried to justify posterior sampling; the additional experiments in gridworld, 2d-driving, and bipedal walker showed the generalizability of the results. The AC therefore recommends acceptance for the paper, but encourages the authors to make the discussions of the limitations pointed out by Reviewer pp4t explicit in the final version.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.