SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.17693 · 2026

Fine-tuning Pocket-Aware Diffusion Models via Denoising Policy Optimization

Yuan Xue, Daniel Kudenko, Megha Khosla

arXiv · PDF

Code that ran

7 of 7 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; 4 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2605.17693.json · badge: /api/ran/2605.17693.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
xy9485/DePPA canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_normalization_stats Ran
ran, honoured the contract we drafted
xy9485/DePPA/summarize_pocket_scores.py
code served (permissive licence) · get_code("9c219b83b40e8c5c")
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 math

def safe_float(value):
    if value is None:
        return None
    text = str(value).strip()
    if not text:
        return None
    try:
        num = float(text)
    except ValueError:
        return None
    if math.isnan(num) or math.isinf(num):
        return None
    return num

def compute_normalization_stats(rows, field_name, csv_path):
    values = []
    for idx, row in enumerate(rows, start=1):
        value = safe_float(row.get(field_name))
        if value is None:
            raise SystemExit(f"Missing or invalid '{field_name}' in '{csv_path}' row {idx}.")
        values.append(value)
    if not values:
        raise SystemExit(f"No numeric values for '{field_name}' in '{csv_path}'.")
    mean = float(sum(values) / len(values))
    variance = float(sum(((v - mean) ** 2 for v in values)) / len(values))
    std = math.sqrt(variance)
    if std == 0:
        raise SystemExit(f"Standard deviation for '{field_name}' in '{csv_path}' is zero; cannot normalize.")
    return (mean, std)

# Setup valid arguments
rows = [
    {"feature_value": "1.5", "other": "x"},
    {"feature_value": "2.5", "other": "y"},
    {"feature_value": "3.5", "other": "z"},
    {"feature_value": "4.5", "other": "w"},
]

field_name = "feature_value"
csv_path = "/path/to/data.csv"

ARGS = {
    "rows": rows,
    "field_name": field_name,
    "csv_path": csv_path,
}
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 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
get_bb_transform Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xy9485/DePPA/geometry_utils.py
code served (permissive licence) · get_code("c81e137b6d163914")
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. 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

# Create small batch of backbone atom coordinates
# n=2 (batch size), 3 coordinates per atom
n_samples = 2

# N atom positions (nitrogen)
n_xyz = np.array([
    [1.5, 0.5, 0.2],
    [-0.3, 1.2, 0.8]
], dtype=np.float32)

# CA atom positions (alpha carbon) 
ca_xyz = np.array([
    [0.0, 0.0, 0.0],
    [0.5, 0.5, 0.5]
], dtype=np.float32)

# C atom positions (carbonyl carbon)
c_xyz = np.array([
    [-1.2, 0.8, -0.3],
    [1.1, -0.4, 0.2]
], dtype=np.float32)

ARGS = {
    "n_xyz": n_xyz,
    "ca_xyz": ca_xyz,
    "c_xyz": c_xyz,
}
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 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
get_n_nodes Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xy9485/DePPA/process_crossdock.py
code served (permissive licence) · get_code("be813c0c5a49cea2")
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 (5, 5) 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 scipy.ndimage import gaussian_filter

# Create sample masks
# lig_mask and pocket_mask should have the same unique indices
# Each value represents a node index, and counts represent the number of nodes
np.random.seed(42)

# Create simple masks with matching indices
# Let's use indices 0, 1, 2 for 3 different ligand-pocket pairs
lig_mask = np.array([0, 0, 0, 1, 1, 2, 2, 2, 2])
pocket_mask = np.array([0, 0, 1, 1, 1, 2, 2, 2, 2])

# Verify they have the same unique indices
unique_lig = np.unique(lig_mask)
unique_pocket = np.unique(pocket_mask)
assert np.array_equal(unique_lig, unique_pocket), "Masks must have matching unique indices"

ARGS = {
    "lig_mask": lig_mask,
    "pocket_mask": pocket_mask,
    "smooth_sigma": None
}
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 ndarray, ndim 2, dtype family float, shape (5, 5) — shape (5, 5) 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
resolve_index_range Ran
ran; our contract draft was wrong, not the code
xy9485/DePPA/batch_generate_ligands_rl.py
code served (permissive licence) · get_code("633427fffeaa2356")
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 slice. 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)

# Test case 1: limit_value is None (should return full slice)
limit_value_1 = None
total_len_1 = 10

# Test case 2: limit_value is empty string (should return full slice)
limit_value_2 = ""
total_len_2 = 10

# Test case 3: limit_value with colon separator (range)
limit_value_3 = "2:5"
total_len_3 = 10

# Test case 4: limit_value with dash separator (range)
limit_value_4 = "1-7"
total_len_4 = 10

# Test case 5: limit_value as single index
limit_value_5 = "3"
total_len_5 = 10

ARGS = {
    "limit_value": "2:5",
    "total_len": 10
}
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 slice — a slice output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a slice 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
rotation_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xy9485/DePPA/geometry_utils.py
code served (permissive licence) · get_code("cf32ddf40be29175")
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 3, dtype family float, shape (2, 3, 3) 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

# Construct arguments for rotation_matrix function
angle = np.array([0.5, 1.2])  # (n,) - array of 2 angles
axis = 0  # axis parameter: 0=x, 1=y, 2=z

ARGS = {
    "angle": angle,
    "axis": axis,
}
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 3, dtype family float, shape (2, 3, 3) — shape (2, 3, 3) 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
safe_float Ran
ran, honoured the contract we drafted
xy9485/DePPA/summarize_pocket_scores.py
code served (permissive licence) · get_code("3eb5d34460ab9e79")
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 float, 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 math

def safe_float(value):
    if value is None:
        return None
    text = str(value).strip()
    if not text:
        return None
    try:
        num = float(text)
    except ValueError:
        return None
    if math.isnan(num) or math.isinf(num):
        return None
    return num

# Test cases for different parameter values
ARGS = {
    "value": "3.14"
}
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 float, 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
safe_mean Ran
ran, honoured the contract we drafted
xy9485/DePPA/summarize_pocket_scores.py
code served (permissive licence) · get_code("f94f32f4d1eba81e")
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 float, 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
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - safe_mean takes 'values' parameter
# - It filters out None values from the list
# - It computes the mean of remaining values
# - Values need to be summable and divisible

# Create a list of values with some None entries and some numeric values
values = [1.5, 2.5, None, 3.5, None, 4.5]

ARGS = {
    "values": values
}
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 float, 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

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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_bb_transform 2 other papers
2 dated earlier
2210.13695 (2022-10)
Structure-based Drug Design with Equivariant Diffusion Models
2302.04313 (2023-02)
Geometry-Complete Diffusion for 3D Molecule Generation and Optimization
get_n_nodes 2 other papers
2 dated earlier
2210.13695 (2022-10)
Structure-based Drug Design with Equivariant Diffusion Models
2302.04313 (2023-02)
Geometry-Complete Diffusion for 3D Molecule Generation and Optimization
rotation_matrix 2 other papers
2 dated earlier
2210.13695 (2022-10)
Structure-based Drug Design with Equivariant Diffusion Models
2302.04313 (2023-02)
Geometry-Complete Diffusion for 3D Molecule Generation and Optimization

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

Structure-based drug design has been accelerated by pocket-aware 3D generative models, yet most methods primarily fit the training distribution and may fall short of satisfying multiple properties required in real-world therapeutic drug discovery. Recently, increasing attention has focused on structure-based molecule optimization (SBMO), which targets fine-grained control over multiple specified molecular properties. In this paper, we present DePPA, a novel SBMO approach building upon Denoising Diffusion Policy Optimization for fine-tuning a pre-trained pocket-aware diffusion model via reinforcement learning. DePPA enables optimization over multiple properties, including binding affinity, drug-likeness, synthesizability and diversity. We formulate the reverse denoising process of the pretrained pocket-aware diffusion model as a multi-step Markov Decision Process, where the desired properties that serve as reward signals are evaluated on the final generated ligand molecules. DePPA incorporates a coarse denoising scheduler during the RL fine-tuning to achieve efficient and effective molecule optimization. Experimental results on the CrossDocked2020 benchmark demonstrate that DePPA outperforms baselines in binding affinity (Vina Score -8.5 kcal/mol), drug-likeness and diversity while exhibiting competitive performance in synthesizability. The source code is available at https://github.com/xy9485/DePPA.

For agents

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

get_harvested_code_for_paper("2605.17693")
get_code_for_paper("2605.17693")
have("2605.17693")

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

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

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

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

Connect an agent — have() is free.