SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.02486 · ICLR · 2025

Dual-Robust Cross-Domain Offline Reinforcement Learning Against Dynamics Shifts

Zhuoran Yang, Zhongxiang Dai, Rui Yang, Xiu Li, Shuang Qiu, Jiafei Lyu, Siyang Gao, Zhongjian Qiao, Cityuhk

arXiv · PDF · Open in the Atlas

Code that ran

10 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 2 failures of our instrument; 4 no recorded run), measured 2026-11-22; 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/2512.02486.json · badge: /api/ran/2512.02486.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
zq2r/DROCO community
Papers with Code archive
9 ran · 4 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
DoubleQFunc Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("61f889f4af38b19e")
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, DoubleQFunc: 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "state_dim": 4,
    "action_dim": 3,
    "hidden_size": 256,
}
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 DoubleQFunc — 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 DoubleQFunc 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
EnsembleFC Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("565d5f3b2d92ee92")
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, EnsembleFC: 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 torch.nn as nn

torch.manual_seed(0)

# Define the arguments for EnsembleFC
ARGS = {
    'in_features': 4,
    'out_features': 3,
    'ensemble_size': 2,
    'weight_decay': 0.01,
    'bias': True
}
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 EnsembleFC — 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 EnsembleFC 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
EnsembleModel Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("d947cb060e01ed70")
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, EnsembleModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

ARGS = {
    'state_size': 4,
    'action_size': 3,
    'reward_size': 2,
    'ensemble_size': 2,
    'hidden_size': 8,
    'learning_rate': 0.001,
    'use_decay': False,
    '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 EnsembleModel — 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 EnsembleModel 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
MLPNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("c62cb3511f9129eb")
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, MLPNetwork: 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'input_dim': 4,
    'output_dim': 3,
    'hidden_size': 256
}
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 MLPNetwork — 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 MLPNetwork 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
Normalizer Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("8165b4e4e90023a0")
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, Normalizer: 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

# The Normalizer.__init__ takes only one parameter: dim
# We need to provide a valid integer for the dimension

dim_value = 4

ARGS = {
    'dim': dim_value
}
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 Normalizer — 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 Normalizer 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
Policy Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("8a661ac1c9e4bfbf")
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, Policy: 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 torch.nn as nn
import math

torch.manual_seed(0)

# Define ARGS dictionary with all parameters for Policy.__init__
ARGS = {
    "state_dim": 4,
    "action_dim": 3,
    "max_action": 1.0,
    "hidden_size": 256
}
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 Policy — 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 Policy 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
TanhTransform Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("b6adb9bd3187839e")
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, TanhTransform: 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 torch.nn.functional as F
from torch.distributions import Normal, TransformedDistribution, constraints
from torch.distributions.transforms import Transform
import math

torch.manual_seed(0)

class TanhTransform(Transform):
    """
    Transform via the mapping :math:`y = \\tanh(x)`.
    It is equivalent to
    
    ComposeTransform([AffineTransform(0., 2.), SigmoidTransform(), AffineTransform(-1., 2.)])
    
    However this might not be numerically stable, thus it is recommended to use `TanhTransform`
    instead.
    Note that one should use `cache_size=1` when it comes to `NaN/Inf` values.
    """
    domain = constraints.real
    codomain = constraints.interval(-1.0, 1.0)
    bijective = True
    sign = +1

    @staticmethod
    def atanh(x):
        return 0.5 * (x.log1p() - (-x).log1p())

    def __eq__(self, other):
        return isinstance(other, TanhTransform)

    def _call(self, x):
        return x.tanh()

    def _inverse(self, y):
        return self.atanh(y)

    def log_abs_det_jacobian(self, x, y):
        return 2.0 * (math.log(2.0) - x - F.softplus(-2.0 * x))


# Create test tensors
x = torch.randn(2, 4)
y = torch.tanh(x)

# TanhTransform has no __init__ parameters, so ARGS is empty
ARGS = {}
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 TanhTransform — 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 TanhTransform 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
ValueFunc Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("e3a1ce468acbf463")
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, ValueFunc: 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "state_dim": 4,
    "action_dim": 3,
    "hidden_size": 256,
}
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 ValueFunc — 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 ValueFunc 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
asymmetric_l2_loss Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from yassinech/caps
pointer only; the stored copy get_code serves, from yassinech/caps, is pointer only (licence: NONE) · get_code("82a8f299419d4d83")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

huber_loss Ran
ran; our contract draft was wrong, not the code
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("ad44a67c8db05805")
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)

# Create small tensors for y_true and y_pred
# Batch size 2, dimension 4
y_true = torch.randn(2, 4)
y_pred = torch.randn(2, 4)
delta = 30.0

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "delta": delta,
}
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
DROCO Not yet run
unverified (harvested, no recorded run)
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("982023d532c1dda2")
How it ran

no invocation recorded.

EnsembleDynamicsModel Not yet run
unverified (harvested, no recorded run)
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("0e8624fb2f901e80")
How it ran

no invocation recorded.

Module Not yet run
unverified (harvested, no recorded run)
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("4cdbd80b8e624adc")
How it ran

no invocation recorded.

init_weights Not yet run
unverified (harvested, no recorded run)
zq2r/DROCO/algo/offline_offline/droco.py
code served (permissive licence) · get_code("8076d9d6464f513f")
How it ran

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, 7 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 5 later) and 7 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
asymmetric_l2_loss
brick of this paper's assembly: loss
7 other papers
6 dated earlier, 1 later · 3 only as an assembly brick
2110.06169 (2021-10)
Offline Reinforcement Learning with Implicit Q-Learning
2310.12955 (2023-10)
Towards Robust Offline Reinforcement Learning under Diverse Data Corruption
2405.16907 (2024-05)
GTA: Generative Trajectory Augmentation with Guidance for Offline Reinforcement Learning
and 4 more not named here
DoubleQFunc
brick of this paper's assembly: model
3 other papers
1 dated earlier, 2 later · 2 only as an assembly brick
2405.15369 (2024-05)
Cross-Domain Policy Adaptation by Capturing Representation Mismatch
2605.13054 (2026-05)
Bridging Domain Gaps with Target-Aligned Generation for Offline Reinforcement Learning
2605.24862 (2026-05)
Unifying Value Alignment and Assignment in Cross-Domain Offline Reinforcement Learning with Heterogeneous Datasets
MLPNetwork
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 3 only as an assembly brick
2405.15369 (2024-05)
Cross-Domain Policy Adaptation by Capturing Representation Mismatch
2506.08460 (2025-06)
MOBODY: Model Based Off-Dynamics Offline Reinforcement Learning
2605.13054 (2026-05)
Bridging Domain Gaps with Target-Aligned Generation for Offline Reinforcement Learning
TanhTransform
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 2 only as an assembly brick
2405.15369 (2024-05)
Cross-Domain Policy Adaptation by Capturing Representation Mismatch
2605.13054 (2026-05)
Bridging Domain Gaps with Target-Aligned Generation for Offline Reinforcement Learning
2605.24862 (2026-05)
Unifying Value Alignment and Assignment in Cross-Domain Offline Reinforcement Learning with Heterogeneous Datasets
EnsembleFC
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2201.11927 (2022-01)
Constrained Variational Policy Optimization for Safe Reinforcement Learning
ValueFunc
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2605.13054 (2026-05)
Bridging Domain Gaps with Target-Aligned Generation for Offline Reinforcement Learning
init_weights
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2405.15369 (2024-05)
Cross-Domain Policy Adaptation by Capturing Representation Mismatch

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

Single-domain offline reinforcement learning (RL) often suffers from limited data coverage, while cross-domain offline RL handles this issue by leveraging additional data from other domains with dynamics shifts. However, existing studies primarily focus on train-time robustness (handling dynamics shifts from training data), neglecting the test-time robustness against dynamics perturbations when deployed in practical scenarios. In this paper, we investigate dual (both traintime and test-time) robustness against dynamics shifts in cross-domain offline RL. We first empirically show that the policy trained with cross-domain offline RL exhibits fragility under dynamics perturbations during evaluation, particularly when target domain data is limited. To address this, we introduce a novel robust cross-domain Bellman (RCB) operator, which enhances test-time robustness against dynamics perturbations while staying conservative to the out-ofdistribution dynamics transitions, thus guaranteeing the train-time robustness. To further counteract potential value overestimation or underestimation caused by the RCB operator, we introduce two techniques, the dynamic value penalty and the Huber loss, into our framework, resulting in the practical Dual-RObust Crossdomain Offline RL (DROCO) algorithm. Extensive empirical results across various dynamics shift scenarios show that DROCO outperforms strong baselines and exhibits enhanced robustness to dynamics perturbations. Code is available at https://github.com/zq2r/DROCO.git.

For agents

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

get_harvested_code_for_paper("2512.02486")
get_code_for_paper("2512.02486")
have("2512.02486")

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

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

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

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

Connect an agent — have() is free.