<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://nicobasile.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://nicobasile.com/" rel="alternate" type="text/html" hreflang="en" /><updated>2026-09-09T23:24:45+00:00</updated><id>https://nicobasile.com/feed.xml</id><title type="html">Nicolas Basile</title><subtitle>Personal research on intelligent systems, embodied AI, robot policy training, and accelerator infrastructure.</subtitle><author><name>Nicolas Basile</name></author><entry><title type="html">Anchoring Simulation Physics To Reality - VLA Fine-Tuning</title><link href="https://nicobasile.com/robotic-foundation-model-training/" rel="alternate" type="text/html" title="Anchoring Simulation Physics To Reality - VLA Fine-Tuning" /><published>2026-01-01T00:00:00+00:00</published><updated>2026-01-01T00:00:00+00:00</updated><id>https://nicobasile.com/robotic-foundation-model-training</id><content type="html" xml:base="https://nicobasile.com/robotic-foundation-model-training/"><![CDATA[<h2 id="introduction">Introduction</h2>

<p>How should real, augmented, and simulated trajectories be mixed when fine-tuning a Vision-Language-Action (VLA) model on a data-scarce manipulator?</p>

<p>In my previous work with discrete-action environments (Minecraft), agents operated under the assumption of “code-as-action” where the environment engine guaranteed physical consistency. That paradigm exposes two critical bottlenecks when applied to high-fidelity, real-world robotics:</p>

<ol>
  <li><strong>Autoregressive Latency:</strong> Token-by-token generation is computationally prohibitive for high-frequency control loops (e.g., &lt;10Hz).</li>
  <li><strong>Action Fidelity:</strong> Discrete tokens fail to capture the continuous, high-dimensional manifolds of joint-space trajectories.</li>
</ol>

<p>I attempted to bridge this gap by fine-tuning a VLA on a 1,200-trajectory corpus (50 real, 150 augmented, 1,000 sim). However, instead of generalizing, the policy developed <strong>“Synthetic Amnesia”</strong>, catastrophic forgetting where simulation artifacts overwrite real-world physical priors.</p>

<p>This post documents the counter-intuitive reality of VLA fine-tuning: <strong>unanchored synthetic data scales visual robustness but degrades physical fidelity.</strong> I introduce a <strong>Golden Ratio mixing strategy</strong> that anchors the model in reality, improving success rates from <strong>8% to 84%</strong>.</p>

<h2 id="architecture-the-smolvla-approach">Architecture: The SmolVLA Approach</h2>

<p>To address the latency and fidelity requirements of high-frequency control, SmolVLA decouples visual-semantic reasoning from motor-control execution:</p>

<ol>
  <li><strong>Visual-Semantic Backbone:</strong> <strong>SmolVLM</strong> (SigLIP-Vision + SmolLM2-Language) as a frozen feature extractor.</li>
  <li><strong>Intermediate Feature Tapping:</strong> To bypass the autoregressive bottleneck, activations are extracted from intermediate transformer blocks (Layer 15 of 30). This assumes that the later layers, optimized for linguistic syntax and abstract reasoning, are redundant for low-level spatial grounding.</li>
  <li><strong>Flow-Matching Action Head:</strong> These features are projected into a lightweight MLP-Transformer that predicts continuous joint trajectories via <strong>Conditional Flow Matching (CFM)</strong>.</li>
</ol>

<figure>
  <img src="/images/model_architecture.jpg" data-original="/images/model_architecture.jpg" srcset="/images/responsive/model_architecture-320.webp 320w, /images/responsive/model_architecture-640.webp 640w, /images/responsive/model_architecture-960.webp 960w, /images/responsive/model_architecture-1024.webp 1024w" sizes="(max-width: 700px) 92vw, 800px" width="1024" height="559" alt="SmolVLA Architecture" class="" decoding="async" loading="lazy" />
  <figcaption>SmolVLA consumes multi-view RGB and language via SigLIP and SmolLM2, fusing them with a projected state token to predict continuous actions via a flow-matching head.</figcaption>
</figure>

<h3 id="model-selection-the-latency-bottleneck">Model Selection: The Latency Bottleneck</h3>

<p>Before settling on the final architecture, I benchmarked heavier contenders: <strong>OpenVLA (7B)</strong> <sup><a href="#ref-openvla">[10]</a></sup> and quantized variants of <strong>Pi-Zero</strong> <sup><a href="#ref-pi0">[1]</a></sup>.</p>

<p>Local GPU constraints (8GB of VRAM) initially struggled to fit these larger models at acceptable fidelity, so I offloaded inference to an A100 cloud instance on Lambda Labs and developed a <strong>ROS 2 Humble</strong> <sup><a href="#ref-ros2">[11]</a></sup> server to handle communication between the local robot and the cloud backbone.</p>

<p>The network round-trip time (serialization + inference + deserialization) pushed the control loop below the 10Hz required for stability. The robot moved in “jerky,” reactive bursts rather than smooth flows.</p>

<p>This constraint led me to <strong>SmolVLA</strong> <sup><a href="#ref-smolvla">[12]</a></sup>. At ~450M parameters, it runs comfortably on my local hardware, eliminating network complexity entirely and allowing for a tight, high-frequency control loop.</p>

<blockquote>
  <p>Although local inference is pragmatic for rapid experimentation, my future work will explore hybrid cloud-edge inference, leveraging methodologies from my previous inference optimization research.</p>
</blockquote>

<h3 id="action-policy-cfm--receding-horizon-control-rhc">Action Policy: CFM &amp; Receding Horizon Control (RHC)</h3>

<p>To generate smooth actions without the computational cost of traditional diffusion policies, SmolVLA uses <strong>Conditional Flow Matching (CFM)</strong> <sup><a href="#ref-flow-matching">[13]</a></sup>.</p>

<p>Unlike diffusion policies, which iteratively denoise an action over many inference steps, CFM learns a deterministic velocity field that transports random noise to a trajectory in a small number of integration steps. This captures the distribution of valid movements while remaining cheap enough for a high-frequency control loop.</p>

<p>The combination of the lightweight architecture and CFM enables <strong>Receding Horizon Control (RHC)</strong>:</p>

<ul>
  <li>
    <p><strong>Trajectory Prediction:</strong> The action head predicts a continuous chunk of <strong>H = 50</strong> steps (<strong>1.67s</strong> of control).</p>
  </li>
  <li>
    <p><strong>Asynchronous Inference:</strong> While the SO-101 arm executes the current chunk at <strong>30Hz</strong> (33.3ms/step), the model asynchronously infers the <em>next</em> chunk in the background.</p>
  </li>
  <li>
    <p><strong>Latency Masking:</strong> Because of layer skipping, inference takes only ~100ms on an NVIDIA 3060 Ti, well within the 1.67s execution window. This allows the robot to move seamlessly without the “stutter” typical of synchronous VLM policies.</p>
  </li>
</ul>

<figure>
  <img src="/images/action_chunks.jpg" data-original="/images/action_chunks.jpg" srcset="/images/responsive/action_chunks-320.webp 320w, /images/responsive/action_chunks-640.webp 640w, /images/responsive/action_chunks-960.webp 960w, /images/responsive/action_chunks-1024.webp 1024w" sizes="(max-width: 700px) 92vw, 800px" width="1024" height="559" alt="Receding-Horizon Control" class="" decoding="async" loading="lazy" />
</figure>

<p>A Note on Action Space: <strong>Joint Space vs. Cartesian Poses</strong></p>

<p>Ideally, a robotic foundation model should predict <strong>End-Effector (EE) Poses</strong>. Predicting “where the hand should be” (Cartesian space) generalizes across embodiments better than predicting “how the motors should angle” (Joint space).</p>

<p>However, my early attempts at EE control hit a wall. Mapping EE predictions to joint angles requires an Inverse Kinematics (IK) solver. I experimented with and began building a differentiable Jacobian-based solver, but the VLA lacked proprioceptive grounding, frequently predicting “valid” Cartesian coordinates that were physically impossible for the arm to reach, forcing the IK solver into singularities or self-collisions.</p>

<p>Sholto Douglas noted in his work on orientation control that “Simplicity wins” - using Euler angles often beats elegant but fragile Quaternion math. Similarly, I found that predicting <strong>Joint Positions</strong> directly was significantly more robust for this iteration. While this locks the model to the SO-101’s specific kinematics, it guarantees that every predicted action is physically executable.</p>

<p>Developing a robust IK stack (integrating <strong>Pinocchio</strong> <sup><a href="#ref-pinocchio">[7]</a></sup> with <strong>Null-space Projection</strong> <sup><a href="#ref-robot-control">[6]</a></sup>) and translating the existing dataset into Cartesian space is a priority for the next iteration. This will allow the model to learn <em>“Implicit Kinematics”</em> while maintaining the cross-embodiment benefits of EE control.</p>

<h2 id="the-filament-problem-manifold-support-in-action-space">The Filament Problem: Manifold Support in Action Space</h2>

<p>Flow matching models learn a vector field that transports a noise distribution to the target action distribution. With only 50 real-world trajectories, the data represents thin <strong>“filaments”</strong> floating in the high-dimensional action space of the policy.</p>

<ul>
  <li><strong>Extrapolation Failure:</strong> If the robot is perturbed even slightly off these demonstrated filaments, the vector field becomes undefined or highly stochastic. This results in the “jittery” behavior (Exp. A) where the model fails to converge to a stable sink.</li>
  <li><strong>The Simulation Solution:</strong> Simulation data provides the necessary <strong>topological support</strong>. By filling the volume between real-world filaments, simulation allows the model to learn a continuous, smooth vector field across the entire workspace, providing the “recovery” behavior needed for robustness.</li>
</ul>

<p>However, this volume comes at a cost. In naive mixing scenarios, the sheer quantity of simulation data (1000 vs. 50) drowned out the real-world signal. The model learned the <em>approximate</em> physics of the sim engines rather than the real robot’s dynamics.</p>

<h2 id="data-mixing-real-and-synthetic-trajectories">Data: Mixing Real and Synthetic Trajectories</h2>

<p>To address the “synthetic amnesia” problem, I adopted a <strong>Tri-Partitioned Strategy</strong> that treats augmented data as a distinct bridge domain.</p>

<p>The final dataset consisted of three distinct buckets:</p>

<ul>
  <li><strong>Real Teleoperation Data (N=50):</strong> Collected on the SO-101 instructor arm setup <sup><a href="#ref-so-arm101">[9]</a></sup> to anchor the policy in true physical dynamics.</li>
  <li><strong>Augmented Real Data (N=150):</strong> Generated via segmentation-based background replacement <sup><a href="#ref-datasocks">[2]</a></sup> and <strong>Kornia</strong> <sup><a href="#ref-kornia">[3]</a></sup> visual transforms. This forces the vision encoder to decouple kinematic signatures from visual framing.</li>
</ul>

<figure class="figure-compact">
  <video data-media="" data-src="/videos/augmented_synthetic_data.mp4" muted="" loop="" playsinline="" preload="none" controls="" poster="/videos/posters/augmented_synthetic_data.webp" width="480" height="368" class="" aria-label="Augmented synthetic training data"></video>
  <figcaption>Example of the augmented real data. Credit: <a href="#ref-datasocks">DataSocks</a>.</figcaption>
</figure>

<ul>
  <li><strong>Simulation Data (N=1000):</strong> Generated primarily in ManiSkill <sup><a href="#ref-maniskill">[15]</a></sup> (SAPIEN <sup><a href="#ref-sapien">[16]</a></sup>) with a small fraction from MuJoCo. I matched the visual assets (block color, table texture) to the physical lab setup (Digital Twin). This provides the “volume” required for stable CFM vector fields.</li>
</ul>

<p>Following established best practices for VLA fine-tuning, the real data collection focused on diversity rather than sheer volume. I collected <strong>N=50</strong> high-quality “anchor” episodes, ensuring varied robot joint configurations by starting and ending trajectories in five distinct zones around the workspace.</p>

<blockquote>
  <p><strong>Technical Note on Simulation:</strong> I initially invested significant time porting the SO-100 to MuJoCo; however, I ultimately pivoted to ManiSkill (SAPIEN) for the bulk of data generation. ManiSkill’s GPU-parallelized experts allowed for 10k trajectories in minutes, significantly accelerating the research pipeline.</p>
</blockquote>

<h2 id="training-the-golden-ratio-strategy">Training: The Golden Ratio Strategy</h2>

<p>The hypothesis was that oversampling real data prevents drift, but excessive synthetic volume without explicit anchoring would cause catastrophic forgetting of real-world physics. I conducted an ablation study to find the inflection point where simulation supports the policy without overwriting reality.</p>

<h3 id="ablation-batch-composition-analysis">Ablation: Batch Composition Analysis</h3>

<p>I drew inspiration from <strong>“Golden Ratio Mixing”</strong> <sup><a href="#ref-golden-ratio">[4]</a></sup>, which posits that maintaining a high proportion of real-world data in minibatches is necessary to anchor the model, even when the underlying dataset is predominantly synthetic. I adopted this <em>principle</em>; not their literal φ ratio. The 15/35/50 optimum emerged from ablation, not from closed-form derivation.</p>

<p>For these benchmarks, <strong>Success</strong> is defined as grasping the object and placing it within 3cm of the target within 15 seconds, averaged over N=25 eval rollouts across held-out <strong>initial conditions</strong> (background, lighting, and object coordinates) not seen during teleop collection.</p>

<ul>
  <li>Baseline (zero-shot SmolVLA): <strong>~5%</strong> success due to domain shift in my custom setup.</li>
  <li>Fine-tuned variants:</li>
</ul>

<div class="table-scroll">
  <table>
    <thead>
      <tr>
        <th>Exp.</th>
        <th>Batch composition<br />(% real / aug / sim)</th>
        <th>Success</th>
        <th>Diagnosis</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>A</td>
        <td><b>100 / 0 / 0</b><br />Pure real</td>
        <td>8%<br /><span class="ci">CI 2–25%</span></td>
        <td><b>Filament collapse:</b> undefined vector field off-demonstration.</td>
      </tr>
      <tr>
        <td>B</td>
        <td><b>Uniform</b><br />Naive</td>
        <td>36%<br /><span class="ci">CI 20–55%</span></td>
        <td><b>Synthetic amnesia:</b> overfit to sim physics (perfect friction).</td>
      </tr>
      <tr>
        <td>C</td>
        <td><b>35 / 15 / 50</b></td>
        <td>52%<br /><span class="ci">CI 33–70%</span></td>
        <td><b>Rigid generalization:</b> stable but brittle to visual noise.</td>
      </tr>
      <tr>
        <td>D</td>
        <td><b>25 / 25 / 50</b></td>
        <td>64%<br /><span class="ci">CI 45–80%</span></td>
        <td><b>Visual overfitting:</b> brittle to lighting/viewpoint changes.</td>
      </tr>
      <tr class="is-best">
        <td><b>E</b></td>
        <td><b>15 / 35 / 50</b><br />Optimal</td>
        <td><b>84%</b><br /><span class="ci">CI 65–94%</span></td>
        <td><b>Optimal mix:</b> balanced anchoring vs. topological support.</td>
      </tr>
      <tr>
        <td>F</td>
        <td><b>10 / 40 / 50</b></td>
        <td>72%<br /><span class="ci">CI 52–86%</span></td>
        <td><b>Weak anchoring:</b> visual robustness with physical drift.</td>
      </tr>
    </tbody>
  </table>
  <p class="table-note"><b>Table 1.</b> Batch composition vs. pick-and-place success. 95% Wilson CIs. N=25 eval rollouts.</p>
</div>

<figure>
  <img src="/images/result_chart.png" data-original="/images/result_chart.png" srcset="/images/responsive/result_chart-320.webp 320w, /images/responsive/result_chart-640.webp 640w, /images/responsive/result_chart-960.webp 960w, /images/responsive/result_chart-1200.webp 1200w" sizes="(max-width: 700px) 92vw, 800px" width="1200" height="800" alt="Result Chart" class="" decoding="async" loading="lazy" />
</figure>

<h3 id="fine-tuning-strategy">Fine-Tuning Strategy</h3>

<p>Training was performed for 20,000 steps using a rented NVIDIA A100 (80GB). Starting from the <code class="language-plaintext highlighter-rouge">lerobot/smolvla_base</code> checkpoint, I froze the VLM backbone and fully fine-tuned the flow-matching Action Expert. This focused the gradients on the robot’s control policy rather than overwriting the semantic knowledge of the vision encoder.</p>

<p><strong>Hyperparameters:</strong> AdamW optimizer (β=[0.9, 0.95], weight decay=1e-10), learning rate 1e-4 with 1,000-step warmup, batch size 64. Training was stopped at 20k steps (~4 hours) following the recommended fine-tuning schedule.</p>

<h3 id="why-the-15--35--50-split-works">Why the 15 / 35 / 50 Split Works</h3>
<p>Although the underlying dataset is 96% synthetic, the tri-partitioned strategy ensures that <strong>50% of every gradient update</strong> is derived from real-world kinematics (Real + Augmented). This prevents the model from overwriting the delicate friction and contact dynamics of the real arm with simulation artifacts.</p>

<p>By combining diverse teleoperation data, visual augmentations, and simulation data via Weighted Stratified Sampling <sup><a href="#ref-rt1">[14]</a></sup>, I fine-tuned SmolVLA to execute smooth, confident motions. This approach successfully eliminated the jitter seen in earlier runs and enabled the model to generalize to new object locations.</p>

<h2 id="limitations">Limitations</h2>

<p>This study is limited to a single manipulation task (pick-and-place) on a single robot morphology (SO-101). Training used a single seed, and evaluation did not include hardware randomization (camera extrinsics, payload, or friction). I leave further ablations on simulation fidelity, augmentation composition, and the scaling laws of real-world trajectory counts to future work. Extending these findings to multi-task settings and diverse embodiments remains an open research question.</p>

<h2 id="future-research-directions">Future Research Directions</h2>

<h3 id="cross-embodiment--end-effector-ee-control">Cross-Embodiment &amp; End-Effector (EE) Control</h3>

<p>The current policy predicts <strong>Joint Positions</strong> (see Architecture for the IK-failure rationale). The next iteration targets <strong>End-Effector (EE) Poses</strong> via Pinocchio <sup><a href="#ref-pinocchio">[7]</a></sup> and null-space IK <sup><a href="#ref-robot-control">[6]</a></sup>, so the VLA predicts “what the hand should do” rather than “how the motors should move.”</p>

<ul>
  <li><strong>Open Research Question:</strong> <em>Can a VLA learn “Implicit Kinematics” from Cartesian supervision?</em>
Switching to EE prediction hides joint-limit constraints. Will the VLA learn to output only those poses that are solvable, or will it hallucinate “valid” 3D coordinates that force the IK solver into singularities or self-collisions?</li>
</ul>

<figure>
  <img src="/images/ee_vs_joint.jpg" data-original="/images/ee_vs_joint.jpg" srcset="/images/responsive/ee_vs_joint-320.webp 320w, /images/responsive/ee_vs_joint-640.webp 640w, /images/responsive/ee_vs_joint-960.webp 960w, /images/responsive/ee_vs_joint-1024.webp 1024w" sizes="(max-width: 700px) 92vw, 800px" width="1024" height="559" alt="End-effector poses versus joint-space actions" class="" decoding="async" loading="lazy" />
</figure>

<h3 id="scalability-and-multi-task-generalization">Scalability and Multi-Task Generalization</h3>

<p>SmolVLA (450M parameters) is sufficient for 30Hz RHC on a 3060 Ti, but it likely lacks the world-knowledge priors required for zero-shot generalization to novel objects. Scaling to larger backbones (7B+) and training on more heterogeneous task data (e.g., OpenVLA <sup><a href="#ref-openvla">[10]</a></sup>, Pi-Zero <sup><a href="#ref-pi0">[1]</a></sup>) is the natural progression for this research.</p>

<hr />

<h2 id="references">References</h2>

<ol class="ref-list">
  <li id="ref-pi0"><strong>Pi-Zero</strong> — Physical Intelligence. <a href="https://www.physicalintelligence.company/blog/pi0">physicalintelligence.company</a></li>
  <li id="ref-datasocks"><strong>Augmented Datasocks</strong> — Pravsels. <a href="https://github.com/pravsels/augmented_datasocks">github.com/pravsels/augmented_datasocks</a></li>
  <li id="ref-kornia"><strong>Kornia</strong> — Riba et al. <a href="https://kornia.readthedocs.io/en/stable">kornia.readthedocs.io</a></li>
  <li id="ref-golden-ratio"><strong>Golden Ratio Mixing</strong> — He et al. <a href="https://arxiv.org/abs/2502.18049">arXiv:2502.18049</a></li>
  <li id="ref-mimicgen"><strong>MimicGen</strong> — Mandlekar et al. <a href="https://mimicgen.github.io/">mimicgen.github.io</a></li>
  <li id="ref-robot-control"><strong>Robot Control III</strong> — Yan-Bin Jia. <a href="https://faculty.sites.iastate.edu/jia/files/inline-files/robot%20control%20III.pdf">Iowa State notes (PDF)</a></li>
  <li id="ref-pinocchio"><strong>Pinocchio</strong> — Carpentier et al. <a href="https://github.com/stack-of-tasks/pinocchio">github.com/stack-of-tasks/pinocchio</a></li>
  <li id="ref-moveit"><strong>MoveIt</strong> — Coleman et al. <a href="https://moveit.ai/">moveit.ai</a></li>
  <li id="ref-so-arm101"><strong>SO-ARM101</strong> — The Robot Studio. <a href="https://github.com/TheRobotStudio/SO-ARM100">github.com/TheRobotStudio/SO-ARM100</a></li>
  <li id="ref-openvla"><strong>OpenVLA</strong> — Kim et al. <a href="https://openvla.github.io/">openvla.github.io</a></li>
  <li id="ref-ros2"><strong>ROS 2 Humble</strong> — Open Source Robotics Foundation. <a href="https://docs.ros.org/en/humble">docs.ros.org/humble</a></li>
  <li id="ref-smolvla"><strong>SmolVLA</strong> — Hugging Face. <a href="https://huggingface.co/lerobot/smolvla_base">lerobot/smolvla_base</a>, <a href="https://huggingface.co/docs/lerobot/en/smolvla#finetune-smolvla-on-your-data">fine-tune docs</a></li>
  <li id="ref-flow-matching"><strong>Conditional Flow Matching</strong> — Lipman et al. <a href="https://arxiv.org/abs/2210.02747">arXiv:2210.02747</a></li>
  <li id="ref-rt1"><strong>RT-1</strong> — Brohan et al. <a href="https://arxiv.org/abs/2206.02077">arXiv:2206.02077</a></li>
  <li id="ref-maniskill"><strong>ManiSkill</strong> — Gu et al. <a href="https://github.com/haosulab/ManiSkill">github.com/haosulab/ManiSkill</a></li>
  <li id="ref-sapien"><strong>SAPIEN</strong> — Xiang et al. <a href="https://sapien.ucsd.edu/">sapien.ucsd.edu</a></li>
</ol>]]></content><author><name>Nicolas Basile</name></author><category term="embodied-ai" /><category term="robotics" /><summary type="html"><![CDATA[When does simulation data stop helping and start erasing real physics? Rebalancing real, augmented, and simulated data when fine-tuning a VLA on my SO-101 raised pick-and-place success from 8% to 84%, without collecting more data. This post covers a six-way ablation of real / aug / sim batch composition.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://nicobasile.com/images/robotic_gripper_neural_net_no_bg.png" /><media:content medium="image" url="https://nicobasile.com/images/robotic_gripper_neural_net_no_bg.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Enhancing Long-Horizon Embodied Agents in Open-World 3D Environments</title><link href="https://nicobasile.com/long-horizon-embodied-agents/" rel="alternate" type="text/html" title="Enhancing Long-Horizon Embodied Agents in Open-World 3D Environments" /><published>2024-05-16T00:00:00+00:00</published><updated>2024-05-16T00:00:00+00:00</updated><id>https://nicobasile.com/long-horizon-embodied-agents</id><content type="html" xml:base="https://nicobasile.com/long-horizon-embodied-agents/"><![CDATA[<h2 id="introduction">Introduction</h2>

<p>NVIDIA’s Voyager laid the foundation for autonomous curriculum learning and tool‑use, but long-horizon, multi-stage objectives still tend to break down due to <strong>forgetting</strong>, <strong>shallow planning</strong>, and <strong>brittle tool selection</strong>.</p>

<p>My goal in this project was to push those boundaries by:</p>
<ul>
  <li>optimizing <strong>long-horizon reliability</strong> via memory, planning persistence, and tool robustness.</li>
  <li>and <strong>automating improvement of the agent’s scaffolding</strong> via verifier-driven optimization (DSPy<sup> <a href="#ref-dspy">[1]</a></sup>).</li>
</ul>

<p>On a suite of multi-stage objectives, these changes improved success rates an average of <strong>~20%</strong> while reducing prompting iterations needed by <strong>&gt;40%</strong> in several cases (relative to NVIDIA’s baseline Voyager framework <sup><a href="#ref-voyager-code">[9]</a></sup>).</p>

<ul>
  <li>Evaluation: 5 random seeds × 4 episodes per seed = 20 episodes/task (no initial inventory).</li>
  <li>Prompting iterations: number of planner/tool-selector regeneration attempts, capped at 50 as in Voyager.</li>
  <li>Success criteria: Task dependent - typically an inventory check, or structure built.</li>
</ul>

<h2 id="what-i-built">What I built</h2>

<p>This project improves upon the Voyager framework with:</p>

<h3 id="1-structured-memory">1) Structured memory</h3>

<ul>
  <li><strong>Compressed episodic memory:</strong> key events, failures, and environmental discoveries.</li>
  <li><strong>Task memory:</strong> current high-level objective and sub-tasks, with progress markers.</li>
  <li><strong>Skill/tool memory:</strong> what tools exist and when they’re useful.</li>
</ul>

<p>This makes the agent’s behavior more consistent across long rollouts and reduces repeated mistakes. This also introduces an optimization point, allowing DSPy to learn optimal selective memory strategies.</p>

<blockquote>
  <p>This mirrors a broader pattern in language-agent research: maintaining an episodic trace, compressing it into higher-level reflections, and retrieving it to steer future plans. <sup><a href="#ref-reflexion">[2]</a></sup></p>
</blockquote>

<h3 id="2-hierarchical-planning">2) Hierarchical planning</h3>
<p>The agent plans at multiple time scales:</p>

<ul>
  <li><strong>High-level plan:</strong> stages/subgoals (“collect wood → craft pickaxe → collect stone → build house”).</li>
  <li><strong>Mid-level steps:</strong> concrete actions per stage (tool calls / environment API usage [i.e walk, mine, craft]).</li>
  <li><strong>Execution loop:</strong> act → observe → update memory → re-plan only when needed.</li>
</ul>

<p>The key change is <strong>plan persistence</strong>: the agent doesn’t re-derive its intent every step, which reduces thrashing.</p>

<h3 id="3-tool-use-that-actually-holds-up-over-long-horizons">3) Tool use that actually holds up over long horizons</h3>

<ul>
  <li>explicit tool “contracts” (inputs/outputs + failure handling),</li>
  <li>validation of tool results before moving on,</li>
  <li>recovery strategies when a tool call fails or returns unexpected state.</li>
</ul>

<blockquote>
  <p>Treating actions/tools as first-class outputs with validation aligns with the ReAct view of interleaving reasoning with environment actions to reduce cascading errors. <sup><a href="#ref-react">[3]</a></sup></p>
</blockquote>

<hr />

<h2 id="prompt--policy-improvement-via-dspy">Prompt + policy improvement via DSPy</h2>

<p>A major part of the gains came from automating improvement upon the <em>agentic scaffolding</em> itself.</p>

<h3 id="vlms-as-reward-models">VLMs as reward models</h3>

<p>For long-horizon tasks, sparse environment rewards are often unusable; instead, I use a <em>vision-language evaluator</em> to score progress from observable evidence (images + trace). This mirrors a growing line of work that treats pretrained VLMs as <em>zero-shot reward models</em> for language-conditioned goals <sup><a href="#ref-vlm-reward-iclr">[4]</a></sup><sup><a href="#ref-vlm-source-rewards">[5]</a></sup>, turning “is the goal satisfied?” into a learned scoring function over visual states.</p>

<p>Concretely, the evaluator consumes (goal, plan, tool calls, observations) and outputs a scalar score plus failure tags (e.g., missed grasp, wrong inventory precondition). Those scores become the optimization target for improving the agent’s scaffolding.</p>

<h3 id="dspy-turns-scaffolding-design-into-optimization">DSPy turns scaffolding design into optimization</h3>

<p>Rather than hand-tuning prompts, I treat the planner/tool-selector/memory-updater as an <em>optimizable program</em> and use DSPy-style compilation/teleprompting to search for module settings that <strong>maximize verifier score</strong>. This is closer to <em>black-box policy search over scaffolding</em> than weight-updating RL, useful when you want rapid iteration without finetuning.</p>

<blockquote>
  <p>DSPy frames prompt-and-module design as an optimizable program (compile/teleprompt), replacing ad-hoc prompt tinkering with systematic search over module behaviors.</p>
</blockquote>

<p>This turned “prompt engineering” into something closer to <strong>search + optimization</strong>, using an internal (synthetic) reward function that is grounded in environmental evidence. As mentioned earlier, the majority of performance gains came from this iterative, evolution-like approach.</p>

<hr />

<h2 id="why-this-matters">Why this matters</h2>
<p>Long-horizon embodied autonomy can’t be solved solely by “a bigger model” and “more data”. In these environments, moving beyond impressive demos and into reliable behavior requires:</p>

<ul>
  <li>memory that persists and stays relevant,</li>
  <li>plans that evolve with the environment,</li>
  <li>tool use that is robust to errors and infinite loops,</li>
  <li>evaluation signals that are aligned with success.</li>
</ul>

<hr />

<h3 id="related-work-odyssey-open-world-skills">Related work: Odyssey (open-world skills)</h3>

<p>Recent work like <strong>Odyssey</strong> <sup><a href="#ref-odyssey">[6]</a></sup><sup><a href="#ref-odyssey-code">[7]</a></sup> extends the Voyager line by <strong>expanding what the agent can do</strong>: it equips Minecraft agents with a large <strong>open-world skill library</strong> (primitive + compositional skills), augments the base model with <strong>domain-specific Minecraft knowledge</strong> via a fine-tuned LLaMA-3 variant trained on a large Minecraft-Wiki Q&amp;A corpus, and introduces a capability-oriented benchmark spanning <strong>long-term planning</strong>, <strong>dynamic-immediate planning</strong>, and <strong>autonomous exploration</strong> tasks.</p>

<p>This project is intentionally <strong>orthogonal</strong>. Rather than primarily increasing skill/action coverage or adding domain knowledge through finetuning, I focus on <strong>making long-horizon behavior reliably hold up</strong> <em>given</em> a set of tools, hardening execution and optimizing the agent’s scaffolding for consistency over long horizons.</p>

<hr />

<h2 id="references">References</h2>

<ol class="ref-list">
  <li id="ref-dspy"><strong>DSPy</strong> — Khattab et al. <a href="https://arxiv.org/abs/2310.03714">arXiv:2310.03714</a></li>
  <li id="ref-reflexion"><strong>Reflexion</strong> — Shinn et al. <a href="https://arxiv.org/abs/2303.11366">arXiv:2303.11366</a></li>
  <li id="ref-react"><strong>ReAct</strong> — Yao et al. <a href="https://arxiv.org/abs/2210.03629">arXiv:2210.03629</a></li>
  <li id="ref-vlm-reward-iclr"><strong>VLMs as Zero-Shot Reward Models</strong> — Rocamonde et al., ICLR 2024. <a href="https://openreview.net/forum?id=N0I2RtD8je">OpenReview</a></li>
  <li id="ref-vlm-source-rewards"><strong>VLMs as a Source of Rewards</strong> — Baumli et al. <a href="https://arxiv.org/abs/2312.09187">arXiv:2312.09187</a></li>
  <li id="ref-odyssey"><strong>Odyssey</strong> — Liu et al. <a href="https://arxiv.org/abs/2407.15325">arXiv:2407.15325</a></li>
  <li id="ref-odyssey-code"><strong>Odyssey (code)</strong> — <a href="https://github.com/zju-vipa/Odyssey">github.com/zju-vipa/Odyssey</a></li>
  <li id="ref-voyager"><strong>Voyager</strong> — Wang et al. <a href="https://arxiv.org/pdf/2305.16291">arXiv:2305.16291</a></li>
  <li id="ref-voyager-code"><strong>Voyager (code)</strong> — <a href="https://github.com/MineDojo/Voyager">github.com/MineDojo/Voyager</a></li>
</ol>]]></content><author><name>Nicolas Basile</name></author><category term="embodied-ai" /><category term="agents" /><summary type="html"><![CDATA[Building on NVIDIA’s Voyager, this project explores how hierarchical memory and a lightweight, RL-inspired policy search implemented with DSPy can improve an embodied agent's behavior. The learned policies improved success rates by ~20% while reducing inference cost.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://nicobasile.com/images/robotic_gripper_neural_net_no_bg.png" /><media:content medium="image" url="https://nicobasile.com/images/robotic_gripper_neural_net_no_bg.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>