SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.16625 · 2026

AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generation

Yiming Yang, Weiwei Sun, Sean Welleck, Zeyu Zheng, Tianqi Chen, Tim Dettmers, Weihua Du, Jingming Zhuo, Andre He, Yixin Dong, Manupa Karunaratne, Ivan Fox

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 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/2604.16625.json · badge: /api/ran/2604.16625.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
StigLidu/AdaExplore canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
construct_problem_dataset_from_problem_dir Ran
ran; our contract draft was wrong, not the code
StigLidu/AdaExplore/src/dataset.py
code served (permissive licence) · get_code("e3b75273924ba2be")
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 list, 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 os
import tempfile
import shutil

# Create a temporary directory with test Python files
temp_dir = tempfile.mkdtemp()

# Create test Python files with numerical prefixes
test_files = [
    "001_first.py",
    "002_second.py",
    "010_tenth.py",
    "005_fifth.py",
]

for filename in test_files:
    filepath = os.path.join(temp_dir, filename)
    with open(filepath, 'w') as f:
        f.write("# test file\n")

# Also add a non-Python file to verify it's filtered out
non_py_file = os.path.join(temp_dir, "readme.txt")
with open(non_py_file, 'w') as f:
    f.write("not a python file\n")

ARGS = {
    "problem_dir": temp_dir
}
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 list, ndim 1, dtype family float — a list 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
extract_first_code Ran
ran; our contract draft was wrong, not the code
StigLidu/AdaExplore/src/utils.py
code served (permissive licence) · get_code("b85d265b7395960b")
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 re

def extract_first_code(output_string: str, code_language_types: list[str]) -> str:
    """
    Extract first code block from model output, specified by code_language_type
    """
    trimmed = output_string.strip()
    code_match = re.search('```(.*?)```', trimmed, re.DOTALL)
    if code_match:
        code = code_match.group(1).strip()
        for code_type in code_language_types:
            if code.startswith(code_type):
                code = code[len(code_type):].strip()
        return code
    return output_string


ARGS = {
    "output_string": "Here is some code:\n```python\nprint('hello')\n```\nEnd of code.",
    "code_language_types": ["python", "javascript", "bash"]
}
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 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
generate_experience_guidance_prompt Ran
ran; our contract draft was wrong, not the code
StigLidu/AdaExplore/agentprompt/prompt_modules.py
code served (permissive licence) · get_code("2e5d7d02ef0d1a63")
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 os
import tempfile

# Create a temporary file with experience guidance content
temp_dir = tempfile.mkdtemp()
experience_guidance_file = os.path.join(temp_dir, 'experience_guidance.txt')

with open(experience_guidance_file, 'w') as f:
    f.write("Avoid pattern A||3.5\n")
    f.write("Avoid pattern B||2.1\n")
    f.write("Avoid pattern C||1.8\n")
    f.write("\n")
    f.write("# Some other comment\n")

ARGS = {
    'experience_guidance_path': experience_guidance_file,
    'threshold': 2
}
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 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
generate_hardware_information_prompt Ran
ran; our contract draft was wrong, not the code
StigLidu/AdaExplore/agentprompt/prompt_modules.py
code served (permissive licence) · get_code("0b8e26831e229f55")
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 torch.nn as nn

torch.manual_seed(0)

# Based on the function signature, we need to provide:
# - gpu_name: str
# - gpu_architecture: str

ARGS = {
    "gpu_name": "NVIDIA A100",
    "gpu_architecture": "Ampere"
}
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
get_code_hash Ran
ran; our contract draft was wrong, not the code
StigLidu/AdaExplore/src/dataset.py
code served (permissive licence) · get_code("0346a0fb1539052c")
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 re
import hashlib

# The function takes a problem_src parameter which is a string containing code
# We need to provide a sample piece of code as a string

ARGS = {
    "problem_src": """
def hello_world():
    # This is a comment
    x = 5
    y = 10
    return x + y
    
\"\"\"
This is a docstring
that spans multiple lines
\"\"\"
"""
}
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 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
query_inference_server Ran
ran; our contract draft was wrong, not the code
StigLidu/AdaExplore/agent/inference_server.py
code served (permissive licence) · get_code("aad3c512cb2a7994")
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 time
import random
from unittest.mock import Mock, MagicMock

# Create a mock server object that simulates the OpenAI-like API
mock_server = Mock()

# Create a mock response object with the expected structure
mock_choice = Mock()
mock_choice.message = Mock()
mock_choice.message.content = "This is a test response from the model."

mock_response = Mock()
mock_response.choices = [mock_choice]

# Configure the mock server to return our mock response
mock_server.chat.completions.create = Mock(return_value=mock_response)

ARGS = {
    'server': mock_server,
    'model_name': 'gpt-4',
    'prompt': 'What is the capital of France?',
    'max_completion_tokens': 16384,
    'retry_times': 5,
    'full_response': False,
}
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 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
read_file Ran
ran; our contract draft was wrong, not the code
StigLidu/AdaExplore/src/utils.py
code served (permissive licence) · get_code("20ac9f8ab3912be1")
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 os
import tempfile

# Create a temporary file with some content
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt') as f:
    f.write('Hello, this is test content.')
    temp_file_path = f.name

try:
    ARGS = {
        'file_path': temp_file_path
    }
finally:
    # Clean up the temporary file
    if os.path.exists(temp_file_path):
        os.unlink(temp_file_path)
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 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
construct_kernelbench_dataset Not yet run
unverified (harvested, no recorded run)
StigLidu/AdaExplore/src/dataset.py
code served (permissive licence) · get_code("57158d2c929b3690")
How it ran

no invocation recorded.

dummy_small_step Not yet run
unverified (harvested, no recorded run)
StigLidu/AdaExplore/agent/actions.py
code served (permissive licence) · get_code("9c9ffe93baf02d12")
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, 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 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.

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 large language model (LLM) agents have shown promise in using execution feedback for test-time adaptation. However, robust selfimprovement remains far from solved: most approaches still treat each problem instance independently, without accumulating reusable knowledge. This limitation is particularly pronounced in domain-specific languages such as Triton, which are underrepresented in LLM pretraining data. Their strict constraints and non-linear optimization landscape further make naive generation and local refinement unreliable. We propose AdaExplore, an agent framework that enables self-improvement via accumulated execution feedback for performance-critical kernel code generation through two complementary stages: failure-driven adaptation and diversity-preserving search, jointly improving correctness and optimization performance without additional fine-tuning or external knowledge. In the adaptation stage, the agent synthesizes tasks and converts recurring failures into a reusable memory of validity rules, helping subsequent generations remain within the feasible set. In the search stage, the agent organizes candidate kernels as a tree and alternates between small local refinements and larger structural regeneration, allowing it to explore the optimization landscape beyond local optima. Experiments on kernel runtime optimization benchmarks validate these gains: Ada-Explore achieves 3.12× and 1.72× speedups on KernelBench Level-2 and Level-3, respectively, within 100 steps, and continues to improve with additional computation. Our implementation is publicly available at https://github.com/StigLidu/AdaExplore.

For agents

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

get_harvested_code_for_paper("2604.16625")
get_code_for_paper("2604.16625")
have("2604.16625")

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

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

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

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

Connect an agent — have() is free.