Towards Certificate-Driven Software Porting: A Self-Improving Agentic Harness for Scientific Program Optimization

summary

Video file (mp4)

The gist

The gist The certificate-driven evolutionary search (CDES) extends evolutionary search with enforceable restrictions derived from failed candidates, recorded as certificates of assumptions, checker

In short

Certificate-Driven Evolutionary Search (CDES) improves evolutionary search by using failed candidate results to create enforceable restrictions, or 'certificates.' This system guides an LLM mutator to generate optimized code for scientific programs. The process uses a rigorous evaluation harness that checks code correctness against formal and numerical standards, proving CDES can reliably port legacy scientific code.

Key concepts

Certificate-Driven Evolutionary Search (CDES)
CDES extends evolutionary search by turning failed candidate results into 'certificates.' These certificates act as enforceable rules or restrictions that guide the next generation of candidate code. This feedback loop allows the system to learn from mistakes and improve subsequent searches, ensuring better optimization.
Evaluation Harness
This harness is a testing system that translates CPU programs into GPU code (CUDA) for scientific simulations. It performs multiple checks, including formal analysis and numerical comparisons against reference solutions. If a candidate fails any mandatory check, it generates a certificate of failure, which feeds back into the search process.
Certificate Database
The certificate database stores the records of failed candidates and the restrictions derived from them. These certificates are used to enforce constraints on future code generation attempts. This mechanism moves beyond simple prompt compliance by creating a separate control logic that validates candidate choices.
Geant4 Functions
These are specific scientific functions, like the Compton function or Fermi function, used as test cases in the study. They represent complex calculations common in physics simulations. The paper uses these functions to benchmark how well CDES-generated GPU code performs compared to CPU versions and expert implementations.

Terminology used across episodes

This episode discusses

The paper

Towards Certificate-Driven Software Porting: A Self-Improving Agentic Harness for Scientific Program Optimization · Read on arXiv

School of Computer Science, Georgia Institute of Technology, USA · School of Physics, Georgia Institute of Technology, USA · Lawrence Berkeley National Laboratory, USA

The upgrade and rewriting of large scientific codebases has traditionally been a major challenge. While evolutionary search with large language models (LLMs) can port and accelerate legacy code, repair feedback in prompts alone does not prevent subsequent candidates from repeating the same errors. We introduce Certificate-Driven Evolutionary Search (CDES), which extends evolutionary search with enforceable restrictions derived from failed candidates, recorded as certificates of assumptions, checker evidence, and justified restrictions. Its control logic enforces these restrictions through rejection, backtracking, and targeted repair while preserving compatible edits. We apply CDES to CPU-to-GPU translation of two particle-simulation functions from the Geant4 toolkit, evaluated with a harness that goes beyond unit tests to combine formal checks, numerical comparisons, physics checks, and GPU safety tests. Generated implementations achieve 13.78x and 23.54x function-level speedups over CPU code, including data conversion and transfers; for one function, GPU throughput exceeds an expert implementation by 14.9%, reaching 16.1% when complementary components are combined. In an ablation over execution settings, certificate feedback increases the fraction of candidates passing required correctness checks from 55% to 90%.

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Today's paper: "Towards Certificate-Driven Software Porting".

Jane: The gist The certificate-driven evolutionary search (CDES) extends evolutionary search with enforceable restrictions derived from failed candidates, recorded as certificates of assumptions, checker evidence, and justified restrictions.

Tom: First, who's behind it and why it matters.

Title and authors: Tom: Now that we’ve seen how they use certificates to guide the search, let's look at what this whole approach is actually called and who wrote it. The paper is titled "Towards Certificate-Driven Software Porting: A Self-Improving Agentic Harness for Scientific Program Optimization."

Jane: That title tells us a lot about the goal. It’s not just about porting code; it’s about creating a self-improving system using an agentic harness to optimize scientific programs, and that's what this paper is all about.

Lu: The authors are Piyush Jha, Aishik Ghosh, and Vijay Ganesh from the Georgia Institute of Technology and Lawrence Berkeley National Laboratory. They are combining expertise from computer science with physics research.

Meng: That mix of backgrounds is important because they need to understand both the software engineering challenges of porting complex code and the underlying physical simulations that the code represents.

Tom: It seems like their main contribution is moving beyond simple prompt-based feedback, which we just talked about, by creating this CDES system where failed candidates become enforceable restrictions.

Jane: They are essentially giving the AI a structured way to learn from what went wrong, turning failures into rules that block bad choices and guide repairs in the next round.

Lu: The authors focus on how information from those failed candidates can be converted into these enforceable restrictions, which is the core mechanism of CDES <ref:2609.34069#pg2>.

Meng: So they aren't relying on just a better prompt; they’re building an internal control logic that actively rejects choices and mandates repairs based on what the system has learned.

Tom: That's right, and it’s a big step because it means the search process itself is self-improving because accumulated certificates change which future modifications are permitted without needing to retrain the underlying LLM.

Jane: It means the agent iteratively refines its search space based on previously validated errors, leading to increasingly accurate and efficient code generation over time.

Lu: This is a fundamental shift in how we think about using LLMs for complex tasks like scientific code translation <ref:2609.34069#pg2>.

Meng: From an engineering perspective, that autonomy is what makes it practical; it allows the system to manage the complexity of generating and repairing large pieces of code by itself.

Tom: So, we’re moving from just hoping for good results to building a structured feedback mechanism where errors actually shape the future search space.

Jane: And this moves us closer to having AI systems that can handle tasks that require deep, sustained reasoning about complex software structures.

Lu: It's about using symbolic feedback in areas like RLSF and constrained reinforcement learning to drive these kinds of improvements <ref:2609.34069#pg2>.

Meng: The authors are drawing on existing methods, like those from FunSearch or AlphaEvolve, but they’re making it smarter by adding this certificate-driven control layer.

Tom: So they’ve taken state-of-the-art evolutionary program search and overlaid this new layer of constraint enforcement to make it much more robust for porting code.

Jane: This whole setup is designed specifically to handle the messy, error-prone nature of translating legacy scientific code into something runnable on modern hardware.

The paper's summary: Tom: So what is the actual high-level summary of what they’re proposing here? Essentially, they are introducing this Certificate-Driven Evolutionary Search system to enhance evolutionary search methods with enforceable restrictions derived from failed candidates.

Jane: They take the information from those failed attempts—the certificates of assumptions, checker evidence, and justified restrictions—and convert them into rules that control the subsequent search.

Lu: The key mechanism is this certificate database which supplies feedback to the mutator LLM and evidence to a conflict checker and analyzer <ref:2609.34069#pg2>.

Meng: This database acts as a repository of knowledge about what kind of assumptions lead to failures, allowing the system to learn from those specific errors.

Tom: The control logic then actively enforces these validated restrictions during generation and repair by rejecting conflicting choices, backtracking when needed, and performing targeted repairs while trying to preserve compatible edits.

Jane: It’s not just feedback; it’s active enforcement. The system doesn't just read the certificate; its logic uses it to reject choices and guide the repair process directly.

Lu: This means CDES doesn't rely on prompt compliance alone, which is a crucial distinction they make when comparing it to previous methods <ref:2609.34069#pg2>.

Meng: So the paper is arguing that this structured control logic is what separates this method from older evolutionary search approaches where the LLM might just be guessing based on a good prompt.

Tom: It’s essentially saying that the system can learn to reject bad choices and actively guide itself toward better solutions through these enforced restrictions.

Jane: This makes the entire process of porting legacy code much more systematic and less reliant on chance or perfect prompting from the LLM.

The paper's improvements: Tom: The paper highlights several specific improvements they’ve made to this system, focusing on how this certificate feedback actually helps in real-world scenarios.

Jane: One major improvement is the reliability boost; they found that the fraction of candidates passing required correctness checks increased significantly from fifty-five percent up to ninety percent.

Lu: That’s a major win for scientific software porting, because it means we're much more confident in the code being generated for complex tasks <ref:2609.34069#pg2>.

Meng: And they also improved the efficiency side; they showed that proposals that actually improve throughput by more than ten percent increased from fifty percent up to eighty percent with this certificate feedback loop.

Tom: Plus, they quantified the cost savings too; the cost per passing proposal dropped by about ten point seven percent, which shows it’s not just improving quality but also doing it more economically.

Jane: That combination of higher quality and better efficiency for a lower cost is what makes this method very compelling when you look at practical applications in porting large codebases.

Lu: They are also showing that the system can achieve optimization patterns that improve on existing expert implementations, like reusing earlier calculations, which is a specific kind of optimization pattern.

Meng: And they showed a hybrid benefit too; combining their generated code with Celeritas’s components for particle energy selection and direction calculation increased GPU throughput by sixteen point one percent over just using Celeritas <ref:2609.34069#pg3>.

Tom: So the improvements aren't just theoretical; they are backed up by these quantifiable metrics showing concrete gains in speed and correctness across different benchmarks.

Jane: It’s a very strong demonstration that this certificate-driven approach delivers tangible benefits when applied to scientific optimization problems.

Conclusion: Tom: So, to wrap up, the authors of "Towards Certificate-Driven Software Porting: A Self-Improving Agentic Harness for Scientific Program Optimization" have provided a proof-of-concept for reliably and scalably porting large legacy scientific codebases.

Jane: They’ve demonstrated that this approach connects conflict detection with certificate validation and enforces search control to create a system that can handle complex optimization tasks effectively.

Lu: It’s a proof of concept for using certificate feedback to create an agentic harness that learns from failures and guides itself toward better solutions, which is really powerful for complex scientific software.

Meng: The practical application here is showing how we can build systems where the AI gets smarter simply by accumulating validated errors without needing continuous retraining.

Tom: They showed that this method generates code with optimization patterns that are actually better than what expert-written implementations achieve on their own, and combining it with other tools yields even more gains.

Jane: It’s a very solid demonstration of how to enforce a flexible range of correctness requirements while still achieving high performance targets on demanding simulations.

Lu: Future work will focus on testing how the cost and correctness benefits of these certificates change across different types of functions and optimization difficulties, which is where the next research directions lie.

Meng: And they’ll be looking at those trade-offs to see if this method stays effective when applied to a much wider variety of scientific problems.

Tom: So, the CDES system is a powerful way to connect conflict detection with certificate validation and enforced search control for scientific optimization, offering a reliable path toward porting large codebases.

Jane: It’s an interesting development because it shows how we can build AI systems that learn to self-regulate based on concrete evidence of past failures.

Lu: Thanks for joining us today. We've been really interested in this work on the CDES system and its potential applications in scientific computing.

Meng: It’s a very exciting area for practical engineering because it shows a way to build better tools that can handle the complexity of legacy code generation.

Tom: We’ll keep an eye on those future studies to see where this research takes us next.

More episodes

← Home