SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.20299 · ICML · 2024

Dataset Distillation for Offline Reinforcement Learning

Ziniu Hu, Yuanzhe Liu, Jonathan Light

arXiv · PDF · Open in the Atlas

Code that ran

11 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 1 violated it and 6 have no contract verdict; 1 failure of our instrument; 5 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/2407.20299.json · badge: /api/ran/2407.20299.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
ggflow123/ddrl canonical (classifier label)
classifier basis: classifier_2025
9 ran · 5 no recorded run
princetonvisualai/multimodal_dataset_distillation extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
AbstractLogged Ran
ran on a synthesized input · constructed an object; no result was computed
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("3cb6088a994bb026")
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, AbstractLogged: the run constructed the object and did not call it, so no result was computed. 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 logging
from abc import ABC, abstractmethod

class AbstractLogged(ABC):
    _instance_counter = 0

    def __init__(self):
        type(self)._instance_counter += 1
        self.instance_id = type(self)._instance_counter
        self.logger = logging.getLogger(f'{self.__class__.__name__}_{self.instance_id}')

    def log(self, message, level=logging.INFO):
        self.logger.log(level, message)


class ConcreteLogged(AbstractLogged):
    pass


logging.basicConfig(level=logging.INFO)

ARGS = {}
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 AbstractLogged — 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 AbstractLogged 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
DataLoader Ran
ran on a synthesized input · constructed an object; no result was computed
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("73df4926a09d96e6")
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, DataLoader: the run constructed the object and did not call it, so no result was computed. 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 tempfile
import os
import json
import logging

# Configure logging
logging.basicConfig(level=logging.INFO)

# Create a temporary directory for the data file
temp_dir = tempfile.mkdtemp()
data_path = os.path.join(temp_dir, "test_data.json")

# Create sample data to write to the file
sample_data = [
    [
        ({"position": 0}, 0, 1.0, {}),
        ({"position": 1}, 1, 2.0, {}),
        (None, None, 0.0, {})
    ],
    [
        ({"position": 0}, 1, 0.5, {}),
        ({"position": 1}, 0, 1.5, {}),
        (None, None, 0.0, {})
    ]
]

# Write the sample data to file
with open(data_path, 'w') as f:
    json.dump(sample_data, f)

# Define ARGS
ARGS = {
    "data_path": data_path
}
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 DataLoader — 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 DataLoader 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
DataLoaderPickle Ran
ran on a synthesized input · constructed an object; no result was computed
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("c66c5a6b68b33c2a")
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, DataLoaderPickle: the run constructed the object and did not call it, so no result was computed. 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 logging
import tempfile
import os

# Configure logging to avoid warnings
logging.basicConfig(level=logging.INFO)

# Create a temporary directory for test data
temp_dir = tempfile.mkdtemp()
data_path = os.path.join(temp_dir, "test_data.pkl")

# Construct sample trajectory data
# Each trajectory is a list of tuples: (state, action, reward, info)
# Per convention: last action is None, last reward is 0.0

trajectory_1 = [
    ("state_0", "action_a", 1.5, {"step": 0}),
    ("state_1", "action_b", 2.0, {"step": 1}),
    ("state_2", None, 0.0, {"step": 2, "terminal": True}),
]

trajectory_2 = [
    ("state_0", "action_a", 0.5, {"step": 0}),
    ("state_1", "action_a", 1.0, {"step": 1}),
    ("state_2", None, 0.0, {"step": 2, "terminal": True}),
]

sample_data = [trajectory_1, trajectory_2]

# Create a pickle file with sample data
import pickle
with open(data_path, 'wb') as f:
    pickle.dump(sample_data, f)

# Define ARGS for DataLoaderPickle
ARGS = {
    "data_path": data_path,
}
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 DataLoaderPickle — 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 DataLoaderPickle 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
LossFunction Ran
ran on a synthesized input · constructed an object; no result was computed
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("9fe90b52f58f8c3a")
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, LossFunction: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "name": "custom_loss"
}
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 LossFunction — 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 LossFunction 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
RolloutBufferBatch Ran
ran on a synthesized input · constructed an object; no result was computed
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("1d6558861d2f2019")
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, RolloutBufferBatch: the run constructed the object and did not call it, so no result was computed. 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)

# Define arguments for RolloutBufferBatch.__init__
state_dim = (4,)  # 1D state with dimension 4
knowledge_dim = (3,)  # 1D knowledge with dimension 3
buffer_size = 10
device = 'cpu'
rng = np.random.default_rng(seed=42)

ARGS = {
    'state_dim': state_dim,
    'knowledge_dim': knowledge_dim,
    'buffer_size': buffer_size,
    'device': device,
    'rng': rng,
}
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 RolloutBufferBatch — 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 RolloutBufferBatch 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
TrainableSyntheticBufferBatch Ran
ran on a synthesized input · constructed an object; no result was computed
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("56af60c95bc3fb0e")
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, TrainableSyntheticBufferBatch: the run constructed the object and did not call it, so no result was computed. 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)
np.random.seed(0)

ARGS = {
    'state_dim': (4,),
    'knowledge_dim': (3,),
    'buffer_size': 100,
    'synthetic_buffer_size': 50,
    'synthetic_init_threshold_size': 10,
    'rng': np.random.default_rng(42),
    'device': 'cpu'
}
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 TrainableSyntheticBufferBatch — 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 TrainableSyntheticBufferBatch 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
distribute_evenly Ran
ran, honoured the contract we drafted
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("c911cb44a79226cd")
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 list, ndim 1, dtype family int; 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

torch.manual_seed(0)

# Parameters for distribute_evenly function
n = 100  # Total number to distribute
buckets = 15  # Number of buckets

ARGS = {
    "n": n,
    "buckets": buckets
}
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 list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
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_batch Ran
ran; our contract draft was wrong, not the code
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("12a6de047472cde7")
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. 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)

# The function expects:
# - states_list: indexable by action, returns a tensor with .size(0) method
# - actions_list: indexable by action, returns a tensor that can be indexed
# - action: an integer key
# - batch_size: an integer

# Create small tensors for states and actions
states_0 = torch.randn(5, 4)  # 5 samples, 4 state dims
actions_0 = torch.randn(5, 3)  # 5 samples, 3 action dims

states_1 = torch.randn(6, 4)  # different size for action 1
actions_1 = torch.randn(6, 3)

# Create lists indexed by action
states_list = [states_0, states_1]
actions_list = [actions_0, actions_1]

# Action to sample from
action = 0

# Batch size (must be <= min size in the selected action's data)
batch_size = 2

ARGS = {
    "states_list": states_list,
    "actions_list": actions_list,
    "action": action,
    "batch_size": batch_size,
}
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 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
match_loss Ran
ran, honoured the contract we drafted
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("41b286a2ec86656d")
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 Tensor, 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)

device = 'cpu'

# Create synthetic gradient list with some None values and some tensors
gw_syn = [
    torch.randn(3, 4),
    None,
    torch.randn(5, 2),
    torch.randn(6),
]

# Create real gradient list with matching structure
gw_real = [
    torch.randn(3, 4),
    None,
    torch.randn(5, 2),
    torch.randn(6),
]

ARGS = {
    'gw_syn': gw_syn,
    'gw_real': gw_real,
    'device': device,
}
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 Tensor, 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
nearest_neighbor Ran
ran, violated the contract we drafted
princetonvisualai/multimodal_dataset_distillation/distill.py
pointer only (licence: NONE) · get_code("c84ddf44fce519da")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princetonvisualai/multimodal_dataset_distillation when it was checked. 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. A run is recorded.

shuffle_files Ran
ran, honoured the contract we drafted
princetonvisualai/multimodal_dataset_distillation/distill.py
pointer only (licence: NONE) · get_code("89cd29634c210401")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princetonvisualai/multimodal_dataset_distillation when it was checked. 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. A run is recorded.

Model Not yet run
unverified (harvested, no recorded run)
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("cbc548badb31e2e4")
How it ran

no invocation recorded.

Student Not yet run
unverified (harvested, no recorded run)
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("da97ab3fee55f7b1")
How it ran

no invocation recorded.

Teacher Not yet run
unverified (harvested, no recorded run)
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("f36979f0b3c89a3e")
How it ran

no invocation recorded.

entire_loader Not yet run
unverified (harvested, no recorded run)
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("1fc0dc32dbfef7dd")
How it ran

no invocation recorded.

train_data_episodic_offline Not yet run
unverified (harvested, no recorded run)
ggflow123/ddrl/src/data_distillation_training_offline.py
code served (permissive licence) · get_code("ca58cfbf08d9ed67")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 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.

FunctionAlso present inEarliest-datedOthers named
nearest_neighbor 2 other papers
2 dated earlier
2308.07545 (2023-08)
Vision-Language Dataset Distillation
2406.03793 (2024-06)
Low-Rank Similarity Mining for Multimodal Dataset Distillation
shuffle_files 1 other paper
1 dated earlier
2308.07545 (2023-08)
Vision-Language Dataset Distillation

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

Offline reinforcement learning often requires a quality dataset that we can train a policy on. However, in many situations, it is not possible to get such a dataset, nor is it easy to train a policy to perform well in the actual environment given the offline data. We propose using data distillation to train and distill a better dataset which can then be used for training a better policy model. We show that our method is able to synthesize a dataset where a model trained on it achieves similar performance to a model trained on the full dataset or a model trained using percentile behavioral cloning. Our project site is available here. We also provide our implementation at this GitHub repository.

For agents

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

get_harvested_code_for_paper("2407.20299")
get_code_for_paper("2407.20299")
have("2407.20299")

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

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

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

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

Connect an agent — have() is free.