Robust Imitation Learning from Corrupted Demonstrations

Liu Liu, Ziyang Tang, Lanqing Li, Dijun Luo

TL;DR

Standard Behavior Cloning completely breaks down when training datasets contain even a small fraction of corrupted or adversarial actions. This paper introduces Robust Behavior Cloning (RBC), which replaces vanilla negative log-likelihood minimization with a min-max Median-of-Means (MOM) tournament objective. RBC tolerates up to a constant fraction of arbitrary outliers, achieving near-expert performance and theoretical statistical rates matching vanilla BC on clean data without requiring environment interaction.

What Problem Does This Paper Address?

Offline Imitation Learning (IL)—most commonly implemented as Behavior Cloning (BC)—learns a policy directly from recorded state-action pairs without interacting with the environment or accessing an explicit reward function. Standard BC hinges on a crucial assumption: demonstrations are collected by an optimal or near-optimal expert.

In practice, human demonstrators make mistakes, recording equipment fails, and adversaries can inject malicious telemetry. When offline data contains gross corruptions or arbitrary outliers, standard maximum likelihood estimation (MLE) fails catastrophically because an outlier action can dominate the average negative log-likelihood (NLL). Prior robust RL/IL frameworks either assume benign noise models, require ongoing online environment interaction, or suffer from error bounds that scale poorly with dimension.

Methods

The authors propose Robust Behavior Cloning (RBC), bringing robust statistical estimation into offline imitation learning:

  • Adversarial Corruption Model: The dataset $\mathcal{D}$ contains $N$ state-action transitions, where an adversary can choose an arbitrary $\epsilon$-fraction ($\epsilon < 0.5$) of the samples and alter them to arbitrary values.
  • Median-of-Means Tournament Objective: Instead of minimizing the average NLL across all samples, RBC partitions the data into $M$ random batches of size $b \le \frac{1}{3\epsilon}$. It formulates policy learning as a min-max tournament: $$\hat{\pi}^{\text{RBC}} = \arg\min_{\pi \in \Pi} \max_{\pi' \in \Pi} \text{median}_{1 \le j \le M} \big(\ell_j(\pi) - \ell_j(\pi')\big)$$ where $\ell_j(\pi)$ is the batch average NLL. Because at least 66% of the batches will contain only authentic expert transitions, taking the median across batch differences neutralizes the influence of corrupted batches.

  • Practical Optimization Heuristic (Algorithm 1): At each training epoch, $\mathcal{D}$ is randomly partitioned into $M$ batches. The algorithm evaluates $\ell_j(\pi) - \ell_j(\pi')$, identifies the median batch $B_{\text{Med}}$, and updates parameters via backpropagation on that single batch—performing gradient descent on $\pi$ and gradient ascent on $\pi'$.

  • Martingale Analysis: Because sequential MDP transitions violate the i.i.d. assumption standard in robust statistics, the theoretical analysis leverages martingale decoupling techniques to prove convergence in total variation (TV) distance and expected return.

Datasets

The authors evaluate their method across standard continuous-control environments:

  • PyBullet Simulator Benchmarks: HopperBulletEnv-v0, Walker2DBulletEnv-v0, HalfCheetahBulletEnv-v0, and AntBulletEnv-v0.
  • OpenAI Gym Environment: LunarLander.

Expert trajectories were generated using pre-trained Soft Actor-Critic (SAC) models from Stable-Baselines3. Demonstrations were corrupted by picking an $\epsilon$-fraction of samples at random and replacing their actions with boundary values (e.g., $-1$ or $+1$), simulating hard-to-detect, high-impact corruptions.

Key Insights and Ideas

  • Linearity is the Vulnerability: Vanilla BC computes the arithmetic mean over sample losses. The mean operator has zero breakdown point—a single arbitrarily bad outlier can blow up the objective. Replacing the outer mean with a median over batch losses restores robustness.
  • Robust Without Environment Interactions: Unlike prior robust imitation methods that require querying an expert (like DAgger) or interactive exploration in the simulator, RBC operates entirely offline.
  • Cost-Free Robustness in Theory: The theoretical analysis proves that the learned policy achieves a cumulative sub-optimality bound of: $$J_{\pi_E} - J_{\hat{\pi}^{\text{RBC}}} \le \mathcal{O}\left(\frac{1}{(1-\gamma)^2} \sqrt{\frac{\log(|\Pi|/\delta)}{N} + \tau}\right)$$ where $\tau = \mathcal{O}(\epsilon) + \text{optimization gap}$. The statistical error scaling matches vanilla BC on clean data, meaning robustness introduces no asymptotic statistical penalty.

Key Results

  • Resilience to Up to 30% Corruptions: In the Lunar Lander task ($N = 4000$), vanilla BC reward collapsed drastically from $\sim 260$ down below $-100$ as the corruption rate $\epsilon$ increased to 30%. RBC's cumulative reward remained nearly unchanged near the expert benchmark ($\sim 250\text{--}270$).
  • Consistency Across Complex Morphologies: On high-dimensional PyBullet environments (Ant, Hopper, Walker2D, HalfCheetah; $N = 60{,}000$) under 10% and 20% corruptions, RBC consistently tracked the expert baseline reward across epochs, while vanilla BC failed to converge or hovered near low returns (e.g., negative rewards in HalfCheetah and under 1000 in Hopper and Ant).

Limitations and Future Work

  • Non-Convex Optimization Gap: The tournament objective is inherently non-convex. While the gradient descent-ascent heuristic converges well empirically, there are no theoretical convergence guarantees to the global minimax saddle point.
  • Computational Overhead: Evaluating loss differences across all batches to identify the median batch requires extra forward passes compared to standard mini-batch SGD.
  • Discrete Policy Assumption: The theoretical bound assumes a finite/discrete policy class $\Pi$ for uniform concentration bounds. Extending this to general continuous neural network function approximations remains open.
  • Future Directions: Incorporating the MOM objective into online interactive imitation learning (e.g., DAgger) and evaluating on real-world noisy sensor datasets in medical diagnosis or autonomous driving.

Summary updated

BibTeX
@inproceedings{liu2022robust,
  author = {Liu Liu and Ziyang Tang and Lanqing Li and Dijun Luo},
  title = {{Robust Imitation Learning from Corrupted Demonstrations}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=UECzHrGio7i},
}
Figure