SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.02449 · ICML · 2024

Quality-Weighted Vendi Scores and Their Application to Diverse Experimental Design

Quan Nguyen, Adji Bousso Dieng

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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.02449.json · badge: /api/ran/2405.02449.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
vertaix/quality-weighted-vendi-score canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
entropy_q Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vertaix/quality-weighted-vendi-score/diverse_search/utils.py
code served (permissive licence) · get_code("ad73c9e8d0084d32")
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 float64, ndim 0, 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 numpy as np

# Create a valid probability distribution (sums to 1, all non-negative)
p = np.array([0.2, 0.3, 0.4, 0.1])

ARGS = {
    'p': p,
    'q': 1.0
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
generate_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vertaix/quality-weighted-vendi-score/diverse_bayesopt/robot/trust_region.py
code served (permissive licence) · get_code("0037210780a90b14")
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 (2, 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 botorch.models import SingleTaskGP
from gpytorch.means import ConstantMean
from gpytorch.kernels import ScaleKernel, RBFKernel

torch.manual_seed(0)

# Create a minimal state object with required attributes
class TrustRegionState:
    def __init__(self, center_point, length):
        self.center_point = center_point
        self.length = length

# Create minimal training data
dim = 4
batch_size = 2
X = torch.randn(5, dim)  # 5 training points, 4 dimensions
Y = torch.randn(5, 1)    # 5 training outputs

# Create a minimal GP model that works with botorch
# SingleTaskGP is the simplest option
model = SingleTaskGP(X, Y)

# Create state with center point and length
center_point = torch.randn(1, dim)
state = TrustRegionState(center_point=center_point, length=0.8)

# Define absolute bounds
lb = -torch.ones(1, dim)
ub = torch.ones(1, dim)

ARGS = {
    'state': state,
    'model': model,
    'X': X,
    'Y': Y,
    'batch_size': 2,
    'n_candidates': None,
    'num_restarts': 2,
    'raw_samples': 32,
    'acqf': 'ts',
    'dtype': torch.float32,
    'absolute_bounds': (lb, ub),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
botorch, gpytorch, 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 (2, 4) — shape (2, 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
get_fantasy_label Ran
ran, honoured the contract we drafted
vertaix/quality-weighted-vendi-score/diverse_search/utils.py
code served (permissive licence) · get_code("1464b529337ba246")
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 int, ndim 0, dtype family int, 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)

ARGS = {
    'fantasy_oracle': 'pessimistic'
}
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 int, ndim 0, dtype family int, 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
tiebreak_max Ran
ran, honoured the contract we drafted
vertaix/quality-weighted-vendi-score/diverse_search/utils.py
code served (permissive licence) · get_code("9027e63704fb660a")
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 tuple, 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 numpy as np

np.random.seed(42)

# Create a simple numpy array of scores with some tied values
scores = np.array([1.5, 2.3, 2.3, 1.1, 2.3])

ARGS = {
    "scores": scores
}
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 tuple, ndim 1, dtype family float — a tuple 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
update_models_end_to_end Ran
ran; our contract draft was wrong, not the code
vertaix/quality-weighted-vendi-score/diverse_bayesopt/robot/gp_utils/update_models.py
code served (permissive licence) · get_code("b84597ee45a5c18a")
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 tuple, 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 torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Define a minimal VAE class
class MinimalVAE(nn.Module):
    def __init__(self, latent_dim=4):
        super().__init__()
        self.latent_dim = latent_dim
        self.encoder = nn.Linear(10, latent_dim * 2)
        self.decoder = nn.Linear(latent_dim, 10)
    
    def forward(self, x):
        # x is a list of strings, we'll encode them as fixed vectors
        pass

# Define a minimal objective class with vae_forward method
class MinimalObjective(nn.Module):
    def __init__(self):
        super().__init__()
        self.vae = MinimalVAE(latent_dim=4)
    
    def vae_forward(self, batch_list):
        # batch_list is a list of strings
        # Return latent codes z and vae_loss
        batch_size = len(batch_list)
        z = torch.randn(batch_size, 4)
        vae_loss = torch.tensor(0.5, requires_grad=True)
        return z, vae_loss

# Define a minimal surrogate model
class MinimalSurrogateModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=1):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, z):
        # z: (batch_size, 4)
        return self.linear(z)

# Define a minimal marginal log likelihood (mll) function
class MinimalMLL:
    def __call__(self, pred, y):
        # pred: (batch_size, 1), y: (batch_size,)
        loss = torch.mean((pred.squeeze() - y) ** 2)
        return loss

# Create instances
objective = MinimalObjective()
model = MinimalSurrogateModel(input_dim=4, output_dim=1)
mll = MinimalMLL()

# Create training data
train_x = ["hello", "world"]  # List of strings
train_y_scores = [0.7, 0.3]

# Define arguments
ARGS = {
    'train_x': train_x,
    'train_y_scores': train_y_scores,
    'objective': objective,
    'model': model,
    'mll': mll,
    'learning_rte': 0.01,
    'num_update_epochs': 1
}
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 tuple, ndim 1, dtype family float — a tuple 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
update_surr_model Ran
ran; our contract draft was wrong, not the code
vertaix/quality-weighted-vendi-score/diverse_bayesopt/robot/gp_utils/update_models.py
code served (permissive licence) · get_code("bff6178af0ea9688")
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 SimpleSurrogateModel. 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.utils.data import TensorDataset, DataLoader

torch.manual_seed(0)

# Define a simple surrogate model
class SimpleSurrogateModel(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear1 = nn.Linear(input_dim, 8)
        self.linear2 = nn.Linear(8, output_dim)
    
    def forward(self, x):
        x = torch.relu(self.linear1(x))
        return self.linear2(x)

# Define a simple MLL (marginal log likelihood) stand-in
class SimpleMLL(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, output, target):
        # Return a scalar loss (MLL-like behavior)
        return torch.mean((output - target) ** 2)

# Create model
input_dim = 4
output_dim = 3
model = SimpleSurrogateModel(input_dim, output_dim)

# Create MLL
mll = SimpleMLL()

# Create training data
batch_size = 2
train_z = torch.randn(batch_size, input_dim)  # input features
train_y = torch.randn(batch_size, output_dim)  # target scores

# Set up arguments
ARGS = {
    'model': model,
    'mll': mll,
    'learning_rte': 0.01,
    'train_z': train_z,
    'train_y': train_y,
    'n_epochs': 2
}
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 SimpleSurrogateModel — a SimpleSurrogateModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleSurrogateModel 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
append_gram_matrix Not yet run
unverified (harvested, no recorded run)
vertaix/quality-weighted-vendi-score/diverse_bayesopt/robot/robot.py
code served (permissive licence) · get_code("5a37bfb90b322cff")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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-22.

Repositories linked to this paper

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

Abstract

Experimental design techniques such as active search and Bayesian optimization are widely used in the natural sciences for data collection and discovery. However, existing techniques tend to favor exploitation over exploration of the search space, which causes them to get stuck in local optima. This collapse problem prevents experimental design algorithms from yielding diverse high-quality data. In this paper, we extend the Vendi scores-a family of interpretable similarity-based diversity metrics-to account for quality. We then leverage these quality-weighted Vendi scores to tackle experimental design problems across various applications, including drug discovery, materials discovery, and reinforcement learning. We found that quality-weighted Vendi scores allow us to construct policies for experimental design that flexibly balance quality and diversity, and ultimately assemble rich and diverse sets of high-performing data points. Our algorithms led to a 70%-170% increase in the number of effective discoveries compared to baselines. 1

For agents

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

get_harvested_code_for_paper("2405.02449")
get_code_for_paper("2405.02449")
have("2405.02449")

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

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

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

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

Connect an agent — have() is free.