SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.12950 · 2024

MolecularGPT: Open Large Language Model (LLM) for Few-Shot Molecular Property Prediction

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 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/2406.12950.json · badge: /api/ran/2406.12950.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
nyushcs/moleculargpt canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
create_prompt Ran
ran; our contract draft was wrong, not the code
nyushcs/moleculargpt/ICL_test_diversity.py
code served (permissive licence) · get_code("5cbb7bb23f2c061d")
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 str. 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 numpy as np

# Set seed for reproducibility
torch.manual_seed(0)

# Create sample SMILES strings (simplified representations)
results_smiles = [
    'CCO',
    'CC(C)O',
    'c1ccccc1',
    'CC(=O)O',
    'CCN',
    'c1ccc(O)cc1'
]

# Create sample labels as strings (matching the function's str comparison)
results_label = [
    str(1.0),
    str(0.0),
    str(1.0),
    str(0.0),
    str(1.0),
    str(0.0)
]

# Set shot parameter (number of positive and negative examples)
shot = 2

ARGS = {
    'results_smiles': results_smiles,
    'results_label': results_label,
    'shot': shot
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
create_prompt Ran
ran; our contract draft was wrong, not the code
nyushcs/moleculargpt/ICL_test_reverse_cls.py
code served (permissive licence) · get_code("437f17c491f15275")
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 str. 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - results_smiles: used with len() and indexing results_smiles[i]
# - results_label: used with len() and indexing results_label[i], compared to str(1.0) and str(0.0)
# Both are sequences that need to be the same length

results_smiles = [
    "CCO",
    "c1ccccc1",
    "CC(=O)O",
    "C1CCCCC1"
]

results_label = [
    str(0.0),
    str(1.0),
    str(1.0),
    str(0.0)
]

ARGS = {
    "results_smiles": results_smiles,
    "results_label": results_label
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
create_prompt Ran
ran; our contract draft was wrong, not the code
nyushcs/moleculargpt/ICL_test_reverse_reg.py
code served (permissive licence) · get_code("40ec3f3c72f787b8")
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 str. 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - results_smiles: iterated over with len() and indexed with [i]
# - results_label: iterated over with len() and indexed with [i]
# Both are used in f-strings, so they should contain string-like values

results_smiles = [
    'CC(C)Cc1ccc(cc1)C(C)C(O)=O',
    'c1ccccc1',
    'CCO',
    'CC'
]

results_label = [
    'active',
    'inactive',
    'neutral',
    'control'
]

ARGS = {
    'results_smiles': results_smiles,
    'results_label': results_label
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
create_prompt Ran
ran; our contract draft was wrong, not the code
nyushcs/moleculargpt/ICL_test_sim_cls.py
code served (permissive licence) · get_code("504b9ab37dc7458f")
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 str. 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 numpy as np

torch.manual_seed(0)

# The function takes two parameters:
# 1. results_smiles: a list of SMILES strings
# 2. results_label: a list of label strings (either '1.0' or '0.0')

results_smiles = [
    'CCO',
    'c1ccccc1',
    'CC(C)C'
]

results_label = [
    str(1.0),
    str(0.0),
    str(1.0)
]

ARGS = {
    'results_smiles': results_smiles,
    'results_label': results_label
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
create_prompt Ran
ran; our contract draft was wrong, not the code
nyushcs/moleculargpt/ICL_test_sim_reg.py
code served (permissive licence) · get_code("32661c96034aa972")
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 str. 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

torch.manual_seed(0)

results_smiles = [
    "CCO",
    "CC(C)O"
]

results_label = [
    "alcohol",
    "secondary_alcohol"
]

ARGS = {
    "results_smiles": results_smiles,
    "results_label": results_label
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
shard_name Ran
ran; our contract draft was wrong, not the code
nyushcs/moleculargpt/dataset.py
code served (permissive licence) · get_code("d5fa4e62584661e2")
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 str. 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 os

def shard_name(dir: str, from_index: int, to_index: int, kind: str):
    return os.path.join(dir, kind, f'{from_index:0>10}-{to_index:0>10}.{kind}')

ARGS = {
    "dir": "/tmp/shards",
    "from_index": 0,
    "to_index": 1000,
    "kind": "parquet"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
tanimoto_ecfp4 Ran
ran, honoured the contract we drafted
nyushcs/moleculargpt/metrics_numba.py
code served (permissive licence) · get_code("eb752e4e58f7074a")
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 float32, 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 numpy as np
from ctypes import POINTER, c_uint32, cast

# Create two 64-element arrays of uint32 values
# These represent ECFP4 fingerprints as bit vectors
a_data = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
                    17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
                    33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
                    49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64],
                   dtype=np.uint32)

b_data = np.array([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32,
                    34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,
                    66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96,
                    98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128],
                   dtype=np.uint32)

# Convert numpy arrays to ctypes pointers
a_ptr = cast(a_data.ctypes.data, POINTER(c_uint32))
b_ptr = cast(b_data.ctypes.data, POINTER(c_uint32))

ARGS = {
    'a': a_ptr,
    'b': b_ptr,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
tanimoto_maccs Ran
ran, honoured the contract we drafted
nyushcs/moleculargpt/metrics_numba.py
code served (permissive licence) · get_code("8297a70b2a756969")
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 float32, 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 ctypes
import numpy as np
from numba import cfunc, types, carray, njit

# First, define the numba functions as they appear in the original code
numba_signature = types.float32(types.CPointer(types.uint32), types.CPointer(types.uint32))

@njit('int_(uint32)')
def word_popcount(v):
    v = v - (v >> 1 & 1431655765)
    v = (v & 858993459) + (v >> 2 & 858993459)
    c = types.uint32((v + (v >> 4) & 252645135) * 16843009) >> 24
    return c

@cfunc(numba_signature)
def tanimoto_maccs(a, b):
    a_array = carray(a, 6)
    b_array = carray(b, 6)
    ands = 0
    ors = 0
    ands += word_popcount(a_array[0] & b_array[0])
    ors += word_popcount(a_array[0] | b_array[0])
    ands += word_popcount(a_array[1] & b_array[1])
    ors += word_popcount(a_array[1] | b_array[1])
    ands += word_popcount(a_array[2] & b_array[2])
    ors += word_popcount(a_array[2] | b_array[2])
    ands += word_popcount(a_array[3] & b_array[3])
    ors += word_popcount(a_array[3] | b_array[3])
    ands += word_popcount(a_array[4] & b_array[4])
    ors += word_popcount(a_array[4] | b_array[4])
    ands += word_popcount(a_array[5] & b_array[5])
    ors += word_popcount(a_array[5] | b_array[5])
    return 1 - types.float32(ands) / ors

# Create two arrays of 6 uint32 values each
a_data = np.array([1, 2, 3, 4, 5, 6], dtype=np.uint32)
b_data = np.array([7, 8, 9, 10, 11, 12], dtype=np.uint32)

# Create pointers to these arrays
a_ptr = a_data.ctypes.data_as(ctypes.POINTER(ctypes.c_uint32))
b_ptr = b_data.ctypes.data_as(ctypes.POINTER(ctypes.c_uint32))

ARGS = {
    'a': a_ptr,
    'b': b_ptr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
word_popcount Ran
ran, honoured the contract we drafted
nyushcs/moleculargpt/metrics_numba.py
code served (permissive licence) · get_code("8372cd306fe6ea81")
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 int, ndim 0, dtype family int, 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
import numpy as np
from numba import cfunc, types, carray, njit

@njit('int_(uint32)')
def word_popcount(v):
    v = v - (v >> 1 & 1431655765)
    v = (v & 858993459) + (v >> 2 & 858993459)
    c = types.uint32((v + (v >> 4) & 252645135) * 16843009) >> 24
    return c

# The function takes a single parameter 'v' which is a uint32
# We need to pass a valid uint32 value
ARGS = {
    'v': np.uint32(42)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
write_table Not yet run
unverified (harvested, no recorded run)
nyushcs/moleculargpt/dataset.py
code served (permissive licence) · get_code("f725c39623b78b8e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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

Molecular property prediction (MPP) is a fundamental and crucial task in drug discovery. However, prior methods are limited by the requirement for a large number of labeled molecules and their restricted ability to generalize for unseen and new tasks, both of which are essential for real-world applications. To address these challenges, we present MolecularGPT for few-shot MPP. From a perspective on instruction tuning, we fine-tune large language models (LLMs) based on curated molecular instructions spanning over 1000 property prediction tasks. This enables building a versatile and specialized LLM that can be adapted to novel MPP tasks without any fine-tuning through zero- and few-shot in-context learning (ICL). MolecularGPT exhibits competitive in-context reasoning capabilities across 10 downstream evaluation datasets, setting new benchmarks for few-shot molecular prediction tasks. More importantly, with just two-shot examples, MolecularGPT can outperform standard supervised graph neural network methods on 4 out of 7 datasets. It also excels state-of-the-art LLM baselines by up to 15.7% increase on classification accuracy and decrease of 17.9 on regression metrics (e.g., RMSE) under zero-shot. This study demonstrates the potential of LLMs as effective few-shot molecular property predictors. The code is available at https://github.com/NYUSHCS/MolecularGPT.

For agents

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

get_harvested_code_for_paper("2406.12950")
get_code_for_paper("2406.12950")
have("2406.12950")

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

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

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

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

Connect an agent — have() is free.