SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.08118 · 2026

Model-based Offline RL via Robust Value-Aware Model Learning with Implicitly Differentiable Adaptive Weighting

Yao Shu, Shuang Qiu, Jiafei Lyu, Boxiang Lyu, Siyang Gao, Zhongjian Qiao

arXiv · PDF · Open in the Atlas

Code that ran

1 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2603.08118.json · badge: /api/ran/2603.08118.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/ROMI community
Papers with Code archive
1 ran · 2 no recorded run
FunctionStatusWhere it lives
SACPolicy Ran
ran on a synthesized input · constructed an object; no result was computed
zq2r/ROMI/offlinerlkit/policy/model_based/romi.py
code served (permissive licence) · get_code("77f178161afd213f")
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, SACPolicy: 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
from torch.distributions import Normal

torch.manual_seed(0)

# Define a simple actor network that outputs a distribution
class SimpleActor(nn.Module):
    def __init__(self, obs_dim=4, action_dim=3):
        super().__init__()
        self.net = nn.Linear(obs_dim, action_dim * 2)
    
    def forward(self, obs):
        out = self.net(obs)
        mean = out[..., :out.shape[-1]//2]
        logstd = out[..., out.shape[-1]//2:]
        std = torch.exp(logstd)
        dist = Normal(mean, std)
        
        # Add rsample and mode methods to the distribution
        original_rsample = dist.rsample
        original_mode = lambda: (dist.mean, dist.mean)
        
        def rsample_wrapper():
            sample = original_rsample()
            squashed = torch.tanh(sample)
            return squashed, sample
        
        def mode_wrapper():
            return torch.tanh(dist.mean), dist.mean
        
        def log_prob_wrapper(squashed, raw):
            log_prob = dist.log_prob(raw)
            log_prob = log_prob - torch.log(1 - squashed.pow(2) + 1e-6)
            return log_prob.sum(dim=-1)
        
        dist.rsample = rsample_wrapper
        dist.mode = mode_wrapper
        dist.log_prob = log_prob_wrapper
        
        return dist

# Define a simple critic network
class SimpleCritic(nn.Module):
    def __init__(self, obs_dim=4, action_dim=3):
        super().__init__()
        self.net = nn.Linear(obs_dim + action_dim, 1)
    
    def forward(self, obs, action):
        x = torch.cat([obs, action], dim=-1)
        return self.net(x)

# Create network instances
obs_dim = 4
action_dim = 3

actor = SimpleActor(obs_dim=obs_dim, action_dim=action_dim)
critic1 = SimpleCritic(obs_dim=obs_dim, action_dim=action_dim)
critic2 = SimpleCritic(obs_dim=obs_dim, action_dim=action_dim)

# Create optimizers
actor_optim = torch.optim.Adam(actor.parameters(), lr=0.001)
critic1_optim = torch.optim.Adam(critic1.parameters(), lr=0.001)
critic2_optim = torch.optim.Adam(critic2.parameters(), lr=0.001)

# Create alpha with auto_alpha enabled
target_entropy = torch.tensor(-action_dim, dtype=torch.float32)
log_alpha = torch.tensor(0.0, requires_grad=True, dtype=torch.float32)
alpha_optim = torch.optim.Adam([log_alpha], lr=0.001)
alpha_tuple = (target_entropy, log_alpha, alpha_optim)

ARGS = {
    'actor': actor,
    'critic1': critic1,
    'critic2': critic2,
    'actor_optim': actor_optim,
    'critic1_optim': critic1_optim,
    'critic2_optim': critic2_optim,
    'tau': 0.005,
    'gamma': 0.99,
    'alpha': alpha_tuple
}
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 SACPolicy — 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 SACPolicy 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
MOPOPolicy Not yet run
unverified (harvested, no recorded run)
zq2r/ROMI/offlinerlkit/policy/model_based/romi.py
code served (permissive licence) · get_code("de5267cded837749")
How it ran

no invocation recorded.

ROMIPolicy Not yet run
unverified (harvested, no recorded run)
zq2r/ROMI/offlinerlkit/policy/model_based/romi.py
code served (permissive licence) · get_code("2fe1012e1ce4a291")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 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
MOPOPolicy
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2005.13239 (2020-05)
MOPO: Model-based Offline Policy Optimization
2204.12581 (2022-04)
RAMBO-RL: Robust Adversarial Model-Based Offline 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-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

Model-based offline reinforcement learning (RL) aims to enhance offline RL with a dynamics model that facilitates policy exploration. However, model exploitation could occur due to inevitable model errors, degrading algorithm performance. Adversarial model learning offers a theoretical framework to mitigate model exploitation by solving a maximin formulation. Within such a paradigm, RAMBO (Rigter et al., 2022) has emerged as a representative and most popular method that provides a practical implementation with model gradient. However, we empirically reveal that severe Q-value underestimation and gradient explosion can occur in RAMBO with only slight hyperparameter tuning, suggesting that it tends to be overly conservative and suffers from unstable model updates. To address these issues, we propose RObust value-aware Model learning with Implicitly differentiable adaptive weighting (ROMI). Instead of updating the dynamics model with model gradient, ROMI introduces a novel robust value-aware model learning approach. This approach requires the dynamics model to predict future states with values close to the minimum Q-value within a scale-adjustable state uncertainty set, enabling controllable conservatism and stable model updates. To further improve out-of-distribution (OOD) generalization during multi-step rollouts, we propose implicitly differentiable adaptive weighting, a bi-level optimization scheme that adaptively achieves dynamics-and value-aware model learning. Empirical results on D4RL and NeoRL datasets show that ROMI significantly outperforms RAMBO and achieves competitive or superior performance compared to other state-of-the-art methods on datasets where RAMBO typically underperforms. Code is available at https://github.com/zq2r/ROMI.git.

For agents

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

get_harvested_code_for_paper("2603.08118")
get_code_for_paper("2603.08118")
have("2603.08118")

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

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

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

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

Connect an agent — have() is free.