SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.02355 · ICLR · 2024

Symbol: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning

Jie Zhang, Yining Ma, Jiacheng Chen, Zeyuan Ma, Hongshu Guo, Yue-Jiao Gong

arXiv · PDF · Open in the Atlas

Code that ran

15 of 18 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; 8 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 6 failures of our instrument; 3 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/2402.02355.json · badge: /api/ran/2402.02355.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
GMC-DRL/Symbol canonical (classifier label)
classifier basis: census
13 ran · 3 no recorded run
gmc-drl/symbol alias (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
Tokenizer Ran
ran on a synthesized input · constructed an object; no result was computed
gmc-drl/symbol/expr/expression.py
code served (permissive licence) · get_code("ac2eca8bc3b28fea")
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 an instance of its own class, Tokenizer: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

class Tokenizer:
    SPECIAL_SYMBOLS = {}
    SPECIAL_FLOAT_SYMBOLS = {}
    SPECIAL_OPERATORS = {}
    SPECIAL_INTEGERS = {}

    def __init__(self):
        self.start = '<START>'
        self.start_id = 1
        self.end = '<END>'
        self.end_id = 2
        self.pad = '<PAD>'
        self.pad_id = 0
        self.vocab = [self.pad, self.start, self.end]

    def encode(self, expr):
        raise NotImplementedError()

    def decode(self, expr):
        raise NotImplementedError()

    def is_unary(self, token):
        raise NotImplementedError()

    def is_binary(self, token):
        raise NotImplementedError()

    def is_leaf(self, token):
        raise NotImplementedError()

    def get_constant_ids(self):
        pass


ARGS = {}
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 Tokenizer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Tokenizer 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
base_reward1 Ran
ran, honoured the contract we drafted
GMC-DRL/Symbol/execute/task.py
code served (permissive licence) · get_code("cb9ad1b42dadf0e8")
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

class PopulationMock:
    def __init__(self, gbest_cost):
        self.gbest_cost = gbest_cost

stu_pop = PopulationMock(gbest_cost=5.0)
tea_pop = PopulationMock(gbest_cost=10.0)
pre_stu_pop = PopulationMock(gbest_cost=6.0)
s_gbest = 4.0
s_init_cost = 15.0

ARGS = {
    "stu_pop": stu_pop,
    "tea_pop": tea_pop,
    "pre_stu_pop": pre_stu_pop,
    "s_gbest": s_gbest,
    "s_init_cost": s_init_cost,
}
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
base_reward2 Ran
ran, honoured the contract we drafted
GMC-DRL/Symbol/execute/task.py
code served (permissive licence) · get_code("20e887bb7bad12f4")
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

class PopulationMock:
    """Mock population class with gbest_cost attribute"""
    def __init__(self, gbest_cost):
        self.gbest_cost = gbest_cost

stu_pop = PopulationMock(gbest_cost=5.0)
tea_pop = PopulationMock(gbest_cost=3.0)
pre_stu_pop = PopulationMock(gbest_cost=6.0)
s_gbest = 2.5
s_init_cost = 10.0

ARGS = {
    "stu_pop": stu_pop,
    "tea_pop": tea_pop,
    "pre_stu_pop": pre_stu_pop,
    "s_gbest": s_gbest,
    "s_init_cost": s_init_cost,
}
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
cal_gap_nearest Ran
ran, honoured the contract we drafted
GMC-DRL/Symbol/execute/task.py
code served (permissive licence) · get_code("fc0d230de35cb482")
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

class Population:
    def __init__(self, current_position, before_select_pos, max_x):
        self.current_position = current_position
        self.before_select_pos = before_select_pos
        self.max_x = max_x

# Create student population with shape (2, 4) - 2 students, 4 dimensions
stu_current = np.array([[0.5, 1.2, 0.8, 1.5],
                        [1.1, 0.3, 1.4, 0.9]], dtype=np.float32)
stu_before = np.array([[0.4, 1.0, 0.7, 1.3],
                       [1.0, 0.2, 1.2, 0.8]], dtype=np.float32)

# Create teacher population with shape (3, 4) - 3 teachers, 4 dimensions
tea_current = np.array([[1.8, 1.9, 1.6, 1.7],
                        [0.1, 0.2, 0.3, 0.4],
                        [1.5, 1.4, 1.3, 1.2]], dtype=np.float32)
tea_before = np.array([[1.7, 1.8, 1.5, 1.6],
                       [0.05, 0.15, 0.25, 0.35],
                       [1.4, 1.3, 1.2, 1.1]], dtype=np.float32)

stu_pop = Population(current_position=stu_current, 
                     before_select_pos=stu_before,
                     max_x=2.0)

tea_pop = Population(current_position=tea_current,
                     before_select_pos=tea_before,
                     max_x=2.0)

ARGS = {
    'stu_pop': stu_pop,
    'tea_pop': tea_pop,
    'mode': 'after'
}
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
get_c Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GMC-DRL/Symbol/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
GMC-DRL/Symbol/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
GMC-DRL/Symbol/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
get_options Ran
ran; our contract draft was wrong, not the code
GMC-DRL/Symbol/options.py
code served (permissive licence) · get_code("d1e201bc39eefb0c")
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 Namespace. 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 argparse

torch.manual_seed(0)

ARGS = {
    'args': [
        '--train',
        '--run_name', 'test_run',
        '--load_path', None,
        '--resume_path', None,
        '--train_mode', '3',
        '--init_pop', 'uniform',
        '--lr_mode', 'big',
        '--fea_mode', 'full',
        '--tea_step', 'step',
        '--gap_mode', 'after',
        '--teacher', 'madde',
        '--population_size', '100',
        '--dim', '10',
        '--max_x', '100.0',
        '--min_x', '-100.0',
        '--boarder_method', 'clipping',
        '--skip_step', '5',
        '--max_fes', '50000',
        '--reward_func', 'gap_near',
        '--b_reward_func', '5',
        '--fea_dim', '9',
        '--max_c', '1.0',
        '--min_c', '-1.0',
        '--c_interval', '0.1',
        '--max_layer', '5',
        '--value_dim', '1',
        '--lr_critic', '0.001',
        '--hidden_dim', '16',
        '--num_layers', '1',
        '--lr', '0.001',
        '--seed', '1024',
        '--is_linux', 'False',
        '--require_baseline', 'True',
        '--v_range', '6.0',
        '--encoder_head_num', '4',
        '--decoder_head_num', '4',
        '--critic_head_num', '4',
        '--embedding_dim', '16',
        '--n_encode_layers', '1',
        '--normalization', 'layer',
    ]
}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
left_or_right Ran
ran; our contract draft was wrong, not the code
GMC-DRL/Symbol/expr/expression.py
code served (permissive licence) · get_code("d3143a4fda85a04d")
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.

import torch

torch.manual_seed(0)

# Analyze the function:
# - position: an integer representing a node position in a tree
# - root: an integer representing the root node position
# - The function traverses up the tree from position to root
# - It performs integer arithmetic: (position - 1) // 2
# - It compares integers: position == root, 2 * root + 1 == tmp
# - Returns 'l' or 'r' string

# Simple test case: position is a leaf node, root is 0
# In a binary tree with 0-indexing:
# - node 0 is root
# - node 1 is left child of 0 (2*0 + 1 = 1)
# - node 2 is right child of 0 (2*0 + 2 = 2)

ARGS = {
    'position': 1,  # A leaf node (left child of root)
    'root': 0       # The root node
}
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 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
prefix_to_infix Ran
ran; our contract draft was wrong, not the code
gmc-drl/symbol/expr/expression.py
code served (permissive licence) · get_code("06cac66065167069")
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) 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

class MockTokenizer:
    SPECIAL_SYMBOLS = {
        'sqrt': 'sqrt({})',
        'sin': 'sin({})',
    }
    SPECIAL_FLOAT_SYMBOLS = {}
    SPECIAL_OPERATORS = {}
    SPECIAL_INTEGERS = {}
    
    def __init__(self):
        self.start = '<START>'
        self.start_id = 1
        self.end = '<END>'
        self.end_id = 2
        self.pad = '<PAD>'
        self.pad_id = 0
        self.vocab = [self.pad, self.start, self.end]
    
    def is_binary(self, token):
        return token in ['+', '-', '*', '/', '**']
    
    def is_unary(self, token):
        return token in ['sqrt', 'sin', 'cos', 'abs']
    
    def is_leaf(self, token):
        return token in ['x', 'y', 'C', 'C0', 'C1', 'C2'] or (isinstance(token, str) and token.startswith('C'))
    
    def get_constant_ids(self):
        return []

# Create a simple valid prefix expression
# Example: x + y in prefix notation is ['+', 'x', 'y']
expr = ['+', 'x', 'y']

# Constants array (one per symbol in expr, though only used for 'C' tokens)
constants = [1.5, 2.5, 3.5]

# Create tokenizer instance
tokenizer = MockTokenizer()

ARGS = {
    'expr': expr,
    'constants': constants,
    'tokenizer': tokenizer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
GMC-DRL/Symbol/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
GMC-DRL/Symbol/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
GMC-DRL/Symbol/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
GMC-DRL/Symbol/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
which_layer Ran
ran, honoured the contract we drafted
GMC-DRL/Symbol/expr/expression.py
code served (permissive licence) · get_code("48f7539302bec5f2")
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 math

def which_layer(position):
    level = math.floor(math.log2(position + 1))
    return level + 1

ARGS = {
    "position": 7
}
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 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
get_binary Not yet run
unverified (harvested, no recorded run)
GMC-DRL/Symbol/model/utils.py
code served (permissive licence) · get_code("c67ef6c7be791cb2")
How it ran

no invocation recorded.

get_mask Not yet run
unverified (harvested, no recorded run)
GMC-DRL/Symbol/expr/expression.py
code served (permissive licence) · get_code("998f869fdd4f4a22")
How it ran

no invocation recorded.

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

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 9 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 9 later) and 9 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 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation
get_c 1 other paper
1 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation
get_choice 1 other paper
1 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation
get_config 1 other paper
1 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation
rotate_gen 1 other paper
1 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation
rotate_gen 1 other paper
1 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation
rotatefunc 1 other paper
1 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation
sample_batch_task_cec21 1 other paper
1 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation
sr_func 1 other paper
1 later
2505.13025 (2025-05)
LiBOG: Lifelong Learning for Black-Box Optimizer Generation

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

Recent Meta-learning for Black-Box Optimization (MetaBBO) methods harness neural networks to meta-learn configurations of traditional black-box optimizers. Despite their success, they are inevitably restricted by the limitations of predefined hand-crafted optimizers. In this paper, we present SYMBOL, a novel framework that promotes the automated discovery of black-box optimizers through symbolic equation learning. Specifically, we propose a Symbolic Equation Generator (SEG) that allows closed-form optimization rules to be dynamically generated for specific tasks and optimization steps. Within SYMBOL, we then develop three distinct strategies based on reinforcement learning, so as to meta-learn the SEG efficiently. Extensive experiments reveal that the optimizers generated by SYMBOL not only surpass the state-of-the-art BBO and MetaBBO baselines, but also exhibit exceptional zero-shot generalization abilities across entirely unseen tasks with different problem dimensions, population sizes, and optimization horizons. Furthermore, we conduct in-depth analyses of our SYMBOL framework and the optimization rules that it generates, underscoring its desirable flexibility and interpretability.

For agents

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

get_harvested_code_for_paper("2402.02355")
get_code_for_paper("2402.02355")
have("2402.02355")

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

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

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

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

Connect an agent — have() is free.