TL;DR
NESYCR (Neurosymbolic Counterfactual Reasoning) is a novel framework that allows robots to successfully execute tasks learned from video demonstrations, even when the deployment environment or robot embodiment changes. By combining the common-sense reasoning of Vision-Language Models (VLMs) with the logical precision of symbolic verification tools, NESYCR automatically adapts and rewrites control code to handle unexpected physical discrepancies, outperforming state-of-the-art baselines by over 31% in task success.
What Problem Does This Paper Address?
Recent advances in "Code-as-Policies" allow robots to watch a video demonstration (like a human organizing a room) and automatically generate executable code to replicate the task. However, a major bottleneck remains: the domain gap.
If a human demonstrates a task using a nimble hand, but the robot must deploy it using a rigid gripper, the physical constraints change. Similarly, if objects are scattered instead of neatly grouped, or if an unexpected obstacle blocks the path, standard VLMs fail. They lack a deep, causal understanding of why actions are performed, meaning they cannot dynamically reformulate the procedure when things go wrong.
Methods
NESYCR addresses this by framing cross-domain adaptation as a counterfactual reasoning problem ("How would the task outcome change if I altered this specific environmental factor?"). The framework operates in two main phases:
- Symbolic World Model Construction: Instead of treating the video demonstration as raw pixels, a VLM abstracts it into a sequence of symbolic states (scene graphs) and abduces STRIPS-style action operators (defining preconditions and effects). A symbolic tool (such as VAL) then verifies this plan for logical consistency, creating a verified world model ($\mathcal{W}$).
- Neurosymbolic Counterfactual Adaptation: When deployed in a new domain, the VLM evaluates the initial target observation. The symbolic tool simulates the original demonstration steps from this new starting state to identify exactly where preconditions fail. The VLM then proposes alternative actions (inserting tool-use steps or removing redundant actions), which are iteratively checked by the symbolic tool until a valid, adapted procedure ($\tilde{\pi}$) is achieved.
Finally, this adapted symbolic plan is compiled into a grounded, executable code policy.
Datasets
The authors evaluated NESYCR across 440 long-horizon manipulation scenarios focused on table organization and object rearrangement.
- Complexity: Tasks were split into Low, Medium, and High complexity, requiring up to 116 visual-motor API calls.
- Domain Factors: Testing included variations in Obstruction, Object Affordance, Kinematic Configuration, Gripper Type, and Combinations of these factors.
- Environments: Simulations were conducted using the Genesis physics engine, and real-world validation was performed on a 7-DoF Franka Emika Research 3 robot arm.
Key Insights and Ideas
- The Neurosymbolic Synergy: VLMs are excellent at intuitive, common-sense brainstorming (e.g., realizing a magnetic hook can be repurposed to gather scattered screws), but they frequently generate logically flawed code. Symbolic solvers are perfectly rigid but lack intuition. NESYCR's tight loop uses the VLM to propose semantic fixes and the symbolic tool to enforce strict physical truth.
- Cascading Incompatibilities: A single domain shift often triggers a domino effect. For example, if a robot must use a magnet to collect screws because its gripper is too large, that new action might block a drawer needed later. NESYCR successfully reasons through these multi-step dependencies to reorder the entire plan safely.
Key Results
NESYCR demonstrated substantial performance leaps over both pure VLM reasoning baselines and world-model baselines:
- Simulation Performance: NESYCR achieved an average 31.14% improvement in task success rate over Statler, the strongest world-model baseline, and out-performed the VLM baseline GPT4V-Robotics by 27.73%.
- Real-World Deployment: In physical tests involving a complex drawer-organizing task with mutual-interference constraints (where opening one drawer blocks another), NESYCR achieved an 87.50% success rate, whereas standard Demo2Code completely failed (0%) due to its inability to adapt to the physical layout change.
Limitations and Future Work
The authors note a fundamental boundary to demonstration-based counterfactual reasoning: the task complexity gap. If the deployment environment diverges too drastically from the demonstration, the original video no longer provides useful guidance, causing a sharp drop-off in performance.
Future work will focus on causal re-grounding, enabling the framework to autonomously infer entirely new causal relationships and object affordances when dropped into completely novel contexts without relying heavily on the initial demonstration structure.
Summary updated