SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.07348 · 2026

Controlled Self-Evolution for Algorithmic Code Optimization

Shuo Zhang, Yi Xu, Shaolei Zhang, Pku, Sysu, Nju, Huacan Wang, Ronghao Chen, Tu Hu, Jingping Liu, Ecnu, Sen Hu, and 6 more

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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2601.07348.json · badge: /api/ran/2601.07348.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
QuantaAlpha/EvoControl canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
aggregate_all_iterations_preds Ran
ran; our contract draft was wrong, not the code
QuantaAlpha/EvoControl/SE_Perf/perf_run.py
code served (permissive licence) · get_code("38770afdba324c26")
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 PosixPath. 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 json
import tempfile
from pathlib import Path

# Create a temporary directory structure with mock iteration directories
tmpdir = tempfile.mkdtemp()
root_output_dir = Path(tmpdir)

# Create iteration_0 directory with preds.json
iter0_dir = root_output_dir / 'iteration_0'
iter0_dir.mkdir()
preds_0 = {
    'instance_1': {
        'passed': True,
        'code': 'def foo():\n    return 42',
        'performance': 0.95,
        'final_metrics': {'accuracy': 0.95, 'f1': 0.92}
    },
    'instance_2': {
        'passed': False,
        'code': '',
        'performance': 0.5,
        'final_metrics': {'accuracy': 0.5}
    }
}
with open(iter0_dir / 'preds.json', 'w', encoding='utf-8') as f:
    json.dump(preds_0, f)

# Create iteration_1 directory with preds.json
iter1_dir = root_output_dir / 'iteration_1'
iter1_dir.mkdir()
preds_1 = {
    'instance_1': {
        'passed': True,
        'code': 'def bar():\n    return 100',
        'performance': 0.98,
        'final_metrics': {'accuracy': 0.98, 'f1': 0.97}
    },
    'instance_3': {
        'passed': True,
        'code': 'def baz():\n    pass',
        'performance': 0.85,
        'final_metrics': None
    }
}
with open(iter1_dir / 'preds.json', 'w', encoding='utf-8') as f:
    json.dump(preds_1, f)

# Create result.json for instance_3 in iteration_1
instance_3_dir = iter1_dir / 'instance_3'
instance_3_dir.mkdir()
result_data = {'final_metrics': {'accuracy': 0.87, 'precision': 0.85}}
with open(instance_3_dir / 'result.json', 'w', encoding='utf-8') as f:
    json.dump(result_data, f)

# Create a simple logger mock
class SimpleLogger:
    def info(self, msg):
        print(f'[INFO] {msg}')
    
    def warning(self, msg):
        print(f'[WARNING] {msg}')

logger = SimpleLogger()

ARGS = {
    'root_output_dir': root_output_dir,
    'logger': logger
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
compute_metrics Ran
ran; our contract draft was wrong, not the code
QuantaAlpha/EvoControl/utils/analyze_iterations.py
code served (permissive licence) · get_code("3de8648950fcd7fc")
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 dict. 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 math

# Construct test data for compute_metrics
# The function takes:
# - entries: list of tuples (int, float)
# - Ks: list of int

# Create entries: list of (k, rt) tuples where k is an integer and rt is a float (runtime)
entries = [
    (1, 0.5),
    (2, 1.2),
    (3, 0.8),
    (5, float('inf')),
    (4, 2.1),
    (1, 0.3),
    (6, 1.5),
]

# Create Ks: list of integer thresholds
Ks = [1, 3, 5, 10]

ARGS = {
    "entries": entries,
    "Ks": Ks,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
sanitize_for_json Ran
ran; our contract draft was wrong, not the code
QuantaAlpha/EvoControl/utils/analyze_iterations.py
code served (permissive licence) · get_code("94c5efd30d54841a")
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 dict. 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 math
from typing import Any

def sanitize_for_json(x: Any) -> Any:
    if isinstance(x, float):
        return x if math.isfinite(x) else None
    if isinstance(x, dict):
        return {k: sanitize_for_json(v) for k, v in x.items()}
    if isinstance(x, list):
        return [sanitize_for_json(v) for v in x]
    return x


# Construct test arguments
ARGS = {
    "x": {
        "finite_float": 3.14,
        "infinite_float": float('inf'),
        "nan_float": float('nan'),
        "nested_dict": {
            "value": 2.71,
            "bad_value": float('-inf')
        },
        "list_of_floats": [1.0, float('inf'), 2.5],
        "nested_list": [
            [1.0, 2.0],
            [float('nan'), 4.0]
        ],
        "string": "test",
        "integer": 42,
        "boolean": True,
        "none_value": None,
        "complex_structure": {
            "numbers": [1, 2.5, float('inf')],
            "nested": {
                "deep": 3.14
            }
        }
    }
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
to_float Ran
ran, honoured the contract we drafted
QuantaAlpha/EvoControl/utils/analyze_iterations.py
code served (permissive licence) · get_code("ade148fe4f871622")
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 float, ndim 0, dtype family float, 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 numpy as np

torch.manual_seed(0)

# The function to_float takes a single parameter 'rt' of type Any
# It handles: None, int, float, str, and returns float('inf') for anything else
# Test various valid inputs

ARGS = {
    'rt': 42  # Can be int, float, str, or None - using int as test case
}
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 float, ndim 0, dtype family float, 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
write_final_json_from_preds Ran
ran; our contract draft was wrong, not the code
QuantaAlpha/EvoControl/SE_Perf/perf_run.py
code served (permissive licence) · get_code("74516f7885cd7c89")
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 PosixPath. 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 json
from pathlib import Path
import tempfile
import os


class MockLogger:
    """Mock logger with warning and info methods"""
    def warning(self, msg):
        pass
    
    def info(self, msg):
        pass


# Create temporary directory for testing
temp_dir = tempfile.mkdtemp()
root_output_dir = Path(temp_dir)

# Create aggregated_preds.json with sample data
aggregated_data = {
    "instance_1": [
        {"code": "print('hello')", "performance": 1.5, "runtime": 1.5},
        {"code": "print('world')", "performance": 2.3, "runtime": 2.3},
    ],
    "instance_2": [
        {"code": "x = 1", "performance": 0.8, "runtime": 0.8},
        {"code": "y = 2", "performance": 1.2, "runtime": 1.2},
    ],
    "instance_3": [
        {"code": "def foo(): pass", "runtime": 0.5},
        {"code": "def bar(): pass", "runtime": 0.9},
    ],
}

aggregated_preds_path = root_output_dir / "preds.json"
with open(aggregated_preds_path, 'w', encoding='utf-8') as f:
    json.dump(aggregated_data, f, ensure_ascii=False)

logger = MockLogger()

ARGS = {
    "aggregated_preds_path": aggregated_preds_path,
    "root_output_dir": root_output_dir,
    "logger": logger,
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
write_iteration_preds Ran
ran; our contract draft was wrong, not the code
QuantaAlpha/EvoControl/SE_Perf/perf_run.py
code served (permissive licence) · get_code("751b8356f081be4a")
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 PosixPath. 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 json
import math
import tempfile
from pathlib import Path


class MockLogger:
    def info(self, msg):
        pass
    
    def warning(self, msg):
        pass


# Create a temporary directory structure with test data
temp_dir = tempfile.TemporaryDirectory()
base_dir = Path(temp_dir.name)

# Create instance directories with result.json files
instance_1_dir = base_dir / "instance_1"
instance_1_dir.mkdir(exist_ok=True)

result_1 = {
    "instance_id": "instance_1",
    "optimized_code": "def optimized_func(): pass",
    "final_performance": 0.95,
    "final_metrics": {"accuracy": 0.95, "latency": 0.5}
}

with open(instance_1_dir / "result.json", "w", encoding="utf-8") as f:
    json.dump(result_1, f)

# Create another instance
instance_2_dir = base_dir / "instance_2"
instance_2_dir.mkdir(exist_ok=True)

result_2 = {
    "instance_id": "instance_2",
    "optimized_code": "def another_func(): return 42",
    "final_performance": float('inf'),
    "final_metrics": {"score": 0.5}
}

with open(instance_2_dir / "result.json", "w", encoding="utf-8") as f:
    json.dump(result_2, f)

# Create instance without result.json (should be skipped)
instance_3_dir = base_dir / "instance_3"
instance_3_dir.mkdir(exist_ok=True)

# Create a non-directory file (should be skipped)
(base_dir / "some_file.txt").touch()

logger = MockLogger()

ARGS = {
    "base_dir": base_dir,
    "logger": logger
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
load_config Not yet run
unverified (harvested, no recorded run)
QuantaAlpha/EvoControl/perfagent/config.py
code served (permissive licence) · get_code("4f1355edf72a7fe2")
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

Self-evolution methods enhance code generation through iterative "generate-verify-refine" cycles, yet existing approaches suffer from low exploration efficiency, failing to discover solutions with superior complexity within limited budgets. This inefficiency stems from initialization bias trapping evolution in poor solution regions, uncontrolled stochastic operations lacking feedback guidance, and insufficient experience utilization across tasks. To address these bottlenecks, we propose Controlled Self-Evolution (CSE), which consists of three key components. Diversified Planning Initialization generates structurally distinct algorithmic strategies for broad solution space coverage. Genetic Evolution replaces stochastic operations with feedback-guided mechanisms, enabling targeted mutation and compositional crossover. Hierarchical Evolution Memory captures both successful and failed experiences at inter-task and intra-task levels. Experiments on EffiBench-X demonstrate that CSE consistently outperforms all baselines across various LLM backbones. Furthermore, CSE achieves higher efficiency from early generations and maintains continuous improvement throughout evolution. Our code is publicly available at https://github.com/QuantaAlpha/EvoControl. (a) Existing Method. (b) Controlled Self-Evolution (CSE).

For agents

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

get_harvested_code_for_paper("2601.07348")
get_code_for_paper("2601.07348")
have("2601.07348")

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

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

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

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

Connect an agent — have() is free.