Memory-Efficient Large Language Models for Program Repair with Semantic-Guided Patch Generation
Not on the map. Why?
Abstract (arXiv)
In this paper, we first show that increases in beam size, even for small-sized LLMs (1B-7B params), require extensive GPU usage, leading to up to 80% of recurring crashes due to memory overloads in LLM-based APR. Seemingly simple solutions to reduce memory consumption are (1) to quantize LLM models, i.e., converting the weights of an LLM from high-precision values to lower-precision ones, and (2) to make beam search sequential, i.e., forwarding each beam through the model sequentially and then concatenating them back into a single output. However, we show that these approaches still do not work via both theoretical analysis and experiments. To address this, we introduce FLAMES, a novel LLM-based APR technique that employs semantic-guided patch generation to enhance repair effectiveness and memory efficiency. Unlike conventional methods that rely on beam search, FLAMES utilizes greedy decoding to enhance memory efficiency while steering the search towards more potentially good repair candidates via a semantic-guided best-first search algorithm. At each decoding step, FLAMES uses semantic feedback from test validation, such as the number of passing and failing test cases, to select the most promising token to explore further. Our empirical evaluation on Defects4J shows thatFLAMES substantially reduces memory consumption by up to 83% compared to LLM-based APR without compromising time efficiency. Moreover, FLAMES correctly fixes 133 bugs on Defects4J, fixing 10 bugs more than the best baseline. Additionally, these improvements also generalize to the HumanEval-Java and TransformedD4J datasets, where FLAMES generates 12% and 36.5% more correct patches, respectively, than the best baseline.
Key facts. Cited by 5 papers in the map (data through 13 Oct 2026). Builds on 39 of its 81 references that are in the map. First posted on arXiv 22 Oct 2024.
Builds on
39 of 81 references.
References · 39
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,388
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,379
- 2023Code Llama: Open Foundation Models for Codecited by 2,130
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,362
- 2024Qwen2.5-Coder Technical Reportcited by 1,179
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 533
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 497
- 2024AutoCodeRover: Autonomous Program Improvementcited by 274
- 2024Reinforcement learningcited by 238
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 229
- 2023Using an LLM to Help With Code Understandingcited by 227
- 2023Planning with Large Language Models for Code Generationcited by 182
27 more
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2023InferFix: End-to-End Program Repair with LLMscited by 114
- 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 108
- 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 85
- 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
- 2019TBar: Revisiting Template-based Automated Program Repaircited by 65
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repaircited by 55
- 2021Neural Program Repair with Execution-based Backpropagationcited by 50
- 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repaircited by 50
- 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
- 2019Getafix: Learning to Fix Bugs Automaticallycited by 41
- 2022SelfAPR: Self-supervised Program Repair with Test Execution Diagnosticscited by 33
- 2023GAMMA: Revisiting Template-based Automated Program Repair via Mask Predictioncited by 23
- 2021Trust Enhancement Issues in Program Repaircited by 22
- 2018Practical Program Repair via Bytecode Mutationcited by 19
- 2020On the Efficiency of Test Suite based Program Repair: A Systematic Assessment of 16 Automated Repair Systems for Java Programscited by 16
- 2023ITER: Iterative Neural Repair for Multi-Location Patchescited by 16
- 2019Empirical Review of Java Program Repair Tools: A Large-Scale Experiment on 2,141 Bugs and 23,551 Repair Attemptscited by 12
- 2022AutoPruner: Transformer-Based Call Graph Pruningcited by 11
- 2021Megadiff: A Dataset of 600k Java Source Code Changes Categorized by Diff Sizecited by 10
- 2024Towards Reliable Evaluation of Neural Program Repair with Natural Robustness Testingcited by 5
- 2022Usability and Aesthetics: Better Together for Automated Repair of Web Pagescited by 2
- 2024Encoding Version History Context for Better Code Representationcited by 2
- 2022Program Repaircited by 1
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 15
- 2025PAGENT: Learning to Patch Software Engineering Agentscited by 4
- 2026Perish or Flourish? A Holistic Evaluation of Large Language Models for Code Generation in Functional Programmingcited by 1
- 2026FPMoE: A Sparse Mixture-of-Experts Approach to Functional Code Generationcited by 0
- 2026How Do LLMs Read Bug Reports? An Empirical Study of Attention in LLMs for Automated Program Repaircited by 0
- 2026How Do LLMs Read Bug Reports? An Empirical Study of Attention in LLMs for Automated Program Repair28 Jul 2026
- 2026FPMoE: A Sparse Mixture-of-Experts Approach to Functional Code Generation27 May 2026
- 2026Perish or Flourish? A Holistic Evaluation of Large Language Models for Code Generation in Functional Programming5 Jan 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025PAGENT: Learning to Patch Software Engineering Agents21 Jun 2025
Similar, not cited
Close in wording, no citation either way
- 2024Aligning the Objective of LLM-based Program Repair
- 2025Automated Repair of C Programs Using Large Language Models
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models
- 2026Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair
- 2025Large Language Models for Fault Localization: An Empirical Study ↗
- 2025Towards Effectively Leveraging Execution Traces for Program Repair with Code LLMs
- 2025AuPair: Golden Example Pairs for Code Repair
- 2025Rethinking Kernel Program Repair: Benchmarking and Enhancing LLMs with RGym