SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.04625 · ACL · 2020

BabyWalk: Going Farther in Vision-and-Language Navigation by Taking Baby Steps

Fei Sha, Hexiang Hu, Wang Zhu, Zhiwei Deng, Jiacheng Chen, Eugene Ie, Vihan Jain

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2005.04625.json · badge: /api/ran/2005.04625.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Sha-Lab/babywalk marked official in Papers with Code
Papers with Code archive
4 ran · 1 no recorded run
FunctionStatusWhere it lives
Seq2SeqFollower Ran
ran on a synthesized input · constructed an object; no result was computed
Sha-Lab/babywalk/src/follower.py
code served (permissive licence) · get_code("c4afe54f7d94700f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Seq2SeqFollower: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np
torch.manual_seed(0)

# Create minimal encoder and decoder modules
class MinimalEncoder(nn.Module):
    def __init__(self, vocab_size, hidden_size, embedding_dim):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, embedding_dim)
        self.lstm = nn.LSTM(embedding_dim, hidden_size, batch_first=True)
        self.hidden_size = hidden_size
    
    def forward(self, seq, seq_lengths):
        embedded = self.embedding(seq)
        packed = nn.utils.rnn.pack_padded_sequence(
            embedded, seq_lengths.cpu(), batch_first=True, enforce_sorted=False
        )
        output, (h_t, c_t) = self.lstm(packed)
        padded_output, _ = nn.utils.rnn.pad_packed_sequence(output, batch_first=True)
        return padded_output, h_t, c_t

class MinimalDecoder(nn.Module):
    def __init__(self, vocab_size, hidden_size, embedding_dim, action_size):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, embedding_dim)
        self.lstm = nn.LSTMCell(embedding_dim, hidden_size)
        self.action_linear = nn.Linear(hidden_size, action_size)
    
    def forward(self, input_id, h_t, c_t):
        embedded = self.embedding(input_id)
        h_t, c_t = self.lstm(embedded, (h_t, c_t))
        action_scores = self.action_linear(h_t)
        return action_scores, h_t, c_t

class MinimalEnv:
    def reset(self, batch):
        obs_list = []
        for i, b in enumerate(batch):
            obs_list.append({
                'instr_id': b.get('instr_id', i),
                'heading': 0.0,
                'elevation': 0.0,
                'viewpoint': 'start',
                'feature': torch.randn(1, 4),
                'action_embedding': {j: torch.randn(4) for j in range(12)}
            })
        return obs_list

class MinimalArgs:
    def __init__(self):
        self.hidden_size = 8
        self.max_steps = 10
        self.max_ins_len = 20

# Create optimizers
encoder = MinimalEncoder(vocab_size=256, hidden_size=8, embedding_dim=4)
decoder = MinimalDecoder(vocab_size=256, hidden_size=8, embedding_dim=4, action_size=12)
encoder_optimizer = torch.optim.Adam(encoder.parameters(), lr=0.001)
decoder_optimizer = torch.optim.Adam(decoder.parameters(), lr=0.001)

# Create environment
env = MinimalEnv()

# Create args
args = MinimalArgs()

ARGS = {
    'env': env,
    'results_path': '/tmp/results.json',
    'args': args,
    'encoder': encoder,
    'decoder': decoder,
    'encoder_optimizer': encoder_optimizer,
    'decoder_optimizer': decoder_optimizer,
    'reverse_instruction': True,
    'max_sub_tasks': 6
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Seq2SeqFollower — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Seq2SeqFollower output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
batch_instructions_from_encoded Ran
ran; our contract draft was wrong, not the code
Sha-Lab/babywalk/src/follower.py
code served (permissive licence) · get_code("3f6be07042b9db4d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch

torch.manual_seed(0)

BASE_VOCAB = ['<PAD>', '<UNK>', '<EOS>', '<BOS>']
VOCAB_EOS_IDX = BASE_VOCAB.index('<EOS>')
VOCAB_PAD_IDX = BASE_VOCAB.index('<PAD>')

# Create sample encoded instructions
# Each instruction is a list of token indices
encoded_instructions = [
    np.array([5, 6, 7, VOCAB_EOS_IDX]),
    np.array([8, 9, VOCAB_EOS_IDX]),
]

max_length = 6
reverse = False
cut = True

ARGS = {
    'encoded_instructions': encoded_instructions,
    'max_length': max_length,
    'reverse': reverse,
    'cut': cut,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
batch_observations_and_actions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Sha-Lab/babywalk/src/follower.py
code served (permissive licence) · get_code("d64d69447502c58c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small tensors for features and action embeddings
feature_dim = 4
action_embedding_dim = 3
num_actions = 2

padding_feature = torch.zeros(feature_dim)
padding_action = torch.zeros(action_embedding_dim)

# Create path observations and actions
# Each observation has 'feature' and 'action_embedding' keys
# path_obs is a list of lists of observations
# path_actions is a list of lists of action indices

# Batch 1: 2 steps
obs_1 = [
    {
        'feature': [torch.tensor([1.0, 2.0, 3.0, 4.0])],
        'action_embedding': [
            torch.tensor([0.1, 0.2, 0.3]),
            torch.tensor([0.4, 0.5, 0.6])
        ]
    },
    {
        'feature': [torch.tensor([5.0, 6.0, 7.0, 8.0])],
        'action_embedding': [
            torch.tensor([0.7, 0.8, 0.9]),
            torch.tensor([1.0, 1.1, 1.2])
        ]
    }
]
actions_1 = [0, 1]

# Batch 2: 1 step (shorter)
obs_2 = [
    {
        'feature': [torch.tensor([9.0, 10.0, 11.0, 12.0])],
        'action_embedding': [
            torch.tensor([1.3, 1.4, 1.5]),
            torch.tensor([1.6, 1.7, 1.8])
        ]
    }
]
actions_2 = [0]

path_obs = [obs_1, obs_2]
path_actions = [actions_1, actions_2]

ARGS = {
    'path_obs': path_obs,
    'path_actions': path_actions,
    'padding_feature': padding_feature,
    'padding_action': padding_action
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
try_cuda Ran
ran; our contract draft was wrong, not the code
Sha-Lab/babywalk/src/follower.py
code served (permissive licence) · get_code("776899237d5bbb31")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SimpleModel. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple PyTorch object that has a .cuda() method
# The function calls .cuda() on pytorch_obj, so it needs to be a tensor or nn.Module
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

pytorch_obj = SimpleModel()

ARGS = {
    "pytorch_obj": pytorch_obj
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pretty_json_dump Not yet run
unverified (harvested, no recorded run)
Sha-Lab/babywalk/src/follower.py
code served (permissive licence) · get_code("7da6624d8c69cd11")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Learning to follow instructions is of fundamental importance to autonomous agents for vision-and-language navigation (VLN). In this paper, we study how an agent can navigate long paths when learning from a corpus that consists of shorter ones. We show that existing state-of-the-art agents do not generalize well. To this end, we propose BabyWalk, a new VLN agent that is learned to navigate by decomposing long instructions into shorter ones (BabySteps) and completing them sequentially. A special design memory buffer is used by the agent to turn its past experiences into contexts for future steps. The learning process is composed of two phases. In the first phase, the agent uses imitation learning from demonstration to accomplish BabySteps. In the second phase, the agent uses curriculum-based reinforcement learning to maximize rewards on navigation tasks with increasingly longer instructions. We create two new benchmark datasets (of long navigation tasks) and use them in conjunction with existing ones to examine BabyWalk's generalization ability. Empirical results show that BabyWalk achieves state-of-the-art results on several metrics, in particular, is able to follow long instructions better. The codes and the datasets are released on our project page https://github.com/ Sha-Lab/babywalk.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2005.04625")
get_code_for_paper("2005.04625")
have("2005.04625")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2005.04625.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2005.04625.svg)](https://syntology.ai/paper/2005.04625)

Connect an agent — have() is free.