AlgoBench: Benchmarking Algorithmic Adaptation in Code Generation

Xinyuan Song, Zekun Cai, Liang Zhao
6/30/2026
cs.SEcs.AIcs.PL
benchmark-dataset

No confident code implementation found for this paper.

Abstract

High pass rates on established programming benchmarks such as HumanEval and LiveCodeBench do not always show whether a model can reason about algorithms. Many fixed benchmarks eventually become part of the public training ecosystem through released problem statements, editorials, and generated solutions, allowing later models to improve partly by exposure rather than by stronger algorithmic ability.

Show full abstract

We introduce ALGOBENCH, a framework that automatically builds novel algorithmic problems from known competitive-programming problems through structured constraint-shifting transformations. Each accepted ALGOBENCH variant is traceable to a source problem, but must make the original reference algorithm fail. Beyond pass@$k$, we introduce complexity-aware metrics -- including OPTT, OPTS, TRAPRATE, GAPT, and CONSENS -- to test whether a solution is not only functionally correct but also asymptotically suitable for the generated problem. Experiments across multiple LLMs and prompting strategies show that performance drops sharply on ALGOBENCH variants, retrieval can increase reuse of the old algorithm, and many correct-looking solutions fail to meet the required complexity. Error analysis shows that failures are mainly algorithmic rather than implementation-level, suggesting that ALGOBENCH evaluates adaptation beyond functional correctness.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{song2026algobench,
  title  = {AlgoBench: Benchmarking Algorithmic Adaptation in Code Generation},
  author = {Xinyuan Song and Zekun Cai and Liang Zhao},
  year   = {2026},
  eprint = {2607.00062},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.00062v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.00062.svg)](https://codeofpaper.com/paper/2607.00062)

Discussion