SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.10636 · ICML · 2020

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

Percy Liang, Michihiro Yasunaga

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2005.10636.json · badge: /api/ran/2005.10636.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
michiyasunaga/DrRepair canonical (classifier label)
classifier basis: classifier_2025
4 ran · 2 no recorded run
FunctionStatusWhere it lives
MultiHeadedAttention Ran
ran on a synthesized input · constructed an object; no result was computed
michiyasunaga/DrRepair/model/repairer/model/attention_zoo.py
code served (permissive licence) · get_code("995919c0e59b6ea0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MultiHeadedAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Define arguments for MultiHeadedAttention.__init__
ARGS = {
    "head_count": 2,
    "model_dim": 8,
    "dropout": 0.1,
    "max_relative_positions": 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MultiHeadedAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MultiHeadedAttention output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
PositionwiseFeedForward Ran
ran on a synthesized input · constructed an object; no result was computed
michiyasunaga/DrRepair/model/repairer/model/attention_zoo.py
code served (permissive licence) · get_code("675f1cb139ebf772")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, PositionwiseFeedForward: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Parameters for PositionwiseFeedForward
d_model = 4
d_ff = 8
dropout = 0.1

ARGS = {
    'd_model': d_model,
    'd_ff': d_ff,
    'dropout': dropout,
}

# Instantiate the module to verify it works
ffn = nn.Module.__new__(nn.Module)
ffn.__class__ = type('PositionwiseFeedForward', (nn.Module,), {
    '__init__': lambda self, d_model, d_ff, dropout=0.1: (
        nn.Module.__init__(self),
        setattr(self, 'w_1', nn.Linear(d_model, d_ff)),
        setattr(self, 'w_2', nn.Linear(d_ff, d_model)),
        setattr(self, 'layer_norm', nn.LayerNorm(d_model, eps=1e-06)),
        setattr(self, 'dropout_1', nn.Dropout(dropout)),
        setattr(self, 'relu', nn.ReLU()),
        setattr(self, 'dropout_2', nn.Dropout(dropout)),
    )[-1],
    'forward': lambda self, x: (
        self.dropout_2(self.w_2(self.dropout_1(self.relu(self.w_1(self.layer_norm(x)))))) + x
    ),
    'update_dropout': lambda self, dropout: (
        setattr(self.dropout_1, 'p', dropout),
        setattr(self.dropout_2, 'p', dropout),
    )[-1],
})

# Create instance with ARGS
instance = nn.Linear.__class__.__bases__[0](**ARGS) if False else None

# Test input tensor: (batch_size=2, input_len=3, model_dim=4)
test_input = torch.randn(2, 3, 4)

ARGS = {
    'd_model': 4,
    'd_ff': 8,
    'dropout': 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PositionwiseFeedForward — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PositionwiseFeedForward output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_relative_positions_matrix Ran
ran, honoured the contract we drafted
michiyasunaga/DrRepair/model/repairer/model/attention_zoo.py
code served (permissive licence) · get_code("0732a6087209857f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (5, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "length": 5,
    "max_relative_positions": 3,
    "cache": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (5, 5) — shape (5, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
prepare_lines_print Ran
ran; our contract draft was wrong, not the code
michiyasunaga/DrRepair/evaluation/deepfix/test_deepfix.py
code served (permissive licence) · get_code("5829c26d2866a681")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for prepare_lines_print function

ARGS = {
    'text_indent': 2,
    'text_str_noindt': 'This is a test string that will be wrapped across multiple lines if it exceeds the maximum length allowed',
    '_max_len': 50,
    'wrap_indent': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
GraphAttentionEncoderFlowLayer Not yet run
unverified (harvested, no recorded run)
michiyasunaga/DrRepair/model/repairer/model/attention_zoo.py
code served (permissive licence) · get_code("0839788f852dacce")
How it ran

no invocation recorded.

relative_matmul Not yet run
unverified (harvested, no recorded run)
michiyasunaga/DrRepair/model/repairer/model/attention_zoo.py
code served (permissive licence) · get_code("2b837c9962d604d7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
generate_relative_positions_matrix
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2206.11218 (2022-06)
Hierarchical Context Tagging for Utterance Rewriting

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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. 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 programfeedback 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). line 9:error: request for member 'size' in 'a', which is of non-class type 'char' Evaluator (compiler) Feedback Goal 1. Localize error: line 5 2. Edit char tmp, a, b; → string tmp, a, b; Dr Repair (our model) 1. Error localized line 5 2. Repair char tmp, a, b; → string tmp, a, b; Sourc 4 in 5 c 6 m 7 c 8 i 9 f 10 11 . line 9:error: request for member 'size' in 'a', which is of non-class type 'char' Evaluator (compiler) Feedback Dr Repair (our model) 1. Error localized line 5 2. Repair char tmp, a, b; → string tmp, a, b;

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2005.10636")
get_code_for_paper("2005.10636")
have("2005.10636")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2005.10636.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2005.10636.svg)](https://syntology.ai/paper/2005.10636)

Connect an agent — have() is free.