PreprintCited by 32Software Engineering ResearchParallel Computing and Optimization TechniquesTeaching and Learning Programming

Learning Performance-Improving Code Edits

Open access
Shypula, Alexander, Madaan, Aman, Zeng, Yimeng, Alon, Uri, Gardner, Jacob, Hashemi, Milad, Neubig, Graham, Ranganathan, Parthasarathy +2 more·2023·arXiv

Abstract

With the decline of Moore's law, optimizing program performance has become a major focus of software research. However, high-level optimizations such as API and algorithm changes remain elusive due to the difficulty of understanding the semantics of code. Simultaneously, pretrained large language models (LLMs) have demonstrated strong capabilities at solving a wide range of programming tasks. To that end, we introduce a framework for adapting LLMs to high-level program optimization. First, we curate a dataset of performance-improving edits made by human programmers of over 77,000 competitive C++ programming submission pairs, accompanied by extensive unit tests. A major challenge is the significant variability of measuring performance on commodity hardware, which can lead to spurious "improvements." To isolate and reliably evaluate the impact of program optimizations, we design an environment based on the gem5 full system simulator, the de facto simulator used in academia and industry. Next, we propose a broad range of adaptation strategies for code optimization; for prompting, these include retrieval-based few-shot prompting and chain-of-thought, and for finetuning, these include performance-conditioned generation and synthetic data augmentation based on self-play. A combination of these techniques achieves a mean speedup of 6.86 with eight generations, higher than average optimizations from individual programmers (3.66). Using our model's fastest generations, we set a new upper limit on the fastest speedup possible for our dataset at 9.64 compared to using the fastest human submissions available (9.56).

AI snapshot

Written from the paper’s full text.

TL;DR

The paper introduces PIE, a benchmark of over 77K C++ competitive-programming submission pairs with gem5-measured execution times, and adapts LLMs to generate performance-improving code edits. Its best model, GPT-3.5 fine-tuned with self-play synthetic data, achieves 6.86× mean speedup with eight generations, exceeding the 3.66× average human speedup and setting a 9.64× upper limit versus 9.56× for fastest human submissions.

Key findings

  • PIE contains 77,967 training pairs from 1,474 problems, 2,544 validation pairs from 77 problems, and 978 test pairs from 41 problems, with over 42.8 million gem5 simulations used to relabel execution times.
  • GPT-3.5 augmented with synthetic data from self-play achieved 87.63% %OPT, 6.86× SPEEDUP, and 95.09% %Correct for Best@8, compared with the human reference average speedup of 3.66×.
  • Fine-tuned performance-conditioned CodeLlama 13B achieved 66.56% %OPT, 5.65× SPEEDUP, and 70.96% %Correct for Best@8.
  • Using the model’s fastest generations, the paper reports a new upper limit of 9.64× speedup on the dataset, slightly above the fastest human submissions at 9.56×.

Methods

  • The authors curated PIE from CodeNet C++ competitive-programming submissions, tracking chronological accepted submissions and keeping pairs with more than 10% relative time improvement; execution time was measured deterministically with the gem5 full-system simulator using an Intel Skylake configuration.
  • They evaluated prompting strategies (instruction prompting, few-shot prompting, chain-of-thought, and dynamic retrieval-based few-shot prompting using CodeBertScore and FAISS) and fine-tuning strategies (standard fine-tuning, high-quality subset, performance-conditioned generation, and synthetic data from self-play) on CodeLlama 7B/13B/34B and OpenAI GPT-3.5/GPT-4.
  • Metrics were %OPT, SPEEDUP, and %Correct, with BEST@k sampling at temperature 0.7; all C++ programs were compiled with GCC 9.3.0, C++17, and -O3.

Limitations

  • The paper states that its gem5 experiments use a two-minute timeout, which may introduce slight variability, and that altering this timeout could change the results.
  • The paper states that test cases may not perfectly cover all cases; in a manual analysis of 120 pairs, 10 speedups came from reducing array allocation constants and may not reflect genuine algorithmic improvements.
  • The paper reports a precision-recall style trade-off: self-play improved speedup from 6.74 to 6.86 and %OPT from 86.71 to 87.63 but slightly dropped correctness, and performance-conditioning may restrict correct programs (mixing 10/10, 9/10, and 8/10 tags increased %Correct from 59.95% to 64.36%). Evident from the text, the benchmark is limited to C++ competitive programming and a gem5 Skylake model, so generalization to other languages, domains, or hardware is not established.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2302.07867

Cites

85 of 85 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Claims the paper makes

3 of 15 cited sources checked · 3 supported · 0 flagged

  • Findingcitation

    The PIE dataset is constructed from performance-improving edits made by human programmers in competitive programming tasks from CodeNet.

    “Our dataset is constructed based on performance-improving edits (PIE) made by human programmers in a range of competitive programming tasks from CodeNet (Puri et al., 2021).”
    Quote in the paperSubstantial claim0 of 1 sources checked
    • cites Puri et al., 2021 source
  • Findingown data

    The average individual human sampled in the test set achieved an average speedup of 3.66×.

    “the average individual human sampled in our test set achieved an average speedup of 3.66×.”
    Quote in the paperSubstantial claim
  • Findingown data

    Without data-driven methods that leverage PIE, the strongest baseline COT only warrants a 1.60× average speedup over 8 submissions, compared with the 3.66× human reference.

    “Without data-driven methods that leverage PIE, our strongest baseline COT only warrants a 1.60× average speedup over 8 submissions vs. the 3.66× human reference.”
    Quote in the paperSubstantial claim
  • Findingown data

    A fine-tuned performance-conditioned version of CODELLAMA 13B can achieve an average speedup of 5.65× on the test set when taking 8 samples and filtering for correctness and execution time.

    “When allowing a model to take 8 samples and filtering for correctness and execution time, our fine-tuned performance-conditioned version of CODELLAMA 13B can achieve an average speedup of 5.65× on our test set”
    • Also stated in: § 4.3 DISCUSSION AND KEY TAKEAWAYS · plain
      “CODELLAMA 13B with performance-conditioned generation (66.56% %OPT, 5.65× SPEEDUP for BEST@8)”
    Quote in the paperSubstantial claim
  • Findingown data

    Benchmarking on real hardware can lead to large, phantom performance improvements due only to random chance.

    “Indeed, we find that benchmarking on real hardware can lead to large, phantom performance “improvements” due only to random chance.”
    • Also stated in: § 2 PERFORMANCE IMPROVING EDITS (PIE) DATASET · plain
      “If benchmarking is not performed carefully, it is easy to mistakenly over-report program optimization results.”
    Quote in the paperSubstantial claim
  • Classified as probably not a substantial claim. 15
  • May combine two claims. 33
  • The quote only partly states this claim. 2
  • Classified as probably not a substantial claim.

    Premisecitation

    Pretrained large language models have demonstrated strong capabilities at solving a wide range of programming tasks.

    “Simultaneously, pretrained large language models (LLMs) have demonstrated strong capabilities at solving a wide range of programming tasks.”
    • Also stated in: § 1 INTRODUCTION · boosted
      “Recently, pre-trained large language models (LLMs) have demonstrated impressive performance at a wide range of programming tasks (Chen et al., 2021b;Fried et al., 2022;Xu et al., 2022;Nijkamp et al., 2022).”
    Quote in the paperSubstantial claim1 of 3 sources checked
    • cites Chen et al., 2021b

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites Fried et al., 2022 source
    • cites Xu et al., 2022

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

  • Classified as probably not a substantial claim.

    Premisecitation

    Retrieval-based mechanisms can improve language models for various tasks requiring factual or procedural knowledge.

    “Recent work has demonstrated that retrieval-based mechanisms can improve language models for various tasks requiring factual or procedural knowledge (Liu et al., 2021;Poesia et al., 2021;Rubin et al., 2022;Madaan et al., 2022;Shrivastava et al., 2023).”
    Quote in the paperSubstantial claim2 of 3 sources checked
    • cites Liu et al., 2021 source
    • cites Poesia et al., 2021

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites Rubin et al., 2022 source
  • May combine two claims.

    Findingown data

    Benchmarking 500 identical program pairs with HYPERFINE yielded a mean speedup of 1.12×, standard deviation 0.36, and top 5% speedup 1.91×.

    “We benchmarked 500 programs “pairs” where the “slow” and “fast” programs are identical.Ideally, we should have source time target time = 1 (i.e., the two programs have identical performance).However, we observed a mean speedup of 1.12×, with a standard deviation of 0.36, and the top 5% of pairs exhibited a speedup of 1.91×.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    Aggregating over all human submissions in the test set with a higher sampling budget, GPT-3.5 achieved a speedup of 9.64× and surpassed the best human submissions across all programmers with a speedup of 9.56×.

    “Aggregating over all human submissions in the test set with a higher sampling budget, GPT-3.5 achieved a speedup of 9.64× and surpassed the best human submissions across all programmers with a speedup of 9.56×.”
    • Also stated in: § 4.2 RESULTS FOR FINETUNING · plain
      “For the PIE dataset, the best human speedup achieved was 9.56×, while our model achieved a slightly higher speedup of 9.64×, setting a new upper limit.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    PIE is a dataset of over 77K competitive C++ programming submission pairs with execution time annotations from gem5 and extensive unit tests.

    “First, we curate a dataset of performance-improving edits made by human programmers of over 77 K competitive C++ programming submission pairs, accompanied by extensive unit tests.”
    • Also stated in: § 1 INTRODUCTION · plain
      “We introduce a new code dataset of more than 77 K C++ program pairs, named PIE, with execution time annotations collected from the gem5 simulator.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    Error analysis of GPT-3.5 fine-tuned with self-play shows about 60% of failures break a unit test, about 30% produce correct but slower or below-threshold programs, and about 10% have syntax errors.

    “Table 5 shows that a large fraction ∼60% of the failures happen because the proposed changes break a unit test.In about 30% of the cases, the model produces a correct, but the generated program is either slower (10%) or doesn't meet our threshold for speedup (10%).Finally, in about 10% of the cases, the generated program has a syntax error.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    There is a mild negative correlation between problem description length and average accuracy (-0.15) and between source program length and average accuracy (-0.26).

    “The results show a mild negative correlation between the problem description length and average accuracy (-0.15) and between the source program length and average accuracy (-0.26), suggesting longer inputs slightly reduce accuracy.”
    Quote in the paperSubstantial claim
  • The quote only partly states this claim.

    Findingown data

    Dynamic retrieval-based few-shot prompting with K=4 retrieved prompts outperforms all baseline variants.

    “Table 2 (bottom) shows results using our dynamic retrieval-based few-shot prompting strategy, with a preferable setting at K = 4 retrieved prompts.”
    • Also stated in: § 4.1 RESULTS FOR FEW-SHOT PROMPTING · plain
      “The results show that dynamic few-shot prompting outperforms all the baseline variants”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    For CODELLAMA and GPT-3.5, adding synthetic data improves %OPT and often SPEEDUP, particularly with BEST@1.

    “For CODELLAMA and GPT-3.5, compared to using no synthetic data, the additional data improves both %OPT and often SPEEDUP, particularly with BEST@1.”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingown data

    For problem number p03160, between submissions s766827701 and s964782197, a speedup of 2.44× is reported despite the programs and environments being identical.

    “For problem number p03160 and between submission s766827701 and s964782197 a speedup of 2.44× is reported, despite the programs and environments being identical.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    In the prompt (private) regime, GPT-3.5 with CoT achieved 43.05% %Opt, 1.60× speedup, and 91.72% %Correct.

    “| Prompt (P) | GPT-3.5, CoT | 43.05% | 1.60× | 91.72% |”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    In the prompt (open-access) regime, CODELLAMA 34B with CoT achieved 19.63% %Opt, 1.30× speedup, and 78.73% %Correct.

    “| Prompt (O) | CODELLAMA 34B, CoT | 19.63% | 1.30× | 78.73% |”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing). May combine two claims.

    Findingown data

    The PIE dataset was relabeled using gem5, requiring over 42.8 million simulations.

    “Thus, we relabel the execution time using gem5 as described below; to create these annotated runtimes, we performed over 42.8 million simulations in our gem5 environment.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    In the retrieval (open-access) regime, CODELLAMA 34B achieved 42.54% %Opt, 2.43× speedup, and 73.62% %Correct.

    “| Retrieval (O) | CODELLAMA 34B | 42.54% | 2.43× | 73.62% |”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    In the fine-tuning (private) regime, GPT-3.5 with Self-Play achieved 87.63% %Opt, 6.86× speedup, and 95.09% %Correct.

    “| FineTune (P) | GPT-3.5, Self-Play | 87.63% | 6.86× | 95.09% |”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingown data

    Miscellaneous optimizations comprised approximately 18.70% of changes.

    “and Miscellaneous (e.g., code cleanups and constant optimizations) comprised ~18.70%.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingown data

    The generation and equivalence checking required executing over 1.4 million binary input pairs.

    “In total, this required executing over 1.4 million binary input pairs.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    The high-quality subset contains 4,085 slow-fast pairs, with no more than 4 submission pairs per problem, averaging 2.77 pairs per problem.

    “we additionally fine-tune with a subset of 4,085 “high-quality” slow-fast pairs-in particular, we take examples with the highest speedup and disallow more than 4 submission pairs per problem, for an average of 2.77 pairs per problem.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    GPT-4 outperforms GPT-3.5 Best@1 and under-performs GPT-3.5 Best@8.

    “we note that GPT-4 outperforms GPT-3.5 Best@1 and under-performs GPT-3.5 Best@8”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    Synthetic data generation yielded 3,314 unique synthetic programs and many thousand more duplicates.

    “we obtain 3,314 unique synthetic programs and many thousand more duplicates.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    Average speedup has a mild negative correlation with problem description length (-0.16) and source program length (-0.11).

    “Additionally, the average speedup has a mild negative correlation with both the problem description length (-0.16) and the source program length (-0.11), indicating a minimal impact of length on speedup compared to correctness.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    COT prompting improves performance over instruction-tuned and fixed prompt setups, but only for the larger CODELLAMA (13B and 34B) and GPT-3.5 models.

    “we observe improvements with this approach over both instructiontuned and fixed prompt setups, but notably only for the larger CODELLAMA (13B and 34B) and GPT-3.5 models.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    The human reference solutions achieved 100.00% %Opt, 3.66× speedup, and 100.00% %Correct.

    “| Human reference | | 100.00% | 3.66× | 100.00% |”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingown data

    After attempting to generate 10,000 new programs through the prompting strategy, 6,553 were not in the training/validation/test set of PIE.

    “We found that after attempting to generate 10,000 new programs through the prompting strategy, 6,553 were not in the training/validation/test set of PIE.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    Dynamic retrieval provides enormous gains over all other prompting approaches; it improved CODELLAMA 34B from 19.63% %OPT, 1.30× SPEEDUP to 34.25% %OPT, 2.28× SPEEDUP for BEST@8.

    “Our results show that dynamic retrieval provides enormous gains over all other prompting approaches; for instance, it improved the performance of CODELLAMA 34B from 19.63 %OPT, 1.30× SPEEDUP to 34.25% %OPT, 2.28× SPEEDUP for BEST@8.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    After excluding test cases that would cause timeouts above 2 minutes in gem5, the median number of test cases per problem is 82.5 in training, 75 in validation, and 104 in test.

    “after excluding them, we obtain a median of 82.5 test cases per problem in our training set, 75 test cases per problem in our validation set, and 104 test cases per problem for our test set (Appendix A.5).”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    After filtering, 1,485 optimized synthetic examples were kept where the optimized program is at least 5× faster and semantic duplicates limited to three.

    “Finally, we keep pairs where the optimized program is at least 5× faster and limit semantic duplicates to three, resulting in 1,485 optimized synthetic examples.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    After training with Self-Play, there is a slight drop in correctness, but speedup and correctness increase from 6.74 to 6.86 and from 86.71 to 87.63.

    “Additionally, there is a slight drop in correctness after training with Self-Play; however, the speedup and correctness increase from 6.74 → 6.86 and 86.71 → 87.63.”
    Quote in the paperNot a substantial claim
  • The quote only partly states this claim.

    Findingreasoning

    Both fine-tuned CODELLAMA models (7B and 13B) show significant improvements in %OPT and SPEEDUP with performance-conditioned generation.

    “Both fine-tuned CODELLAMA models (7B and 13B) show significant improvements in %OPT and SPEEDUP.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    LoRA fine-tuning of CODELLAMA 7B on All data achieved 1.12% Best@1 %Opt, 1.01× speedup, and 45.82% %Correct.

    “| All | CODELLAMA 7B | 1.12% | 1.01× | 45.82% | 9.57% | 1.17× | 87.47% |”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    The PIE dataset splits contain 77,967 training pairs from 1,474 problems, 2,544 validation pairs from 77 problems, and 978 test pairs from 41 problems.

    “We obtain a training set of 77,967 pairs from 1,474 problems, a validation set of 2,544 pairs from 77 problems, and a test set of 978 pairs from 41 problems.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    In the fine-tuning (open-access) regime, CODELLAMA 13B with Perf-Cond achieved 66.56% %Opt, 5.65× speedup, and 70.96% %Correct.

    “| FineTune (O) | CODELLAMA 13B, Perf-Cond | 66.56% | 5.65× | 70.96% |”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing), S4 (based).

    Findingnone given

    Increased speedup from dynamic retrieval may come with some cost of correctness.

    “We note that increased speedup may, however, come with some cost of correctness.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingown data

    Of the 6,553 generated programs not in PIE, 3,314 equivalence sets were found.

    “of these 6,553 generations we found 3,314 equivalence sets.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data

    In the retrieval (private) regime, GPT-4 achieved 76.07% %Opt, 3.93× speedup, and 95.71% %Correct.

    “| Retrieval (P) | GPT-4 | 76.07% | 3.93× | 95.71% |”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing). May combine two claims.

    Premisecitation

    The gem5 full system simulator provides detailed microarchitectural emulation of modern processors and is the gold standard CPU simulator in academia and industry.

    “we evaluate performance using the gem5 CPU simulator (Binkert et al., 2011), the gold standard CPU simulator in academia and industry, and models state-of-the-art general-purpose processors.”
    • Also stated in: § 2 PERFORMANCE IMPROVING EDITS (PIE) DATASET · plain
      “we measure program performance using the gem5 (Binkert et al., 2011) full system simulator, which provides detailed microarchitectural emulation of modern processors.”
    Quote in the paperNot a substantial claim0 of 1 sources checked
    • cites Binkert et al., 2011 source
  • May combine two claims.

    Study design and conductreasoning

    Performance measurement using the gem5 full system simulator is deterministic and provides reproducible, denoised performance results.

    “This evaluation strategy is entirely deterministic, ensuring both reliability and reproducibility.”
    • Also stated in: § 2 PERFORMANCE IMPROVING EDITS (PIE) DATASET · plain
      “Executing deterministic programs in gem5 provides deterministic performance results.This enables reproducibility in research and denoised performance measurements.2”
    Quote in the paperSubstantial claim0 of 1 sources checked
    • cites Binkert et al., 2011 source
  • May combine two claims.

    Interpretationreasoning

    PIE enables reproducible evaluation of LLMs for program optimization and reliable performance annotations for training.

    “PIE enables reproducible evaluation of LLMs for program optimization and reliable performance annotations for training.”
    Quote in the paperSubstantial claim
  • Classified as probably not a substantial claim.

    Premisecitation

    The effectiveness of parameter-efficient methods depends on the training data.

    “Recent work has shown that the effectiveness of parameter-efficient methods depends on the training data.”
    Quote in the paperSubstantial claim0 of 2 sources checked
    • cites He et al. (2021)

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites Niederfahrenhorst et al. (2023)

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

  • May combine two claims.

    Interpretationown data

    Language models struggle to generate a correct program when faced with larger source programs and challenging problems, but their ability to optimize programs is minimally impacted.

    “Overall, this analysis reveals that language models struggle to generate a correct program when faced with larger source programs and challenging problems, but their ability to optimize programs is minimally impacted.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Interpretationreasoning

    Program optimization is a non-trivial task requiring knowledge of algorithms, data structures, and programming grounded in performance; retrieving highly relevant examples may improve an LLM's optimization ability.

    “Program optimization is a non-trivial task requiring knowledge of algorithms, data structures, and programming grounded in performance; thus, retrieving highly relevant examples may improve an LLM's optimization ability.”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Study design and conductnone given

    The experiments use a two-minute timeout, which may introduce slight variability.

    “Our experiments use a two-minute timeout, which may introduce slight variability.”
    Quote in the paperNot a substantial claim
    • The authors state this as an assumption: gem5 terminates.
  • May combine two claims.

    Interpretationown data

    The model trained on synthetic data learns to try novel optimization strategies, but that comes at the cost of making more mistakes, revealing a precision-recall style trade-off.

    “This reveals a precision-recall style trade-off: the model trained on synthetic data learns to try novel optimization strategies, but that comes at the cost of making more mistakes.”
    Quote in the paperNot a substantial claim
  • Classified as probably not a substantial claim. May combine two claims.

    Study design and conductreasoning

    All C++ programs were compiled with GCC version 9.3.0 and C++17 with -O3 optimization flag, so reported improvements are on top of the optimizing compiler.

    “We compile all C++ programs with GCC version 9.3.0 and C++17 as well as the -O3 optimization flag; therefore, any reported improvements would be those on top of the optimizing compiler.”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Premisecitation

    CodeNet includes an average of 4 test cases per problem.

    “CodeNet includes an average of 4 test cases per problem.”
    Quote in the paperNot a substantial claim0 of 1 sources checked
    • cites Puri et al., 2021 source
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Study design and conductown data

    The error analysis was performed on a randomly sampled set of 120 (source, optimized) program pairs.

    “We manually analyze a randomly sampled set of 120 (source, optimized) program pairs to understand the algorithmic and structural changes responsible for the performance gains.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Interpretationown data

    The LLM is capable of performing sophisticated optimizations while preserving functionality.

    “These findings show the LLM's capability to perform sophisticated optimizations while preserving functionality.”
    Quote in the paperSubstantial claim
47 of 47
  • The paper relies on this without support.

    High-level optimizations such as API and algorithm changes remain elusive due to the difficulty of understanding the semantics of code.

    “However, high-level optimizations such as API and algorithm changes remain elusive due to the difficulty of understanding the semantics of code.”
  • The paper relies on this without support.

    Lack of open datasets and reliable performance measurement techniques has stymied research in automating performance optimization.

    “However, these techniques are either narrow or difficult to build on due to the lack of open datasets and lack of reliable performance measurement techniques, which has stymied research in this direction.”
  • The paper relies on this without support.

    Programs can typically be written in many ways with different performance profiles.

    “Programs can typically be written in many ways with different performance profiles.”
  • The authors state this as an assumption.

    gem5 terminates.

    “This assumes gem5 terminates.”
4 of 4

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

  • Two different Best@8 retrieval results for CODELLAMA 34B

    Major

    The discussion gives CODELLAMA 34B with dynamic retrieval a Best@8 result of 42.54% optimized and 2.43× speedup, but the later takeaway gives 34.25% and 2.28× for the same model, method, and sampling budget.

  • Failure categories do not account for the stated 30%

    Minor

    The two categories given for correct but insufficiently optimized programs are 10% slower and 10% below the speedup threshold. They add to 20%, not the stated approximately 30%.

    Reported 30 · recomputed 20

  • Optimization percentage is described as correctness

    Minor

    The text calls the increase from 86.71 to 87.63 an increase in correctness. Table 1 instead identifies 87.63% as %Opt and reports 95.09% as %Correct for the self-play model.

3 of 3

Cites

Flagged first, then by citations

9 of the 94 references couldn’t be matched to a known paper.

Research works printed but not linked: 8

  1. Alfred V Aho, Ravi Sethi, and Jeffrey D Ullman. Compilers: Principles, Techniques, and Tools, volume 2. Addison-wesley Reading, 2007.
  2. Chris Cummins, Zacharias V Fisches, Tal Ben-Nun, Torsten Hoefler, Michael FP O'Boyle, and Hugh Leather. ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler Op- timizations. In ICLR, 2021.
  3. Jhe-Yu Liou, Xiaodong Wang, Stephanie Forrest, and Carole-Jean Wu. GEVO: GPU Code Optimization using Evolutionary Computation. TACO, 2020. · DOI
  4. Aman Madaan, Niket Tandon, Peter Clark, and Yiming Yang. MemPrompt: Memory-assisted Prompt Edit- ing with User Feedback. In EMNLP, 2022.
  5. Charith Mendis, Cambridge Yang, Yewen Pu, Dr Amarasinghe, Michael Carbin, et al. Compiler Auto- Vectorization with Imitation Learning. NeurIPS, 2019.
  6. Hui Shi, Yang Zhang, Xinyun Chen, Yuandong Tian, and Jishen Zhao. Deep Symbolic Superoptimization without Human Knowledge. In ICLR, 2019.
  7. Delaram Talaashrafi. Advances in the Automatic Detection of Optimization Opportunities in Computer Programs. PhD thesis, Western University, 2022.
  8. Lewis Tunstall, Leandro Von Werra, and Thomas Wolf. Natural Language Processing with Transformers. "O'Reilly Media, Inc.", 2022.

Cited by

Sorted by citations

Authors
Shypula, A., Madaan, A., Zeng, Y., Alon, U., Gardner, J., Hashemi, M., Neubig, G., Ranganathan, P., Bastani, O., & Yazdanbakhsh, A.
Affiliations
  • University of Pennsylvania (US)
  • Google (United States) (US)
Venue
arXiv
Publisher
arXiv
Published
2023
ISSN
2331-8422 (ISSN-L)
OpenAlex
W4321276180
Cited by
23
References
94
Citations by year
2026: 2 · 2025: 10 · 2024: 6 · 2023: 5
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion, other-oa)
  • arXiv (Cornell University)
Funders
DeepMind
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Hardware and Architecture › Parallel Computing and Optimization Techniques
  • Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
Keywords
program optimization, large language models, performance evaluation, chain-of-thought prompting, synthetic data augmentation, fine-tuning, competitive programming

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Claims read by deepseek-v4.1-flash under definition version 3 (extract-v3) on 2026-10-10.

Classified by jev-1.13-20260917 (gold-guideline-v0.2) on 2026-10-10.

Cited sources are checked by gpt-6-sol.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review