SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.04720 · ICML · 2020

Improving Molecular Design by Stochastic Iterative Target Augmentation

Kevin Yang, Wengong Jin, Kyle Swanson, Regina Barzilay, Tommi Jaakkola

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 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; 0 failures of our instrument; 2 no recorded run), measured 2026-11-21; 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/2002.04720.json · badge: /api/ran/2002.04720.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
cbilodeau2/g2g_optimization community (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
FunctionStatusWhere it lives
drop_dots Ran
ran on a synthesized input
cbilodeau2/g2g_optimization/g2g_optimization/hgraph/pairing.py
code served (permissive licence) · get_code("bfdd144773ab7453")
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 DataFrame. 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 pandas as pd

# Create a simple DataFrame with SMILES column
# The function filters out rows where SMILES contains '.'
df = pd.DataFrame({
    'SMILES': [
        'CCO',           # valid, no dot
        'c1ccccc1',      # valid, no dot
        'CCO.CC',        # invalid, has dot
        'c1ccccc1.O',    # invalid, has dot
        'CC(C)C'         # valid, no dot
    ]
})

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
get_accuracy_bin Ran
ran on a synthesized input
cbilodeau2/g2g_optimization/g2g_optimization/hgraph/nnutils.py
code served (permissive licence) · get_code("1ee94d6efd4bc1a0")
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 0, dtype family float, shape () 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)

# Create small tensors for testing
# scores: tensor of floating point values that will be compared to 0
scores = torch.tensor([0.5, -0.3, 0.1, -0.8], dtype=torch.float32)

# labels: tensor of binary labels (0 or 1) that match the predictions
labels = torch.tensor([1, 0, 1, 0], dtype=torch.long)

ARGS = {
    "scores": scores,
    "labels": labels,
}
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 0, dtype family float, shape () — shape () 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
get_index_smiles Ran
ran on a synthesized input
cbilodeau2/g2g_optimization/g2g_optimization/hgraph/pairing.py
code served (permissive licence) · get_code("5027b73a3e67c839")
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 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.

import torch
import numpy as np

torch.manual_seed(0)

class MockMolecule:
    def __init__(self, smiles_str):
        self.smiles = smiles_str

# Create a mock dataset with molecule objects that have smiles attributes
data_set = [
    MockMolecule("CC(=O)Nc1ccc(O)cc1"),
    MockMolecule("c1ccccc1C(=O)O"),
    MockMolecule("CCO"),
    MockMolecule("CC(C)CC(N)C(=O)O"),
]

# Create index_set to select specific molecules from the dataset
index_set = [0, 2, 3]

ARGS = {
    "index_set": index_set,
    "data_set": data_set,
}
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 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
index_select_ND Ran
ran on a synthesized input
cbilodeau2/g2g_optimization/g2g_optimization/hgraph/nnutils.py
code served (permissive licence) · get_code("6cfa3e07a37cd10c")
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, 3, 2) 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)

# Construct valid arguments for index_select_ND
# The function takes:
# - source: a tensor that will have index_select applied along dim
# - dim: the dimension along which to select
# - index: a tensor of indices to select

# Create a source tensor with shape (5, 3, 2) - batch dim 5, other dims 3 and 2
source = torch.randn(5, 3, 2)

# dim should be a valid dimension in source (0, 1, or 2)
dim = 0

# index should be a 1D or multi-dimensional tensor of indices
# Valid indices range from 0 to source.size(dim)-1
# Create a 2D index tensor for demonstration
index = torch.tensor([[0, 2, 4], [1, 3, 0]])

ARGS = {
    "source": source,
    "dim": dim,
    "index": index
}
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, 3, 2) — shape (2, 3, 3, 2) 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
make_cuda Ran
ran on a synthesized input
cbilodeau2/g2g_optimization/g2g_optimization/hgraph/hgnn.py
code served (permissive licence) · get_code("d02f49e16c847527")
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. 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

torch.manual_seed(0)

# The function expects tensors as a tuple of (tree_tensors, graph_tensors)
# Each of these is a list where all elements except the last are converted to tensors
# and the last element is kept as-is

# Create small sample tensors for tree_tensors
tree_tensors = [
    torch.randint(0, 10, (2, 4)),      # First element - will be converted to long
    torch.randint(0, 10, (2, 4)),      # Second element - will be converted to long
    "metadata_string"                   # Last element - kept as-is
]

# Create small sample tensors for graph_tensors
graph_tensors = [
    torch.randint(0, 10, (2, 4)),      # First element - will be converted to long
    torch.randint(0, 10, (2, 4)),      # Second element - will be converted to long
    {"type": "graph"}                   # Last element - kept as-is
]

tensors = (tree_tensors, graph_tensors)

ARGS = {
    "tensors": tensors
}
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 — a tuple output has no array shape of its own; none is 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
read_constraints Ran
ran on a synthesized input
cbilodeau2/g2g_optimization/g2g_optimization/hgraph/pairing.py
code served (permissive licence) · get_code("ec9aaf9708d1873d")
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 dict. 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 json
import tempfile
import os

# Create a temporary constraint file with valid JSON values
temp_dir = tempfile.mkdtemp()
constraint_file = os.path.join(temp_dir, "constraints.txt")

with open(constraint_file, 'w') as f:
    f.write("param1=42\n")
    f.write("param2=[1, 2, 3]\n")
    f.write("param3={\"key\": \"value\"}\n")
    f.write("# This is a comment\n")
    f.write("param4=3.14\n")

ARGS = {
    "constraint_file": constraint_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
avg_pool Not yet run
unverified (harvested, no recorded run)
cbilodeau2/g2g_optimization/g2g_optimization/hgraph/nnutils.py
code served (permissive licence) · get_code("703ab4f978cdd28f")
How it ran

no invocation recorded.

set_atommap Not yet run
unverified (harvested, no recorded run)
cbilodeau2/g2g_optimization/g2g_optimization/hgraph/chemutils.py
pointer only (licence: MIT); the stored copy get_code serves, from einae-nd/moama-dev, is pointer only (licence: NONE) · get_code("64031117dac3cd1d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from einae-nd/moama-dev, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 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
index_select_ND 3 other papers
3 later
2010.03951 (2020-10)
MolDesigner: Interactive Design of Efficacious Drugs with Deep Learning
2110.09681 (2021-10)
Permutation invariant graph-to-sequence model for template-free retrosynthesis and reaction prediction
2502.15805 (2025-02)
FragFM: Hierarchical Framework for Efficient Molecule Generation via Fragment-Level Discrete Flow Matching
set_atommap 2 other papers
2 later
2309.04589 (2023-09)
Motif-aware Attribute Masking for Molecular Graph Pre-training
2502.15805 (2025-02)
FragFM: Hierarchical Framework for Efficient Molecule Generation via Fragment-Level Discrete Flow Matching
avg_pool 1 other paper
1 later
2502.15805 (2025-02)
FragFM: Hierarchical Framework for Efficient Molecule Generation via Fragment-Level Discrete Flow Matching

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

Repositories linked to this paper

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

Abstract

Generative models in molecular design tend to be richly parameterized, data-hungry neural models, as they must create complex structured objects as outputs. Estimating such models from data may be challenging due to the lack of sufficient training data. In this paper, we propose a surprisingly effective self-training approach for iteratively creating additional molecular targets. We first pretrain the generative model together with a simple property predictor. The property predictor is then used as a likelihood model for filtering candidate structures from the generative model. Additional targets are iteratively produced and used in the course of stochastic EM iterations to maximize the log-likelihood that the candidate structures are accepted. A simple rejection (re-weighting) sampler suffices to draw posterior samples since the generative model is already reasonable after pre-training. We demonstrate significant gains over strong baselines for both unconditional and conditional molecular design. In particular, our approach outperforms the previous state-of-theart in conditional molecular design by over 10% in absolute gain. Finally, we show that our approach is useful in other domains as well, such as program synthesis.

For agents

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

get_harvested_code_for_paper("2002.04720")
get_code_for_paper("2002.04720")
have("2002.04720")

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

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

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

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

Connect an agent — have() is free.