mlsanityData to 14 Oct 2026

AuPair: Golden Example Pairs for Code Repair

arXiv 2502.18487 ↗First posted 12 Feb 2025cs.SE cs.AI cs.CLcited by 3

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Scaling up inference-time compute has proven to be a valuable strategy in improving the performance of Large Language Models (LLMs) without fine-tuning. An important task that can benefit from additional inference-time compute is self-repair; given an initial flawed response, or guess, the LLM corrects its own mistake and produces an improved response, or fix. We leverage the in-context learning ability of LLMs to perform self-repair in the coding domain. The key contribution of our paper is an approach that synthesises and selects an ordered set of golden example pairs, or AuPairs, of these initial guesses and subsequent fixes for the corresponding problems. Each such AuPair is provided as a single in-context example at inference time to generate a repaired solution. For an inference-time compute budget of N LLM calls per problem, N AuPairs are used to generate N repaired solutions, out of which the highest-scoring solution is selected as the final answer. The underlying intuition is that if the LLM is given a different example of fixing an incorrect guess each time, it can subsequently generate a diverse set of repaired solutions. Our algorithm selects these AuPairs in a manner that maximises complementarity and usefulness. We demonstrate the results of our algorithm on 5 LLMs across 7 competitive programming datasets for the code repair task. Our algorithm yields a significant boost in performance compared to best-of-N and self-repair, and also exhibits strong generalisation across datasets and models. Moreover, our approach shows significantly stronger scaling with inference-time compute budget compared to baselines.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 35 of its 40 references that are in the map. First posted on arXiv 12 Feb 2025.

Builds on

35 of 40 references.

Closest ancestors · 4

Same direction, newest first

  1. 2024ThinkRepair: Self-Directed Automated Program Repair30 Jul
  2. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar
  3. 2023Teaching Large Language Models to Self-Debug11 Apr
  4. 2022Competition-Level Code Generation with AlphaCode8 Feb

Other references · 31

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  4. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  5. 2020Learning to summarize from human feedbackcited by 2,588
  6. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  7. 2021Measuring Coding Challenge Competence With APPScited by 902
  8. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  9. 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 783
  10. 2022Transformers learn in-context by gradient descentcited by 732
  11. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
  12. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
19 more
  1. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
  2. 2022Generating Sequences by Learning to Self-Correctcited by 277
  3. 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 197
  4. 2024The Effect of Sampling Temperature on Problem Solving in Large Language Modelscited by 170
  5. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 145
  6. 2023An Empirical Study of the Non-determinism of ChatGPT in Code Generationcited by 137
  7. 2023Learning Performance-Improving Code Editscited by 106
  8. 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 86
  9. 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
  10. 2021Break-It-Fix-It: Unsupervised Learning for Program Repaircited by 71
  11. 2018CODIT: Code Editing with Tree-Based Neural Modelscited by 40
  12. 2023Refactoring Programs Using Large Language Models with Few-Shot Examplescited by 28
  13. 2017ARJA: Automated Repair of Java Programs via Multi-Objective Genetic Programmingcited by 26
  14. 2024HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agentcited by 24
  15. 2022CIRCLE: Continual Repair across Programming Languagescited by 17
  16. 2024RePair: Automated Program Repair with Process-based Feedbackcited by 16
  17. 2016Automated Correction for Syntax Errors in Programming Assignments using Recurrent Neural Networkscited by 13
  18. 2017Semantic Code Repair using Neuro-Symbolic Transformation Networkscited by 13
  19. 2022Fix Bugs with Transformer through a Neural-Symbolic Edit Grammarcited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Aligning the Objective of LLM-based Program Repair
  2. 2025FeedbackEval: A Benchmark for Evaluating Large Language Models in Feedback-Driven Code Repair Tasks
  3. 2024MORepair: Teaching LLMs to Repair Code via Multi-Objective Fine-tuning
  4. 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Models
  5. 2025MemoCoder: Automated Function Synthesis using LLM-Supported Agents
  6. 2026When Models Edit Too Much: On the Fidelity of Minimal Code Edits
  7. 2026QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization
  8. 2024Memory-Efficient Large Language Models for Program Repair with Semantic-Guided Patch Generation