cs.ROSep 6, 2026

ContextFlow: In-Context Flow Matching for Robot Manipulation

Authors: Jian Ding, Xianjie Dai, Roei Herzig, Nussair Hroub, Jinjie Mai, Dengxin Dai, Bernard Ghanem, Mohamed Elhoseiny

Organizations: KAUST, Thuwal, Saudi Arabia · University of California, Berkeley, USA · Zurich, Switzerland

Abstract

Although highly effective in vision and language domains, applying in-context learning to robotics remains challenging. Existing autoregressive in-context imitation methods discretize continuous actions and exacerbate the accumulation of early prediction errors through next-token prediction, limiting their generalization on unseen task configurations. Meanwhile, flow-matching policies have been explored for continuous robot control and can help mitigate compounding errors; however, in-context imitation learning within a flow-matching framework remains underexplored. To address these limitations, we introduce ContextFlow, a conditional flow-matching model that learns continuous action distributions for in-context imitation learning. ContextFlow conditions flow-based action prediction on demonstrations and observations, enabling robust generation from noisy action distributions. To better encode multimodal in-context demonstrations, we adapt perceiver-style multimodal context compressors that distill visual, proprioceptive, and action sequences into compact, task-relevant latent representations. On LIBERO, ContextFlow outperforms ICRT by 35 percentage points in average success rate on unseen task configurations, while matching the performance of the task-specific fine-tuned VLA model π0π_0 without any fine-tuning on unseen tasks. On real robots, it generalizes to unseen configurations of both single-arm and bimanual tasks, achieving 40% success on a new pen-uncapping configuration. Project Page: https://dingjiansw101.github.io/contextflow-page/.

Figures & tables

Appendix figures & tables12 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. ICLR: In-Context Imitation Learning with Visual Reasoning

    Mar 8, 2026Toan Nguyen, Weiduo Yuan, Songlin Wei +3Robot Imitation LearningICL for Robotics

  2. CoLA-Flow Policy: Temporally Coherent Imitation Learning via Continuous Latent Action Flow Matching for Robotic Manipulation

    Jan 30, 2026Wu Songwei, Jiang Zhiduo, Sun Wandong +4Flow MatchingLatent Action Learning

  3. Flowing With Purpose: Latent Action Guided Flow Matching Policies For Robotic Manipulation

    Jun 22, 2026Bruno Machado, Alexandre Chapin, Emmanuel Dellandrea +1Flow MatchingRobotic Manipulation