Teaching a Tree to Recover: Online Distillation of an LLM Supervisor with Counterfactual Replay
Organizations: Department of Electrical Engineering, Chalmers University of Technology, Sweden
Abstract
Autonomous mobile robots commonly pair a global planner with a local model predictive controller (MPC), but nonconvex obstacle avoidance and a limited horizon can make the robot freeze in complex layouts. Deciding whether to replan, wait, or call for help is a supervisory decision. Recent work queries a large language model (LLM) supervisor on every anomaly, which is slow and costly. We instead distill the LLM online into a decision tree. After each training episode, counterfactual replay labels recoveries as needed, unnecessary, or harmful. These labels retire unhelpful rules. In simulation, on 20 unseen layouts where the MPC alone freezes, the tree handles at least 18 correctly across all seeds, either by reaching the goal or by calling for help when no feasible path exists. The tree matches both an always-query LLM supervisor and expert-designed rules, while issuing no LLM queries at test time. Handwritten rules cannot anticipate the long tail of situations a physical robot will encounter. Online distillation is a promising remedy: the tree handles familiar cases, and the LLM is consulted only for new ones, whose validated recoveries become new rules. Language models can thus also serve as designers of supervisors rather than only as runtime supervisors.
Figures & tables
| Arrangement | Right /20 | T / W / C | Steps | Calls / ep | Age | Tree |
|---|---|---|---|---|---|---|
| No recovery | 0 | 14 / 6 / 0 | – | – | – | – |
| Scripted rules | 18 | 2 / 0 / 0 | 288 | – | 1.0 | – |
| LLM alone | 3.3 / 0 / 0.3 | – | ||||
| Frozen tree | 1.7 / 0 / 0 | 0 | 1.0 | 99% |
| Arm | Right /200 | T / W / C | Recov. | Waits | Needed | Rules (ret.) | Unseen /100 |
|---|---|---|---|---|---|---|---|
| Scripted rules | 197 | 2 / 0 / 1 | 353 | 148 | 67% | – | 95 |
| Distillation alone | 7 / 0 / 1 | 37% | (0) | ||||
| Without replay | 5.0 / 0 / 1 | – | (0) | ||||
| Method | 2.0 / 0 / 0 | 41% | (3) |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Harmful | |||||||
| Arm | Replayed | Clean | Needed | Unnec. | ending | steps | Unclear |
| Scripted rules | 351 | 94% | 67% | 26% | 0% | 6% | 1% |
| Distillation alone | 98% | % | % | % | % | 1% | |
| Method | 99% | % | % | % | % | 0% | |
Robot Failure Recovery
Robot failure recovery studies how robots detect, diagnose, and respond to errors, damage, and unexpected physical interactions.
See all 74 papers