Manuscript Offprint

arXiv:2610.18848

Contact Trajectory Prompting: In-Context Transfer of Contact-Rich Behaviors from a Single Demonstration

Xian Nie, Yujie Zang, Yuhang Zheng, Yupeng Zheng, Songen Gu, Wendi Chen, Chuan Wen, Cewu Lu, Wenchao Ding, Junchi Yan, Shuicheng Yan

Xian Nie1,2∗^{1,2*}, Yujie Zang1,2,3∗^{1,2,3*}, Yuhang Zheng3∗^{3*}, Yupeng Zheng4^{4}, Songen Gu5^{5}, Wendi Chen1^{1}, Chuan Wen1^{1}, Cewu Lu1^{1}, Wenchao Ding2^{2}, Junchi Yan1†^{1\dagger}, Shuicheng Yan3†^{3\dagger}

1^{1}Shanghai Jiao Tong University 2^{2}TARS Robotics 3^{3}National University of Singapore

4^{4}Institute of Automation, Chinese Academy of Sciences 5^{5}Fudan University

∗^{*}Equal contribution †^{\dagger}Corresponding authors

Figure

Prompting

Single Demonstration

Trajectory

Force

One-Shot Physical Interaction Transfer

Fig. 1. Contact Trajectory Prompting (CTP). CTP encodes motion and contact measurements from a single demonstration into an ordered prompt that captures their temporal evolution. The prompt specifies the desired interaction behavior, including contact intensity and its temporal evolution, while online observations guide a frozen policy in closed-loop execution on unseen object instances. This allows the demonstration to convey how the robot should physically interact with an object, alongside the demonstrated motion.

Abstract—In-context robot learning enables robots to acquire new behaviors from demonstrations without test-time parameter updates. However, visual and kinematic specifications alone may not distinguish contact-rich behaviors that share similar motions but require different interaction intensities or patterns. We propose Contact Trajectory Prompting (CTP), a framework for one-shot transfer of contact-rich manipulation behaviors. CTP encodes motion and contact information from a single demonstration into an ordered contact trajectory prompt that captures their temporal evolution and specifies the desired physical interaction behavior. During execution, the policy uses online sensory feedback to retrieve interaction-relevant information from the prompt, conditioning closed-loop action generation on the demonstrated contact behavior. Across real-world wiping, rotation, and insertion tasks on objects excluded from training, CTP achieves 78.7% overall success, outperforming the strongest evaluated baseline by 13.0 percentage points. Changing only the reference demonstration enables CTP to follow contact specifications for both intensity and direction, including an intermediate wiping force level and clockwise or counterclockwise cap rotation. These results demonstrate that contact trajectories serve as effective behavioral specifications, extending in-context robot learning beyond motion imitation to physical interaction transfer. Project website: https://ctp-robotics.github.io/project_page/.

I. INTRODUCTION

Learning new manipulation behaviors from few or even single demonstrations is a fundamental challenge in robot learning. Recent advances in in-context robot learning (ICRL) provide a promising framework by enabling robots to adapt their behavior at test time through conditioning on behavior demonstrations, without task-specific parameter updates [1], [2], [3]. In this paradigm, demonstrations serve as contextual specifications that convey task objectives and execution patterns, allowing the policy to infer the desired behavior and adapt it to current observations [4].

Existing ICRL methods use visual observations [5], language instructions [6], or action trajectories [7] to specify task objectives and execution behaviors, enabling robots to adapt their actions to the provided context. In contact-rich tasks, the desired behavior also involves how strongly the robot should interact with an object, which may not be fully specified by visual and kinematic cues alone. For example, under the same wiping task configuration, a robot may follow similar motion paths, while light and heavy wiping require different contact intensities. Thus, demonstrations with similar motions may convey different interaction requirements, and reproducing their motion alone may not achieve the desired interaction intensity.

Representing these interaction requirements calls for encoding contact intensity and its temporal evolution. Force and tactile sensing provide direct access to this information. However, related studies primarily use contact information for feedback control or training supervision [8], [9], [10], with less emphasis on using reference contact to specify the desired interaction intensity and its temporal evolution. This motivates us to investigate how demonstrated contact patterns can serve as behavioral specifications, guiding a policy to follow the reference intensity while adapting to the current contact state through online feedback.

To this end, we introduce Contact Trajectory Prompting (CTP), a framework for transferring contact-rich behaviors from a single demonstration. CTP encodes demonstrated motion and contact measurements into an ordered prompt that preserves their temporal evolution and specifies the desired interaction behavior. During execution, a frozen policy uses online observations to retrieve relevant information from this prompt and generate actions that follow the reference specification while adapting to the current contact state.

We evaluate CTP on three real-world contact-rich manipulation task families: wiping, rotation, and insertion. Across object-disjoint one-shot transfer experiments, CTP enables robots to transfer demonstrated contact-rich behaviors from a single reference demonstration without policy updates. Furthermore, changing only the reference demonstration allows the robot to reproduce distinct interaction behaviors, including different contact intensities and manipulation directions. These results demonstrate that contact trajectories can serve as expressive behavioral specifications, extending in-context robot learning beyond motion imitation toward physical interaction strategy transfer.

The main contributions of this paper are as follows:

• We formulate reference contact trajectories as behavioral specifications for one-shot manipulation within known task families.

• We develop a contact prompt encoder that compresses demonstrated motion and bilateral contact measurements into ordered tokens, together with observation-conditioned prompt retrieval for action generation.

• We evaluate the approach on three real-world task families and analyze the roles of reference contact, online contact feedback, and prompt representation.

References (33)