Confidence-Aware Imitation Learning from Demonstrations with Varying Optimality

Songyuan Zhang, Zhangjie Cao, Dorsa Sadigh, Yanan Sui

Abstract

Standard Imitation Learning (IL) frameworks rely on the assumption that demonstrations are provided by an expert and are near-optimal. In practice, datasets often consist of a mixture of optimal, suboptimal, and even failed trajectories. We introduce Confidence-Aware Imitation Learning (CAIL), a novel framework designed to handle demonstrations with varying optimality. CAIL employs a bi-level optimization strategy to jointly learn a confidence score for each demonstration alongside the policy. By utilizing a minimal amount of ranked evaluation data, CAIL effectively filters out low-quality demonstrations. Our experiments across simulation and real-world robotic tasks demonstrate that CAIL significantly outperforms state-of-the-art IL methods, maintaining robustness even when optimal data is scarce.

Introduction

Imitation Learning has shown great promise in teaching complex behaviors to agents. However, the "expert" assumption is a significant bottleneck for real-world deployment. Data sourced from diverse human operators or web scraping is inherently noisy. Standard IL methods like Generative Adversarial Imitation Learning (GAIL) or Adversarial Inverse Reinforcement Learning (AIRL) often fail in these scenarios as they attempt to mimic all provided data equally, leading to suboptimal performance.

Existing solutions often require labor-intensive manual labeling of demonstration quality or assume a high-quality majority in the dataset. CAIL addresses these limitations by automatically inferring the quality of demonstrations through a learned confidence mechanism.

Methodology: Bi-Level Optimization

CAIL treats imitation learning as a bi-level optimization problem, where the goal is to find a policy that maximizes performance while simultaneously identifying which demonstrations are most trustworthy.

The CAIL framework utilizes a bi-level optimization process to update confidence scores ($\beta$) and the imitation learning model ($F_\theta$) iteratively.

The Inner Loop: Policy Learning

The inner loop focuses on policy optimization using a modified AIRL backbone. Unlike standard AIRL, CAIL reweights each state-action pair $(s, a)$ in the demonstration set by a learned confidence score $\beta$. This ensures that the agent prioritizes mimicking high-confidence transitions.

The Outer Loop: Confidence Learning

The outer loop updates the confidence scores $\beta$ by evaluating the policy's performance against a small set of ranked trajectories (e.g., "Trajectory A is superior to Trajectory B"). An "outer loss" is calculated based on these rankings, and gradients are backpropagated to adjust $\beta$. To maintain efficiency, CAIL uses a pseudo-update step, performing a single gradient step for the policy before updating confidence, rather than training to full convergence in every iteration.

Experimental Evaluation

We evaluated CAIL in four environments: MuJoCo Reacher, MuJoCo Ant, Franka Panda (Simulation), and a UR5e physical robot. The training datasets were intentionally corrupted, consisting of only 20% optimal demonstrations and 80% suboptimal or random trajectories. Only 5% of the data was provided with rankings for the outer loop.

Results and Discussion

CAIL consistently outperformed all baselines, including GAIL, AIRL, and ranking-based methods like T-REX and D-REX.

Experimental results across Reacher, Ant, Simulation, and Real Robot environments. CAIL (red) consistently achieves the highest expected returns and success rates.

Key Findings

  • Robustness to Suboptimality: CAIL successfully learned optimal policies even in the absence of perfect demonstrations by inferring the direction of optimality from ranked suboptimal data.
  • Fine-Grained Filtering: By defining confidence at the state-action level, CAIL can extract useful segments from otherwise poor demonstrations.
  • Real-World Performance: On the UR5e physical robot, CAIL achieved a 100% success rate, significantly higher than 2IWIL (83%) and AIRL (33%).
  • Theoretical Soundness: The authors proved that the learned confidence scores converge to optimal values at a rate of $O(1/\sqrt{T})$.

Conclusion

Confidence-Aware Imitation Learning provides a robust framework for learning from imperfect, real-world data. By integrating confidence estimation directly into the optimization loop, CAIL removes the need for extensive manual labeling. Future work includes relaxing the assumption of shared dynamics between the demonstrator and the agent, potentially allowing robots to learn directly from human video demonstrations.

Summary updated

BibTeX
@inproceedings{zhang2021confidence,
  author = {Songyuan Zhang and Zhangjie Cao and Dorsa Sadigh and Yanan Sui},
  title = {{Confidence-Aware Imitation Learning from Demonstrations with Varying Optimality}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=RcfJUrZzhoL},
}
Figure