cs.ROSep 18, 2026

CARF: Contrastive Attraction-Repulsion of Failure-Guided Flow Matching

Authors: Shuqi Zhao, Bang Du, Cheng-En Wu, Yichen Xie, Yixiao Wang, Masayoshi Tomizuka

Abstract

Robot demonstration collection often produces imperfect or failed trajectories in addition to successful demonstrations. Existing methods typically exploit failed trajectories by identifying segments that still make progress toward task completion, but largely overlook failure-critical behaviors that directly lead to task failure. Here we argue that these two types of segments provide fundamentally asymmetric supervision: progressive segments should be imitated, whereas failure-critical segments should be explicitly avoided. Based on this observation, we propose CARF, a Contrastive Attraction-Repulsion of Failure-guided framework for learning from imperfect robot data. CARF introduces a progress-based importance scorer, trained solely on successful expert demonstrations and its perturbation results, to estimate step-wise contributions toward task completion and identify informative regions in failed trajectories. These scores guide a unified flow-matching objective that attracts the policy toward progressive behaviors and repels it from failure-critical ones, while excluding ambiguous segments. This enables more comprehensive utilization of imperfect data and avoids unreliable supervision from ambiguous failure segments. Extensive experiments in simulation and the real world demonstrate consistent improvements over competing baselines across diverse failure scenarios, with ablations further validating the effectiveness of the proposed scoring and attraction-repulsion mechanisms. Our website is https://zhao-sq.github.io/carf/#.

Figures & tables

Explore similar work

CardsList
  1. How to Utilize Failure Demo Data?: Effective Data Selection for Imitation Learning Using Distribution Differences in Attention Mechanism

    May 8, 2026Kana Miyamoto, Kanata Suzuki, Tetsuya OgataLearning from DemonstrationRobot Imitation Learning

  2. FAR: Failure-Aware Retry for Test-Time Recovery and Continual Policy Improvement

    Jul 1, 2026Haoran Hao, Shahram Najam Syed, Jeffrey Ichnowski +1Robot Policy LearningRobot Policy Adaptation

  3. Arrive and Survive: Scaling Safe Goal-Conditioned Policy Learning from One-Bit Failure Signals

    Aug 27, 2026Guopeng Li, Yiyang Duan, Yiru Jiao +1Goal-Conditioned RLSafe RL