SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.14653 · 2024

OASIS: Conditional Distribution Shaping for Offline Safe Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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; 5 failures of our instrument; 3 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.14653.json · badge: /api/ran/2407.14653.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
yihangyao/OASIS canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
CUDA Ran
ran; our contract draft was wrong, not the code
yihangyao/OASIS/Generation/causal_model.py
code served (permissive licence) · get_code("572c07ae4870962e")
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 2, dtype family float, shape (2, 4) as a later run recorded it. 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, 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)

# Create a small tensor to pass as the 'var' parameter
var = torch.randn(2, 4)

# Define the ARGS dict with all parameters
ARGS = {
    'var': var,
    'device': 'cpu'
}
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 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
get_keys Ran
ran; our contract draft was wrong, not the code
yihangyao/OASIS/DSRL/dsrl/offline_env.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from seohongpark/HILP, is pointer only (licence: NONE) · get_code("395635db622171fa")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from seohongpark/HILP, and GitHub detected no licence in that repository 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.

mlp Ran
ran; our contract draft was wrong, not the code
yihangyao/OASIS/OSRL/osrl/common/net.py
code served (permissive licence) · get_code("cb1929149ecc4471")
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 Sequential. 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 torch.nn as nn

torch.manual_seed(0)

# Define the arguments for the mlp function
ARGS = {
    "sizes": [4, 8, 6, 2],
    "activation": nn.ReLU,
    "output_activation": nn.Tanh
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential 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
temp_sigmoid Ran
ran; our contract draft was wrong, not the code
yihangyao/OASIS/Generation/causal_model.py
code served (permissive licence) · get_code("40840130a00e53c9")
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 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

torch.manual_seed(0)

# temp_sigmoid takes two parameters:
# - x: a tensor to apply sigmoid to (with temperature scaling)
# - temp: temperature parameter (default 1.0)

x = torch.randn(2, 4)
temp = 1.0

ARGS = {
    "x": x,
    "temp": temp,
}
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 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_torch Ran
ran; our contract draft was wrong, not the code
yihangyao/OASIS/OSRL/osrl/common/net.py
code served (permissive licence) · get_code("134173215340e0d1")
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. 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)

# Test case 1: Test with a list (will be converted to tensor)
x_list = [1.0, 2.0, 3.0, 4.0]

# Test case 2: Test with a numpy array
x_numpy = np.array([[1.0, 2.0], [3.0, 4.0]])

# Test case 3: Test with a tensor
x_tensor = torch.randn(2, 4)

# Test case 4: Test with a dict containing mixed types
x_dict = {
    'tensor': torch.randn(2, 4),
    'list': [1.0, 2.0, 3.0],
    'nested_dict': {
        'inner_tensor': torch.randn(2, 3)
    }
}

# Use the dict case as primary argument since it exercises the most code paths
ARGS = {
    'x': x_dict,
    'dtype': torch.float32,
    '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 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
download_dataset_from_url Not yet run
unverified (harvested, no recorded run)
yihangyao/OASIS/DSRL/dsrl/offline_env.py
code served (permissive licence) · get_code("6f1537c5f45a3b7e")
How it ran

no invocation recorded.

extract Not yet run
unverified (harvested, no recorded run)
yihangyao/OASIS/OSRL/osrl/common/net.py
code served (permissive licence) · get_code("09c8479d9a5b3e06")
How it ran

no invocation recorded.

filepath_from_url Not yet run
unverified (harvested, no recorded run)
yihangyao/OASIS/DSRL/dsrl/offline_env.py
code served (permissive licence) · get_code("e14321aa0b5c0b78")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 1 the same month, 4 later) and 2 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
extract 77 other papers
46 dated earlier, 4 the same month, 25 later, 2 same year, order not determinable · 32 only as an assembly brick
1711.11585 (2017-11)
High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
and 74 more not named here
filepath_from_url 6 other papers
5 dated earlier, 1 later
2004.07219 (2020-04)
D4RL: Datasets for Deep Data-Driven Reinforcement Learning
2211.09817 (2022-11)
On the Effect of Pre-training for Transformer in Different Modality on Offline Reinforcement Learning
2306.09303 (2023-06)
Datasets and Benchmarks for Offline Safe Reinforcement Learning
and 3 more not named here
get_keys 6 other papers
5 dated earlier, 1 later
2004.07219 (2020-04)
D4RL: Datasets for Deep Data-Driven Reinforcement Learning
2211.09817 (2022-11)
On the Effect of Pre-training for Transformer in Different Modality on Offline Reinforcement Learning
2306.09303 (2023-06)
Datasets and Benchmarks for Offline Safe Reinforcement Learning
and 3 more not named here
mlp 3 other papers
1 dated earlier, 2 later · 1 only as an assembly brick
2302.07351 (2023-02)
Constrained Decision Transformer for Offline Safe Reinforcement Learning
2510.22027 (2025-10)
Online Optimization for Offline Safe Reinforcement Learning
2602.08584 (2026-02)
Conditional Sequence Modeling for Safe Reinforcement Learning
to_torch 2 other papers
2 dated earlier
2305.18459 (2023-05)
Diffusion Model is an Effective Planner and Data Synthesizer for Multi-Task Reinforcement Learning
2402.07226 (2024-02)
Stitching Sub-trajectories with Conditional Diffusion Model for Goal-Conditioned Offline RL
download_dataset_from_url 1 other paper
1 dated earlier
2306.09303 (2023-06)
Datasets and Benchmarks for Offline Safe Reinforcement Learning

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 safe reinforcement learning (RL) aims to train a policy that satisfies constraints using a pre-collected dataset. Most current methods struggle with the mismatch between imperfect demonstrations and the desired safe and rewarding performance. In this paper, we introduce OASIS (cOnditionAl diStributIon Shaping), a new paradigm in offline safe RL designed to overcome these critical limitations. OASIS utilizes a conditional diffusion model to synthesize offline datasets, thus shaping the data distribution toward a beneficial target domain. Our approach makes compliance with safety constraints through effective data utilization and regularization techniques to benefit offline safe RL training. Comprehensive evaluations on public benchmarks and varying datasets showcase OASIS's superiority in benefiting offline safe RL agents to achieve high-reward behavior while satisfying the safety constraints, outperforming established baselines. Furthermore, OASIS exhibits high data efficiency and robustness, making it suitable for real-world applications, particularly in tasks where safety is imperative and high-quality demonstrations are scarce.

For agents

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

get_harvested_code_for_paper("2407.14653")
get_code_for_paper("2407.14653")
have("2407.14653")

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

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

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

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

Connect an agent — have() is free.