Agentic Verified Optimization of Real-World Software
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Program optimization aims to improve performance while preserving behavior. Coding agents can already make programs faster by changing algorithms, data structures, and execution strategies. However, existing equivalence checks mostly rely on tests, which agents have been shown to exploit, passing the tests without preserving the intended behavior. We propose agentic verified optimization, in which an agent produces a faster implementation together with a machine-checked proof of equivalence to the existing one. Because the existing implementation serves as the specification, the task avoids the specification-writing bottleneck of verified code generation, and recent advances in theorem proving make the proofs attainable. We formulate the task at the function and repository levels in Lean 4, where programs can be both executed and reasoned about. Few real-world applications are written in Lean, so we develop Aqueduct, an agentic framework that migrates C, C++, Go, and Rust programs into native Lean, validates each port by differential testing against its original. On the 189 reference implementations in Verina, agents produce faster proved rewrites for 156, including algorithmic changes such as replacing exponential recursion with dynamic programming. On 17 migrated applications, their 92 proved rewrites speed up 47 of 51 application scenarios. These application-level gains are smaller than the function-level ones, making the choice of functions to optimize an important problem. Current agents can thus already carry out verified optimization on both standalone functions and applications migrated from real programs. We discuss the remaining challenges and the steps toward verified optimization in production.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 57 of its 91 references that are in the map. Submitted 20 Oct 2026.
Builds on
57 of 91 references.
Closest ancestors · 6
Same direction, newest first
- 2026ARES: Adaptive Reasoning-Effort Steering for PPA- and Cost-Aware RTL Optimization with LLM Agents30 Jul
- 2025VeruSAGE: A Study of Agent-Based Verification for Rust Systems20 Dec
- 2025Towards Robust Agentic CUDA Kernel Benchmarking, Verification, and Optimization16 Sep
- 2025Astra: A Multi-Agent System for GPU Kernel Performance Optimization9 Sep
- 2025AlphaEvolve: A coding agent for scientific and algorithmic discovery16 Jun
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
Other references · 51
- 2021Evaluating Large Language Models Trained on Codecited by 8,938
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
- 2020Generative Language Modeling for Automated Theorem Provingcited by 419
- 2025DeepSeek-Prover-V2: Advancing Formal Mathematical Reasoning via Reinforcement Learning for Subgoal Decompositioncited by 335
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?cited by 279
- 2022HyperTree Proof Search for Neural Theorem Provingcited by 211
- 2025Goedel-Prover-V2: Scaling Formal Theorem Proving with Scaffolded Data Synthesis and Self-Correctioncited by 182
- 2023Learning Performance-Improving Code Editscited by 122
- 2025ImpossibleBench: Measuring LLMs' Propensity of Exploiting Test Casescited by 101
- 2026ProgramBench: Can Language Models Rebuild Programs From Scratch?cited by 81
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 78
- 2025CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learningcited by 73
38 more
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 72
- 2024DafnyBench: A Benchmark for Formal Software Verificationcited by 66
- 2024SpecGen: Automated Generation of Formal Program Specifications via Large Language Modelscited by 61
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Modelscited by 44
- 2025VERINA: Benchmarking Verifiable Code Generationcited by 43
- 2024Cedar: A New Language for Expressive, Fast, Safe, and Analyzable Authorization (Extended Version)cited by 42
- 2024Automated Proof Generation for Rust Code via Self-Evolutioncited by 39
- 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 37
- 2025CLEVER: A Curated Benchmark for Formally Verified Code Generationcited by 35
- 2026Advancing Mathematics Research with AI-Driven Formal Proof Searchcited by 34
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 33
- 2025A benchmark for vericoding: formally verified program synthesiscited by 28
- 2024LLM-Vectorizer: LLM-based Verified Loop Vectorizercited by 27
- 2024miniCodeProps: a Minimal Benchmark for Proving Code Propertiescited by 21
- 2025Proving the Coding Interview: A Benchmark for Formally Verified Code Generationcited by 21
- 2024Verified Code Transpilation with LLMscited by 17
- 2017Souper: A Synthesizing Superoptimizercited by 15
- 2026VeriSoftBench: Repository-Scale Formal Verification Benchmarks for Leancited by 12
- 2026KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?cited by 12
- 2026Inductive Deductive Synthesis: Enabling AI to Generate Formally Verified Systemscited by 10
- 2026The Correctness Illusion in LLM-Generated GPU Kernelscited by 10
- 2022Aeneas: Rust Verification by Functional Translationcited by 9
- 2026Prove2Me: An Open Collaborative Platform for Scaling Math Formalizationcited by 9
- 2025Towards Repository-Level Program Verification with Large Language Modelscited by 8
- 2025VecTrans: Enhancing Compiler Auto-Vectorization through LLM-Assisted Code Transformationscited by 7
- 2026CSLib: The Lean Computer Science Librarycited by 7
- 2026Intent-aligned Formal Specification Synthesis via Traceable Refinementcited by 6
- 2026Vero: Can AI Agents Build Formally Verified Software Repositories?cited by 6
- 2025HEC: Equivalence Verification Checking for Code Transformation via Equality Saturationcited by 3
- 2026Large Language Models for Multilingual Code Intelligence: A Surveycited by 3
- 2026A Contract-Grade Verifier for LLM-Generated GPU Kernels, and a Native Blackwell Backward for the Gated-Linear-Recurrence Familycited by 3
- 2019Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programmingcited by 2
- 2026Testing, Credible Compilation, and Verification in the Axon Verified Compiler in Lean and Claude Codecited by 2
- 2026CktFormalizer: Autoformalization of Natural Language into Circuit Representationscited by 2
- 2026AUTOGATE: Automated Clock Gating via Toggling-Aware LLM-based RTL Rewritingcited by 2
- 2026T-LLM Compiler: Trusted LLM-based Code Optimization and Verification Frameworkcited by 2
- 2026The Time is Here for Just-in-Time Systems: Challenges and Opportunitiescited by 1
- 2026Certificate-Carrying Transformation of Event-Driven Block Programscited by 1
50 most cited of 51 All 51 (JSON)
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Scaling Lean Theorem Proving for Real-World Code Verification
- 2026Lean Refactor: Multi-Objective Controllable Proof Optimization via Agentic Strategy Search
- 2026Automating Formal Verification with Agent-Guided Tree Search
- 2026Self-Modifying Lean Proof Agents with Verifier-Grounded Benchmark Coevolution
- 2026Agentic Proving for Program Verification
- 2026Optimizing the Cost-Quality Tradeoff of Agentic Theorem Provers in Lean
- 2026Accelerate Bench: Evaluating Agents for Application-Level Program Optimization
- 2026PERFOPT-Bench: Evaluating Coding Agents on Software Performance Optimization