SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.19633 · 2026

optimize_anything: Unified Text Optimization can Outperform Specialized Systems

Dan Klein, Joseph Gonzalez, Matei Zaharia, Ion Stoica, Omar Khattab, Alexandros Dimakis, Lakshya Agrawal, Sanjit Seshia, Donghyun Lee, Shangyin Tan, Koushik Sen, Wenjie Ma, and 2 more

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 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/2605.19633.json · badge: /api/ran/2605.19633.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
gepa-ai/gepa canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
FunctionStatusWhere it lives
idxmax Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gepa-ai/gepa/src/gepa/gepa_utils.py
code served (permissive licence) · get_code("ef0523e65b24e9ba")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct a list of floats for the idxmax function
lst = [1.5, 3.2, 2.1, 4.8, 0.9]

ARGS = {
    "lst": lst
}
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 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
json_default Ran
ran; our contract draft was wrong, not the code
gepa-ai/gepa/src/gepa/gepa_utils.py
code served (permissive licence) · get_code("d8fa283fbf920f6c")
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
import json

# The json_default function attempts to unpack x into a dict using {**x}
# If that fails, it returns repr(x)
# So we need to test with:
# 1. An object that can be unpacked as a dict (has __iter__ and yields key-value pairs)
# 2. An object that cannot be unpacked (will trigger the exception)

class DictLike:
    """A simple class that can be unpacked like a dict"""
    def __init__(self):
        self.data = {"key1": "value1", "key2": 42}
    
    def __iter__(self):
        return iter(self.data.items())

# Test with a dict-like object
dict_like_obj = DictLike()

# This will test the exception path since DictLike doesn't fully support dict unpacking
non_serializable_obj = torch.tensor([1.0, 2.0, 3.0])

ARGS = {
    "x": dict_like_obj
}
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
try_json_serialize Ran
ran; our contract draft was wrong, not the code
gepa-ai/gepa/src/gepa/gepa_utils.py
code served (permissive licence) · get_code("1ed779fc21fe51db")
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 torch
import json

torch.manual_seed(0)

# Test case 1: None
obj1 = None

# Test case 2: Primitives
obj2 = 42
obj3 = 3.14
obj4 = "hello"
obj5 = True

# Test case 3: Dict with primitives
obj6 = {"key1": 42, "key2": "value", "key3": 3.14}

# Test case 4: List/tuple with primitives
obj7 = [1, 2, "three", 4.0]
obj8 = (5, "six", 7.0)

# Test case 5: Nested dict
obj9 = {"outer": {"inner": 123, "list": [1, 2, 3]}}

# Test case 6: Non-serializable object (will trigger str() conversion)
class CustomObject:
    def __init__(self, value):
        self.value = value
    def __str__(self):
        return f"CustomObject({self.value})"

obj10 = CustomObject(999)

# Test case 7: Torch tensor (non-serializable, will use str())
obj11 = torch.tensor([1.0, 2.0, 3.0, 4.0])

# Test case 8: Complex nested structure with mixed types
obj12 = {
    "primitives": [1, 2.5, "text", True, None],
    "nested_dict": {"a": 10, "b": [1, 2, 3]},
    "tensor": torch.randn(2, 4),
    "custom": CustomObject(42)
}

ARGS = {
    "obj": obj12
}
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 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
default_batch_evaluate Not yet run
unverified (harvested, no recorded run)
gepa-ai/gepa/src/gepa/core/adapter.py
code served (permissive licence) · get_code("2e543357f94b44a3")
How it ran

no invocation recorded.

invoke_batch_evaluate Not yet run
unverified (harvested, no recorded run)
gepa-ai/gepa/src/gepa/core/adapter.py
code served (permissive licence) · get_code("dd04edc561ea43be")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

Can a single LLM-based optimization system match specialized tools across fundamentally different domains? We show that when optimization problems are formulated as improving a text artifact evaluated by a scoring function, a single AI-based optimization system-supporting single-task search, multi-task search with crossproblem transfer, and generalization to unseen inputs-achieves state-of-the-art results across six diverse tasks. Our system discovers agent architectures that nearly triple Gemini Flash's ARC-AGI accuracy (32.5% → 89.5%), finds scheduling algorithms that cut cloud costs by 40%, generates CUDA kernels where 87% match or beat PyTorch, and outperforms AlphaEvolve's reported circle packing solution (n=26). Ablations across three domains reveal that actionable side information yields faster convergence and substantially higher final scores than score-only feedback, and that multitask search outperforms independent optimization given equivalent per-problem budget through cross-task transfer, with benefits scaling with the number of related tasks. Together, we show for the first time that text optimization with LLM-based search is a generalpurpose problem-solving paradigm, unifying tasks traditionally requiring domain-specific algorithms under a single framework. We open-source optimize_anything with support for multiple backends as part of the GEPA project at https://github.com/gepa-ai/gepa. * Equal contribution.

For agents

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

get_harvested_code_for_paper("2605.19633")
get_code_for_paper("2605.19633")
have("2605.19633")

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

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

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

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

Connect an agent — have() is free.