Gradient-Based Program Repair: Fixing Bugs in Continuous Program Spaces
Andr\'e Silva, Gustav Thor\'en, Martin Monperrus

TL;DR
This paper introduces Gradient-Based Program Repair (GBPR), a novel method that transforms program repair into continuous optimization in a differentiable numerical space, enabling more effective bug fixing guided by program behavior.
Contribution
The paper presents the first approach to recast program repair as continuous optimization in a differentiable numerical program space, bridging symbolic code and behavior-based search.
Findings
GBPR effectively repairs buggy programs using gradient-based optimization.
RaspBugs benchmark contains 1,466 buggy symbolic programs for evaluation.
Experimental results show convincing repair trajectories and improved repair success.
Abstract
Automatic program repair seeks to generate correct code from buggy programs, with most approaches searching the correct program in a discrete, symbolic space of source code tokens. This symbolic search is fundamentally limited by its inability to directly reason about program behavior. We introduce Gradient-Based Program Repair (GBPR), a new approach that recasts program repair as continuous optimization in a differentiable numerical program space. Our core insight is to compile symbolic programs into differentiable numerical representations, enabling search in the numerical program space directly guided by program behavior. To evaluate GBPR, we present RaspBugs, a new benchmark of 1,466 buggy symbolic RASP programs and their respective numerical representations. Our experiments demonstrate that GBPR can effectively repair buggy symbolic programs by gradient-based optimization in the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
