SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.17100 · 2023

RL4CO: an Extensive Reinforcement Learning for Combinatorial Optimization Benchmark

arXiv · PDF · Open in the Atlas

Code that ran

12 of 16 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 12 have no contract verdict; 0 failures of our instrument; 4 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/2306.17100.json · badge: /api/ran/2306.17100.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
ai4co/rl4co canonical (classifier label)
classifier basis: census
9 ran · 4 no recorded run
facebookresearch/rl community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
FunctionStatusWhere it lives
batchify Ran
ran on a synthesized input
ai4co/rl4co/rl4co/utils/ops.py
code served (permissive licence) · get_code("e899117c9df4359e")
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 (12, 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
from tensordict import TensorDict

torch.manual_seed(0)

# Test case 1: Tensor with int shape
x_tensor = torch.randn(2, 4)
shape_int = 3

# Test case 2: Tensor with tuple shape
x_tensor_2 = torch.randn(2, 4)
shape_tuple = (2, 3)

# Test case 3: TensorDict with int shape
td = TensorDict({"a": torch.randn(2, 4), "b": torch.randn(2, 5)}, batch_size=[2])
shape_int_td = 2

# Test case 4: TensorDict with tuple shape
td_2 = TensorDict({"a": torch.randn(2, 4)}, batch_size=[2])
shape_tuple_td = (2, 3)

# Primary test: Tensor with tuple shape (most general case)
ARGS = {
    "x": torch.randn(2, 4),
    "shape": (2, 3)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensordict, 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 (12, 4) — shape (12, 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
clean_hydra_config Ran
ran on a synthesized input
ai4co/rl4co/rl4co/utils/lightning.py
code served (permissive licence) · get_code("4f2ccb8b68f3e715")
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 DictConfig. 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.

from omegaconf import DictConfig
import os

# Create a minimal config dict that mimics Hydra's flat structure with '/' separators
config = {
    'model/name': {'value': 'resnet'},
    'model/layers': {'value': 3},
    'training/lr': {'value': 0.001},
    'training/epochs': {'value': 100},
    'paths/root_dir': {'value': '/home/user/project'},
    'paths/data_dir': {'value': '/home/user/project/data'},
    'logging/level': {'value': 'info'},
    'wandb/project': {'value': 'my_project'},
    'wandb/entity': {'value': 'my_entity'},
}

ARGS = {
    'config': config,
    'keep_value_only': True,
    'remove_keys': 'wandb',
    'clean_cfg_path': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DictConfig — a DictConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DictConfig 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
gather_by_index Ran
ran on a synthesized input
ai4co/rl4co/rl4co/utils/ops.py
code served (permissive licence) · get_code("0fdfebdf5e82532b")
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 3, dtype family float, shape (2, 2, 3) 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 source tensor: shape [2, 4, 3]
# Batch size 2, dimension 4 along dim=1, feature size 3
src = torch.randn(2, 4, 3)

# Create index tensor: shape [2, 2]
# Batch size 2, selecting 2 indices along dim=1
idx = torch.tensor([[0, 2], [1, 3]], dtype=torch.long)

ARGS = {
    "src": src,
    "idx": idx,
    "dim": 1,
    "squeeze": 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 Tensor, ndim 3, dtype family float, shape (2, 2, 3) — shape (2, 2, 3) 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_lightning_device Ran
ran on a synthesized input
ai4co/rl4co/rl4co/utils/lightning.py
code served (permissive licence) · get_code("8a9f41865ce393ce")
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 device. 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 lightning as L
import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

class MockStrategy:
    def __init__(self):
        self.root_device = torch.device('cpu')

class MockTrainer:
    def __init__(self):
        self.strategy = MockStrategy()

class SimpleLightningModule(L.LightningModule):
    def __init__(self):
        super().__init__()
        self.model = SimpleModule()
        self.trainer = MockTrainer()
    
    def forward(self, x):
        return self.model(x)
    
    def training_step(self, batch, batch_idx):
        x, y = batch
        loss = torch.nn.functional.mse_loss(self(x), y)
        return loss
    
    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters(), lr=0.001)

lit_module = SimpleLightningModule()

ARGS = {
    "lit_module": lit_module
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
lightning, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device 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_log_likelihood Ran
ran on a synthesized input
ai4co/rl4co/rl4co/utils/decoding.py
code served (permissive licence) · get_code("a326212367641139")
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 1, dtype family float, shape (2,) 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)

# Construct tensors for the function
batch_size = 2
seq_len = 5
action_dim = 4

# logprobs: (batch_size, seq_len, action_dim) - log probabilities
logprobs = torch.randn(batch_size, seq_len, action_dim) - 10  # negative values for log probs, but > -1000

# actions: (batch_size, seq_len) - selected action indices
actions = torch.randint(0, action_dim, (batch_size, seq_len))

# mask: (batch_size, seq_len) - boolean mask where True means keep the value
mask = torch.ones(batch_size, seq_len, dtype=torch.bool)
mask[0, 0] = False  # Set one position to False to test masking

# return_sum: boolean flag
return_sum = True

ARGS = {
    "logprobs": logprobs,
    "actions": actions,
    "mask": mask,
    "return_sum": return_sum,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
pos_init_embedding Ran
ran on a synthesized input
ai4co/rl4co/rl4co/models/nn/pos_embeddings.py
code served (permissive licence) · get_code("1ea1f47aac5e2bda")
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 AbsolutePositionalEmbedding. 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 ARGS for pos_init_embedding function
ARGS = {
    'pos_name': 'APE',
    'config': {
        'embed_dim': 8
    }
}
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 AbsolutePositionalEmbedding — a AbsolutePositionalEmbedding output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AbsolutePositionalEmbedding 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
prod Ran
ran on a synthesized input
facebookresearch/rl/torchrl/_utils.py
pointer only (licence: MIT) · get_code("eb9333cd6b23461f")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, facebookresearch/rl, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

remove_key Ran
ran on a synthesized input
ai4co/rl4co/rl4co/utils/lightning.py
code served (permissive licence) · get_code("cc7ca011efea6f39")
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 torch

torch.manual_seed(0)

# The function takes a config dict and removes keys containing a substring
# It iterates over config.items() and filters based on key containment

ARGS = {
    'config': {
        'model_name': 'bert',
        'learning_rate': 0.001,
        'wandb_project': 'my_project',
        'wandb_entity': 'my_entity',
        'batch_size': 32,
        'epochs': 10,
        'optimizer': 'adam'
    },
    'key': 'wandb'
}
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 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
scaled_dot_product_attention_simple Ran
ran on a synthesized input
ai4co/rl4co/rl4co/models/nn/attention.py
code served (permissive licence) · get_code("247b5d1c10709554")
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 3, dtype family float, shape (2, 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.functional as F

torch.manual_seed(0)

# Set up tiny tensors for attention mechanism
batch_size = 2
seq_len_q = 3
seq_len_kv = 3
head_dim = 4

# Query, Key, Value tensors: (batch, seq_len, dim)
q = torch.randn(batch_size, seq_len_q, head_dim)
k = torch.randn(batch_size, seq_len_kv, head_dim)
v = torch.randn(batch_size, seq_len_kv, head_dim)

# Optional attention mask (additive, same shape as scores)
attn_mask = torch.zeros(batch_size, seq_len_q, seq_len_kv)

# Dropout probability
dropout_p = 0.1

# Whether to use causal masking
is_causal = False

ARGS = {
    "q": q,
    "k": k,
    "v": v,
    "attn_mask": attn_mask,
    "dropout_p": dropout_p,
    "is_causal": is_causal,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 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
seed_generator Ran
ran on a synthesized input
facebookresearch/rl/torchrl/_utils.py
pointer only (licence: MIT) · get_code("f82fa5a8534a7ff2")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, facebookresearch/rl, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

strtobool Ran
ran on a synthesized input
facebookresearch/rl/torchrl/_utils.py
pointer only (licence: MIT) · get_code("f5efb02606aa8292")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, facebookresearch/rl, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

unbatchify Ran
ran on a synthesized input
ai4co/rl4co/rl4co/utils/ops.py
code served (permissive licence) · get_code("83c9a91ca5c59e38")
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 5, dtype family float, shape (1, 2, 3, 4, 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
from tensordict import TensorDict

torch.manual_seed(0)

# Test with a simple Tensor case
# x.shape = [a*b*c, ...] where a=2, b=3, c=4, and one extra dim of size 5
# shape = [2, 3, 4]
x_tensor = torch.randn(2 * 3 * 4, 5)  # [24, 5]
shape = [2, 3, 4]

ARGS = {
    "x": x_tensor,
    "shape": shape,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensordict, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 5, dtype family float, shape (1, 2, 3, 4, 5) — shape (1, 2, 3, 4, 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
create_optimizer Not yet run
unverified (harvested, no recorded run)
ai4co/rl4co/rl4co/utils/optim_helpers.py
code served (permissive licence) · get_code("c30fa333f4496ccc")
How it ran

no invocation recorded.

create_scheduler Not yet run
unverified (harvested, no recorded run)
ai4co/rl4co/rl4co/utils/optim_helpers.py
code served (permissive licence) · get_code("e57fec3fed7f7ac3")
How it ran

no invocation recorded.

fused_chunk_linear_attn_wrapper Not yet run
unverified (harvested, no recorded run)
ai4co/rl4co/rl4co/models/nn/flash_attention.py
code served (permissive licence) · get_code("7267ff9e6a317eec")
How it ran

no invocation recorded.

scaled_dot_product_attention_flash_attn Not yet run
unverified (harvested, no recorded run)
ai4co/rl4co/rl4co/models/nn/flash_attention.py
code served (permissive licence) · get_code("59a1a205d6476e10")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 16 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.

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

Combinatorial optimization (CO) is fundamental to several real-world applications, from logistics and scheduling to hardware design and resource allocation. Deep reinforcement learning (RL) has recently shown significant benefits in solving CO problems, reducing reliance on domain expertise and improving computational efficiency. However, the absence of a unified benchmarking framework leads to inconsistent evaluations, limits reproducibility, and increases engineering overhead, raising barriers to adoption for new researchers. To address these challenges, we introduce RL4CO, a unified and extensive benchmark with in-depth library coverage of 27 CO problem environments and 23 state-of-the-art baselines. Built on efficient software libraries and best practices in implementation, RL4CO features modularized implementation and flexible configurations of diverse environments, policy architectures, RL algorithms, and utilities with extensive documentation. RL4CO helps researchers build on existing successes while exploring and developing their own designs, facilitating the entire research process by decoupling science from heavy engineering. We finally provide extensive benchmark studies to inspire new insights and future work. RL4CO has already attracted numerous researchers in the community and is open-sourced at https://github.com/ai4co/rl4co.

For agents

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

get_harvested_code_for_paper("2306.17100")
get_code_for_paper("2306.17100")
have("2306.17100")

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

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

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

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

Connect an agent — have() is free.