SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.13934 · NeurIPS · 2025

RLVR-World: Training World Models with Reinforcement Learning

Mingsheng Long, Jialong Wu, Ningya Feng, Shaofeng Yin

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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 10 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-24; 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/2505.13934.json · badge: /api/ran/2505.13934.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
thuml/RLVR-World canonical (classifier label)
classifier basis not recorded on the link
11 ran · 2 no recorded run
FunctionStatusWhere it lives
batch_forward Ran
ran on a synthesized input
thuml/RLVR-World/vid_wm/ivideogpt/eval_runenv.py
code served (permissive licence) · get_code("18ed10ec1a2ccb20")
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 (8, 7) 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
import torch.nn as nn

torch.manual_seed(0)

# Define a simple forward function that takes two inputs and returns a tensor
def simple_forward(x, y):
    # x shape: (batch_size, 4)
    # y shape: (batch_size, 3)
    # Returns concatenated output: (batch_size, 7)
    return torch.cat([x, y], dim=1)

# Create small tensors
# input: (8, 4) - 8 samples, 4 features
# input2: (8, 3) - 8 samples, 3 features
input_tensor = torch.randn(8, 4)
input2_tensor = torch.randn(8, 3)

ARGS = {
    "batch_size": 2,
    "input": input_tensor,
    "input2": input2_tensor,
    "forward": simple_forward,
}
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 (8, 7) — shape (8, 7) 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
batch_forward Ran
ran on a synthesized input
thuml/RLVR-World/vid_wm/ivideogpt/train_vgpt.py
code served (permissive licence) · get_code("e4a5cabcf27fc1f9")
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 (6, 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
import torch.nn as nn
from tqdm import tqdm, trange

torch.manual_seed(0)

# Create a simple forward function that processes input batches
def simple_forward(x):
    """A simple forward pass that takes input and applies a linear transformation."""
    return x * 2.0

# Create input tensor: shape (6, 4) - 6 samples, 4 features
input_tensor = torch.randn(6, 4)

# Define arguments for batch_forward
ARGS = {
    "batch_size": 2,
    "input": input_tensor,
    "forward": simple_forward,
    "verbose": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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 (6, 4) — shape (6, 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
extract_sections Ran
ran on a synthesized input
thuml/RLVR-World/lang_wm/webagent/agent/world_model_agent.py
code served (permissive licence) · get_code("ff25903c58c30586")
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. 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 re

def extract_sections(text):
    pattern = re.compile('New items:\\n(.*?)(?=\\n\\nDeleted items:)|Deleted items:\\n(.*?)(?=\\n\\nUpdated items:)|Updated items:\\n(.*?)(?=\\n\\n|\\Z)', re.DOTALL)
    results = {'new_items': None, 'deleted_items': None, 'updated_items': None}
    for match in pattern.finditer(text):
        if match.group(1) is not None:
            content = match.group(1).strip()
            results['new_items'] = content if content != 'None' else None
        elif match.group(2) is not None:
            content = match.group(2).strip()
            results['deleted_items'] = content or None
        elif match.group(3) is not None:
            content = match.group(3).strip()
            results['updated_items'] = content or None
    return results


# Setup: Create a valid text input with the expected sections
text_input = """New items:
- Item A
- Item B

Deleted items:
- Item X
- Item Y

Updated items:
- Item 1 updated
- Item 2 modified"""

ARGS = {
    'text': text_input
}
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 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
generate_multiple_times Ran
ran on a synthesized input
thuml/RLVR-World/vid_wm/ivideogpt/train_vgpt.py
code served (permissive licence) · get_code("1d6bc3ce11d22b60")
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 int, shape (8, 5) 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
import torch.nn as nn
from unittest.mock import Mock

torch.manual_seed(0)

# Create a minimal model that has a generate method
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def generate(self, input_ids, **kwargs):
        # Return a tensor of generated tokens
        batch_size = input_ids.shape[0]
        seq_len = input_ids.shape[1]
        return torch.randint(0, 50256, (batch_size, seq_len + 2))

# Create a minimal accelerator mock
class MinimalAccelerator:
    def unwrap_model(self, model):
        return model

# Create the arguments
gen_input = torch.randint(0, 50256, (2, 3))  # batch_size=2, seq_len=3
model = MinimalModel()
accelerator = MinimalAccelerator()

gen_kwargs = {
    "max_new_tokens": 2,
    "do_sample": False
}

ARGS = {
    "gen_times": 4,
    "accelerator": accelerator,
    "model": model,
    "gen_input": gen_input,
    "gen_kwargs": gen_kwargs,
    "max_batch_size": 4,
    "verbose": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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 int, shape (8, 5) — shape (8, 5) 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_dataset_path Ran
ran on a synthesized input
thuml/RLVR-World/vid_wm/oxe_data_converter.py
code served (permissive licence) · get_code("b49a1b06cda0c01a")
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 str. 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 os

ARGS = {
    'parent_dir': '/tmp/datasets',
    'dataset_name': 'robo_net'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_unfinished Ran
ran; our contract draft was wrong, not the code
thuml/RLVR-World/lang_wm/webagent/run_for_trajectory.py
pointer only (licence: MIT); the stored copy get_code serves, from kyle8581/wma-agents, is pointer only (licence: NONE) · get_code("c4557f6bed96e135")
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 kyle8581/wma-agents, 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.

get_unfinished Ran
ran on a synthesized input
thuml/RLVR-World/lang_wm/webagent/run_w_world_model.py
code served (permissive licence) · get_code("93f43874ebbe522a")
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 float; 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 json
import os
import tempfile

# Create a temporary directory for results
temp_dir = tempfile.mkdtemp()

# Create a results.json file with some task IDs
result_data = {
    'info': {
        'task_001': {'status': 'completed'},
        'task_002': {'status': 'completed'},
        'task_003': {'status': 'completed'}
    }
}

result_file = os.path.join(temp_dir, 'results.json')
with open(result_file, 'w') as f:
    json.dump(result_data, f)

# Create config file paths - some that exist in results.json, some that don't
config_files = [
    '/path/to/task_001.yaml',
    '/path/to/task_002.yaml',
    '/path/to/task_004.yaml',  # This one is unfinished
    '/path/to/task_005.yaml'   # This one is unfinished
]

ARGS = {
    'config_files': config_files,
    'result_dir': temp_dir
}
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 list, ndim 1, dtype family float — 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
grad_layer_wrt_loss Ran
ran on a synthesized input
thuml/RLVR-World/vid_wm/ivideogpt/train_ctx_tokenizer.py
code served (permissive licence) · get_code("3834b388eb788947")
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 (3, 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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model layer
class SimpleLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the layer
layer = SimpleLayer()

# Create a small input tensor (batch_size=2, input_dim=4)
x = torch.randn(2, 4, requires_grad=False)

# Forward pass through the layer
output = layer(x)

# Create a simple loss (scalar tensor that requires grad)
loss = output.sum()

# Ensure loss requires grad for autograd to work
loss.requires_grad_(True)

ARGS = {
    "loss": loss,
    "layer": layer.linear.weight
}
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 (3, 4) — shape (3, 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
gradient_penalty Ran
ran on a synthesized input
thuml/RLVR-World/vid_wm/ivideogpt/train_ctx_tokenizer.py
code served (permissive licence) · get_code("1825d9e3299f556f")
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
import torch.nn as nn

torch.manual_seed(0)

# Create tiny tensors
# images: needs to be a tensor that requires grad (for autograd.grad to work)
# output: needs to be a scalar or tensor that depends on images
batch_size = 2
image_dims = 4
images = torch.randn(batch_size, image_dims, requires_grad=True)

# output: a scalar tensor that we compute from images to create a computation graph
# We need output to depend on images for the gradient computation to work
output = images.sum()

# weight parameter
weight = 10

ARGS = {
    "images": images,
    "output": output,
    "weight": weight,
}
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
parse_task_id_from_path Ran
ran on a synthesized input
thuml/RLVR-World/lang_wm/webagent/run_w_world_model.py
code served (permissive licence) · get_code("37301055029429c8")
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 str. 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

ARGS = {
    "config_file_string": "path/to/config/12345.yaml"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
safe_json_load Ran
ran on a synthesized input
thuml/RLVR-World/lang_wm/webagent/agent/world_model_agent.py
code served (permissive licence) · get_code("0ef898211b3216e4")
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. 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 json
import random
import time
import tempfile
import os

# Create a temporary JSON file with valid JSON content
temp_dir = tempfile.mkdtemp()
temp_json_path = os.path.join(temp_dir, "test_data.json")

# Write valid JSON to the file
with open(temp_json_path, 'w') as f:
    json.dump({"key": "value", "number": 42, "list": [1, 2, 3]}, f)

ARGS = {
    "path": temp_json_path,
    "max_retries": 100,
    "min_delay": 0.05,
    "max_delay": 0.2,
}
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 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
get_dataloaders Not yet run
unverified (harvested, no recorded run)
thuml/RLVR-World/vid_wm/ivideogpt/eval_runenv.py
code served (permissive licence) · get_code("9fdeb5691f697950")
How it ran

no invocation recorded.

get_dataloaders Not yet run
unverified (harvested, no recorded run)
thuml/RLVR-World/vid_wm/ivideogpt/eval_vgpt.py
code served (permissive licence) · get_code("84199c73adefd0fc")
How it ran

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, 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 12 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
get_unfinished 2 other papers
2 dated earlier
2410.13232 (2024-10)
Web Agents with World Models: Learning and Leveraging Environment Dynamics in Web Navigation
2503.09780 (2025-03)
AGENTDAM: Privacy Leakage Evaluation for Autonomous Web Agents

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

World models predict state transitions in response to actions and are increasingly developed across diverse modalities. However, standard training objectives such as maximum likelihood estimation (MLE) often misalign with task-specific goals of world models, i.e., transition prediction metrics like accuracy or perceptual quality. In this paper, we present RLVR-World, a unified framework that leverages reinforcement learning with verifiable rewards (RLVR) to directly optimize world models for such metrics. Despite formulating world modeling as autoregressive prediction of tokenized sequences, RLVR-World evaluates metrics of decoded predictions as verifiable rewards. We demonstrate substantial performance gains on both language-and video-based world models across domains, including text games, web navigation, and robot manipulation. Our work indicates that, beyond recent advances in reasoning language models, RLVR offers a promising posttraining paradigm for enhancing the utility of generative models more broadly. Code, datasets, models, and video samples are available at the project website:

For agents

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

get_harvested_code_for_paper("2505.13934")
get_code_for_paper("2505.13934")
have("2505.13934")

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

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

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

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

Connect an agent — have() is free.