SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.11502 · ICLR · 2025

Offline Model-Based Optimization by Learning to Rank

Ke Xue, Chao Qian, Rong-Xi Tan, Shen-Huan Lyu, Haopu Shang, Yaoyuan Wang, Sheng Fu

arXiv · PDF · Open in the Atlas

Code that ran

15 of 17 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, 3 violated it and 2 have no contract verdict; 10 failures of our instrument; 2 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/2410.11502.json · badge: /api/ran/2410.11502.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
brandontrabucco/design-bench canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
lamda-bbo/Offline-RaM canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
lamda-bbo/offline-ram reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
jiangnanboy/learning_to_rank reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
ggchen1997/bdi unrelated (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
LambdaRankLossFunction Ran
ran on a synthesized input · constructed an object; no result was computed
lamda-bbo/offline-ram/losses/lambdaRank.py
pointer only (licence: NONE) · get_code("878f7feaba547fb6")
How it ran

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

LossFunction Ran
ran on a synthesized input
lamda-bbo/offline-ram/losses/lambdaRank.py
pointer only (licence: NONE) · get_code("f39d3df3ce16b87c")
How it ran

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

dcg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lamda-bbo/Offline-RaM/losses/neuralNDCG.py
pointer only (licence: NONE) · get_code("f40a7926c73e49c1")
How it ran

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

default_linear_distribution Ran
ran, violated the contract we drafted
brandontrabucco/design-bench/design_bench/datasets/dataset_builder.py
code served (permissive licence) · get_code("97d1dadc0092cddc")
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 ndarray, ndim 1, dtype family float, shape (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 numpy as np

# Create a small ranks array for testing
# This represents the rank order of designs in a dataset
ranks = np.array([0, 1, 2, 3, 4], dtype=np.int64)

ARGS = {
    "ranks": ranks
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (5,) — shape (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
default_quadratic_distribution Ran
ran, violated the contract we drafted
brandontrabucco/design-bench/design_bench/datasets/dataset_builder.py
code served (permissive licence) · get_code("cd881bdf30de1f0a")
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 ndarray, ndim 1, dtype family float, shape (6,) 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 numpy as np
import torch

np.random.seed(0)
torch.manual_seed(0)

# Create a sample ranks array
# This represents the rank order of designs, typically integers from 0 to n-1
ranks = np.array([0, 1, 2, 3, 4, 5], dtype=np.int32)

ARGS = {
    "ranks": ranks
}
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 ndarray, ndim 1, dtype family float, shape (6,) — shape (6,) 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
default_uniform_distribution Ran
ran, violated the contract we drafted
brandontrabucco/design-bench/design_bench/datasets/dataset_builder.py
code served (permissive licence) · get_code("7dbee57a564eced6")
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 ndarray, ndim 1, dtype family float, shape (8,) 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 numpy as np

# Create a sample ranks array
# The function expects a numpy array representing rank order of designs
# It simply returns an array of ones with the same shape
ranks = np.array([3, 1, 4, 1, 5, 9, 2, 6], dtype=np.int32)

ARGS = {
    "ranks": ranks
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (8,) — shape (8,) 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
deterministic_neural_sort Ran
ran; our contract draft was wrong, not the code
lamda-bbo/Offline-RaM/losses/loss_utils.py
pointer only (licence: NONE) · get_code("fd1924a6479e1fa4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lamda-bbo/Offline-RaM 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_confirm_token Ran
ran; our contract draft was wrong, not the code
brandontrabucco/design-bench/design_bench/disk_resource.py
code served (permissive licence) · get_code("fb3792dae3b52c70")
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.

from unittest.mock import Mock

# Create a mock response object with cookies attribute
# The function iterates over response.cookies.items() and checks if key.startswith('download_warning')
mock_response = Mock()

# Create a cookies dict with a download_warning key
mock_cookies = {
    'download_warning': 'token_value_123',
    'other_cookie': 'some_value'
}

mock_response.cookies = mock_cookies

ARGS = {
    'response': mock_response
}
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
import_name Ran
ran; our contract draft was wrong, not the code
brandontrabucco/design-bench/design_bench/task.py
code served (permissive licence) · get_code("9bdda179859c7e1c")
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 importlib
import sys

# Create a simple module and attribute to import
class DummyClass:
    value = "test_value"

# Add a dummy module to sys.modules so we can import it
import types
dummy_module = types.ModuleType('dummy_module')
dummy_module.DummyClass = DummyClass
sys.modules['dummy_module'] = dummy_module

# Define the arguments
ARGS = {
    'name': 'dummy_module:DummyClass'
}
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 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
lambdaRank_scheme Ran
ran; our contract draft was wrong, not the code
lamda-bbo/Offline-RaM/losses/lambdaRank.py
pointer only (licence: NONE) · get_code("9c71991dafef6c40")
How it ran

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

load_data Ran
ran; our contract draft was wrong, not the code
jiangnanboy/learning_to_rank/src/trees/lgb_ltr.py
pointer only (licence: NONE) · get_code("3006c520eff7c841")
How it ran

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

make_loss_fn Ran
ran; our contract draft was wrong, not the code
ggchen1997/bdi/utils.py
pointer only (licence: NONE) · get_code("3f6fcd223948503e")
How it ran

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

one_hot Ran
ran; our contract draft was wrong, not the code
brandontrabucco/design-bench/design_bench/datasets/discrete_dataset.py
code served (permissive licence) · get_code("9254b9a1999e5ab9")
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 ndarray, ndim 3, dtype family float, shape (2, 3, 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 numpy as np

# Analyze the function:
# - 'a' is used with: .size, .ravel(), .shape attributes
# - 'num_classes' is used as an integer for np.zeros shape and indexing
# 
# The function converts integer class indices to one-hot representation
# So 'a' should be a numpy array of integers (class indices)
# 'num_classes' should be the total number of classes

# Create a small integer array with class indices
a = np.array([[0, 1, 2], [1, 0, 3]], dtype=np.int64)

# Number of classes should be greater than max index in 'a'
num_classes = 5

ARGS = {
    "a": a,
    "num_classes": num_classes,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 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
sample_gumbel Ran
ran; our contract draft was wrong, not the code
lamda-bbo/Offline-RaM/losses/loss_utils.py
pointer only (licence: NONE) · get_code("c754deebeb9906bf")
How it ran

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

sinkhorn_scaling Ran
ran; our contract draft was wrong, not the code
lamda-bbo/Offline-RaM/losses/loss_utils.py
pointer only (licence: NONE) · get_code("089fa157d43247ba")
How it ran

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

direct_download Not yet run
unverified (harvested, no recorded run)
brandontrabucco/design-bench/design_bench/disk_resource.py
code served (permissive licence) · get_code("bee40bc7b8e40002")
How it ran

no invocation recorded.

google_drive_download Not yet run
unverified (harvested, no recorded run)
brandontrabucco/design-bench/design_bench/disk_resource.py
code served (permissive licence) · get_code("0508c25f44e088dc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 0 later) and 8 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
lambdaRank_scheme 2 other papers
2 dated earlier
2023.emnlp-main.923 (2023 (year only))
Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking Agents
2311.01555 (2023-11)
Instruction Distillation Makes Large Language Models Efficient Zero-shot Rankers
default_linear_distribution 1 other paper
1 dated earlier
2202.08450 (2022-02)
Design-Bench: Benchmarks for Data-Driven Offline Model-Based Optimization
default_quadratic_distribution 1 other paper
1 dated earlier
2202.08450 (2022-02)
Design-Bench: Benchmarks for Data-Driven Offline Model-Based Optimization
default_uniform_distribution 1 other paper
1 dated earlier
2202.08450 (2022-02)
Design-Bench: Benchmarks for Data-Driven Offline Model-Based Optimization
direct_download 1 other paper
1 dated earlier
2202.08450 (2022-02)
Design-Bench: Benchmarks for Data-Driven Offline Model-Based Optimization
get_confirm_token 1 other paper
1 dated earlier
2202.08450 (2022-02)
Design-Bench: Benchmarks for Data-Driven Offline Model-Based Optimization
google_drive_download 1 other paper
1 dated earlier
2202.08450 (2022-02)
Design-Bench: Benchmarks for Data-Driven Offline Model-Based Optimization
import_name 1 other paper
1 dated earlier
2202.08450 (2022-02)
Design-Bench: Benchmarks for Data-Driven Offline Model-Based Optimization
one_hot 1 other paper
1 dated earlier
2202.08450 (2022-02)
Design-Bench: Benchmarks for Data-Driven Offline Model-Based Optimization

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

Offline model-based optimization (MBO) aims to identify a design that maximizes a black-box function using only a fixed, pre-collected dataset of designs and their corresponding scores. This problem has garnered significant attention from both scientific and industrial domains. A common approach in offline MBO is to train a regression-based surrogate model by minimizing mean squared error (MSE) and then find the best design within this surrogate model by different optimizers (e.g., gradient ascent). However, a critical challenge is the risk of out-of-distribution errors, i.e., the surrogate model may typically overestimate the scores and mislead the optimizers into suboptimal regions. Prior works have attempted to address this issue in various ways, such as using regularization techniques and ensemble learning to enhance the robustness of the model, but it still remains. In this paper, we argue that regression models trained with MSE are not well-aligned with the primary goal of offline MBO, which is to select promising designs rather than to predict their scores precisely. Notably, if a surrogate model can maintain the order of candidate designs based on their relative score relationships, it can produce the best designs even without precise predictions. To validate it, we conduct experiments to compare the relationship between the quality of the final designs and MSE, finding that the correlation is really very weak. In contrast, a metric that measures order-maintaining quality shows a significantly stronger correlation. Based on this observation, we propose learning a ranking-based model that leverages learning to rank techniques to prioritize promising designs based on their relative scores. We show that the generalization error on ranking loss can be well bounded. Empirical results across diverse tasks demonstrate the superior performance of our proposed ranking-based method than twenty existing methods. Our implementation is available at https://github.com/ lamda-bbo/Offline-RaM.

For agents

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

get_harvested_code_for_paper("2410.11502")
get_code_for_paper("2410.11502")
have("2410.11502")

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

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

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

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

Connect an agent — have() is free.