SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.17355 · 2024

Bidirectional Decoding: Improving Action Chunking via Guided Test-Time Sampling

arXiv · PDF · Open in the Atlas

Code that ran

7 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 7 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/2408.17355.json · badge: /api/ran/2408.17355.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
jubayer-hamid/bid_lerobot canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
YuejiangLIU/bid_diffusion canonical (classifier label)
classifier basis: classifier_2025
0 ran · 3 no recorded run
FunctionStatusWhere it lives
aggregate_stats Ran
ran; our contract draft was wrong, not the code
jubayer-hamid/bid_lerobot/lerobot/common/datasets/compute_stats.py
code served (permissive licence) · get_code("96806d7bcd376422")
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 dict. The image it ran in was 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 einops

torch.manual_seed(0)

class MockDataset:
    def __init__(self, stats, num_samples):
        self.stats = stats
        self.num_samples = num_samples

# Create mock datasets with different stats
dataset1_stats = {
    "observation": {
        "min": torch.tensor([0.0, 0.1, 0.2, 0.3]),
        "max": torch.tensor([1.0, 1.1, 1.2, 1.3]),
        "mean": torch.tensor([0.5, 0.6, 0.7, 0.8]),
        "std": torch.tensor([0.1, 0.12, 0.14, 0.16]),
    },
    "action": {
        "min": torch.tensor([0.0, 0.0]),
        "max": torch.tensor([1.0, 1.0]),
        "mean": torch.tensor([0.5, 0.5]),
        "std": torch.tensor([0.2, 0.2]),
    }
}

dataset2_stats = {
    "observation": {
        "min": torch.tensor([0.1, 0.2, 0.3, 0.4]),
        "max": torch.tensor([1.1, 1.2, 1.3, 1.4]),
        "mean": torch.tensor([0.55, 0.65, 0.75, 0.85]),
        "std": torch.tensor([0.15, 0.18, 0.2, 0.22]),
    },
    "reward": {
        "min": torch.tensor([-1.0]),
        "max": torch.tensor([1.0]),
        "mean": torch.tensor([0.0]),
        "std": torch.tensor([0.5]),
    }
}

dataset1 = MockDataset(dataset1_stats, num_samples=100)
dataset2 = MockDataset(dataset2_stats, num_samples=50)

ARGS = {
    "ls_datasets": [dataset1, dataset2]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
cfg_to_group Ran
ran; our contract draft was wrong, not the code
jubayer-hamid/bid_lerobot/lerobot/common/logger.py
code served (permissive licence) · get_code("0ce2ef6e4d74b8e1")
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 str. The image it ran in was 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.

from omegaconf import DictConfig, OmegaConf

# Construct a minimal DictConfig that satisfies the function's requirements
cfg = OmegaConf.create({
    'policy': {
        'name': 'ppo'
    },
    'dataset_repo_id': 'huggingface/dataset_v1',
    'env': {
        'name': 'CartPole-v1'
    },
    'seed': 42
})

ARGS = {
    'cfg': cfg,
    'return_list': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
flatten_dict Ran
ran; our contract draft was wrong, not the code
jubayer-hamid/bid_lerobot/lerobot/common/datasets/utils.py
code served (permissive licence) · get_code("e2adf71cdd509f3e")
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 dict. The image it ran in was 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

# Construct arguments for flatten_dict function
# The function takes: d (dict), parent_key (str, default=''), sep (str, default='/')

# Create a nested dictionary structure to test the flattening
nested_dict = {
    "a": {
        "b": 1,
        "c": {
            "d": 2
        }
    },
    "e": 3,
    "f": {
        "g": {
            "h": {
                "i": 4
            }
        }
    }
}

ARGS = {
    "d": nested_dict,
    "parent_key": "",
    "sep": "/"
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_wandb_run_id_from_filesystem Ran
ran; our contract draft was wrong, not the code
jubayer-hamid/bid_lerobot/lerobot/common/logger.py
code served (permissive licence) · get_code("34feb637b36db73f")
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 str. The image it ran in was 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 re
from glob import glob
from pathlib import Path
import tempfile
import os

# Create a temporary directory structure that mimics the wandb file layout
temp_dir = tempfile.mkdtemp()
checkpoint_dir = Path(temp_dir) / "checkpoints"
checkpoint_dir.mkdir(parents=True, exist_ok=True)

wandb_dir = Path(temp_dir) / "wandb" / "latest-run"
wandb_dir.mkdir(parents=True, exist_ok=True)

# Create a valid wandb run file with the expected naming pattern
run_id = "abc123def456"
wandb_file = wandb_dir / f"run-{run_id}.wandb"
wandb_file.touch()

ARGS = {
    "checkpoint_dir": checkpoint_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
hf_transform_to_torch Ran
ran; our contract draft was wrong, not the code
jubayer-hamid/bid_lerobot/lerobot/common/datasets/utils.py
code served (permissive licence) · get_code("099e51f9595e2381")
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 dict. The image it ran in was 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
from PIL import Image as PILImage
import numpy as np

torch.manual_seed(0)

# Create sample PIL images (2 images, each 4x3 pixels, RGB)
img1 = PILImage.new('RGB', (4, 3), color=(100, 150, 200))
img2 = PILImage.new('RGB', (4, 3), color=(50, 75, 100))

# Create sample data with different types
items_dict = {
    'images': [img1, img2],
    'scalars': [1.5, 2.5],
    'vectors': [np.array([1.0, 2.0, 3.0, 4.0]), np.array([5.0, 6.0, 7.0, 8.0])],
    'metadata': [{'path': '/data/file1.jpg', 'timestamp': 1000}, {'path': '/data/file2.jpg', 'timestamp': 2000}],
    'none_values': [None, None]
}

ARGS = {
    'items_dict': items_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
preprocess_observation Ran
ran; our contract draft was wrong, not the code
jubayer-hamid/bid_lerobot/lerobot/common/envs/utils.py
code served (permissive licence) · get_code("e6d251290c05dab4")
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 dict. The image it ran in was 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)

# Build a minimal observation dictionary that matches what the function expects
observations = {
    'pixels': np.random.randint(0, 256, size=(2, 64, 80, 3), dtype=np.uint8),  # batch=2, h=64, w=80, c=3
    'environment_state': np.random.randn(2, 5).astype(np.float32),  # batch=2, state_dim=5
    'agent_pos': np.random.randn(2, 4).astype(np.float32),  # batch=2, pos_dim=4
}

ARGS = {
    'observations': observations,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
unflatten_dict Ran
ran; our contract draft was wrong, not the code
jubayer-hamid/bid_lerobot/lerobot/common/datasets/utils.py
code served (permissive licence) · get_code("ad190f7467ea58ae")
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 dict. The image it ran in was 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

# Analyze the function: unflatten_dict takes a dict with keys that may contain
# a separator (default '/') and reconstructs a nested dictionary structure.
# It iterates through key-value pairs, splits keys by separator, and builds
# nested dicts accordingly.

# Create a simple flat dictionary with separator-delimited keys
d = {
    'a/b/c': 1,
    'a/b/d': 2,
    'a/e': 3,
    'f': 4,
    'g/h/i/j': 5
}

# The sep parameter is optional with default '/'
sep = '/'

ARGS = {
    'd': d,
    'sep': sep
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
decode_video_frames_torchvision Not yet run
unverified (harvested, no recorded run)
jubayer-hamid/bid_lerobot/lerobot/common/datasets/video_utils.py
code served (permissive licence) · get_code("50b733cd61beee6e")
How it ran

no invocation recorded.

get_image_transforms Not yet run
unverified (harvested, no recorded run)
jubayer-hamid/bid_lerobot/lerobot/common/datasets/transforms.py
code served (permissive licence) · get_code("41456dc6464cef69")
How it ran

no invocation recorded.

load_from_videos Not yet run
unverified (harvested, no recorded run)
jubayer-hamid/bid_lerobot/lerobot/common/datasets/video_utils.py
code served (permissive licence) · get_code("08e3707d74a100d9")
How it ran

no invocation recorded.

make_env Not yet run
unverified (harvested, no recorded run)
jubayer-hamid/bid_lerobot/lerobot/common/envs/factory.py
code served (permissive licence) · get_code("a46ac2680ddd2dbe")
How it ran

no invocation recorded.

postprocess_action_batch Not yet run
unverified (harvested, no recorded run)
YuejiangLIU/bid_diffusion/diffusion_policy/sampler/base.py
pointer only (licence: NOASSERTION) · get_code("597482ebd2495227")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, YuejiangLIU/bid_diffusion (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

preprocess_obs_batch Not yet run
unverified (harvested, no recorded run)
YuejiangLIU/bid_diffusion/diffusion_policy/sampler/base.py
pointer only (licence: NOASSERTION) · get_code("e1f5a88e179e4f79")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, YuejiangLIU/bid_diffusion (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

slice_action_batch Not yet run
unverified (harvested, no recorded run)
YuejiangLIU/bid_diffusion/diffusion_policy/sampler/base.py
pointer only (licence: NOASSERTION) · get_code("205ee75fa1a06a47")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, YuejiangLIU/bid_diffusion (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 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 14 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

Predicting and executing a sequence of actions without intermediate replanning, known as action chunking, is increasingly used in robot learning from human demonstrations. Yet, its effects on the learned policy remain inconsistent: some studies find it crucial for achieving strong results, while others observe decreased performance. In this paper, we first dissect how action chunking impacts the divergence between a learner and a demonstrator. We find that action chunking allows the learner to better capture the temporal dependencies in demonstrations but at the cost of reduced reactivity to unexpected states. To address this tradeoff, we propose Bidirectional Decoding (BID), a test-time inference algorithm that bridges action chunking with closed-loop adaptation. At each timestep, BID samples multiple candidate predictions and searches for the optimal one based on two criteria: (i) backward coherence, which favors samples that align with previous decisions; (ii) forward contrast, which seeks samples of high likelihood for future plans. By coupling decisions within and across action chunks, BID promotes both long-term consistency and short-term reactivity. Experimental results show that our method boosts the performance of two state-of-the-art generative policies across seven simulation benchmarks and two real-world tasks. Code and videos are available at https://bid-robot.github.io.

For agents

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

get_harvested_code_for_paper("2408.17355")
get_code_for_paper("2408.17355")
have("2408.17355")

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

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

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

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

Connect an agent — have() is free.