SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.11259 · ICLR · 2024

Domain-Agnostic Molecular Generation with Chemical Feedback

Zhuo Chen, Huajun Chen, Yin Fang ♣♠, Ningyu Zhang ♣♠, Lingbing Guo, ♣ Xiaohui

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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, 1 violated it and 2 have no contract verdict; 2 failures of our instrument; 0 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/2301.11259.json · badge: /api/ran/2301.11259.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
zjunlp/MolGen canonical (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
RankingLoss Ran
ran on a synthesized input
zjunlp/MolGen/MolGen/src/utils.py
code served (permissive licence) · get_code("4a77ef0b3dd30448")
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)

# Construct tensors for the function
# score: shape (batch_size, num_candidates) - ranking scores
# summary_score: shape (batch_size,) - gold summary scores
batch_size = 2
num_candidates = 4

score = torch.randn(batch_size, num_candidates)
summary_score = torch.randn(batch_size)

ARGS = {
    "score": score,
    "summary_score": summary_score,
    "margin": 0.1,
    "gold_margin": 0.2,
    "gold_weight": 1.0,
    "no_gold": False,
    "no_cand": 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 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_pairs Ran
ran; our contract draft was wrong, not the code
zjunlp/MolGen/MolGen/model/bart/tokenization_bart.py
code served (permissive licence) · get_code("c083e60f5001bd38")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned set. 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.

# The function expects a word represented as a tuple of symbols (strings)
# It iterates through the word starting from index 0 and 1, creating pairs of consecutive symbols

word = ("h", "e", "ll", "o")

ARGS = {
    "word": word
}
Setup block drafted by
a language model, Claude Sonnet 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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
reduce_value Ran
ran, violated the contract we drafted
zjunlp/MolGen/MolGen/src/distributed_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from chenxi1228/SPEED, is pointer only (licence: NONE) · get_code("996937099be3e2fa")
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 chenxi1228/SPEED, 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. A run is recorded.

set_optim Ran
ran on a synthesized input
zjunlp/MolGen/MolGen/src/utils.py
code served (permissive licence) · get_code("73f856655a61345c")
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 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 torch.nn as nn
import torch.optim as optim

torch.manual_seed(0)

# Create a minimal model with named parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.layer2(self.layer1(x))

# Create config object with required attributes
class OptConfig:
    def __init__(self, optim_type='adamw', scheduler_type='fixed', lr=1e-4, 
                 weight_decay=0.01, adam_epsilon=1e-8, warmup_steps=100, 
                 total_steps=1000, accumulation_steps=1):
        self.optim = optim_type
        self.scheduler = scheduler_type
        self.lr = lr
        self.weight_decay = weight_decay
        self.adam_epsilon = adam_epsilon
        self.warmup_steps = warmup_steps
        self.total_steps = total_steps
        self.accumulation_steps = accumulation_steps

# Create test models
model1 = SimpleModel()
model2 = SimpleModel()

# Create config
opt = OptConfig(optim_type='adamw', scheduler_type='linear', lr=1e-4, 
                weight_decay=0.01, adam_epsilon=1e-8, warmup_steps=100, 
                total_steps=1000, accumulation_steps=2)

ARGS = {
    'opt': opt,
    'model_list': [model1, model2],
    'freeze_part': ['layer1'],
    'accumulation_step': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
shift_tokens_right Ran
ran; our contract draft was wrong, not the code
zjunlp/MolGen/MolGen/model/bart/modeling_bart.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/ternary_binary_transformer, is pointer only (licence: NOASSERTION) · get_code("cfb09657fff12fcf")
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 facebookresearch/ternary_binary_transformer, and GitHub could not classify the licence of that repository (NOASSERTION). 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. A run is 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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 3 later) and 2 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
get_pairs 258 other papers
41 dated earlier, 2 the same month, 207 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
shift_tokens_right 18 other papers
4 dated earlier, 13 later, 1 same year, order not determinable · 1 only as an assembly brick
2021.acl-demo.21 (2021 (year only))
KuiLeiXi: a Chinese Open-Ended Text Adventure Game
2203.07836 (2022-03)
Graph Pre-training for AMR Parsing and Generation
2203.11239 (2022-03)
DQ-BART: Efficient Sequence-to-Sequence Model via Joint Distillation and Quantization
and 15 more not named here
reduce_value 4 other papers
3 dated earlier, 1 later
2104.11493 (2021-04)
Stroke-Based Scene Text Erasing Using Synthetic Data for Training
2210.11298 (2022-10)
Tele-Knowledge Pre-training for Fault Analysis
2212.14454 (2022-12)
MEAformer: Multi-modal Entity Alignment Transformer for Meta Modality Hybrid
and 1 more not named here

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

The generation of molecules with desired properties has become increasingly popular, revolutionizing the way scientists design molecular structures and providing valuable support for chemical and drug design. However, despite the potential of language models in molecule generation, they face challenges such as generating syntactically or chemically flawed molecules, having narrow domain focus, and struggling to create diverse and feasible molecules due to limited annotated data or external molecular databases. To tackle these challenges, we introduce MOL-GEN, a pre-trained molecular language model tailored specifically for molecule generation. Through the reconstruction of over 100 million molecular SELFIES, MOLGEN internalizes structural and grammatical insights. This is further enhanced by domain-agnostic molecular prefix tuning, fostering robust knowledge transfer across diverse domains. Importantly, our chemical feedback paradigm steers the model away from "molecular hallucinations", ensuring alignment between the model's estimated probabilities and real-world chemical preferences. Extensive experiments on well-known benchmarks underscore MOLGEN's optimization capabilities in properties such as penalized logP, QED, and molecular docking. Additional analyses confirm its proficiency in accurately capturing molecule distributions, discerning intricate structural patterns, and efficiently exploring the chemical space 1 .

For agents

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

get_harvested_code_for_paper("2301.11259")
get_code_for_paper("2301.11259")
have("2301.11259")

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

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

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

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

Connect an agent — have() is free.