KAPSO: 자율적 프로그램 합성 및 최적화를 위한 지식 기반 프레임워크
KAPSO: A Knowledge-grounded framework for Autonomous Program Synthesis and Optimization
January 29, 2026
저자: Alireza Nadaf, Alireza Mohammadshahi, Majid Yazdani
cs.AI
초록
우리는 자율적인 프로그램 합성 및 최적화를 위한 모듈형 프레임워크인 KAPSO를 소개한다. KAPSO는 자연어로 된 목표와 평가 방법이 주어지면, 측정 가능한 목표를 향해 실행 가능한 결과물을 개선하기 위해 아이디어 창출, 코드 합성 및 편집, 실행, 평가, 학습을 반복적으로 수행한다. 합성을 최종 종착점으로 간주하기보다, KAPSO는 합성을 장기적인 최적화 루프 내의 연산자로 활용하며, 여기서 진행 상황은 평가자의 결과를 통해 정의된다.
KAPSO는 코딩 에이전트에서 흔히 발생하는 장기적 실패 요소들, 즉 실험 상태 소실, 취약한 디버깅, 도메인 전문성의 미흡한 재사용 등을 해결하기 위해 세 가지 긴밀하게 결합된 구성 요소를 통합한다. 첫째, Git 기반 실험 엔진은 각 시도를 브랜치로 분리하여 재현 가능한 결과물을 생성하고 반복 작업 간의 출처를 보존한다. 둘째, 지식 시스템은 저장소, 내부 플레이북, 문서화 자료, 과학 논문, 웹 검색 결과 등으로 구성된 다양한 출처의 정보를 수집하여 워크플로우, 구현체, 환경 제약 조건에 대한 검색을 지원하는 구조화된 표현으로 체계화한다. 셋째, 인지적 메모리 계층은 검색을 조율하고 실험 흔적(실행 로그, diff, 평가자 피드백)에서 추출된 재사용 가능한 교훈들의 일화적 저장소를 유지함으로써 반복되는 오류 패턴을 줄이고 수렴 속도를 가속화한다.
우리는 MLE-Bench(캐글 스타일 머신러닝 경진대회) 및 ALE-Bench(AtCoder 휴리스틱 최적화)에서 KAPSO를 평가하고 종단간 성능을 보고한다.
코드 이용 가능: https://github.com/Leeroo-AI/kapso
English
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