CO-Bench: Benchmarking Language Model Agents in Algorithm Search for Combinatorial Optimization

Weiwei Sun, Shengyu Feng, Shanda Li, Yiming Yang · OpenReview

Abstract

Although LLM-based agents have attracted significant attention in domains such as software engineering and machine learning research, their role in advancing combinatorial optimization (CO) remains relatively underexplored. This gap underscores the need for a deeper understanding of their potential in tackling structured, constraint-intensive problems—a pursuit currently limited by the absence of comprehensive benchmarks for systematic investigation. To address this, we introduce CO-Bench, a benchmark suite featuring 36 real-world CO problems drawn from a broad range of domains and complexity levels. CO-Bench includes structured problem formulations and curated data to support rigorous investigation of LLM agents. We evaluate multiple agentic frameworks against established human-designed algorithms, revealing the strengths and limitations of existing LLM agents and identifying promising directions for future research.

Introduction

Combinatorial Optimization (CO) is a fundamental challenge in logistics, scheduling, and bioinformatics, requiring the identification of optimal solutions within discrete, constraint-heavy spaces. Because many of these problems are NP-hard, developing efficient algorithms has traditionally demanded deep domain expertise and extensive manual trial-and-error. While Large Language Model (LLM) agents have demonstrated potential in scientific discovery, their efficacy in CO has remained difficult to quantify due to the lack of diverse, rigorous benchmarks. Existing evaluations often focus on narrow tasks or rely on heavily handcrafted prompts, failing to test an agent's ability to independently engineer high-performance solvers from abstract descriptions.

CO-Bench addresses this gap by providing a large-scale environment designed to evaluate how effectively LLM agents can autonomously search for and develop algorithms. Our study reveals that while top-tier agentic frameworks can already outperform classical human-designed solvers on a majority of tasks, significant hurdles remain regarding solution feasibility and true algorithmic novelty.

The CO-Bench Framework

CO-Bench consists of 36 real-world CO problems spanning eight categories, including Packing, Scheduling, Routing, and Graph/Set problems. These problems are primarily sourced from the OR-Library, a standard repository for operations research. With over 6,400 test instances and problems involving up to 11,000 variables, CO-Bench offers a significantly more comprehensive evaluation than previous benchmarks.

Overview of the CO-Bench problem categories and specific tasks.

The evaluation process simulates an algorithm development competition. An agent receives a formal natural language description of a CO problem and a development dataset. It then enters an iterative loop: writing Python code, executing it in a sandboxed environment, receiving feedback, and refining the algorithm. The final submission is evaluated on a hidden test set based on its Average Score (proximity to the best-known objective value) and its Valid Solution rate.

Experimental Results

We benchmarked 15 LLMs and 9 agentic frameworks against classical human-designed solvers, such as Gurobi and LKH. The results indicate a clear hierarchy of performance:

  1. Reasoning as a Catalyst: "Frontier" reasoning models (e.g., o3-mini, Claude-3.7-Sonnet) consistently outperformed standard LLMs. Their ability to analyze constraints before generating code is vital for complex CO tasks.
  2. The Agentic Multiplier: Iterative frameworks like FunSearch and ReEvo significantly boost performance compared to one-shot prompting. These agents can evolve their code over dozens of iterations, refining heuristics and incorporating advanced techniques like K-D trees or simulated annealing.
  3. Surpassing Baselines: On 25 out of 36 problems, LLM-generated algorithms outperformed classical solver baselines. In three instances, they even surpassed the best-known solutions in existing literature.
Performance comparison across base LLMs, reasoning models, and agentic frameworks.

As shown in the performance data, the FunSearch framework achieved the highest average score (0.842), followed by Greedy Refinement and EoH (0.840), all of which exceeded the classical solver baseline of 0.797.

Discussion and Limitations

Despite these successes, two primary challenges persist. First is the Feasibility Gap: agents frequently struggle with strict constraint satisfaction. A significant portion of failures stems from "Violate Constraint" errors or timeouts, indicating that agents have difficulty internalizing multi-layered industrial rules. Second is the Novelty Ceiling: while agents are adept at applying established techniques (e.g., 2-opt refinements or candidate lists), they rarely invent entirely new algorithmic paradigms. They currently function more as efficient engineers than as innovative scientists.

Future work should focus on enhancing agent reasoning regarding feasibility and developing sophisticated planning mechanisms to bridge the gap between heuristic optimization and mathematical perfection.

Summary updated

BibTeX
@misc{sun2025co,
  author = {Weiwei Sun and Shengyu Feng and Shanda Li and Yiming Yang},
  title = {{CO-Bench: Benchmarking Language Model Agents in Algorithm Search for Combinatorial Optimization}},
  year = {2025},
  eprint = {2504.04310},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.04310},
}
Figure