Counterfactual Behavior Cloning: Offline Imitation Learning from Imperfect Human Demonstrations
Shahabedin Sagheb, Dylan P. Losey
TL;DR
Counterfactual Behavior Cloning (Counter-BC) tackles offline imitation learning from imperfect human demonstrations by expanding each demonstrated action into a counterfactual set within a radius $\Delta$ and using a classifier grounded in the restricted counterfactual policy $\hat{\pi}_\theta$. The method derives a loss that minimizes entropy over counterfactual actions while keeping the full policy near the counterfactual explanations, enabling recovery of the human’s underlying intended policy $\pi^*$. The authors provide theoretical justification, show that Counter-BC generalizes prior BC-based approaches, and validate the approach across simulations with synthetic and real human data, plus a real-world air hockey user study. Results indicate Counter-BC yields more proficient, robust policies when learning from crowds or varying teacher skill, with a tunable trade-off controlled by $\Delta$ that balances fidelity to demonstrations against simplicity of explanation.
Abstract
Learning from humans is challenging because people are imperfect teachers. When everyday humans show the robot a new task they want it to perform, humans inevitably make errors (e.g., inputting noisy actions) and provide suboptimal examples (e.g., overshooting the goal). Existing methods learn by mimicking the exact behaviors the human teacher provides -- but this approach is fundamentally limited because the demonstrations themselves are imperfect. In this work we advance offline imitation learning by enabling robots to extrapolate what the human teacher meant, instead of only considering what the human actually showed. We achieve this by hypothesizing that all of the human's demonstrations are trying to convey a single, consistent policy, while the noise and sub-optimality within their behaviors obfuscates the data and introduces unintentional complexity. To recover the underlying policy and learn what the human teacher meant, we introduce Counter-BC, a generalized version of behavior cloning. Counter-BC expands the given dataset to include actions close to behaviors the human demonstrated (i.e., counterfactual actions that the human teacher could have intended, but did not actually show). During training Counter-BC autonomously modifies the human's demonstrations within this expanded region to reach a simple and consistent policy that explains the underlying trends in the human's dataset. Theoretically, we prove that Counter-BC can extract the desired policy from imperfect data, multiple users, and teachers of varying skill levels. Empirically, we compare Counter-BC to state-of-the-art alternatives in simulated and real-world settings with noisy demonstrations, standardized datasets, and real human teachers. See videos of our work here: https://youtu.be/XaeOZWhTt68
