SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.04624 · ICLR · 2022

Iterative Refinement Graph Neural Network for Antibody Sequence-Structure Co-design

Regina Barzilay, Tommi Jaakkola, Wengong Eric, Wendy Schmidt, Jeremy Wohlwend

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2110.04624.json · badge: /api/ran/2110.04624.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
wengong-jin/refinegnn community
Papers with Code archive
8 ran · 3 no recorded run
FunctionStatusWhere it lives
MPNEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("d11b2517ba9429b5")
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, MPNEncoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

class Args:
    def __init__(self):
        self.hidden_size = 4
        self.vocab_size = 8
        self.depth = 2
        self.dropout = 0.1

ARGS = {
    'args': Args(),
    'node_in': 3,
    'edge_in': 5,
    'direction': 'forward'
}
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 MPNEncoder — 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 MPNEncoder 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
MPNNLayer Ran
ran on a synthesized input · constructed an object; no result was computed
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("589cd9fd3655241f")
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, MPNNLayer: 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)

# Define the Normalize class (needed as dependency)
class Normalize(nn.Module):
    def __init__(self, features, epsilon=1e-06):
        super(Normalize, self).__init__()
        self.gain = nn.Parameter(torch.ones(features))
        self.bias = nn.Parameter(torch.zeros(features))
        self.epsilon = epsilon

    def forward(self, x, dim=-1):
        mu = x.mean(dim, keepdim=True)
        sigma = torch.sqrt(x.var(dim, keepdim=True) + self.epsilon)
        gain = self.gain
        bias = self.bias
        if dim != -1:
            shape = [1] * len(mu.size())
            shape[dim] = self.gain.size()[0]
            gain = gain.view(shape)
            bias = bias.view(shape)
        return gain * (x - mu) / (sigma + self.epsilon) + bias

# Parameters for MPNNLayer
num_hidden = 4
num_in = 3
dropout = 0.1

# Create input tensors
# h_V: (batch, num_nodes, num_hidden)
h_V = torch.randn(2, 5, num_hidden)

# h_E: (batch, num_nodes, num_edges, num_in)
h_E = torch.randn(2, 5, 6, num_in)

# mask_attend: (batch, num_nodes, num_edges)
mask_attend = torch.ones(2, 5, 6)

ARGS = {
    "num_hidden": num_hidden,
    "num_in": num_in,
    "dropout": dropout,
}
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 MPNNLayer — 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 MPNNLayer 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
Normalize Ran
ran on a synthesized input
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("ead5fe5814ebf612")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, 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.

import torch
import torch.nn as nn

class Normalize(nn.Module):

    def __init__(self, features, epsilon=1e-06):
        super(Normalize, self).__init__()
        self.gain = nn.Parameter(torch.ones(features))
        self.bias = nn.Parameter(torch.zeros(features))
        self.epsilon = epsilon

    def forward(self, x, dim=-1):
        mu = x.mean(dim, keepdim=True)
        sigma = torch.sqrt(x.var(dim, keepdim=True) + self.epsilon)
        gain = self.gain
        bias = self.bias
        if dim != -1:
            shape = [1] * len(mu.size())
            shape[dim] = self.gain.size()[0]
            gain = gain.view(shape)
            bias = bias.view(shape)
        return gain * (x - mu) / (sigma + self.epsilon) + bias


INIT_ARGS = {
    'features': 4,
    'epsilon': 1e-06
}

ARGS = {
    'x': torch.randn(2, 4),
    'dim': -1
}

if __name__ == '__main__':
    normalize = Normalize(**INIT_ARGS)
    output = normalize(**ARGS)
    print(output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PosEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("86c8abf3e2db8787")
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, PosEmbedding: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

# The function takes E_idx as input in forward()
# E_idx is used with .unsqueeze(-1) and multiplied with frequency
# It should be a tensor of shape that makes sense for positional embeddings
# Typically batch_size x seq_len

# Create a small E_idx tensor
E_idx = torch.arange(0, 6, dtype=torch.float32).view(2, 3)  # shape: (2, 3)

# num_embeddings is used to create frequency vector
# and determines the embedding dimension
num_embeddings = 4

ARGS = {
    "num_embeddings": num_embeddings,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosEmbedding — 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 PosEmbedding 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
PositionalEncodings Ran
ran on a synthesized input · constructed an object; no result was computed
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("f00cb58c5480a0f0")
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, PositionalEncodings: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

# The PositionalEncodings.__init__ takes:
# - num_embeddings: int (dimension of embeddings, used in forward for frequency calculation)
# - period_range: list with 2 elements (default [2, 1000], but not actually used in forward)

# The forward method expects:
# - E_idx: tensor of shape (N_batch, N_nodes, N_neighbors) containing indices

# Create a small instance
num_embeddings = 4
period_range = [2, 1000]

ARGS = {
    'num_embeddings': num_embeddings,
    'period_range': period_range,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PositionalEncodings — 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 PositionalEncodings 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
ProteinFeatures Ran
ran on a synthesized input · constructed an object; no result was computed
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("dc253370d5b46064")
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, ProteinFeatures: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

ARGS = {
    'num_positional_embeddings': 16,
    'num_rbf': 16,
    'top_k': 30,
    'features_type': 'full',
    'direction': 'forward',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ProteinFeatures — 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 ProteinFeatures 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
gather_nodes Ran
ran; our contract draft was wrong, not the code
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("77cd7ee3a9fa2105")
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 4, dtype family float, shape (2, 3, 2, 4) 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)

# nodes: shape (batch_size, num_nodes, feature_dim)
# neighbor_idx: shape (batch_size, num_neighbors, k) where k is some neighborhood size
nodes = torch.randn(2, 5, 4)  # batch=2, num_nodes=5, features=4

# neighbor_idx should contain indices into the nodes dimension (dim 1)
# shape: (batch_size, num_neighbors, k)
neighbor_idx = torch.randint(0, 5, (2, 3, 2))  # batch=2, num_neighbors=3, k=2

ARGS = {
    "nodes": nodes,
    "neighbor_idx": neighbor_idx,
}
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 4, dtype family float, shape (2, 3, 2, 4) — shape (2, 3, 2, 4) 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
pairwise_distance Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("b6c96b40a3de4111")
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 tuple, ndim 4, 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.

import torch

torch.manual_seed(0)

# X is indexed as X[:, :, 1, :], so it needs shape (batch, seq_len, atoms, coords)
# We'll use batch=2, seq_len=3, atoms=4, coords=3
batch_size = 2
seq_len = 3
num_atoms = 4
coord_dim = 3

X = torch.randn(batch_size, seq_len, num_atoms, coord_dim)

# mask is used with unsqueeze(1) and unsqueeze(2), so it should be 2D: (batch, seq_len)
mask = torch.ones(batch_size, seq_len)

ARGS = {
    "X": X,
    "mask": mask,
}
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 tuple, ndim 4, dtype family float — a tuple 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
RevisionDecoder Not yet run
unverified (harvested, no recorded run)
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("fe97dc1c37ccfad0")
How it ran

no invocation recorded.

gather_edges Not yet run
unverified (harvested, no recorded run)
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("ae83abf1a9db1e77")
How it ran

no invocation recorded.

insert_tensor Not yet run
unverified (harvested, no recorded run)
wengong-jin/refinegnn/structgen/revision.py
code served (permissive licence) · get_code("9a310db156ddb7b0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 9 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
gather_nodes
brick of this paper's assembly: helper
2 other papers
2 later
2409.17265 (2024-09)
CodonMPNN for Organism Specific and Codon Optimal Inverse Folding
2601.19232 (2026-01)
Structure-based RNA Design by Step-wise Optimization of Latent Diffusion Model
gather_edges
brick of this paper's assembly: helper
1 other paper
1 later
2409.17265 (2024-09)
CodonMPNN for Organism Specific and Codon Optimal Inverse Folding

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-23.

Repositories linked to this paper

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

Abstract

Antibodies are versatile proteins that bind to pathogens like viruses and stimulate the adaptive immune system. The specificity of antibody binding is determined by complementarity-determining regions (CDRs) at the tips of these Y-shaped proteins. In this paper, we propose a generative model to automatically design the CDRs of antibodies with enhanced binding specificity or neutralization capabilities. Previous generative approaches formulate protein design as a structureconditioned sequence generation task, assuming the desired 3D structure is given a priori. In contrast, we propose to co-design the sequence and 3D structure of CDRs as graphs. Our model unravels a sequence autoregressively while iteratively refining its predicted global structure. The inferred structure in turn guides subsequent residue choices. For efficiency, we model the conditional dependence between residues inside and outside of a CDR in a coarse-grained manner. Our method achieves superior log-likelihood on the test set and outperforms previous baselines in designing antibodies capable of neutralizing the SARS-CoV-2 virus.

For agents

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

get_harvested_code_for_paper("2110.04624")
get_code_for_paper("2110.04624")
have("2110.04624")

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

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

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

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

Connect an agent — have() is free.