SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.15369 · ICML · 2024

Cross-Domain Policy Adaptation by Capturing Representation Mismatch

Zongqing Lu, Chenjia Bai, Xiu Li, Jiafei Lyu, Jingwen Yang

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 5 failures of our instrument; 3 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/2405.15369.json · badge: /api/ran/2405.15369.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
Kavka1/VGDF canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
dmksjfl/par canonical (classifier label)
classifier basis: classifier_2025
3 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
tinkoff-ai/CORL community
Papers with Code archive
1 ran · 0 no recorded run
t6-thu/H2O community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AvgL1Norm Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from sfujim/TD7
pointer only · get_code("1e71094b23b75fbe")
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.

CalQL Ran
ran on a synthesized input · constructed an object; no result was computed
tinkoff-ai/CORL/algorithms/finetune/cal_ql.py
code served (permissive licence) · get_code("174015b80fd5152d")
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, CalQL: 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
from torch.optim import Adam

torch.manual_seed(0)

# Define a minimal critic network that takes observations and actions
class CriticNet(nn.Module):
    def __init__(self, obs_dim=4, action_dim=3):
        super().__init__()
        self.net = nn.Sequential(
            nn.Linear(obs_dim + action_dim, 64),
            nn.ReLU(),
            nn.Linear(64, 1)
        )
    
    def forward(self, obs, actions):
        x = torch.cat([obs, actions], dim=-1)
        return self.net(x)

# Define a minimal actor network
class ActorNet(nn.Module):
    def __init__(self, obs_dim=4, action_dim=3):
        super().__init__()
        self.obs_dim = obs_dim
        self.action_dim = action_dim
        self.net = nn.Sequential(
            nn.Linear(obs_dim, 64),
            nn.ReLU(),
            nn.Linear(64, action_dim * 2)
        )
    
    def forward(self, obs):
        output = self.net(obs)
        mean = output[..., :self.action_dim]
        log_std = output[..., self.action_dim:]
        return mean, log_std
    
    def log_prob(self, obs, actions):
        mean, log_std = self.forward(obs)
        std = log_std.exp()
        dist = torch.distributions.Normal(mean, std)
        return dist.log_prob(actions).sum(dim=-1, keepdim=True)
    
    def sample(self, obs):
        mean, log_std = self.forward(obs)
        std = log_std.exp()
        dist = torch.distributions.Normal(mean, std)
        actions = dist.rsample()
        log_prob = dist.log_prob(actions).sum(dim=-1, keepdim=True)
        return actions, log_prob

# Instantiate networks
critic_1 = CriticNet(obs_dim=4, action_dim=3)
critic_2 = CriticNet(obs_dim=4, action_dim=3)
actor = ActorNet(obs_dim=4, action_dim=3)

# Instantiate optimizers
critic_1_optimizer = Adam(critic_1.parameters(), lr=0.0003)
critic_2_optimizer = Adam(critic_2.parameters(), lr=0.0003)
actor_optimizer = Adam(actor.parameters(), lr=0.0003)

# Define ARGS dictionary with all CalQL parameters
ARGS = {
    'critic_1': critic_1,
    'critic_1_optimizer': critic_1_optimizer,
    'critic_2': critic_2,
    'critic_2_optimizer': critic_2_optimizer,
    'actor': actor,
    'actor_optimizer': actor_optimizer,
    'target_entropy': -3.0,
    'discount': 0.99,
    'alpha_multiplier': 1.0,
    'use_automatic_entropy_tuning': True,
    'backup_entropy': False,
    'policy_lr': 0.0003,
    'qf_lr': 0.0003,
    'soft_target_update_rate': 0.005,
    'bc_steps': 100000,
    'target_update_period': 1,
    'cql_n_actions': 10,
    'cql_importance_sample': True,
    'cql_lagrange': False,
    'cql_target_action_gap': -1.0,
    'cql_temp': 1.0,
    'cql_alpha': 5.0,
    'cql_max_target_backup': False,
    'cql_clip_diff_min': -float('inf'),
    'cql_clip_diff_max': float('inf'),
    '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 CalQL — 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 CalQL 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
Discriminator Ran
ran on a synthesized input
t6-thu/H2O/Network/Weight_net.py
pointer only (licence: NONE) · get_code("a0b6506a43dcb733")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, t6-thu/H2O 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.

Encoder Ran
ran on a synthesized input · constructed an object; no result was computed
dmksjfl/par/algo/PAR.py
pointer only (licence: NONE) · get_code("d4549ddb93436460")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dmksjfl/par 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.

Policy Ran
ran on a synthesized input · constructed an object; no result was computed
dmksjfl/par/algo/PAR.py
pointer only (licence: NONE) · get_code("410b5d459ab3fd2b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dmksjfl/par 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.

call_activation Ran
ran; our contract draft was wrong, not the code
Kavka1/VGDF/model/base.py
code served (permissive licence) · get_code("69beeb71e148597d")
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 type. 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)

class Swish(nn.Module):
    def __init__(self):
        super(Swish, self).__init__()

    def forward(self, x):
        return x * torch.sigmoid(x)

def call_activation(name: str) -> nn.Module:
    if name == 'Identity':
        return nn.Identity
    elif name == 'ReLU':
        return nn.ReLU
    elif name == 'Tanh':
        return nn.Tanh
    elif name == 'Sigmoid':
        return nn.Sigmoid
    elif name == 'SoftMax':
        return nn.Softmax
    elif name == 'ELU':
        return nn.ELU
    elif name == 'LeakyReLU':
        return nn.LeakyReLU
    elif name == 'Swish':
        return Swish
    else:
        raise NotImplementedError(f'Invalid activation name: {name}')

ARGS = {
    'name': 'ReLU'
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
call_mlp Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Kavka1/VGDF/model/base.py
code served (permissive licence) · get_code("9cae947bc688c602")
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
import numpy as np

torch.manual_seed(0)

# Define the custom activation and helper functions that are part of the module
class Swish(nn.Module):
    def __init__(self):
        super(Swish, self).__init__()

    def forward(self, x):
        return x * torch.sigmoid(x)

def init_weight(layer, initializer='he normal'):
    if isinstance(layer, nn.Module):
        if initializer == 'xavier uniform':
            nn.init.xavier_uniform_(layer.weight)
            nn.init.constant_(layer.bias, 0)
        elif initializer == 'xavier normal':
            nn.init.xavier_normal_(layer.weight)
            nn.init.constant_(layer.bias, 0)
        elif initializer == 'he normal':
            nn.init.kaiming_normal_(layer.weight)
            nn.init.constant_(layer.bias, 0)
        elif initializer == 'orthogonal':
            nn.init.orthogonal_(layer.weight)
            nn.init.constant_(layer.bias, 0)
        elif initializer == 'truncated normal':
            nn.init.trunc_normal_(layer.weight, std=1 / (2 * np.sqrt(layer.weight.shape[1])))
            nn.init.constant_(layer.bias, 0)
    elif isinstance(layer, nn.Parameter):
        if initializer == 'xavier uniform':
            nn.init.xavier_uniform_(layer)
        elif initializer == 'xavier normal':
            nn.init.xavier_normal_(layer)
        elif initializer == 'he normal':
            nn.init.kaiming_normal_(layer)
        elif initializer == 'orthogonal':
            nn.init.orthogonal_(layer)

def call_activation(name: str) -> nn.Module:
    if name == 'Identity':
        return nn.Identity
    elif name == 'ReLU':
        return nn.ReLU
    elif name == 'Tanh':
        return nn.Tanh
    elif name == 'Sigmoid':
        return nn.Sigmoid
    elif name == 'SoftMax':
        return nn.Softmax
    elif name == 'ELU':
        return nn.ELU
    elif name == 'LeakyReLU':
        return nn.LeakyReLU
    elif name == 'Swish':
        return Swish
    else:
        raise NotImplementedError(f'Invalid activation name: {name}')

# Now set up ARGS for call_mlp
ARGS = {
    'in_dim': 5,
    'out_dim': 3,
    'hidden_layers': [8, 6],
    'inner_activation': 'ReLU',
    'output_activation': 'Tanh',
    'initializer': 'he normal',
    'layer_factory': None
}
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 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
eval_policy Ran
ran, honoured the contract we drafted
dmksjfl/par/train_offline.py
pointer only (licence: NONE) · get_code("2a67e91feeab6fb8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dmksjfl/par 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.

is_terminal_region_for_at Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Kavka1/VGDF/env/env_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from dmksjfl/PAR, is pointer only (licence: NONE) · get_code("b8653ae9a4e21d3c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from dmksjfl/PAR, 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.

is_terminal_region_for_hp Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Kavka1/VGDF/env/env_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from dmksjfl/PAR, is pointer only (licence: NONE) · get_code("0aa4b9c66abed3d1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from dmksjfl/PAR, 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.

PAR Not yet run
unverified (harvested, no recorded run)
dmksjfl/par/algo/PAR.py
pointer only (licence: NONE) · get_code("578f3481eb1c9cd4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dmksjfl/par 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. No invocation recorded.

init_weights Not yet run
unverified (harvested, no recorded run)
Kavka1/VGDF/model/dynamics.py
code served (permissive licence) · get_code("3f3ed592dc8c7b88")
How it ran

no invocation recorded.

is_terminal_region_for_hc Not yet run
unverified (harvested, no recorded run)
Kavka1/VGDF/env/env_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from dmksjfl/PAR, is pointer only (licence: NONE) · get_code("b126429395363b00")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from dmksjfl/PAR, 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. No invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 7 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 4 the same month, 7 later) and 6 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
AvgL1Norm
brick of this paper's assembly: helper
5 other papers
1 dated earlier, 1 the same month, 3 later · 1 only as an assembly brick
2306.02451 (2023-06)
For SALE: State-Action Representation Learning for Deep Reinforcement Learning
2405.11718 (2024-05)
Feasibility Consistent Representation Learning for Safe Reinforcement Learning
2410.20750 (2024-10)
ODRL: A Benchmark for Off-Dynamics Reinforcement Learning
and 2 more not named here
Encoder
brick of this paper's assembly: model
2 other papers
1 dated earlier, 1 later · 2 only as an assembly brick
2306.02451 (2023-06)
For SALE: State-Action Representation Learning for Deep Reinforcement Learning
2501.16142 (2025-01)
Towards General-Purpose Model-Free Reinforcement Learning
eval_policy 2 other papers
2 later
2410.20750 (2024-10)
ODRL: A Benchmark for Off-Dynamics Reinforcement Learning
2603.12087 (2026-03)
Cross-Domain Policy Optimization via Bellman Consistency and Hybrid Critics
is_terminal_region_for_at 2 other papers
1 the same month, 1 later
2405.06192 (2024-05)
Contrastive Representation for Data Filtering in Cross-Domain Offline Reinforcement Learning
2603.12087 (2026-03)
Cross-Domain Policy Optimization via Bellman Consistency and Hybrid Critics
is_terminal_region_for_hc 2 other papers
1 the same month, 1 later
2405.06192 (2024-05)
Contrastive Representation for Data Filtering in Cross-Domain Offline Reinforcement Learning
2603.12087 (2026-03)
Cross-Domain Policy Optimization via Bellman Consistency and Hybrid Critics
is_terminal_region_for_hp 2 other papers
1 the same month, 1 later
2405.06192 (2024-05)
Contrastive Representation for Data Filtering in Cross-Domain Offline Reinforcement Learning
2603.12087 (2026-03)
Cross-Domain Policy Optimization via Bellman Consistency and Hybrid Critics
init_weights 1 other paper
1 later
2512.02486 (2025-12)
Dual-Robust Cross-Domain Offline Reinforcement Learning Against Dynamics Shifts

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

It is vital to learn effective policies that can be transferred to different domains with dynamics discrepancies in reinforcement learning (RL). In this paper, we consider dynamics adaptation settings where there exists dynamics mismatch between the source domain and the target domain, and one can get access to sufficient source domain data, while can only have limited interactions with the target domain. Existing methods address this problem by learning domain classifiers, performing data filtering from a value discrepancy perspective, etc. Instead, we tackle this challenge from a decoupled representation learning perspective. We perform representation learning only in the target domain and measure the representation deviations on the transitions from the source domain, which we show can be a signal of dynamics mismatch. We also show that representation deviation upper bounds performance difference of a given policy in the source domain and target domain, which motivates us to adopt representation deviation as a reward penalty. The produced representations are not involved in either policy or value function, but only serve as a reward penalizer. We conduct extensive experiments on environments with kinematic and morphology mismatch, and the results show that our method exhibits strong performance on many tasks. Our code is publicly available at https://github.com/dmksjfl/PAR.

For agents

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

get_harvested_code_for_paper("2405.15369")
get_code_for_paper("2405.15369")
have("2405.15369")

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

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

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

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

Connect an agent — have() is free.