PreprintCited by 1Software Engineering ResearchEvolutionary Algorithms and ApplicationsAI-based Problem Solving and Planning

KAPSO: A Knowledge-grounded framework for Autonomous Program Synthesis and Optimization

Open access
Nadafian, Alireza, Mohammadshahi, Alireza, Yazdani, Majid·2026·arXiv

Abstract

We introduce KAPSO, a modular framework for autonomous program synthesis and optimization. Given a natural language goal and an evaluation method, KAPSO iteratively performs ideation, code synthesis and editing, execution, evaluation, and learning to improve a runnable artifact toward measurable objectives. Rather than treating synthesis as the endpoint, KAPSO uses synthesis as an operator within a long-horizon optimization loop, where progress is defined by evaluator outcomes. KAPSO targets long-horizon failures common in coding agents, including lost experimental state, brittle debugging, and weak reuse of domain expertise, by integrating three tightly coupled components. First, a git-native experimentation engine isolates each attempt as a branch, producing reproducible artifacts and preserving provenance across iterations. Second, a knowledge system ingests heterogeneous sources, including repositories, internal playbooks, and curated external resources such as documentation, scientific papers, and web search results, and organizes them into a structured representation that supports retrieval over workflows, implementations, and environment constraints. Third, a cognitive memory layer coordinates retrieval and maintains an episodic store of reusable lessons distilled from experiment traces (run logs, diffs, and evaluator feedback), reducing repeated error modes and accelerating convergence. We evaluated KAPSO on MLE-Bench (Kaggle-style ML competitions) and ALE-Bench (AtCoder heuristic optimization), and report end-to-end performance. Code Available at: https://github.com/Leeroo-AI/kapso

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2601.21526

Cites

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Still being checked.

Research works printed but not linked: 5

  1. J. Nam, J. Yoon, J. Chen, J. Shin, S. Ö. Arık, and T. Pfister, MLE-STAR: Machine Learning Engineering Agent via Search and Targeted Refinement, arXiv:2506.15692, 2025. https://arxiv. org/abs/2506.15692 · arXiv
  2. InternAgent Team et al., InternAgent: When Agent Becomes the Scientist -Building Closed-Loop System from Hypothesis to Verification, arXiv:2505.16938, 2025. https://arxiv.org/abs/2505. 16938 · arXiv
  3. X. Yang et al., R&D-Agent: An LLM-Agent Framework Towards Autonomous Data Science, arXiv:2505.14738, 2025. https://arxiv.org/abs/2505.14738 · arXiv
  4. E. Toledo et al., AI Research Agents for Machine Learning: Search, Exploration, and General- ization in MLE-bench, arXiv:2507.02554, 2025. https://arxiv.org/abs/2507.02554 · arXiv
  5. Y. Imajuku, K. Horie, Y. Iwata, K. Aoki, N. Takahashi, and T. Akiba, ALE-Bench: A Benchmark for Long-Horizon Objective-Driven Algorithm Engineering, arXiv:2506.09050, 2025. https: //arxiv.org/abs/2506.09050 · arXiv

Cited by

Sorted by citations

Authors
Nadafian, A., Mohammadshahi, A., & Yazdani, M.
Venue
arXiv
Publisher
arXiv
Published
2026
ISSN
2331-8422 (ISSN-L)
OpenAlex
W7126159021
Cited by
0
References
0
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion, cc-by)
  • arXiv (Cornell University) (cc-by)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Artificial Intelligence › Evolutionary Algorithms and Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › AI-based Problem Solving and Planning
Keywords
program optimization, coding agents, knowledge grounding, reproducibility, provenance tracking, knowledge retrieval, cognitive memory, heuristic optimization

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review