海德堡大学开源智能体技能 代码优化提速 8.9 倍

原标题:Show HN: An agent skill that optimizes code with falsifiable hypotheses
72AI 研判分

海德堡大学算法工程组发布面向 Claude Code 与 Codex 的智能体技能,要求每次实验前先提出可证伪假设、每次改动后校验正确性,并只保留可审查的单一补丁。在 VieCut 最小割求解器上实现 8.9 倍加速且所有割结果不变,在 KaHIP 图划分工具上提速 3.9 倍且划分质量不变。

报道正文

本文目录11 个章节

Agents that optimize your code like an algorithm engineer: a falsifiable hypothesis before every experiment, correctness checked after every change, one reviewable patch per accepted change, and a PDF report of the whole session.

A skill for Claude Code and Codex, from the Algorithm Engineering Group at Heidelberg University.

GitHub Paper (DIMACS 2027) Quick start Example report

Results on established open-source codes

Every kept change was checked against the original output.

CodeProblemResultCorrectnessDetails
VieCutexact minimum cut8.9x fasterevery cut unchangedv2.0, paper
KaHIP kaffpagraph partitioning3.9x fasterpartition quality unchangedv3.26, report
KaHIP ultragraph partitioning quality2.2% smaller cutssame balance rule as strongv3.28
Hochbaum's pseudoflowmaximum flow3.0x fasterflow value verified on 164 instancesKB 039
FREIGHTstreaming hypergraph partitioning1.82x fasterbit-identical outputKB 035
ParHIPdistributed graph partitioning (MPI)1.61x fasterbyte-identical partitionsKB 040
ScalableCorrelationClusteringcorrelation clustering1.24x fasteridentical solution qualityv1.2

How it works: the Algorithm Engineering cycle

Algorithm Engineering is a cycle of design, analysis, implementation and experiment, driven by falsifiable hypotheses. AAE hands this cycle to an autonomous agent. During setup you agree with the agent on the benchmark, the metric, the correctness assertions and the budget; then it runs on its own.

Design

A falsifiable hypothesis: "changing X will improve the metric by roughly Z, because ..."

Analyze

Predict direction and size of the effect before measuring, from profiling and analysis.

Implement

A minimal change, committed to Git, with the correctness assertions checked.

Experiment

Run the benchmark; keep the change only if it is better and still correct, otherwise revert.

What you get

Faster, still correct codeEvery change is checked against assertions you agreed on, e.g. bit-identical output. One patch per accepted changeNumbered Git patches in patches/, each with its hypothesis, easy to review and apply. A PDF reportThe trajectory of the metric and one page per tested hypothesis: intuition, prediction, measurements, verdict.

From the report of the KaHIP kaffpa session: 122 experiments, 69 hypotheses, 41 patches, 3.9x faster in total.

Quick start

In Claude Code:

文本
/plugin install aae --marketplace CHSZLab/AgenticAlgorithmEngineering
/aae:aae make the solver in src/ faster on the graphs in data/

In Codex, install the skill with scripts/install_codex_skill.py and call it with $aae; any other agent can follow AAE.md. To try it first, run the 10-minute quick-start example: a slow but correct shortest-path program with a benchmark and a correctness check.

How AAE compares

autoresearchAlphaEvolve, OpenEvolve, ShinkaEvolveAAE
Works onone training scriptcode blocks scored by an evaluatorany existing code base and language
Searchone agent, keep or discardlanguage-model mutations and an evolutionary populationone agent following the Algorithm Engineering cycle
Before each experimentthe agent's next ideaa proposed mutationa falsifiable hypothesis with its predicted effect
Correctnessthe metricthe evaluator scoreassertions agreed with you, checked after every change
What you getimproved script and logbest program and populationone patch per change, a PDF report, lessons in a shared knowledge base

Knowledge base

Sessions share what they learned: the knowledge base collects optimization techniques and experiment results, and agents read it before they start. Contributions from your own sessions are welcome.

Citation

David A. Bader, Adil Chhabra, Ernestine Großmann, Monika Henzinger, Alexander Noe, and Christian Schulz. Agentic Algorithm Engineering: Improving Shared-Memory Exact Minimum Cuts. In 13th DIMACS Implementation Challenge Workshop: Network Flows 2.0, OASIcs, 2027. To appear. Preprint: arXiv.07204.

文本
@inproceedings{bader2027agenticalgorithmengineering,
  title         = {Agentic Algorithm Engineering: Improving Shared-Memory Exact Minimum Cuts},
  author        = {David A. Bader and Adil Chhabra and Ernestine Gro{\ss}mann and Monika Henzinger and Alexander Noe and Christian Schulz},
  booktitle     = {13th DIMACS Implementation Challenge Workshop: Network Flows 2.0},
  series        = {OASIcs},
  publisher     = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  year          = {2027},
  note          = {To appear},
  eprint        = {2609.07204},
  archivePrefix = {arXiv},
  url           = {https://arxiv.org/abs/2609.07204}
}

To cite the software itself, use its Zenodo DOI 10.5281/zenodo.24537749, which always resolves to the latest release.


作者发帖说明(HN):

Hi all, I am a professor in algorithm engineering. In our field we use a method of falsifiable hypothesis testing to improve algorithms. More precisely, this is a cycle consisting of designing an algorithm, analyzing the algorithm, then implementing it and lastly testing it using experiments on real-world instances which leads to designing new algorithms based on the current observations.

We put this methodology into an AI skill which runs in an infinite loop. This skill first creates a performance profile, then produces a hypothesis which is implemented and tested automatically using an AI agent. If the change improved the performance and tests negotiated with the user verify it, the change is kept, if not it is discarded. Everything is tracked via version control.

Part of the output is a pdf report which documents all the code changes and progress over time as well as individual patches to only merge specific patches if one chooses to do so. Moreover, this comes with a knowledge-base in which we collect global optimization knowledge, thereby improving the skill over time.

We ran this on a wide range of public code bases, e.g. our KaHIP graph partitioning toolkit, which improved running time by 3.9x, or our VieCut minimum cut solver, where the skill improved the running time of the system by 8.9x; I do believe the skill is very easy to use and hence am sharing this here. Let me know what you think!