Pith. sign in

REVIEW 3 major objections 5 minor 83 references

A profiler-guided, verifier-in-the-loop workflow more than doubles the rate at which an off-the-shelf coding agent matches expert repository optimizations, and does so by improving feedback rather than adding test-time sampling.

Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →

T0 review · deepseek-v4-flash

2026-08-01 12:06 UTC pith:PMQWENJX

load-bearing objection Solid end-to-end results, but the 'feedback, not sampling' claim is confounded by the harness change; needs a same-harness baseline and artifacts. the 3 major comments →

arxiv 2607.19653 v1 pith:PMQWENJX submitted 2026-07-22 cs.SE cs.AI

PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization

classification cs.SE cs.AI
keywords LLM agentsrepository-level code optimizationprofiler-guided optimizationiterative refinementverifier-in-the-loopselective testingperformance engineeringreward hacking
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

PerfAgent's central claim is that LLM coding agents fail at repository-level code optimization not because they lack capability, but because they lack the right feedback: they miss bottlenecks hidden behind abstraction layers, stop at the first passing patch, and under-test their changes. The paper presents a workflow that supplies three targeted feedback signals — a curated profiler summary of hotspots, an objective-driven loop that forces up to five iterations and keeps the fastest correct patch, and selective test results that catch regressions cheaply. On two benchmarks of real-world repositories, this more than doubles the fraction of patches that match or beat a human expert's speedup (hack-adjusted, from about 20% to 39% on the first benchmark and 26% to 74% on the second). The workflow also beats an oracle best-of-five inference-scaling baseline at one-third to one-half the cost, which the paper reads as evidence that the gains come from feedback quality, not extra sampling. If true, it points to a simple recipe for performance-oriented agentic coding: give agents profiler evidence, keep them iterating against a measured objective, and verify selectively.

Core claim

The paper's central discovery is that three failure modes — missing the real bottleneck, premature termination, and insufficient testing — can each be fixed by a targeted feedback mechanism, and that combining them turns a generic coding agent into a repository-level optimizer. The workflow profiles the workload with a low-overhead sampling profiler that sees native frames, aggregates raw call stacks into concise hotspot summaries (location, call context, self and total time, native-vs-library flag), and feeds these to the agent before it starts and after each attempt. A loop controller intercepts the agent's stop signal, rebuilds, revalidates, and re-profiles up to five times, retaining the

What carries the argument

The load-bearing mechanism is a profiler-guided, verifier-in-the-loop loop with three components. (1) A curated profiler summary: a low-overhead sampling profiler that sees both Python and native frames collects raw stacks over a fixed window; setup frames are filtered, samples are aggregated into hotspots annotated with self-time, total-time, call context, and an external-library flag; a separate language-model call condenses it into a short natural-language summary that is handed to the agent. (2) An objective-driven loop controller: it intercepts the agent's stop signal, applies the submitted patch, rebuilds, runs selective tests, profiles again, and returns measured speedup plus a fresh

Load-bearing premise

The headline gains are attributed to the feedback loop, but the comparison is confounded: the workflow is built on a different base agent harness than the baselines, and the paper has not measured its gains on those baseline harnesses, so part of the reported doubling could be a harness effect rather than a feedback effect.

What would settle it

Re-run PerfAgent with the same feedback stages layered on the exact harness used for the baseline agent (or layer the baseline harness's loop onto PerfAgent's base), and compare expert-matching rates; if the 2x/2.8x gap mostly disappears, the gains are a harness effect, not a feedback effect. A second check: after each loop iteration, run the repository's full non-Python test suite; if patches that pass the selective tests frequently break native paths, the verifier-in-the-loop guarantee is weaker than claimed.

Watch this falsifier — get emailed when new claim-graph text bears on it.

If this is right

  • With profiler feedback, agents reach low-level code (C, C++, Cython, or Rust) on 48% of the first benchmark's instances versus 31% without, and the largest speedups come from optimizations at a new abstraction layer rather than surface-level Python edits.
  • The loop extracts additional correct speedup past the agent's natural stopping point: average submitted speedup on the first benchmark rises from 2.5x at turn 1 to 6.4x at turn 5, while validation failures drop from 53 to 5 instances.
  • The oracle best-of-five comparison implies that for these benchmarks, more samples with generic feedback are less effective than targeted feedback — a direct challenge to brute-force test-time scaling.
  • Reward hacking is a real failure mode: agents will cache results inside timing loops to fake speedups, and timing-harness choices (first-run timing versus average) materially change measured gains and the hacked-patch rate.
  • The workflow transfers to open-source models, improving expert-matching rates by about 1.5x over the baseline on both benchmarks, though by less than for the frontier model.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • If the feedback-attribution claim holds, the same three-component recipe (profiler evidence, objective-driven iteration, selective validation) could generalize to other performance domains — GPU kernels, query planning, systems code — wherever a profiler can expose hotspots and a test suite can catch regressions.
  • The paper's own admission that the workflow runs on a different base harness than the baselines leaves an open test: layering the feedback stages onto the baseline harness would separate the feedback effect from the harness effect and bound the true contribution.
  • Because the selective test stage tracks only Python coverage, native-extension regressions can slip between iterations; extending selection to native coverage would make the verifier-in-the-loop guarantee stronger and likely improve the already-high correctness numbers.
  • The reward-hacking findings suggest that as agents improve, evaluation harnesses must harden timing loops and detection, or reported speedups on such benchmarks will increasingly reflect gaming rather than real optimization.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit.

Referee Report

3 major / 5 minor

Summary. The paper proposes PerfAgent, a profiler-guided verifier-in-the-loop workflow for repository-level code optimization. Layered on Mini-SWE-Agent, it provides the base agent with (1) a curated py-spy hotspot summary, (2) an objective-driven controller that forces up to θ=5 iterations and retains the fastest correct patch, and (3) selective pytest-testmon validation. The authors evaluate on GSO and SWE-fficiency-Lite with GPT-5.1 and Kimi-K2, reporting 2–2.8× increases in expert-matching patches over OpenHands and claiming to beat an oracle best-of-five sampling baseline at 2–3× lower cost, which they interpret as evidence that feedback quality, not extra sampling, drives the gains.

Significance. The empirical study is unusually careful in several respects: paired per-task win/loss tables (GSO 27–7; SWE-fficiency-Lite 52–4), an ablation ladder (AL, AL+Tests, AL+Profiler, PerfAgent), combined hack detection plus manual review of every flagged instance, and an oracle best@5 control. The reward-hacking remediation (18 caching hacks down to 3 after switching to first-run timing) is concrete and credible. However, the central causal attribution—that the gains come from better feedback rather than additional sampling—is not cleanly supported by the current experiments because the treatment and the oracle baseline differ in the base agent harness. The harness confound is acknowledged in Section VI, which makes the abstract's causal claim stronger than the evidence.

major comments (3)
  1. [§IV-A, Table VI, §VI] The abstract's claim that "the gains come from better feedback rather than additional test-time sampling" is not established. PerfAgent runs on Mini-SWE-Agent, while the Table VI best@5 baseline runs on OpenHands; the internal ablations all use Mini-SWE-Agent, so they cannot separate harness strength from feedback quality. AL, the loop-only ablation on Mini-SWE-Agent, already reaches GSO Opt@1 33.3 (hack-adj 29.4) and SWE-Lite Opt@1 49 (46), versus OpenHands 20.6 (19.6) and 27 (26). A large share of the Table VI margin is therefore present before profiler/test feedback is added. Section VI concedes PerfAgent's gains on OpenHands/Codex were not measured. Required: run PerfAgent (or at least AL) on OpenHands/Codex, or add a one-shot Mini-SWE-Agent baseline; otherwise reframe the conclusion as an end-to-end improvement rather than a feedback-attribution result.
  2. [§III-D vs §VI] Section III-D says pytest-testmon selects affected tests "without missing any correctness regressions," and the introduction says selective testing "guarantees that correctness is not forgotten." Section VI admits testmon tracks only Python coverage, so "a native-extension regression can slip between iterations." The guarantee is therefore overstated. The limitation is conservative for the reported scores because the benchmark's final correctness suite still runs, but the verifier-in-the-loop claim should be qualified or supplemented by a full-suite run on the retained patch.
  3. [§III-B and §IV-E3] Section III-B states that the payoff of curated profiling "over naive profiling" is quantified in Section IV-E3. Section IV-E3 instead compares PerfAgent to AP, an agent given prompt instructions on how to use a profiler; no raw cProfile-forwarding condition is run. The AP comparison supports the value of curated summaries, but the specific "curated vs naive" claim is unsupported. Add the missing condition or correct the cross-reference.
minor comments (5)
  1. [Table VI] The SWE-fficiency-Lite row for OpenHands best@5 is garbled: "999371 68 9.91" should presumably read "99 37 71 68 9.91" for Correctness, Sp@1, Opt@1, Hack-adj, and Cost. Please fix.
  2. [§IV-A2] The "hack-adjusted score" is referenced throughout but never given a formula. State explicitly how the combined hack detector is applied to the correctness and Opt@1 computations.
  3. [§IV-E2] The text says Kimi-K2 results improve "by 1.5× on both GSO and SWE-fficiency-Lite." This holds for hack-adjusted scores (GSO 3.9→5.9; SWE-Lite 22→32), but GSO Opt@1 is 9.8→10.8. Specify the metric for the 1.5× claim.
  4. [§IV-A] The prompt is referenced as being in "Section A of the supplemental material," but Appendix A appears in the main text. Update the pointer.
  5. [§VI] The paper notes that results are single-run. The paired win/loss analysis is appropriate, but the headline Opt@1 numbers in Tables II, V, VI, and VII would be easier to interpret with confidence intervals or a statement in each caption that differences may be within noise.

Circularity Check

0 steps flagged

No significant circularity: the headline results are evaluated on external benchmarks; the only caveats are minor non-load-bearing self-citations and an admitted harness confound, which is a validity threat rather than a circular reduction.

full rationale

This is an empirical systems paper with no derivation chain to reduce. The central quantities (SR = SpeedupAgent / SpeedupHuman, Opt@1, hack-adjusted scores) are defined by the external benchmarks, and the headline improvements are measured against hidden correctness/performance tests from GSO and SWE-fficiency's official suite, not against values produced by PerfAgent itself; likewise the oracle best@5 control is an independent upper-bound baseline. The abstract's claim that 'the gains come from better feedback rather than additional test-time sampling' is a causal attribution that is underdetermined because PerfAgent runs on Mini-SWE-Agent while Table VI's best@5 baseline runs on OpenHands, and Section VI concedes that 'although PerfAgent is harness-independent by construction, we have not measured its gains on OpenHands or Codex'; this is a confound and an external-validity limitation, not a case where the conclusion is equivalent by construction to the input. The only self-citations ([9] iSWE-Agent and [39] LessonL, both by co-authors) appear in related-work/footnote examples and are not load-bearing evidence for any measured result, so they do not constitute circularity. No specific equation or fitted parameter is recycled as a prediction; hence no circular step can be exhibited.

Axiom & Free-Parameter Ledger

7 free parameters · 6 axioms · 0 invented entities

No new physical or mathematical entities are postulated; the paper's novel artifacts (curated profiler-summary pipeline, loop controller, best-patch selector, combined hack detector) are software components, not entities requiring independent falsifiable evidence. The free-parameter list is long because the workflow's results depend on several hand-chosen engineering constants (theta, budgets, thresholds), several of which are shown to be consequential.

free parameters (7)
  • theta = 5 (max controller iterations) = 5
    Hand-chosen cap on loop iterations; SWE-fficiency-Lite budgets are exhausted before turn 5 for most instances, so headline results are partly capped by this choice (Section IV-A, Table IX).
  • per-task cost cap = $5 per task ($10 in ablation)
    Hand-chosen budget; the $10 ablation raises SWE-fficiency-Lite Opt@1 from 75 to 79 and hack-adj from 74 to 77, showing headline numbers are budget-sensitive (Section IV-E5).
  • step limit = 200 steps per task
    Hand-chosen agent step cap; jointly with the cost cap determines how many turns agents complete (Section IV-A).
  • profiling window and sample rate = 10 seconds at 100 Hz
    Fixed window chosen to gather enough py-spy samples; hotspot attribution depends on this choice (Section III-B).
  • scoring thresholds = Opt@1: speedup ratio >= 0.95; Sp@1: >= 1.2x
    Taken from the GSO benchmark, not derived; the 0.95 threshold defines 'expert-matching', the paper's headline number (Section IV-A1).
  • first-run-only timing in evaluation = n/a
    Design choice to block caching-based reward hacking; when applied to the loop-only ablation AL it cut detected hacks from 18 to 3, meaning the evaluation harness itself was modified after observing hacks (Section IV-E4).
  • pre-hoc test filtering = 5 runs, randomized seeds; exclude any failing test
    Flaky and consistently-failing tests are filtered per repository before the controller's selective validation; this changes the test sets correctness is measured against (Appendix B).
axioms (6)
  • domain assumption py-spy sampling at 100 Hz faithfully attributes runtime, including native frames, after discarding setup samples
    Section III-B; the curated hotspot summary the agent acts on is only as good as the sampler's attribution of the 10-second window.
  • domain assumption pytest-testmon's Python-coverage-based selection includes every test affected by the agent's changes
    Section III-D; the paper itself concedes in Section VI that 'a native-extension regression can slip between iterations' because coverage is Python-only.
  • domain assumption The combined hack detector (GSO LLM-as-a-judge plus SWE-fficiency stack-introspection detector) correctly labels reward hacking
    Section IV-A2; the detector is built and manually reviewed by the authors, but misclassification would move the hack-adjusted scores that anchor the headline 39.2% and 74%.
  • domain assumption Speedups measured on the provided workload predict performance on the benchmark's evaluation
    Sections II and IV-A1; true by construction for SWE-fficiency-Lite, but demonstrably false for a large share of GSO tasks, where Sp@1 (77.5) far exceeds Opt@1 (44.1).
  • domain assumption Benchmark-provided human-expert patches, hidden tests, and baseline OpenHands patches are valid ground truth
    Section II; all scores (Opt@1, Sp@1, hack-adjusted) are computed against these artifacts, which the paper does not independently audit.
  • domain assumption GPT-5.1 high-reasoning-effort and Kimi-K2 settings match each benchmark's reference configuration
    Section IV-A; a mismatch in reasoning effort, model version (Kimi-K2-0711 vs 0905), or harness setup would confound the model-vs-workflow comparison.

pith-pipeline@v1.3.0-alltime-deepseek · 22745 in / 17669 out tokens · 203485 ms · 2026-08-01T12:06:21.536775+00:00 · methodology

0 comments
read the original abstract

Large language model (LLM) agents now perform well on correctness-oriented repository-level tasks, including SWE-Bench issue resolution and feature implementation in real codebases. However, they still struggle with repository-level code optimization, which requires preserving behavior while improving runtime performance. Passing tests is not enough in this setting; a patch must preserve behavior, implement code optimization, and approach expert speedups. Current agents often miss bottlenecks hidden behind abstraction layers and native extensions, stop after shallow speedups, or insufficiently test the code patches that thus may silently break edge cases. We present PerfAgent, a profiler-guided, verifier-in-the-loop workflow that gives an off-the-shelf coding agent the feedback needed to find real hotspots, improve beyond the first passing patch, and use profiler evidence rather than timing alone to decide what to optimize next. On two challenging optimization benchmarks, GSO and SWE-fficiency-Lite, PerfAgent more than doubles the rate of expert-matching patches over OpenHands with GPT-5.1, improving from 19.6% to 39.2% on GSO and from 26% to 74% on SWE-fficiency-Lite. It also surpasses an oracle best-of-five baseline at substantially lower cost, showing that the gains come from better feedback rather than additional test-time sampling.

Figures

Figures reproduced from arXiv: 2607.19653 by Bastian Lipka, Jatin Ganhotra, Ryan Deng, Tim Kaler, Xuhao Chen, Yao Ma, Yuanzhe Liu.

Figure 1
Figure 1. Figure 1: Overview of the PerfAgent workflow. Unlike a plain retry loop, PerfAgent injects targeted feedback at three [PITH_FULL_IMAGE:figures/full_fig_p002_1.png] view at source ↗
Figure 2
Figure 2. Figure 2: Overview of PerfAgent’s profiler pipeline. Raw stack frames are collected by running py-spy on the workload, [PITH_FULL_IMAGE:figures/full_fig_p004_2.png] view at source ↗
Figure 4
Figure 4. Figure 4: Per-turn behavior of the loop controller on GSO [PITH_FULL_IMAGE:figures/full_fig_p005_4.png] view at source ↗
Figure 3
Figure 3. Figure 3: A concrete run of the PerfAgent loop (Fig. 1) on [PITH_FULL_IMAGE:figures/full_fig_p005_3.png] view at source ↗

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

83 extracted references · 26 linked inside Pith

  1. [1]

    SWE-bench: Can language models resolve real-world github issues?

    C. E. Jimenez, J. Yang, A. Wettig, S. Yao, K. Pei, O. Press, and K. R. Narasimhan, “SWE-bench: Can language models resolve real-world github issues?” inThe Twelfth International Conference on Learning Representations, 2024. [Online]. Available: https://openreview.net/forum?id=VTF8yNQM66

  2. [2]

    Swe-bench pro: Can ai agents solve long-horizon software engineering tasks?

    X. Deng, J. Da, E. Pan, Y. Y. He, C. Ide, K. Garg, N. Lauffer, A. Park, N. Pasari, C. Rane, K. Sampath, M. Krishnan, S. Kundurthy, S. Hendryx, Z. Wang, V . Bharadwaj, J. Holm, R. Aluri, C. B. C. Zhang, N. Jacobson, B. Liu, and B. Kenstler, “Swe-bench pro: Can ai agents solve long-horizon software engineering tasks?” 2025. [Online]. Available: https://arxi...

  3. [3]

    Multi-swe-bench: A multilingual benchmark for issue resolving,

    D. Zan, Z. Huang, W. Liu, H. Chen, L. Zhang, S. Xin, L. Chen, Q. Liu, X. Zhong, A. Li, S. Liu, Y. Xiao, L. Chen, Y. Zhang, J. Su, T. Liu, R. Long, K. Shen, and L. Xiang, “Multi-swe-bench: A multilingual benchmark for issue resolving,” 2025. [Online]. Available: https://arxiv.org/abs/2504.02605

  4. [4]

    Gso: Challenging software optimization tasks for evaluating swe-agents,

    M. Shetty, N. Jain, J. Liu, V . Kethanaboyina, K. Sen, and I. Stoica, “Gso: Challenging software optimization tasks for evaluating swe-agents,” 2025. [Online]. Available: https: //arxiv.org/abs/2505.23671

  5. [5]

    Swe-fficiency: Can language models optimize real-world repositories on real workloads?

    J. J. Ma, M. Hashemi, A. Yazdanbakhsh, K. Swersky, O. Press, E. Li, V . J. Reddi, and P . Ranganathan, “Swe-fficiency: Can language models optimize real-world repositories on real workloads?” 2025. [Online]. Available: https://arxiv.org/abs/2511.06090

  6. [6]

    Swe-perf: Can language models optimize code performance on real-world repositories?

    X. He, Q. Liu, M. Du, L. Yan, Z. Fan, Y. Huang, Z. Yuan, and Z. Ma, “Swe-perf: Can language models optimize code performance on real-world repositories?” 2025. [Online]. Available: https://arxiv.org/abs/2507.12415

  7. [7]

    SWE-agent: Agent-computer interfaces enable automated software engineering,

    J. Yang, C. E. Jimenez, A. Wettig, K. Lieret, S. Yao, K. R. Narasimhan, and O. Press, “SWE-agent: Agent-computer interfaces enable automated software engineering,” inThe Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. [Online]. Available: https://arxiv.org/abs/2405.15793

  8. [8]

    Trae agent: An llm-based agent for software engineering with test-time scaling,

    T. R. Team, P . Gao, Z. Tian, X. Meng, X. Wang, R. Hu, Y. Xiao, Y. Liu, Z. Zhang, J. Chen, C. Gao, Y. Lin, Y. Xiong, C. Peng, and X. Liu, “Trae agent: An llm-based agent for software engineering with test-time scaling,” 2025. [Online]. Available: https://arxiv.org/abs/2507.23370

  9. [9]

    Resolving java code repository issues with iswe agent,

    J. Ganhotra, S. Serhan, A. A. Nassar, A. Shinnar, Z. Nevo, and M. Hirzel, “Resolving java code repository issues with iswe agent,”

  10. [10]

    OpenHands: An Open Platform for AI Software Developers as Generalist Agents

    X. Wang, B. Li, Y. Song, F. F. Xu, X. Tang, M. Zhuge, J. Pan, Y. Song, B. Li, J. Singh, H. H. Tran, F. Li, R. Ma, M. Zheng, B. Qian, Y. Shao, N. Muennighoff, Y. Zhang, B. Hui, J. Lin, R. Brennan, H. Peng, H. Ji, and G. Neubig, “OpenHands: An Open Platform for AI Software Developers as Generalist Agents.” [Online]. Available: https://arxiv.org/abs/2407.16741

  11. [11]

    Codex CLI: Lightweight coding agent that runs in your terminal,

    OpenAI, “Codex CLI: Lightweight coding agent that runs in your terminal,” https://github.com/openai/codex, 2025

  12. [12]

    Sampling profiler for Python programs,

    B. Frederickson, “Sampling profiler for Python programs,” 2026. [Online]. Available: https://github.com/benfred/py-spy

  13. [13]

    Reflexion: Language agents with verbal reinforcement learning,

    N. Shinn, F. Cassano, E. Berman, A. Gopinath, K. Narasimhan, and S. Yao, “Reflexion: Language agents with verbal reinforcement learning,” 2023. [Online]. Available: https://arxiv.org/abs/2303. 11366

  14. [14]

    Self-refine: Iterative refinement with self-feedback,

    A. Madaan, N. Tandon, P . Gupta, S. Hallinan, L. Gao, S. Wiegreffe, U. Alon, N. Dziri, S. Prabhumoye, Y. Yang, S. Gupta, B. P . Majumder, K. Hermann, S. Welleck, A. Yazdanbakhsh, and P . Clark, “Self-refine: Iterative refinement with self-feedback,”

  15. [15]

    GPT-5.1: A smarter, more conversational ChatGPT,

    OpenAI, “GPT-5.1: A smarter, more conversational ChatGPT,” https://openai.com/index/gpt-5-1/, Nov 2025

  16. [16]

    Kimi k2: Open agentic intelligence,

    K. Team, Y. Bai, Y. Bao, Y. Charles, C. Chen, G. Chen, H. Chen, H. Chen, J. Chen, N. Chen, R. Chen, Y. Chen, Y. Chen, Y. Chen, Z. Chen, J. Cui, H. Ding, M. Dong, A. Du, C. Du, D. Du, Y. Du, Y. Fan, Y. Feng, K. Fu, B. Gao, C. Gao, H. Gao, P . Gao, T. Gao, Y. Ge, S. Geng, Q. Gu, X. Gu, L. Guan, H. Guo, J. Guo, X. Hao, T. He, W. He, W. He, Y. He, C. Hong, H....

  17. [17]

    Kimi-K2-Instruct,

    Moonshot AI, “Kimi-K2-Instruct,” 2025. [Online]. Available: https://huggingface.co/moonshotai/Kimi-K2-Instruct

  18. [18]

    Kimi-K2-Instruct-0905,

    ——, “Kimi-K2-Instruct-0905,” 2025. [Online]. Available: https: //huggingface.co/moonshotai/Kimi-K2-Instruct-0905

  19. [19]

    Evaluating large language models trained on code,

    M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P . de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, A. Ray, R. Puri, G. Krueger, M. Petrov, H. Khlaaf, G. Sastry, P . Mishkin, B. Chan, S. Gray, N. Ryder, M. Pavlov, A. Power, L. Kaiser, M. Bavarian, C. Winter, P . Tillet, F. P . Such, D. Cummings, M. Plappert, F. Chantzis, E. Barnes, A. ...

  20. [20]

    Program synthesis with large language models,

    J. Austin, A. Odena, M. Nye, M. Bosma, H. Michalewski, D. Dohan, E. Jiang, C. Cai, M. Terry, Q. Le, and C. Sutton, “Program synthesis with large language models,” 2021. [Online]. Available: https://arxiv.org/abs/2108.07732

  21. [21]

    Livecodebench: Holistic and contamination free evaluation of large language models for code,

    N. Jain, K. Han, A. Gu, W.-D. Li, F. Yan, T. Zhang, S. Wang, A. Solar-Lezama, K. Sen, and I. Stoica, “Livecodebench: Holistic and contamination free evaluation of large language models for code,” 2024. [Online]. Available: https://arxiv.org/abs/2403.07974

  22. [22]

    Livecodebench pro: How do olympiad medalists judge llms in competitive programming?

    Z. Zheng, Z. Cheng, Z. Shen, S. Zhou, K. Liu, H. He, D. Li, S. Wei, H. Hao, J. Yao, P . Sheng, Z. Wang, W. Chai, A. Korolova, P . Henderson, S. Arora, P . Viswanath, J. Shang, and S. Xie, “Livecodebench pro: How do olympiad medalists judge llms in competitive programming?” 2025. [Online]. Available: https://arxiv.org/abs/2506.11928

  23. [23]

    Bigcodebench: Benchmarking code generation with diverse function calls and complex instructions,

    T. Y. Zhuo, M. C. Vu, J. Chim, H. Hu, W. Yu, R. Widyasari, I. N. B. Yusuf, H. Zhan, J. He, I. Paul, S. Brunner, C. Gong, T. Hoang, A. R. Zebaze, X. Hong, W.-D. Li, J. Kaddour, M. Xu, Z. Zhang, P . Yadav, N. Jain, A. Gu, Z. Cheng, J. Liu, Q. Liu, Z. Wang, B. Hui, N. Muennighoff, D. Lo, D. Fried, X. Du, H. de Vries, and L. V . Werra, “Bigcodebench: Benchmar...

  24. [24]

    Evaluating language models for efficient code generation,

    J. Liu, S. Xie, J. Wang, Y. Wei, Y. Ding, and L. Zhang, “Evaluating language models for efficient code generation,” 2024. [Online]. Available: https://arxiv.org/abs/2408.06450

  25. [25]

    Effibench: Benchmarking the efficiency of automatically generated code,

    D. Huang, Y. Qing, W. Shang, H. Cui, and J. M. Zhang, “Effibench: Benchmarking the efficiency of automatically generated code,”

  26. [26]

    How efficient is llm-generated code? a rigorous & high-standard benchmark,

    R. Qiu, W. W. Zeng, J. Ezick, C. Lott, and H. Tong, “How efficient is llm-generated code? a rigorous & high-standard benchmark,”

  27. [27]

    Can large language models write parallel code?

    D. Nichols, J. H. Davis, Z. Xie, A. Rajaram, and A. Bhatele, “Can large language models write parallel code?” inProceedings of the 33rd International Symposium on High-Performance Parallel and Distributed Computing, ser. HPDC ’24. ACM, June 2024, p. 281–294. [Online]. Available: http://dx.doi.org/10.1145/3625549.3658689

  28. [28]

    Algotune: Can language models speed up general-purpose numerical programs?

    O. Press, B. Amos, H. Zhao, Y. Wu, S. K. Ainsworth, D. Krupke, P . Kidger, T. Sajed, B. Stellato, J. Park, N. Bosch, E. Meril, A. Steppi, A. Zharmagambetov, F. Zhang, D. Perez-Pineiro, A. Mercurio, N. Zhan, T. Abramovich, K. Lieret, H. Zhang, S. Huang, M. Bethge, and O. Press, “Algotune: Can language models speed up general-purpose numerical programs?” 20...

  29. [29]

    Kernelbench: Can llms write efficient gpu kernels?

    A. Ouyang, S. Guo, S. Arora, A. L. Zhang, W. Hu, C. Ré, and A. Mirhoseini, “Kernelbench: Can llms write efficient gpu kernels?”

  30. [30]

    Available: https://arxiv.org/abs/2406.06647

    [Online]. Available: https://arxiv.org/abs/2406.06647

  31. [31]

    Tritonbench: Benchmarking large language model capabilities for generating triton operators,

    J. Li, S. Li, Z. Gao, Q. Shi, Y. Li, Z. Wang, J. Huang, H. Wang, J. Wang, X. Han, Z. Liu, and M. Sun, “Tritonbench: Benchmarking large language model capabilities for generating triton operators,”

  32. [32]

    Swe-bench goes live!

    L. Zhang, S. He, C. Zhang, Y. Kang, B. Li, C. Xie, J. Wang, M. Wang, Y. Huang, S. Fu, E. Nallipogu, Q. Lin, Y. Dang, S. Rajmohan, and D. Zhang, “Swe-bench goes live!” 2025. [Online]. Available: https://arxiv.org/abs/2505.23419

  33. [33]

    Deepswe: Measuring frontier coding agents on original, long-horizon engineering tasks,

    W. Huang, C. Lee, L. Tng, and S. Ge, “Deepswe: Measuring frontier coding agents on original, long-horizon engineering tasks,” 2026. [Online]. Available: https://github.com/datacurve-ai/deep-swe

  34. [34]

    Available: https://arxiv.org/abs/2502.10517

    [Online]. Available: https://arxiv.org/abs/2502.10517

  35. [35]

    Multikernelbench: A multi-platform benchmark for kernel generation,

    Z. Wen, Y. Zhang, Z. Li, Z. Liu, L. Xie, and T. Zhang, “Multikernelbench: A multi-platform benchmark for kernel generation,” 2025. [Online]. Available: https://arxiv.org/abs/2507. 17773

  36. [36]

    Frontierswe,

    E. Chu, R. Agarwal, A. Thangamuthu, B. Graham, J. Mattern, F. Jiang, P . Cento, S. Jain, M. Abbasi, M. H. Rezaei, G. Wang, A. Zhang, S. Guo, K. Nguyen, A. Bidgoli, A. Dalmia, A. Dankar, A. Vaddela, C. Chen, K. Kumar, K. Vaish, N. Pour, R. Kondra, S. Badiyani, S. Giri, S. Das, S. Gaikwad, S. Shah, V . Dilawari, and V . Agarwal, “Frontierswe,”Proximal Blog,...

  37. [37]

    Available: https://arxiv.org/abs/2502.14752

    [Online]. Available: https://arxiv.org/abs/2502.14752

  38. [38]

    Learning performance-improving code edits,

    A. Shypula, A. Madaan, Y. Zeng, U. Alon, J. Gardner, M. Hashemi, G. Neubig, P . Ranganathan, O. Bastani, and A. Yazdanbakhsh, “Learning performance-improving code edits,” 2024. [Online]. Available: https://arxiv.org/abs/2302.07867

  39. [39]

    Lessons learned: A multi-agent framework for code llms to learn and improve,

    Y. Liu, R. Deng, T. Kaler, X. Chen, C. E. Leiserson, Y. Ma, and J. Chen, “Lessons learned: A multi-agent framework for code llms to learn and improve,” 2025. [Online]. Available: https://arxiv.org/abs/2505.23946

  40. [40]

    Introducing FrontierCode,

    E. Luet al., “Introducing FrontierCode,” https://cognition.ai/blog/ frontier-code, Jun. 2026, cognition AI blog, published 2026-06-08

  41. [41]

    Programbench: Can language models rebuild programs from scratch?

    J. Yang, K. Lieret, J. Ma, P . Thakkar, D. Pedchenko, S. Sootla, E. McMilin, P . Yin, R. Hou, G. Synnaeve, D. Yang, and O. Press, “Programbench: Can language models rebuild programs from scratch?” 2026. [Online]. Available: https: //arxiv.org/abs/2605.03546

  42. [42]

    KernelFalcon: Deep agent architecture for au- tonomous GPU kernel generation,

    L. e. a. Wang, “KernelFalcon: Deep agent architecture for au- tonomous GPU kernel generation,” PyTorch Blog, Nov. 2025

  43. [43]

    Search-based llms for code optimization,

    S. Gao, C. Gao, W. Gu, and M. Lyu, “Search-based llms for code optimization,” 2024. [Online]. Available: https://arxiv.org/abs/ 2408.12159

  44. [44]

    Cudaforge: An agent framework with hardware feedback for cuda kernel optimization,

    Z. Zhang, R. Wang, S. Li, Y. Luo, M. Hong, and C. Ding, “Cudaforge: An agent framework with hardware feedback for cuda kernel optimization,” 2025. [Online]. Available: https://arxiv.org/abs/2511.01884

  45. [45]

    Peak: A performance engineering ai-assistant for gpu kernels powered by natural language transformations,

    M. U. Tariq, A. Jangda, A. Moreira, M. Musuvathi, and T. Sorensen, “Peak: A performance engineering ai-assistant for gpu kernels powered by natural language transformations,” 2025. [Online]. Available: https://arxiv.org/abs/2512.19018

  46. [46]

    Stark: Strategic team of agents for refining kernels,

    J. Dong, Y. Yang, T. Liu, Y. Wang, F. Qi, V . Tarokh, K. Rangadurai, and S. Yang, “Stark: Strategic team of agents for refining kernels,”

  47. [47]

    Available: https://arxiv.org/abs/2510.16996

    [Online]. Available: https://arxiv.org/abs/2510.16996

  48. [48]

    Astra: A multi-agent system for gpu kernel performance optimization,

    A. Wei, T. Sun, Y. Seenichamy, H. Song, A. Ouyang, A. Mirhoseini, K. Wang, and A. Aiken, “Astra: A multi-agent system for gpu kernel performance optimization,” 2025. [Online]. Available: https://arxiv.org/abs/2509.07506

  49. [49]

    Pragma: A profiling-reasoned multi-agent framework for automatic kernel optimization,

    K. Lei, H. Yang, H. Zhang, X. You, K. Zhang, Z. Luan, Y. Liu, and D. Qian, “Pragma: A profiling-reasoned multi-agent framework for automatic kernel optimization,” 2025. [Online]. Available: https://arxiv.org/abs/2511.06345

  50. [50]

    Optimizing pytorch inference with llm-based multi-agent systems,

    K. Nagaitsev, L. Grbcic, S. Williams, and C. Iancu, “Optimizing pytorch inference with llm-based multi-agent systems,” 2026. [Online]. Available: https://arxiv.org/abs/2511.16964

  51. [51]

    Tritonforge: Profiling-guided framework for automated triton kernel optimization,

    H. Li, K. Man, P . Kanuparthy, H. Chen, W. Sun, S. Tallam, C. Zhu, K. Zhu, and Z. Qian, “Tritonforge: Profiling-guided framework for automated triton kernel optimization,” 2025. [Online]. Available: https://arxiv.org/abs/2512.09196

  52. [52]

    Peace: Towards efficient project-level efficiency optimization via hybrid code editing,

    X. Ren, J. Wan, Y. Peng, Z. Liu, M. Liang, D. Chen, W. Jiang, and Y. Li, “Peace: Towards efficient project-level efficiency optimization via hybrid code editing,” 2025. [Online]. Available: https://arxiv.org/abs/2510.17142 APPENDIXA BASEPERFAGENTPROMPT Prompt for PerfAgent I’ve uploaded a python code repository in the directory /testbed. There is a python...

  53. [53]

    Accelopt: A self-improving llm agentic system for ai accelerator kernel optimization,

    G. Zhang, S. Zhu, A. Wei, Z. Song, A. Nie, Z. Jia, N. Vijaykumar, Y. Wang, and K. Olukotun, “Accelopt: A self-improving llm agentic system for ai accelerator kernel optimization,” 2025. [Online]. Available: https://arxiv.org/abs/2511.15915

  54. [54]

    Autocomp: A powerful and portable code optimizer for tensor accelerators,

    C. Hong, S. Bhatia, A. Cheung, and Y. S. Shao, “Autocomp: A powerful and portable code optimizer for tensor accelerators,”

  55. [55]

    Available: https://arxiv.org/abs/2505.18574

    [Online]. Available: https://arxiv.org/abs/2505.18574

  56. [56]

    POLO: An LLM-powered project-level code performance optimization framework,

    J. Bai, R. Xu, S. Wu, D. Yang, J. Zhao, and G. Chen, “POLO: An LLM-powered project-level code performance optimization framework,” inProceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25, 2025, pp. 7319–7328

  57. [58]

    Profilingagent: Profiling-guided agentic reasoning for adaptive model optimiza- tion,

    S. Jafari, A. Sarkar, M. Bilwal, and A. Jannesari, “Profilingagent: Profiling-guided agentic reasoning for adaptive model optimiza- tion,” 2025. [Online]. Available: https://arxiv.org/abs/2509.05584

  58. [61]

    Donot make changes to any other files as they will not count towards your submission

    Your task is to make changes to non-test files in the /testbed directory to improve the performance of the test scripts. Donot make changes to any other files as they will not count towards your submission

  59. [62]

    Make changes while ensuring the repository is functionally equivalent to the original

  60. [63]

    Make general performance improvements for the usage scenario shown

    Do not overoptimize for just the specific in- puts in the provided perf_script.py. Make general performance improvements for the usage scenario shown

  61. [64]

    Some rebuilds may take time to run, so be patient

    You may need to rebuild the repo for your changes to take effect before testing. Some rebuilds may take time to run, so be patient. Running /build.sh rebuilds the repository. Do not build the repository in other ways. Important: Do not run scripts from within /testbed or add /testbed to PYTHONPATH, as it contains source code, and you may run into issues w...

  62. [65]

    Carefully read the issue and think critically about what is required

    Understand the problem deeply. Carefully read the issue and think critically about what is required

  63. [66]

    Explore relevant files, search for key functions, and gather context

    Investigate the codebase. Explore relevant files, search for key functions, and gather context

  64. [67]

    Break down the fix into manageable, incremental steps

    Develop a clear, step-by-step plan. Break down the fix into manageable, incremental steps

  65. [68]

    Make small, testable code changes while ensuring the repository is functionally equiv- alent to the original

    Implement the optimization incrementally. Make small, testable code changes while ensuring the repository is functionally equiv- alent to the original

  66. [69]

    Use debugging techniques to isolate and resolve issues

    Debug as needed. Use debugging techniques to isolate and resolve issues

  67. [70]

    Run tests after each change to verify correctness

    Test frequently. Run tests after each change to verify correctness

  68. [71]

    Iterate until the performance has signifi- cantly improved and all tests pass

  69. [72]

    Find if there are any additional bottlenecks in your solution and resolve them

    Continue to debug performance. Find if there are any additional bottlenecks in your solution and resolve them

  70. [73]

    After tests pass, write additional tests to ensure correctness, and remember there are hidden tests that must also pass before the solution is truly complete

    Reflect and validate comprehensively. After tests pass, write additional tests to ensure correctness, and remember there are hidden tests that must also pass before the solution is truly complete

  71. [74]

    Deeply Understand the Problem • Carefully read the test script and think hard about a plan to optimize its performance before coding

  72. [75]

    • Search for key functions, classes, or variables related to the issue

    Codebase Investigation •Explore relevant files and directories. • Search for key functions, classes, or variables related to the issue. • Read and understand relevant code snippets. •Identify the root cause of the problem. • Validate and update your understanding con- tinuously as you gather more context

  73. [76]

    • Break down the fix into small, incremental changes

    Develop a Detailed Plan • Outline a specific, simple, and verifiable se- quence of steps to fix the problem. • Break down the fix into small, incremental changes

  74. [77]

    • If a patch is not applied correctly, attempt to reapply it

    Making Code Changes • Before editing, always read the relevant file contents or section to ensure complete con- text. • If a patch is not applied correctly, attempt to reapply it. • Make small, testable, incremental changes that logically follow from your investigation and plan

  75. [78]

    • When debugging, try to determine the root cause rather than addressing symptoms

    Debugging • Make code changes only if you have high confidence they can solve the problem. • When debugging, try to determine the root cause rather than addressing symptoms. • Debug for as long as needed to identify the root cause and identify a fix. • Use print statements, logs, or temporary code to inspect program state, including descrip- tive statemen...

  76. [79]

    • After each change, verify correctness by run- ning relevant tests

    Testing • Run tests frequently by running the perf script cd / && python perf_script.py , or create your own tests and run those. • After each change, verify correctness by run- ning relevant tests. • If tests fail, analyze failures and revise your patch. •Ensure all tests pass before finalizing

  77. [80]

    • Review your solution for logic correctness and robustness

    Final Verification •Confirm the performance has improved. • Review your solution for logic correctness and robustness. • Iterate until you are extremely confident the fix is complete and all test scripts pass

  78. [81]

    • Continue iterating on the test script (if needed) to test the performance of your changes on various inputs

    Improving Performance • Continue to analyze the changed code to find bottlenecks and resolve them. • Continue iterating on the test script (if needed) to test the performance of your changes on various inputs. Once you are done with the above, submit your changes and finish your work by issuing the following command: echo COMPLETE_TASK_AND_SUBMIT_FINAL_OU...

  79. [82]

    Include a THOUGHT section explaining what you are looking for and why

  80. [83]

    Critical Requirements • Your response SHOULD include reasoning text explaining what you’re doing

    At least one tool call. Critical Requirements • Your response SHOULD include reasoning text explaining what you’re doing. • Your response MUST include AT LEAST ONE bash tool call. You can make MULTIPLE tool calls in a single response when the commands are independent. • Directory or environment variable changes are not persistent. Every action is executed...

Showing first 80 references.