SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.13025 · IJCAI · 2025

LiBOG: Lifelong Learning for Black-Box Optimizer Generation

Jialin Liu, Jiyuan Pei, Yi Mei, Mengjie Zhang

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 4 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.13025.json · badge: /api/ran/2505.13025.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
peijy/libog canonical (classifier label)
classifier basis not recorded on the link
7 ran · 4 no recorded run
FunctionStatusWhere it lives
get_c Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
peijy/libog/model/utils.py
code served (permissive licence) · get_code("fa03ddd643b266fa")
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
from torch.distributions import Categorical

torch.manual_seed(0)

# Create a small output tensor with shape (batch_size, 1, output_size)
# After squeeze(1), it becomes (batch_size, output_size)
output = torch.randn(2, 1, 4)

# min_c: minimum value for the choice
min_c = 0

# interval: step size for choices
interval = 1

# fix_c: optional fixed choice tensor (same batch size as output)
fix_c = torch.tensor([0, 2])

ARGS = {
    "output": output,
    "min_c": min_c,
    "interval": interval,
    "fix_c": fix_c,
}
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
get_choice Ran
ran; our contract draft was wrong, not the code
peijy/libog/model/utils.py
code served (permissive licence) · get_code("4eec176e5155a959")
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. 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
from torch.distributions import Categorical
import math

torch.manual_seed(0)

# Analyze function parameters:
# - output: used as output.size() -> (bs, _, output_size), then squeezed to (bs, output_size)
# - mask: used with output[mask == 0] = -math.inf, same shape as output after squeeze
# - fix_choice: optional, can be None or a tensor of actions

# Create test tensors
bs = 2  # batch size
output_size = 5  # distinct from bs

# output shape: (bs, 1, output_size) - function does output.squeeze(1)
output = torch.randn(bs, 1, output_size)

# mask shape: (bs, output_size) - same as squeezed output for masking
mask = torch.ones(bs, output_size)
# Set one position to 0 to test masking
mask[0, 2] = 0

# fix_choice: None (to test the full return path) or a tensor of valid action indices
# actions are in range [0, 15] based on binary_code_len=4 (2^4=16 values)
# but function does int(action[i] + 1), so action can be negative
# action values used: bin(int(action[i] + 1)) means action[i] + 1 must be >= 0
# so action[i] >= -1, and for 4-bit binary, int(action[i] + 1) should be in [0, 15]
# so action[i] in [-1, 14]
fix_choice = None

ARGS = {
    "output": output,
    "mask": mask,
    "fix_choice": fix_choice
}
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
get_config Ran
ran; our contract draft was wrong, not the code
peijy/libog/dataset/generate_dataset.py
code served (permissive licence) · get_code("12f99d2367c2e338")
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 numpy as np

# Define a stand-in class for cec2021 dataset
class CEC2021Dataset:
    def __init__(self):
        self.name = "cec2021"
        self.data = np.random.randn(10, 5)

cec2021 = CEC2021Dataset()

# The function get_config only takes one parameter: problem_id
# We need to provide a valid problem_id (1-11 based on pro_name list)
ARGS = {
    "problem_id": 1
}
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 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
rotate_gen Ran
ran, honoured the contract we drafted
peijy/libog/dataset/cec_test_func.py
code served (permissive licence) · get_code("392a4a144f4f496a")
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 2, dtype family float, shape (4, 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 numpy as np

# Set random seed for reproducibility
np.random.seed(42)

# The function takes only one parameter: dim
# It's an integer representing the dimension of the square matrix to generate
dim = 4

ARGS = {
    "dim": dim
}
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 2, dtype family float, shape (4, 4) — shape (4, 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
rotate_gen Ran
ran, honoured the contract we drafted
peijy/libog/dataset/generate_dataset.py
code served (permissive licence) · get_code("b47f380a7c1830e4")
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 2, dtype family float, shape (4, 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 numpy as np

def rotate_gen(dim):
    random_state = np.random
    H = np.eye(dim)
    D = np.ones((dim,))
    for n in range(1, dim):
        mat = np.eye(dim)
        x = random_state.normal(size=(dim - n + 1,))
        D[n - 1] = np.sign(x[0])
        x[0] -= D[n - 1] * np.sqrt((x * x).sum())
        Hx = np.eye(dim - n + 1) - 2.0 * np.outer(x, x) / (x * x).sum()
        mat[n - 1:, n - 1:] = Hx
        H = np.dot(H, mat)
    D[-1] = (-1) ** (1 - dim % 2) * D.prod()
    H = (D * H.T).T
    return H

ARGS = {
    "dim": 4
}
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 2, dtype family float, shape (4, 4) — shape (4, 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
rotatefunc Ran
ran, honoured the contract we drafted
peijy/libog/dataset/cec_test_func.py
code served (permissive licence) · get_code("a98a5f0293d29fe7")
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 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 numpy as np

# x should be a 2D array that can be transposed and matrix-multiplied
# Mr should be a 2D rotation matrix that can multiply x.transpose()
# The function does: Mr @ x.T, then transposes result back

x = np.random.randn(2, 4)  # batch=2, dim=4
Mr = np.random.randn(4, 4)  # rotation matrix 4x4 to match x's feature dimension

ARGS = {
    "x": x,
    "Mr": Mr,
}
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 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
sr_func Ran
ran, honoured the contract we drafted
peijy/libog/dataset/cec_test_func.py
code served (permissive licence) · get_code("30e8c93ca132b54e")
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 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 numpy as np

# Analyze sr_func usage:
# - x: indexed as x[:, :Os.shape[-1]], so needs to be 2D array with sufficient columns
# - Os: used in x[:, :Os.shape[-1]] - Os, so needs shape (..., some_dim)
# - Mr: passed to rotatefunc, used as np.matmul(Mr, y.transpose()).transpose()
#       so needs to be 2D matrix that can multiply with transposed y
# - sh: multiplied with array, needs to be scalar or broadcastable

# rotatefunc signature: rotatefunc(x, Mr)
# - x.transpose() then matmul with Mr, then transpose result
# - if x is (batch, features), then x.transpose() is (features, batch)
# - Mr @ (features, batch) needs Mr to be (something, features)
# - result is (something, batch), transposed to (batch, something)

# Set up dimensions:
# batch_size = 2
# input_features = 5 (x will have 5 columns)
# os_features = 3 (Os.shape[-1] will be 3)
# rotated_features = 4 (output of rotation)

batch_size = 2
input_features = 5
os_features = 3
rotated_features = 4

# x: (batch, input_features) - raw input
x = np.random.randn(batch_size, input_features)

# Os: (os_features,) or (..., os_features) - used in subtraction after slicing
# x[:, :Os.shape[-1]] gives (batch, os_features), so Os should be (os_features,)
Os = np.random.randn(os_features)

# sh: scalar or (1,) for multiplication
sh = 2.0

# Mr: rotation matrix
# After (x[:, :os_features] - Os) * sh, we have shape (batch, os_features)
# rotatefunc does: np.matmul(Mr, y.transpose()).transpose()
# y.transpose() is (os_features, batch)
# Mr @ (os_features, batch) requires Mr to be (rotated_features, os_features)
# result is (rotated_features, batch), transposed to (batch, rotated_features)
Mr = np.random.randn(rotated_features, os_features)

ARGS = {
    'x': x,
    'Os': Os,
    'Mr': Mr,
    'sh': sh
}
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 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_binary Not yet run
unverified (harvested, no recorded run)
peijy/libog/model/utils.py
code served (permissive licence) · get_code("c67ef6c7be791cb2")
How it ran

no invocation recorded.

get_options Not yet run
unverified (harvested, no recorded run)
peijy/libog/options.py
code served (permissive licence) · get_code("7418cf1e80d665bc")
How it ran

no invocation recorded.

rollout_imitate Not yet run
unverified (harvested, no recorded run)
peijy/libog/execute/rollout.py
code served (permissive licence) · get_code("05d64f846af4ee1f")
How it ran

no invocation recorded.

sample_batch_task_cec21 Not yet run
unverified (harvested, no recorded run)
peijy/libog/dataset/generate_dataset.py
code served (permissive licence) · get_code("3a5bca03957b3154")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 2 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_binary 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning
get_c 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning
get_choice 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning
get_config 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning
rotate_gen 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning
rotate_gen 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning
rotatefunc 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning
sample_batch_task_cec21 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning
sr_func 1 other paper
1 dated earlier
2402.02355 (2024-02)
Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning

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

Meta-Black-Box Optimization (MetaBBO) garners attention due to its success in automating the configuration and generation of black-box optimizers, significantly reducing the human effort required for optimizer design and discovering optimizers with higher performance than classic human-designed optimizers. However, existing MetaBBO methods conduct one-off training under the assumption that a stationary problem distribution with extensive and representative training problem samples is preavailable. This assumption is often impractical in real-world scenarios, where diverse problems following shifting distribution continually arise. Consequently, there is a pressing need for methods that can continuously learn from new problems encountered on-the-fly and progressively enhance their capabilities. In this work, we explore a novel paradigm of lifelong learning in MetaBBO and introduce LiBOG, a novel approach designed to learn from sequentially encountered problems and generate high-performance optimizers for Black-Box Optimization (BBO). LiBOG consolidates knowledge both across tasks and within tasks to mitigate catastrophic forgetting. Extensive experiments demonstrate LiBOG's effectiveness in learning to generate high-performance optimizers in a lifelong learning manner, addressing catastrophic forgetting while maintaining plasticity to learn new tasks.

For agents

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

get_harvested_code_for_paper("2505.13025")
get_code_for_paper("2505.13025")
have("2505.13025")

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

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

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

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

Connect an agent — have() is free.