MCPcopy Index your code
hub / github.com/Gabesarch/ICAL

github.com/Gabesarch/ICAL @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
4,261 symbols 15,274 edges 483 files 1,268 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

VLM Agents Generate Their Own Memories: Distilling Experience into Embodied Programs of Thought

NeurIPS 2024 Spotlight

Overview

This repository contains the code and resources for the paper titled: "ICAL: Continual Learning of Multimodal Agents by Transforming Trajectories into Actionable Insights." This repository is organized into three main directories, each representing a different domain evaluated in our work: Ego4D, VisualWebArena, and TEACh.

Abstract

Large-scale LLMs and VLMs excel at few-shot learning but require high-quality demonstrations. We introduce In-Context Abstraction Learning (ICAL), which iteratively refines suboptimal trajectories into high-quality data with optimized actions and detailed reasoning. Given an inefficient demonstration, a VLM corrects actions and annotates causal relationships, object states, subgoals, and task-relevant visuals, forming “programs of thought.” With human feedback, these programs are improved as the agent executes them in a similar environment. The resulting examples, used as prompts or fine-tuning data, significantly boost decision-making while reducing human feedback needs. ICAL surpasses state-of-the-art in TEACh (dialogue-based instruction following), VisualWebArena (multimodal web agents), and Ego4D (action anticipation). In TEACh, combining fine-tuning and retrieval on ICAL examples outperforms raw human demonstrations and expert examples, achieving a 17.5% increase in goal-condition success. In VisualWebArena, retrieval-augmented GPT-4V with ICAL improves task success rate 1.6× over GPT-4V, while fine-tuning Qwen2-VL achieves a 2.8× improvement. In Ego4D, ICAL outperforms few-shot GPT-4V and remains competitive with supervised models. Overall, ICAL scales 2× better than raw human demonstrations and reduces manual prompt engineering.

Repository Structure

ICAL
├── README.md
├── Ego4D
│   ├── README.md
│   ├── domain_files
│   └── environment
├── VisualWebArena
│   ├── README.md
│   ├── domain_files
│   └── environment
└── TEACh
    ├── README.md
    ├── domain_files
    └── environment

Contents of Each Folder

Each folder (Ego4D, VisualWebArena, TEACh) includes: - README.md: Instructions specific to running ICAL in that domain. - domain_files: Files required to run ICAL in the domain. - environment: Configuration and setup files for the environment.

Running ICAL in Each Domain

Ego4D

To learn more about running ICAL in Ego4D Forecasting, please refer to the Ego4D README.

VisualWebArena

For instructions on running ICAL in VisualWebArena, please refer to the VisualWebArena README.

TEACh

Detailed steps for running ICAL in the TEACh domain can be found in the TEACh README.

Learned Examples

The ICAL learned examples for each domain can be found in the following locations:

Installation

To install and set up the ICAL environment, follow these general steps:

  1. Clone the repository: bash git clone https://github.com/Gabesarch/ICAL.git cd ICAL

  2. Navigate to the domain directory you are interested in (e.g., Ego4D), and follow the installation instructions provided in its README file.

Acknowledgements

This work builds on the existing research and frameworks in each of the respective domains. We would like to thank the contributors to the Ego4D, VisualWebArena, and TEACh projects for their invaluable resources.

Citation

@inproceedings{sarch2024vlm,
  title={VLM Agents Generate Their Own Memories: Distilling Experience into Embodied Programs of Thought},
  author={Sarch, Gabriel Herbert and Jang, Lawrence and Tarr, Michael J and Cohen, William W and Marino, Kenneth and Fragkiadaki, Katerina},
  booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
  year={2024}
}

Core symbols most depended-on inside this repo

print
called by 824
TEACh/utils/misc.py
get
called by 167
Ego4d/ego4d_forecasting/datasets/short_term_anticipation.py
info
called by 146
TEACh/teach/src/teach/simulators/simulator_base.py
to
called by 113
TEACh/utils/misc.py
size
called by 104
Ego4d/Tracking-Anything-with-DEVA/deva/inference/kv_memory_store.py
open
called by 103
TEACh/prompt/api_primitives_nodefinitions.py
step
called by 96
TEACh/task_base/teach_base.py
max
called by 86
TEACh/utils/misc.py

Shape

Method 2,374
Function 1,369
Class 505
Route 13

Languages

Python100%
C++1%

Modules by API surface

TEACh/utils/improc.py87 symbols
TEACh/teach/src/teach/simulators/simulator_THOR.py80 symbols
TEACh/utils/wctb.py78 symbols
TEACh/utils/geom.py72 symbols
VisualWebArena/browser_env/actions.py69 symbols
TEACh/teach/src/teach/simulators/simulator_base.py59 symbols
Ego4d/Tracking-Anything-with-DEVA/deva/ext/MobileSAM/tiny_vit_sam.py52 symbols
Ego4d/Tracking-Anything-with-DEVA/deva/inference/visualizer.py51 symbols
Ego4d/SoM/task_adapter/utils/visualizer.py51 symbols
TEACh/utils/basic.py49 symbols
TEACh/nets/ID_Transformer/util/misc.py49 symbols
TEACh/SOLQ/util/misc.py49 symbols

For agents

$ claude mcp add ICAL \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact