SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.13774 · ICML · 2023

Distance Weighted Supervised Learning for Offline Interaction Data

Dorsa Sadigh, Jensen Gao, Joey Hejna

arXiv · PDF · Open in the Atlas

Code that ran

14 of 27 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; 2 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 10 failures of our instrument; 13 no recorded run), measured 2026-11-23; 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/2304.13774.json · badge: /api/ran/2304.13774.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
jhejna/dwsl community
Papers with Code archive
14 ran · 13 no recorded run
FunctionStatusWhere it lives
IdentityProcessor Ran
ran on a synthesized input
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("b091d78e039a3988")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 gym
import numpy as np
from gym.spaces import Box, Discrete

# Define observation and action spaces
observation_space = Box(low=-1.0, high=1.0, shape=(4,), dtype=np.float32)
action_space = Discrete(3)

# INIT_ARGS for IdentityProcessor
INIT_ARGS = {
    'observation_space': observation_space,
    'action_space': action_space
}

# Create a sample batch for ARGS
batch = torch.randn(2, 4)  # batch_size=2, feature_dim=4

# ARGS for IdentityProcessor
ARGS = {
    'batch': batch
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
gym, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_get_space Ran
ran; our contract draft was wrong, not the code
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("1120c18dc5d68b27")
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) 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 numpy as np
import gym

# Test case 1: Discrete space (high only)
args_discrete = {
    'low': None,
    'high': 5,
    'shape': None,
    'dtype': None
}

# Test case 2: Box space with scalars
args_box_scalar = {
    'low': 0.0,
    'high': 1.0,
    'shape': (4,),
    'dtype': np.float32
}

# Test case 3: Box space with arrays
args_box_array = {
    'low': np.array([0.0, -1.0]),
    'high': np.array([1.0, 1.0]),
    'shape': (2,),
    'dtype': np.float32
}

# Test case 4: Dict space with multiple subspaces
args_dict_space = {
    'low': {'position': 0.0, 'velocity': -1.0},
    'high': {'position': 10.0, 'velocity': 1.0},
    'shape': {'position': (3,), 'velocity': (2,)},
    'dtype': {'position': np.float32, 'velocity': np.float32}
}

# Use the dict space test case as the primary ARGS
ARGS = args_dict_space
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
gym, numpy — 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 1 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
contains_tensors Ran
ran, violated the contract we drafted
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("637f84c3975402d4")
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) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Test case 1: batch is a dict containing tensors
batch_with_tensors = {
    "input": torch.randn(2, 4),
    "target": torch.randn(2, 4)
}

# Test case 2: batch is a list containing tensors
batch_list_with_tensors = [torch.randn(2, 4), torch.randn(2, 4)]

# Test case 3: batch is a dict with nested structures containing tensors
batch_nested = {
    "data": [torch.randn(2, 4), torch.randn(2, 4)],
    "metadata": {"id": 1}
}

# Test case 4: batch is a dict without tensors
batch_no_tensors = {
    "id": 1,
    "name": "test"
}

# Test case 5: batch is a list without tensors
batch_list_no_tensors = [1, 2, 3]

# Test case 6: batch is a single tensor
batch_single_tensor = torch.randn(2, 4)

# Test case 7: batch is a scalar (no tensor)
batch_scalar = 42

ARGS = {
    "batch": batch_with_tensors
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("0954fb2e0809ee19")
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) 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 gym
from typing import Dict, Any

# Create a nested dictionary structure to test the flatten_dict function
nested_dict = {
    'model': {
        'layer1': {
            'weights': 'weight_tensor',
            'bias': 'bias_tensor'
        },
        'layer2': 'activation'
    },
    'optimizer': {
        'lr': 0.001,
        'momentum': 0.9
    },
    'simple_value': 42
}

ARGS = {
    'd': nested_dict,
    'separator': '.'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
gym — 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_buffer_bytes Ran
ran, honoured the contract we drafted
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("2560be95562059c8")
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) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

# Create a simple numpy array for testing
buffer_array = np.array([[1, 2, 3, 4], [5, 6, 7, 8]], dtype=np.float32)

ARGS = {
    "buffer": buffer_array
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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_from_batch Ran
ran; our contract draft was wrong, not the code
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("4e1e3b9c7d834b3c")
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) 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)

# Test case 1: Simple tensor indexing with single index
batch_tensor = torch.randn(5, 4)
start_idx = 2
end_idx = None

# Test case 2: Nested dict with tensors
batch_dict = {
    'x': torch.randn(6, 3),
    'y': torch.randn(4, 2),
    'nested': {
        'z': torch.randn(7, 4)
    }
}

# Test case 3: List of tensors
batch_list = [torch.randn(5, 4), torch.randn(3, 2)]

# Test case 4: Numpy array
batch_numpy = np.random.randn(8, 4)

# Test case 5: Using numpy array as index
start_np = np.array([0, 2, 4])

# Test case 6: Using torch tensor as index
start_torch = torch.tensor([1, 3])

# Test case 7: Mixed nested structure
batch_mixed = {
    'tensors': [torch.randn(5, 4), torch.randn(3, 2)],
    'arrays': np.random.randn(6, 3),
    'tuple': (torch.randn(4, 2), np.random.randn(5, 3))
}

# Primary test case: dict with tensors, using integer start and end
ARGS = {
    'batch': {
        'data': torch.randn(10, 4),
        'labels': torch.randn(10, 2)
    },
    'start': 2,
    'end': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
nest_dict Ran
ran; our contract draft was wrong, not the code
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("253bd1783fdde661")
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) 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
from typing import Dict, Optional

torch.manual_seed(0)

# Construct a flat dictionary with dot-separated keys
d = {
    'model.layer1.weight': 0.5,
    'model.layer1.bias': 0.1,
    'model.layer2.weight': 0.3,
    'training.lr': 0.001,
    'training.epochs': 100,
    'data.batch_size': 32
}

separator = '.'

ARGS = {
    'd': d,
    'separator': separator
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
np_bytes_per_instance Ran
ran, honoured the contract we drafted
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("b24b0464408ffe6f")
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) and returned int64, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 gym

# Test with a gym.spaces.Box
box_space = gym.spaces.Box(low=0, high=1, shape=(4, 3), dtype=np.float32)

ARGS = {
    "space": box_space
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int64, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
np_dataset_alloc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("6a5e94d838f59eb4")
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) and returned ndarray, ndim 5, dtype family float, shape (10, 2, 4, 3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 gym

# Create a simple Box space
box_space = gym.spaces.Box(low=0, high=1, shape=(4, 3), dtype=np.float32)

# Create arguments for the function
ARGS = {
    "space": box_space,
    "capacity": 10,
    "begin_pad": (2,),
    "end_pad": (3,)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 5, dtype family float, shape (10, 2, 4, 3, 3) — shape (10, 2, 4, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
remove_stack_dim Ran
ran; our contract draft was wrong, not the code
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("a22c277630c0ae43")
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) and returned Box. 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 gym
import numpy as np

# Test case 1: Box space (the main case being tested)
box_space = gym.spaces.Box(
    low=np.array([[0.0, 1.0, 2.0, 3.0]]),
    high=np.array([[10.0, 11.0, 12.0, 13.0]]),
    dtype=np.float32
)

ARGS = {
    "space": box_space
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Box — a Box output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Box 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
to_device Ran
ran; our contract draft was wrong, not the code
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("743f3e742b59e566")
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) 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

torch.manual_seed(0)

# Create a complex nested batch structure with tensors, dicts, and lists
tensor1 = torch.randn(2, 4)
tensor2 = torch.randn(3, 5)
tensor3 = torch.randn(2, 2)

batch = {
    "input_ids": tensor1,
    "attention_mask": tensor2,
    "nested_list": [tensor3, {"deep_tensor": torch.randn(1, 4)}],
    "simple_value": torch.randn(2, 3)
}

device = torch.device("cpu")

ARGS = {
    "batch": batch,
    "device": device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
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
to_np Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("42e782a8ed834a53")
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) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# Test case 1: torch.Tensor
tensor_batch = torch.randn(2, 4)

# Test case 2: dict containing tensors
dict_batch = {
    "input": torch.randn(2, 4),
    "target": torch.randn(2, 3),
    "nested": {
        "value": torch.randn(1, 5)
    }
}

# Test case 3: list of tensors
list_batch = [torch.randn(2, 4), torch.randn(3, 5)]

# Test case 4: tuple of tensors
tuple_batch = (torch.randn(2, 4), torch.randn(2, 3))

# Test case 5: mixed nested structure
mixed_batch = {
    "tensors": [torch.randn(2, 4), torch.randn(1, 3)],
    "single": torch.randn(2, 5),
    "tuple": (torch.randn(2, 2), torch.randn(1, 4))
}

ARGS = {
    "batch": tensor_batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
to_tensor Ran
ran; our contract draft was wrong, not the code
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("95d8a0e297dabc98")
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) 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 numpy as np
import torch

torch.manual_seed(0)

# Test case 1: dict with numpy arrays
batch_dict = {
    'a': np.array([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=np.float64),
    'b': np.array([[9.0, 10.0, 11.0, 12.0]], dtype=np.float32),
}

# Test case 2: list with numpy arrays
batch_list = [
    np.array([[1.0, 2.0, 3.0, 4.0]], dtype=np.float64),
    np.array([[5.0, 6.0, 7.0, 8.0]], dtype=np.float32),
]

# Test case 3: tuple with numpy arrays
batch_tuple = (
    np.array([[1.0, 2.0, 3.0, 4.0]], dtype=np.float64),
    np.array([[5.0, 6.0, 7.0, 8.0]], dtype=np.float32),
)

# Test case 4: nested structure
batch_nested = {
    'x': [np.array([[1.0, 2.0, 3.0, 4.0]], dtype=np.float64)],
    'y': (np.array([[5.0, 6.0, 7.0, 8.0]], dtype=np.float32),),
}

ARGS = {
    'batch': batch_dict,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
unsqueeze Ran
ran; our contract draft was wrong, not the code
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("f0ae192e0609afeb")
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) and returned Tensor, ndim 3, dtype family float, shape (2, 1, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# Test case 1: torch.Tensor
tensor_batch = torch.randn(2, 4)

# Test case 2: dict with nested tensors
dict_batch = {
    'a': torch.randn(2, 4),
    'b': torch.randn(3, 5)
}

# Test case 3: list with mixed types
list_batch = [
    torch.randn(2, 4),
    np.array([[1, 2], [3, 4]]),
    5
]

# Test case 4: tuple with tensors
tuple_batch = (torch.randn(2, 4), torch.randn(3, 5))

# Test case 5: numpy array
numpy_batch = np.array([[1, 2, 3], [4, 5, 6]])

# Test case 6: scalar int
scalar_int = 42

# Test case 7: scalar float
scalar_float = 3.14

# Test case 8: numpy scalar
numpy_scalar = np.float32(2.71)

# Use the tensor_batch and dim as primary test case
ARGS = {
    'batch': tensor_batch,
    'dim': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 1, 4) — shape (2, 1, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
Algorithm Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("0bc5a55290b00b3d")
How it ran

no invocation recorded.

DWSL Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("2849ec76164663e1")
How it ran

no invocation recorded.

Empty Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("61e694e983824ce6")
How it ran

no invocation recorded.

OffPolicyAlgorithm Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("44dba07f7e9beef9")
How it ran

no invocation recorded.

Processor Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("deee25387cd3a9ad")
How it ran

no invocation recorded.

ReplayBuffer Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("377a3792bec4c050")
How it ran

no invocation recorded.

_flatten_dict_helper Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("1a771a68f2829a00")
How it ran

no invocation recorded.

add_dummy_transition Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("85f672bba25c666b")
How it ran

no invocation recorded.

add_to_ep Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("19868d3ab5b76af1")
How it ran

no invocation recorded.

concatenate Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("28abd9986e85184e")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("2906ca8520e2b085")
How it ran

no invocation recorded.

save_data Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("135a3fcc0598994a")
How it ran

no invocation recorded.

set_in_batch Not yet run
unverified (harvested, no recorded run)
jhejna/dwsl/research/algs/dwsl.py
code served (permissive licence) · get_code("7830c871b6faa561")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Sequential decision making algorithms often struggle to leverage different sources of unstructured offline interaction data. Imitation learning (IL) methods based on supervised learning are robust, but require optimal demonstrations, which are hard to collect. Offline goal-conditioned reinforcement learning (RL) algorithms promise to learn from sub-optimal data, but face optimization challenges especially with high-dimensional data. To bridge the gap between IL and RL, we introduce Distance Weighted Supervised Learning or DWSL, a supervised method for learning goalconditioned policies from offline data. DWSL models the entire distribution of time-steps between states in offline data with only supervised learning, and uses this distribution to approximate shortest path distances. To extract a policy, we weight actions by their reduction in distance estimates. Theoretically, DWSL converges to an optimal policy constrained to the data distribution, an attractive property for offline learning, without any bootstrapping. Across all datasets we test, DWSL empirically maintains behavior cloning as a lower bound while still exhibiting policy improvement. In high-dimensional image domains, DWSL surpasses the performance of both prior goal-conditioned IL and RL algorithms. Visualizations and code can be found at https:// sites.google.com/view/dwsl/home.

For agents

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

get_harvested_code_for_paper("2304.13774")
get_code_for_paper("2304.13774")
have("2304.13774")

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

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

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

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

Connect an agent — have() is free.