Graph-based, Self-Supervised Program Repair from Diagnostic Feedback

Michihiro Yasunaga, Percy Liang
5/20/2020
216 citations
cs.SEcs.CLcs.LG
contrastive-ssl

Official code: michiyasunaga/DrRepair (199 stars, Python, MIT, last commit 2021-05-24).

Abstract

We consider the problem of learning to repair programs from diagnostic feedback (e.g., compiler error messages). Program repair is challenging for two reasons: First, it requires reasoning and tracking symbols across source code and diagnostic feedback.

Show full abstract

Second, labeled datasets available for program repair are relatively small. In this work, we propose novel solutions to these two challenges. First, we introduce a program-feedback graph, which connects symbols relevant to program repair in source code and diagnostic feedback, and then apply a graph neural network on top to model the reasoning process. Second, we present a self-supervised learning paradigm for program repair that leverages unlabeled programs available online to create a large amount of extra program repair examples, which we use to pre-train our models. We evaluate our proposed approach on two applications: correcting introductory programming assignments (DeepFix dataset) and correcting the outputs of program synthesis (SPoC dataset). Our final system, DrRepair, significantly outperforms prior work, achieving 68.2% full repair rate on DeepFix (+22.9% over the prior best), and 48.4% synthesis success rate on SPoC (+3.7% over the prior best).

View on arXivView PDF

Code Implementations(1)

MIT

[ICML 2020] DrRepair: Learning to Repair Programs from Error Messages

19932Python, ShellJun 26, 20205 years agoMIT
code-generationdeep-learninggraph-neural-networkspre-trainingprogram-repair

Similar Papers

Cite this paper

@article{yasunaga2020graphbased,
  title  = {Graph-based, Self-Supervised Program Repair from Diagnostic Feedback},
  author = {Michihiro Yasunaga and Percy Liang},
  year   = {2020},
  eprint = {2005.10636},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2005.10636}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2005.10636.svg)](https://codeofpaper.com/paper/2005.10636)

Discussion