Octopus: Embodied Vision-Language Programmer from Environmental Feedback

Jingkang Yang, Yuhao Dong, Shuai Liu, Bo Li, Ziyue Wang, Haoran Tan, Chencheng Jiang, Jiamu Kang, Yuanhan Zhang, Kaiyang Zhou, Ziwei Liu

Introduction

In the pursuit of truly autonomous embodied agents, a significant challenge remains: bridging the gap between high-level reasoning and low-level physical manipulation. Existing Large Vision-Language Models (VLMs) often struggle with this "granularity gap," either producing abstract plans that lack execution details or granular motor commands that fail to scale to complex tasks.

Octopus introduces a novel paradigm by acting as an embodied vision-language programmer. Instead of outputting natural language instructions or raw joint torques, Octopus generates executable code. By training on a new benchmark, OctoVerse, and utilizing a specialized reinforcement learning scheme based on environmental feedback (RLEF), Octopus demonstrates superior performance in multi-step tasks across diverse simulated environments.

The Granularity Gap in Embodied AI

Traditional approaches to Embodied AI typically fall into two categories. Low-level controllers focus on specific motor commands (e.g., "move arm 2cm left"), which are too fine-grained for long-horizon planning. Conversely, high-level planners output abstract text (e.g., "get a snack"), which lacks the technical grounding required for simulator execution. Furthermore, many models rely on external vision modules to translate visual scenes into text, often losing critical spatial information in the process.

Octopus addresses these issues by directly perceiving egocentric visual data and writing the Python code necessary to interact with the environment. This approach treats code as a universal interface—unambiguous, structured, and directly executable by simulator APIs.

Methodology: Vision-Language Programming and RLEF

The Octopus architecture is built upon the Otter model, integrating an MPT-7B language decoder with a CLIP ViT-L/14 vision encoder. The model uses a Perceiver Resampler and Cross-Gated Attention to fuse visual and textual features effectively.

The Octopus framework processes environmental messages to generate explanations, plans, and executable action code, utilizing feedback to correct failures.

The core algorithmic innovation is Reinforcement Learning with Environmental Feedback (RLEF). While initial training involves Supervised Fine-Tuning (SFT) on data generated by a GPT-4 "oracle," the model is further refined using Proximal Policy Optimization (PPO). A reward model, based on CodeLLaMA-7B, evaluates whether the generated code successfully altered the environment state. This allows the agent to learn from "failed" states—such as attempting to grab an object that is out of reach—and adjust its strategy accordingly.

The OctoVerse Benchmark

To evaluate the model, the researchers developed OctoVerse, a suite of three simulators designed for vision-language programming:

  1. OctoGibson: Based on OmniGibson, focusing on photorealistic household tasks like cooking or cleaning.
  2. OctoMC: Based on Minecraft, emphasizing open-world exploration and resource management.
  3. OctoGTA: Based on Grand Theft Auto V, focusing on complex urban navigation and NPC interaction.

Crucially, OctoVerse features vision-dependent functions. For instance, rather than using a global coordinate walkTo(location) function, the agent must use teleport(yaw, distance), forcing it to actively perceive the environment to navigate successfully.

Results and Comparative Analysis

Octopus demonstrates a significant performance lead over existing embodied planners and "blind" LLMs. In the OctoGibson environment, the full Octopus model (SFT + RLEF) achieved a task completion rate of 0.33 in unseen environments, nearly tripling the performance of the SFT-only version (0.11) and significantly outperforming EmbodiedGPT (0.10).

A comparison of Octopus against other state-of-the-art models, highlighting its unique combination of vision, code generation, and feedback-driven training.

Human evaluators also rated Octopus's conceptual planning accuracy at 0.53, compared to 0.25 for CodeLLaMA. The model showed strong generalization capabilities, successfully transferring the "vision-to-code" paradigm to Minecraft and GTA-V with limited training data.

Conclusion and Future Work

Octopus represents a step forward in creating agents that can reason and act within complex environments. By using code as an intermediary, the model balances deliberative reasoning with executable precision. However, limitations remain, particularly regarding millimeter-perfect spatial precision and navigating complex physical barriers that require advanced pathfinding logic. Future research will focus on integrating more granular motor control and extending the model's capabilities to handle even longer-horizon tasks involving dozens of sequential sub-goals.

Summary updated

BibTeX
@inproceedings{yang2024octopus,
  author = {Jingkang Yang and Yuhao Dong and Shuai Liu and Bo Li and Ziyue Wang and Haoran Tan and Chencheng Jiang and Jiamu Kang and Yuanhan Zhang and Kaiyang Zhou and Ziwei Liu},
  title = {{Octopus: Embodied Vision-Language Programmer from Environmental Feedback}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73232-4\_2},
}
Figure