ICML-2020 Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
Paper: Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
DrRepair: Program-feedback graphs and self-supervised training
Abstract
Program repair is challenging for two reasons: it requires reasoning over and tracking symbols across source code and diagnostic feedback, and labeled datasets for program repair remain relatively small. This paper proposes an approach that addresses both issues. First, it introduces program-feedback graphs that link symbols in the source code relevant to repair with diagnostic feedback, and applies a graph neural network on this structure to model the reasoning process. Second, it uses a self-supervised learning regime to pretrain the model.
Introduction
This work studies learning to repair programs from diagnostic feedback (compiler error messages), as shown in Figure 1.

Program-feedback graph

Whereas prior work relied mainly on end-to-end models or ASTs alone, this paper uses program-feedback graphs to directly connect the symbols involved in program-repair reasoning.
Self-supervised learning
The authors collect domain-relevant (programming-competition) correct programs from the web, design a corruption procedure to break programs, and synthesize new ⟨broken program, fixed program⟩ pairs—yielding roughly ten times more training data than the original labeled set.
Approach

Graph structure and graph attention capture long-range dependencies; compared with ASTs, program-feedback graphs are more robust to errors in the source code.
Program corruption procedure

- Syntax: Randomly delete, insert, or replace operators or punctuation (e.g.,
.,;,(),{},[],++), producing errors such as “expected @@@”. - ID-type: Randomly delete, insert, or replace identifier types (e.g.,
int,float,char), leading to type conflicts and redeclaration errors. - ID-typo: Randomly delete, insert, or replace an identifier, causing errors such as missing primary expressions and undeclared identifiers.
- Keyword: Randomly delete, insert, or replace language keywords or library calls (e.g.,
if,size()), yielding other miscellaneous diagnostics.
Experiment



<HR align=left color=#987cb9 SIZE=1>