SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1803.09518 · 2018

Fréchet ChemNet Distance: A metric for generative models for molecules in drug discovery

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 (0 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-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/1803.09518.json · badge: /api/ran/1803.09518.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
insilicomedicine/fcd_torch community (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
FunctionStatusWhere it lives
build_masked_loss Ran
ran on a synthesized input
insilicomedicine/fcd_torch/fcd_torch/keras2pytorch.py
code served (permissive licence) · get_code("08c1bbf222daf46d")
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 function. 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 keras.backend as K
import numpy as np

# Create a simple loss function to pass as loss_function parameter
def simple_mse_loss(y_true, y_pred):
    """Simple MSE loss function"""
    return K.mean(K.square(y_true - y_pred))

# Define mask_value - a scalar value that will be masked out
mask_value = 0.0

ARGS = {
    "loss_function": simple_mse_loss,
    "mask_value": mask_value,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
calculate_frechet_distance Ran
ran on a synthesized input
insilicomedicine/fcd_torch/fcd_torch/utils.py
code served (permissive licence) · get_code("dd804e3188fac887")
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 float64, ndim 0, 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 numpy as np
from scipy import linalg

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample data for Frechet Distance calculation
# These represent activation statistics from a neural network
dim = 4  # Feature dimension

# Mean vectors (1D arrays of shape (dim,))
mu1 = np.random.randn(dim)
mu2 = np.random.randn(dim)

# Covariance matrices (2D arrays of shape (dim, dim))
# Create positive semi-definite matrices
A1 = np.random.randn(dim, dim)
sigma1 = A1 @ A1.T + np.eye(dim) * 0.1

A2 = np.random.randn(dim, dim)
sigma2 = A2 @ A2.T + np.eye(dim) * 0.1

ARGS = {
    "mu1": mu1,
    "sigma1": sigma1,
    "mu2": mu2,
    "sigma2": sigma2,
    "eps": 1e-06,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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_one_hot Ran
ran on a synthesized input
insilicomedicine/fcd_torch/fcd_torch/utils.py
code served (permissive licence) · get_code("0840fcb4bcdcde19")
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 ndarray, ndim 2, dtype family float, shape (4, 35) 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

# The function takes two parameters: smiles (a string) and pad_len (an integer with default -1)
# We need to provide valid SMILES strings and padding lengths

ARGS = {
    "smiles": "CCO",  # A simple SMILES string (ethanol)
    "pad_len": -1,    # Default value means no padding, use actual length
}
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 ndarray, ndim 2, dtype family float, shape (4, 35) — shape (4, 35) 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
load_imported_model Not yet run
unverified (harvested, no recorded run)
insilicomedicine/fcd_torch/fcd_torch/utils.py
code served (permissive licence) · get_code("020baa2a70cf8d4a")
How it ran

no invocation recorded.

masked_accuracy Not yet run
unverified (harvested, no recorded run)
insilicomedicine/fcd_torch/fcd_torch/keras2pytorch.py
code served (permissive licence) · get_code("27b3c0dc7c5ee22c")
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, 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 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.

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

The new wave of successful generative models in machine learning has increased the interest in deep learning driven de novo drug design. However, assessing the performance of such generative models is notoriously difficult. Metrics that are typically used to assess the performance of such generative models are the percentage of chemically valid molecules or the similarity to real molecules in terms of particular descriptors, such as the partition coefficient (logP) or druglikeness. However, method comparison is difficult because of the inconsistent use of evaluation metrics, the necessity for multiple metrics, and the fact that some of these measures can easily be tricked by simple rule-based systems. We propose a novel distance measure between two sets of molecules, called Fréchet ChemNet distance (FCD), that can be used as an evaluation metric for generative models. The FCD is similar to a recently established performance metric for comparing image generation methods, the Fréchet Inception Distance (FID). Whereas the FID uses one of the hidden layers of InceptionNet, the FCD utilizes the penultimate layer of a deep neural network called ChemNet, which was trained to predict drug activities. Thus, the FCD metric takes into account chemically and biologically relevant information about molecules, and also measures the diversity of the set via the distribution of generated molecules. The FCD's advantage over previous metrics is that it can detect if generated molecules are a) diverse and have similar b) chemical and c) biological properties as real molecules. We further provide an easy-to-use implementation that only requires the SMILES representation of the generated molecules as input to calculate the FCD. Implementations are available at: https://www.github.com/bioinf-jku/FCD

For agents

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

get_harvested_code_for_paper("1803.09518")
get_code_for_paper("1803.09518")
have("1803.09518")

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

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

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

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

Connect an agent — have() is free.