mlsanityData to 7 Oct 2026

Anchored Self-Play for Code Repair

arXiv 2607.03523 ↗First posted 3 Jul 2026cs.SE cs.CLcited by 1

On the map: Synthetic data and self-improvement for LLMs → Code and instruction data synthesis

Abstract (arXiv)

Code repair is an important capability for language models (LMs): given a buggy program and unit tests, an LM must produce a fixed program that passes the tests. Because code repair data is limited, we aim to scale supervision by using an LM to generate bug--fix tasks. We propose _generator--fixer self-play_, in which a single model is trained with reinforcement learning to generate bugs and fix them. As the fixer improves, the generator adapts to produce more difficult bugs, yielding an automatic curriculum. To test whether this curriculum generalizes, we introduce BugSourceBench, a repair benchmark spanning realistic bug sources: bugs in human-written code, LM-generated code, and human-edited LM-generated code. On BugSourceBench, we find that self-play drifts toward difficult but unrealistic bugs, improving on synthetic bugs but degrading on human-authored ones. We propose Anchored Self-Play (ASP), which anchors self-play with a small reference set by adding a code-embedding similarity reward for generation and mixing reference bugs into fixer training. Across bug sources, ASP achieves the best fix rates, improving average fix rate over standard self-play by +24% relative / +7.0 pp absolute, with gains on bugs from both LMs and humans.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Code and instruction data synthesis, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 36 of its 50 references that are in the map. First posted on arXiv 3 Jul 2026.

Builds on

36 of 50 references.

Closest ancestors · 3

Same direction, newest first

  1. 2025Learning to Solve and Verify: A Self-Play Framework for Code and Test Generation20 Feb
  2. 2024SPaR: Self-Play with Tree-Search Refinement to Improve Instruction-Following in Large Language Models16 Dec
  3. 2024COAST: Enhancing the Code Debugging Ability of LLMs through Communicative Agent Based Data Synthesis9 Aug

Other references · 33

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2021Program Synthesis with Large Language Modelscited by 3,509
  3. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  4. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  5. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  6. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  7. 2021Measuring Coding Challenge Competence With APPScited by 879
  8. 2024Self-Play Fine-Tuning Converts Weak Language Models to Strong Language Modelscited by 552
  9. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
  10. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  11. 2025Absolute Zero: Reinforced Self-play Reasoning with Zero Datacited by 323
  12. 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 255
21 more
  1. 2025R-Zero: Self-Evolving Reasoning LLM from Zero Datacited by 210
  2. 2022Evolving Curricula with Regret-Based Environment Designcited by 166
  3. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
  4. 2020Autotelic Agents with Intrinsically Motivated Goal-Conditioned Reinforcement Learning: a Short Surveycited by 83
  5. 2025SPICE: Self-Play In Corpus Environments Improves Reasoningcited by 78
  6. 2021Break-It-Fix-It: Unsupervised Learning for Program Repaircited by 71
  7. 2021Self-Supervised Bug Detection and Repaircited by 59
  8. 2025Self-Questioning Language Modelscited by 47
  9. 2024Learning Formal Mathematics From Intrinsic Motivationcited by 45
  10. 2025Language Self-Play For Data-Free Trainingcited by 42
  11. 2025Toward Training Superintelligent Software Agents through Self-Play SWE-RLcited by 37
  12. 2024BugsInPy: A Database of Existing Bugs in Python Programs to Enable Controlled Testing and Debugging Studiescited by 35
  13. 2022SelfAPR: Self-supervised Program Repair with Test Execution Diagnosticscited by 33
  14. 2025Guided Self-Evolving LLMs with Minimal Human Supervisioncited by 33
  15. 2025BugPilot: Complex Bug Generation for Efficient Learning of SWE Skillscited by 28
  16. 2025SWE-Synth: Synthesizing Verifiable Bug-Fix Data to Enable Large Language Models in Resolving Real-World Bugscited by 22
  17. 2022On Distribution Shift in Learning-based Bug Detectorscited by 15
  18. 2019Bears: An Extensible Java Bug Benchmark for Automatic Program Repair Studiescited by 13
  19. 2025SPICE: An Automated SWE-Bench Labeling Pipeline for Issue Clarity, Test Coverage, and Effort Estimationcited by 11
  20. 2025Propose, Solve, Verify: Self-Play Through Formal Verificationcited by 11
  21. 2022Improving Automated Program Repair with Domain Adaptationcited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models
  2. 2024RePair: Automated Program Repair with Process-based Feedback
  3. 2026SelfHeal: Empirical Fix Pattern Analysis and Bug Repair in LLM Agents
  4. 2025Self-Bootstrapping Automated Program Repair: Using LLMs to Generate and Evaluate Synthetic Training Data for Bug Repair
  5. 2026Large Language Models for Programming: Actually Fixing or Reimplementing Incorrect Code?
  6. 2024ThinkRepair: Self-Directed Automated Program Repair
  7. 2025FeedbackEval: A Benchmark for Evaluating Large Language Models in Feedback-Driven Code Repair Tasks
  8. 2026QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization