SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.05330 · NeurIPS · 2024

Inversion-based Latent Bayesian Optimization

Hyunwoo Kim, Jinyoung Park, Seunghun Lee, Jaewon Chu

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 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/2411.05330.json · badge: /api/ran/2411.05330.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
mlvlab/InvBO canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
mlvlab/invbo canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
TS Ran
ran; our contract draft was wrong, not the code
mlvlab/InvBO/invbo/utils/bo_utils/turbo.py
code served (permissive licence) · get_code("01631f8f50a4bb6a")
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. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

class MockPosterior:
    def __init__(self, loc, lazy_covariance_matrix):
        self.loc = loc
        self.lazy_covariance_matrix = lazy_covariance_matrix

class MockLazyCovariance:
    def __init__(self, cov_matrix):
        self.cov_matrix = cov_matrix
    
    def zero_mean_mvn_samples(self, batch_size):
        # Return samples from a multivariate normal
        n_points = self.cov_matrix.shape[0]
        return torch.randn(batch_size, n_points)

class MockModel(nn.Module):
    def __init__(self, n_points, n_features):
        super().__init__()
        self.n_points = n_points
        self.n_features = n_features
    
    def posterior(self, X_cand):
        # loc shape: (n_points,)
        loc = torch.randn(self.n_points)
        # Create a simple covariance matrix
        cov_matrix = torch.eye(self.n_points)
        lazy_cov = MockLazyCovariance(cov_matrix)
        return MockPosterior(loc, lazy_cov)

batch_size = 2
n_points = 2
n_features = 4

X_cand = torch.randn(n_points, n_features)
model = MockModel(n_points, n_features)

ARGS = {
    "X_cand": X_cand,
    "model": model,
    "batch_size": batch_size,
}
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 — a tuple output has no array shape of its own; none is 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
lipschitz_loss Ran
ran; our contract draft was wrong, not the code
mlvlab/InvBO/invbo/utils/utils.py
code served (permissive licence) · get_code("98cfe3d3a797ae62")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

# z: tensor that gets .cuda() called, then unsqueezed and used in distance computation
# Shape: (batch_size, embedding_dim)
z = torch.randn(2, 4)

# y: tensor that gets .cuda() called, then unsqueezed and squeezed
# Shape: (batch_size, 1) based on squeeze(-1) operation
y = torch.randn(2, 1)

# recon_weight: tensor used in multiplication and indexing with [:, None]
# Shape: (batch_size,)
recon_weight = torch.randn(2)

ARGS = {
    "z": z,
    "y": y,
    "recon_weight": recon_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 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
load_train_z Ran
ran, honoured the contract we drafted
mlvlab/InvBO/invbo/utils/mol_utils/load_data.py
code served (permissive licence) · get_code("e00ccb61913dc9fb")
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 (5, 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 pandas as pd
import torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory and CSV file for testing
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "model-train-zs.csv")

# Create sample training z values
sample_zs = torch.randn(10, 4)
df = pd.DataFrame(sample_zs.numpy())
df.to_csv(csv_path, header=False, index=False)

# Path to VAE state dict (will be inferred from csv path)
path_to_vae_statedict = csv_path.replace("-train-zs.csv", ".pt")

ARGS = {
    "num_initialization_points": 5,
    "path_to_vae_statedict": path_to_vae_statedict,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, 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 (5, 4) — shape (5, 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
update_models_end_to_end Ran
ran; our contract draft was wrong, not the code
mlvlab/InvBO/invbo/utils/utils.py
code served (permissive licence) · get_code("0935ed12b60eb28d")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np
from scipy import stats
from unittest.mock import Mock

torch.manual_seed(0)

# Build a minimal VAE mock that has the required interface
class MinimalVAE(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Linear(10, 8)
        self.decoder = nn.Linear(4, 10)
        
    def vae_forward(self, batch_list):
        # Return z, _, recon_loss, kldiv
        batch_size = len(batch_list)
        z = torch.randn(batch_size, 4)  # latent dim = 4
        recon_loss = torch.randn(batch_size, 10)  # reconstruction loss per sample
        kldiv = torch.tensor(0.1)
        return z, None, recon_loss, kldiv

class MinimalSurrogateModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
        
    def forward(self, z):
        return self.linear(z)

class MinimalObjective:
    def __init__(self):
        self.vae = MinimalVAE()
    
    def vae_forward(self, batch_list):
        batch_size = len(batch_list)
        z = torch.randn(batch_size, 4)
        recon_loss = torch.randn(batch_size, 10)
        kldiv = torch.tensor(0.1)
        return z, None, recon_loss, kldiv

class MinimalMLL:
    def __call__(self, pred, y):
        # Return a scalar loss
        return torch.mean((pred - y.unsqueeze(-1)) ** 2)

class MinimalTracker:
    def log(self, dict_log):
        pass

# Construct minimal arguments
train_x = ["CC", "CCO"]  # 2 strings of length 2 and 3
train_y_scores = np.array([0.5, 0.7])

objective = MinimalObjective()
model = MinimalSurrogateModel()
mll = MinimalMLL()

learning_rte = 0.001
num_update_epochs = 1
tracker = MinimalTracker()

alpha = 0.1
beta = 0.1
gamma = 0.1
delta = 0.1

ARGS = {
    "train_x": train_x,
    "train_y_scores": train_y_scores,
    "objective": objective,
    "model": model,
    "mll": mll,
    "learning_rte": learning_rte,
    "num_update_epochs": num_update_epochs,
    "track_with_wandb": False,
    "tracker": tracker,
    "alpha": alpha,
    "beta": beta,
    "gamma": gamma,
    "delta": delta,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, 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_state Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mlvlab/InvBO/invbo/utils/bo_utils/turbo.py
code served (permissive licence) · get_code("ba51f9dac22959af")
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 State. 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 math

torch.manual_seed(0)

class State:
    def __init__(self):
        self.best_value = 0.5
        self.success_counter = 0
        self.failure_counter = 0
        self.success_tolerance = 3
        self.failure_tolerance = 2
        self.length = 1.0
        self.length_max = 10.0
        self.length_min = 0.01
        self.restart_triggered = False

state = State()
Y_next = torch.tensor([0.7, 0.9])

ARGS = {
    'state': state,
    'Y_next': Y_next
}
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 State — a State output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a State 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
LatentSpaceObjective Not yet run
unverified (harvested, no recorded run)
mlvlab/invbo/invbo/latent_space_objective.py
code served (permissive licence) · get_code("56ff38263af0c676")
How it ran

no invocation recorded.

generate_batch Not yet run
unverified (harvested, no recorded run)
mlvlab/InvBO/invbo/utils/bo_utils/turbo.py
code served (permissive licence) · get_code("27be588cbcdb4733")
How it ran

no invocation recorded.

load_molecule_train_data Not yet run
unverified (harvested, no recorded run)
mlvlab/InvBO/invbo/utils/mol_utils/load_data.py
code served (permissive licence) · get_code("70bc126cfa970aa5")
How it ran

no invocation recorded.

update_surr_model Not yet run
unverified (harvested, no recorded run)
mlvlab/InvBO/invbo/utils/utils.py
code served (permissive licence) · get_code("0dda692b10a19709")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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
update_state 3 other papers
3 dated earlier
2201.11872 (2022-01)
Local Latent Space Bayesian Optimization over Structured Inputs
2310.20258 (2023-10)
Advancing Bayesian Optimization via Learning Correlated Latent Space
2406.05250 (2024-06)
LLM-Enhanced Bayesian Optimization for Efficient Analog Layout Constraint Generation
load_train_z 2 other papers
2 dated earlier
2201.11872 (2022-01)
Local Latent Space Bayesian Optimization over Structured Inputs
2310.20258 (2023-10)
Advancing Bayesian Optimization via Learning Correlated Latent Space
update_surr_model 2 other papers
2 dated earlier
2201.11872 (2022-01)
Local Latent Space Bayesian Optimization over Structured Inputs
2310.20258 (2023-10)
Advancing Bayesian Optimization via Learning Correlated Latent Space
lipschitz_loss 1 other paper
1 dated earlier
2310.20258 (2023-10)
Advancing Bayesian Optimization via Learning Correlated Latent Space

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

Latent Bayesian optimization (LBO) approaches have successfully adopted Bayesian optimization over a continuous latent space by employing an encoderdecoder architecture to address the challenge of optimization in a high dimensional or discrete input space. LBO learns a surrogate model to approximate the black-box objective function in the latent space. However, we observed that most LBO methods suffer from the 'misalignment problem', which is induced by the reconstruction error of the encoder-decoder architecture. It hinders learning an accurate surrogate model and generating high-quality solutions. In addition, several trust region-based LBO methods select the anchor, the center of the trust region, based solely on the objective function value without considering the trust region's potential to enhance the optimization process. To address these issues, we propose Inversion-based Latent Bayesian Optimization (InvBO), a plug-and-play module for LBO. InvBO consists of two components: an inversion method and a potential-aware trust region anchor selection. The inversion method searches the latent code that completely reconstructs the given target data. The potential-aware trust region anchor selection considers the potential capability of the trust region for better local optimization. Experimental results demonstrate the effectiveness of InvBO on nine real-world benchmarks, such as molecule design and arithmetic expression fitting tasks. Code is available at https://github.com/mlvlab/InvBO.

For agents

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

get_harvested_code_for_paper("2411.05330")
get_code_for_paper("2411.05330")
have("2411.05330")

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

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

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

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

Connect an agent — have() is free.