SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.04880 · ICML · 2021

Self-Improved Retrosynthetic Planning

Jinwoo Shin, Hankook Lee, Sungsoo Ahn, Junsu Kim

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures 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/2106.04880.json · badge: /api/ran/2106.04880.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
junsu-kim97/self_improved_retro marked official in Papers with Code
Papers with Code archive
3 ran · 2 no recorded run
FunctionStatusWhere it lives
MolNode Ran
ran on a synthesized input · constructed an object; no result was computed
junsu-kim97/self_improved_retro/retro_star/alg/molstar.py
code served (permissive licence) · get_code("3cd413e7bfbc107c")
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, MolNode: 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 numpy as np

class MolNode:
    def __init__(self, mol, init_value, parent=None, is_known=False, zero_known_value=True):
        self.mol = mol
        self.pred_value = init_value
        self.value = init_value
        self.succ_value = np.inf
        self.parent = parent
        self.id = -1
        if self.parent is None:
            self.depth = 0
        else:
            self.depth = self.parent.depth
        self.is_known = is_known
        self.children = []
        self.succ = is_known
        self.open = True
        if is_known:
            self.open = False
            if zero_known_value:
                self.value = 0
            self.succ_value = self.value
        if parent is not None:
            parent.children.append(self)

    def v_self(self):
        return self.value

    def v_target(self):
        if self.parent is None:
            return self.value
        else:
            return self.parent.v_target()

    def init_values(self, no_child=False):
        assert self.open and (no_child or self.children)
        new_value = np.inf
        self.succ = False
        for reaction in self.children:
            new_value = np.min((new_value, reaction.v_self()))
            self.succ |= reaction.succ
        v_delta = new_value - self.value
        self.value = new_value
        if self.succ:
            for reaction in self.children:
                self.succ_value = np.min((self.succ_value, reaction.succ_value))
        self.open = False
        return v_delta

    def backup(self, succ):
        assert not self.is_known
        new_value = np.inf
        for reaction in self.children:
            new_value = np.min((new_value, reaction.v_self()))
        new_succ = self.succ | succ
        updated = self.value != new_value or self.succ != new_succ
        new_succ_value = np.inf
        if new_succ:
            for reaction in self.children:
                new_succ_value = np.min((new_succ_value, reaction.succ_value))
            updated = updated or self.succ_value != new_succ_value
        v_delta = new_value - self.value
        self.value = new_value
        self.succ = new_succ
        self.succ_value = new_succ_value
        if updated and self.parent:
            return self.parent.backup(v_delta, from_mol=self.mol)

    def serialize(self):
        text = '%d | %s' % (self.id, self.mol)
        return text

    def get_ancestors(self):
        if self.parent is None:
            return {self.mol}
        ancestors = self.parent.parent.get_ancestors()
        ancestors.add(self.mol)
        return ancestors


ARGS = {
    'mol': 'C1=CC=CC=C1',
    'init_value': 1.5,
    'parent': None,
    'is_known': False,
    'zero_known_value': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MolNode — 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 MolNode 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
ReactionNode Ran
ran on a synthesized input · constructed an object; no result was computed
junsu-kim97/self_improved_retro/retro_star/alg/molstar.py
code served (permissive licence) · get_code("855b2e0f9660637a")
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, ReactionNode: 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 numpy as np

class ReactionNode:
    def __init__(self, parent, cost, template):
        self.parent = parent
        self.depth = self.parent.depth + 1 if parent else 0
        self.id = -1
        self.cost = cost
        self.template = template
        self.children = []
        self.value = None
        self.succ_value = np.inf
        self.target_value = None
        self.succ = None
        self.open = True
        if parent:
            parent.children.append(self)

    def v_self(self):
        return self.value

    def v_target(self):
        return self.target_value

    def init_values(self):
        assert self.open
        self.value = self.cost
        self.succ = True
        for mol in self.children:
            self.value += mol.value
            self.succ &= mol.succ
        if self.succ:
            self.succ_value = self.cost
            for mol in self.children:
                self.succ_value += mol.succ_value
        self.target_value = self.parent.v_target() - self.parent.v_self() + self.value
        self.open = False

    def backup(self, v_delta, from_mol=None):
        self.value += v_delta
        self.target_value += v_delta
        self.succ = True
        for mol in self.children:
            self.succ &= mol.succ
        if self.succ:
            self.succ_value = self.cost
            for mol in self.children:
                self.succ_value += mol.succ_value
        if v_delta != 0:
            assert from_mol
            self.propagate(v_delta, exclude=from_mol)
        return self.parent.backup(self.succ)

    def propagate(self, v_delta, exclude=None):
        if exclude is None:
            self.target_value += v_delta
        for child in self.children:
            if exclude is None or child.mol != exclude:
                for grandchild in child.children:
                    grandchild.propagate(v_delta)

    def serialize(self):
        return '%d' % self.id


class RootNode:
    def __init__(self):
        self.depth = 0
        self.children = []
        self.value = 1.5
        self.target_value = 1.5

    def v_self(self):
        return self.value

    def v_target(self):
        return self.target_value

    def backup(self, succ):
        return succ


root_parent = RootNode()
cost_val = 0.5
template_val = "template_1"

ARGS = {
    "parent": root_parent,
    "cost": cost_val,
    "template": template_val,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ReactionNode — 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 ReactionNode 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
SynRoute Ran
ran on a synthesized input · constructed an object; no result was computed
junsu-kim97/self_improved_retro/retro_star/alg/molstar.py
code served (permissive licence) · get_code("2adb5a59a5048dff")
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, SynRoute: 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 numpy as np

# SynRoute.__init__ takes three parameters: target_mol, succ_value, search_status
# Looking at the code:
# - target_mol: used as a string/identifier in mols list, used in serialize_reaction with string operations
# - succ_value: compared with search_status (numeric comparison)
# - search_status: compared with succ_value (numeric comparison)

target_mol = "CC(=O)Oc1ccccc1C(=O)O"  # example SMILES string
succ_value = 0.5
search_status = 0.3

ARGS = {
    "target_mol": target_mol,
    "succ_value": succ_value,
    "search_status": search_status,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
graphviz, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SynRoute — 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 SynRoute 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
MolTree Not yet run
unverified (harvested, no recorded run)
junsu-kim97/self_improved_retro/retro_star/alg/molstar.py
code served (permissive licence) · get_code("f1f74a9c22ad8544")
How it ran

no invocation recorded.

molstar Not yet run
unverified (harvested, no recorded run)
junsu-kim97/self_improved_retro/retro_star/alg/molstar.py
code served (permissive licence) · get_code("b1d3a32726af711c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 1 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
MolNode
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2006.15820 (2020-06)
Retro*: Learning Retrosynthetic Planning with Neural Guided A* Search
MolTree
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2006.15820 (2020-06)
Retro*: Learning Retrosynthetic Planning with Neural Guided A* Search
ReactionNode
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2006.15820 (2020-06)
Retro*: Learning Retrosynthetic Planning with Neural Guided A* Search
SynRoute
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2006.15820 (2020-06)
Retro*: Learning Retrosynthetic Planning with Neural Guided A* Search

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

Retrosynthetic planning is a fundamental problem in chemistry for finding a pathway of reactions to synthesize a target molecule. Recently, search algorithms have shown promising results for solving this problem by using deep neural networks (DNNs) to expand their candidate solutions, i.e., adding new reactions to reaction pathways. However, the existing works on this line are suboptimal; the retrosynthetic planning problem requires the reaction pathways to be (a) represented by realworld reactions and (b) executable using "building block" molecules, yet the DNNs expand reaction pathways without fully incorporating such requirements. Motivated by this, we propose an endto-end framework for directly training the DNNs towards generating reaction pathways with the desirable properties. Our main idea is based on a self-improving procedure that trains the model to imitate successful trajectories found by itself. We also propose a novel reaction augmentation scheme based on a forward reaction model. Our experiments demonstrate that our scheme significantly improves the success rate of solving the retrosynthetic problem from 86.84% to 96.32% while maintaining the performance of DNN for predicting valid reactions.

For agents

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

get_harvested_code_for_paper("2106.04880")
get_code_for_paper("2106.04880")
have("2106.04880")

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

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

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

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

Connect an agent — have() is free.