TL;DR
End-to-end visuomotor policies often fail when encountering novel objects or backgrounds, even when the underlying physical actions required are identical to seen tasks. Adapting by Analogy (ABA) allows a robot to adapt at test time without collecting new demonstrations or retraining: when an out-of-distribution (OOD) observation is detected, an expert provides brief language-based functional correspondences (e.g., "treat a pencil like a pen"), enabling the robot to retrieve functionally equivalent in-distribution (ID) embeddings and steer its policy to success.
What Problem Does This Paper Address?
Imitation learning policies—such as diffusion-based visuomotor models—excel at learning multimodal, closed-loop manipulation behaviors from expert teleoperation. However, they are notoriously brittle to distribution shifts. Placing a novel object on the table or changing the tabletop background color often triggers catastrophic failure, even if the required motions (e.g., grasping a thin cylinder) have been demonstrated hundreds of times on training objects.
Existing remedies typically require human supervisors to intervene with full teleoperated corrective demonstrations and retrain the policy. This paper asks: Can we reuse already-learned behaviors instead of collecting new demonstrations? In many cases, success does not require novel motor skills, just an analogy mapping test-time observations to training-time conditions sharing the same affordances.
Methods
Adapting by Analogy (ABA) operates at deployment time through four main phases:
- OOD Anomaly Detection: At each timestep, the system computes the cosine similarity between the current observation embedding $\hat{z} = \mathcal{E}(\hat{o})$ and training embeddings. If similarity drops below threshold $\lambda$, the robot flags an OOD state and requests expert guidance.
- Proprioceptive Filtering & Language Decoding: To search the demonstration dataset $\mathcal{D}_{\text{ID}}$ efficiently, the robot first filters demonstrations to a candidate set $\mathcal{O}_q$ sharing similar end-effector and joint configurations. Next, the expert provides high-level correspondence descriptions (e.g., matching semantic categories or spatial alignments). Using Grounded SAM, image segments are extracted from both OOD and ID scenes. The system computes the Intersection over Union (IoU) across functionally paired segments to rank candidate training observations.
- Entropy-Based Interactive Refinement: Initial instructions may be ambiguous or task-phase dependent. To resolve this, ABA passes candidates through the policy, clusters the predicted action trajectories via K-means, and measures the entropy across action modes. If action entropy remains high, the robot prompts the expert for refined correspondences until confidence is reached.
- Observation Intervention: Once the mapping is finalized, the robot averages the latent embeddings of the top-$M$ functionally corresponding ID observations: $$\hat{z} := \frac{1}{M}\sum_{o \in \mathcal{O}_f} \mathcal{E}(o)$$ This averaged latent is fed directly into the frozen policy to generate actions.
Datasets
The authors evaluated their framework on real-world manipulation datasets collected with a Franka Research 3 manipulator equipped with a UMI gripper, a wrist camera, and a third-person camera:
- Sweep-Trash: 100 training demonstrations (50 sweeping crumpled paper/recycling upward, 50 sweeping M&Ms/organic downward).
- Object-in-Cup: 200 demonstrations (100 picking a pen grasped below its center-of-mass and inserting from the front; 100 picking a marker grasped above its center-of-mass and inserting from the bottom).
- Evaluation Benchmark: 14 test conditions comprising in-distribution scenes, novel backgrounds (black cloth workspace), and novel OOD objects (Doritos, crumpled napkins, thumb tacks, pencils, batteries, and Jenga blocks), totaling 140 real-world evaluation rollouts.
Key Insights and Ideas
- OOD failure is often an observation-association failure, not a motor deficiency: Robots already have the kinematic capability to grasp a pencil if they know how to grasp a pen; the failure is in associating the visual input with the correct action distribution.
- Visual similarity $\neq$ Functional similarity: Baseline vision foundation models like DINOv2 match low-level visual appearances well, but they struggle when functional equivalence cuts across visual appearances (e.g., categorizing Doritos as organic trash vs. napkins as recycling). Human-provided functional alignment bridges this semantic gap.
- Uncertainty-driven feedback requests: By monitoring entropy over candidate action clusters, the robot only queries human assistance when multiple divergent behavior modes exist, avoiding unnecessary queries during unambiguous motion phases.
Key Results
- Large Generalization Gains on OOD Objects: Across novel objects, ABA achieved a 76% absolute success rate improvement over the unassisted Vanilla Diffusion Policy on both tasks. While the Vanilla baseline completely failed on the Object-in-Cup task with novel objects, ABA achieved high success by mapping pencils, batteries, and Jenga blocks to corresponding pen/marker grasp modes.
- Robustness to Background Shifts: On the Object-in-Cup task with an unseen black background, the Vanilla policy dropped to a 0% success rate, whereas ABA maintained a 90% success rate.
- Low Expert Burden: ABA queried the expert only 1.3 to 5.2 times per rollout on average across 70–120 step trajectories (requesting feedback during roughly 6% of execution steps).
- Functional Alignment Correlates with Success: An analysis comparing successful baseline rollouts to ABA showed that whenever baselines accidentally succeeded, their retrieved embeddings exhibited high precision overlap with ABA's functionally matched observations.
Limitations and Future Work
- Assumes Functional Overlap: ABA relies on the assumption that the training data already contains an appropriate motor skill for the test object. If an OOD task demands entirely new kinematic behaviors, observation substitution will fail.
- Reliance on Human Experts: The method currently uses a human in the loop to specify and refine template-based language correspondences. Future directions include leveraging Vision-Language Models (VLMs) or large multimodal models to propose functional analogies autonomously.
- OOD Detection Calibration: The fast anomaly detector relies on fixed cosine similarity thresholds, which require careful calibration to prevent either excessive feedback prompts or missed intervention opportunities.
Summary updated