Goal-Persistent Coding Agents as Scientific Performance Engineers: A Fixed-Radius Nearest-Neighbor Case Study
cs.AI, cs.PF, cs.SE
Submitted: 2026-09-25
Updated: 2026-09-25
Comments: 10 pages, 2 figures
Code: https://github.com/xju2/libFRNN
License: http://creativecommons.org/licenses/by/4.0/
The gist: Coding agents can pursue persistent objectives across many tool-use turns, but evidence that general-purpose agents can conduct rigorous scientific performance engineering remains limited.
Terminology
Abstract
Coding agents can pursue persistent objectives across many tool-use turns, but evidence that general-purpose agents can conduct rigorous scientific performance engineering remains limited. We present a repository-scale case study in which off-the-shelf Codex and Claude Code agents optimize fixed-radius nearest-neighbor (FRNN) search for particle tracking. Starting from a PyTorch-dependent CUDA implementation, the agents follow an executable goal that specifies exact-correctness tests, profiling requirements, and acceptance criteria without prescribing code transformations. In the primary sequential trajectory, they autonomously remove the PyTorch dependency and conduct hypothesis-driven optimization experiments. The resulting standalone C++/CUDA library exactly reproduces the targeted reference result. Its synchronous NumPy interface achieved 1.6-fold speedup over the original GPU-resident PyTorch interface, despite including host transfers. Similar speedups were observed across different GPU architectures and software stacks. An independent optimization rerun followed a different sequence of hypotheses and reached even better performance on the target workload. These results show that goal-persistent coding agents can act as experimental performance engineers, and that executable scientific contracts are needed both to guide and to validate their optimization.
Sources
- Performance of a Geometric Deep Learning Pipeline for HL-LHC Particle Tracking
- Accelerating the Inference of the Exa.TrkX Pipeline
- ReEvo: Large Language Models as Hyper-Heuristics with Reflective Evolution
- AlphaEvolve: A coding agent for scientific and algorithmic discovery
- AdaEvolve: Adaptive LLM Driven Zeroth-Order Optimization
- AVO: Agentic Variation Operators for Autonomous Evolutionary Search
- CudaForge: An Agent Framework with Hardware Feedback for CUDA Kernel Optimization
- KForge: Program Synthesis for Diverse AI Hardware Accelerators
- FormulaCode: Evaluating Agentic Optimization on Large Codebases
- The AI Scientist-v2: Workshop-Level Automated Scientific Discovery via Agentic Tree Search
- Hypothesis-Driven Autonomous Materials Synthesis with Multimodal LLM Agents
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems