SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.13643 · ICLR · 2025

Fine-Tuning Discrete Diffusion Models via Reward Optimization with Applications to DNA and Protein Design

U Berkeley, Sergey Levine, Tommi Jaakkola, Aviv Regev, Masatoshi Uehara, Hanchen Wang, Tommaso Biancalani, Genentech, Chenyu Wang, Yichun He, Amy Wang, Avantika Lal

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 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/2410.13643.json · badge: /api/ran/2410.13643.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
chenyuwang-monica/drakes canonical (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
FunctionStatusWhere it lives
batch_dna_detokenize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chenyuwang-monica/drakes/drakes_dna/dataloader_gosai.py
pointer only (licence: NONE); the stored copy get_code serves, from ChenyuWang-Monica/DRAKES, is pointer only (licence: NONE) · get_code("4ec57ee85c940684")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenyuwang-monica/drakes 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.

binary_discretization Ran
ran; our contract draft was wrong, not the code
chenyuwang-monica/drakes/drakes_dna/noise_schedule.py
pointer only (licence: NONE); the stored copy get_code serves, from ChenyuWang-Monica/DRAKES, is pointer only (licence: NONE) · get_code("9b9814cca50339d7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenyuwang-monica/drakes 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.

dna_detokenize Ran
ran; our contract draft was wrong, not the code
chenyuwang-monica/drakes/drakes_dna/dataloader_gosai.py
pointer only (licence: NONE); the stored copy get_code serves, from ChenyuWang-Monica/DRAKES, is pointer only (licence: NONE) · get_code("b988ba95b058558a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenyuwang-monica/drakes 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.

dna_tokenize Ran
ran, honoured the contract we drafted
chenyuwang-monica/drakes/drakes_dna/dataloader_gosai.py
pointer only (licence: NONE); the stored copy get_code serves, from ChenyuWang-Monica/DRAKES, is pointer only (licence: NONE) · get_code("733f359f0f876fb7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenyuwang-monica/drakes 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.

fsspec_exists Ran
ran, violated the contract we drafted
chenyuwang-monica/drakes/drakes_dna/utils.py
pointer only (licence: NONE) · get_code("dec1de00023a923b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenyuwang-monica/drakes 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.

get_logger Ran
ran; our contract draft was wrong, not the code
chenyuwang-monica/drakes/drakes_dna/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from ybseo-ac/prior_filter, is pointer only (licence: NONE) · get_code("60dbd956810fafb6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenyuwang-monica/drakes 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.

get_noise Ran
ran; our contract draft was wrong, not the code
chenyuwang-monica/drakes/drakes_dna/noise_schedule.py
pointer only (licence: NONE); the stored copy get_code serves, from ChenyuWang-Monica/DRAKES, is pointer only (licence: NONE) · get_code("fe6314378d2def00")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenyuwang-monica/drakes 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.

fsspec_listdir Not yet run
unverified (harvested, no recorded run)
chenyuwang-monica/drakes/drakes_dna/utils.py
pointer only (licence: NONE) · get_code("db0136eb80a50383")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenyuwang-monica/drakes 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. No invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 8 later) and 0 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
fsspec_exists 7 other papers
1 dated earlier, 6 later
2403.03234 (2024-03)
Caduceus: Bi-Directional Equivariant Long-Range DNA Sequence Modeling
2502.01384 (2025-02)
Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods
2505.18883 (2025-05)
Partition Generative Modeling: Masked Modeling Without Masks
and 4 more not named here
fsspec_listdir 6 other papers
1 dated earlier, 5 later
2403.03234 (2024-03)
Caduceus: Bi-Directional Equivariant Long-Range DNA Sequence Modeling
2502.01384 (2025-02)
Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods
2505.18883 (2025-05)
Partition Generative Modeling: Masked Modeling Without Masks
and 3 more not named here
get_noise 6 other papers
6 later · 1 only as an assembly brick
2502.01384 (2025-02)
Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods
2503.00307 (2025-03)
Remasking Discrete Diffusion Models with Inference-Time Scaling
2505.17384 (2025-05)
Variational Autoencoding Discrete Diffusion with Enhanced Dimensional Correlations Modeling
and 3 more not named here
binary_discretization 5 other papers
5 later
2412.10193 (2024-12)
Simple Guidance Mechanisms for Discrete Diffusion Models
2502.01384 (2025-02)
Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods
2505.18883 (2025-05)
Partition Generative Modeling: Masked Modeling Without Masks
and 2 more not named here
batch_dna_detokenize 3 other papers
3 later
2502.01384 (2025-02)
Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods
2510.00502 (2025-10)
Diffusion Alignment as Variational Expectation-Maximization
2601.19232 (2026-01)
Structure-based RNA Design by Step-wise Optimization of Latent Diffusion Model
dna_detokenize 3 other papers
3 later
2502.01384 (2025-02)
Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods
2510.00502 (2025-10)
Diffusion Alignment as Variational Expectation-Maximization
2601.19232 (2026-01)
Structure-based RNA Design by Step-wise Optimization of Latent Diffusion Model
dna_tokenize 3 other papers
3 later
2502.01384 (2025-02)
Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods
2510.00502 (2025-10)
Diffusion Alignment as Variational Expectation-Maximization
2601.19232 (2026-01)
Structure-based RNA Design by Step-wise Optimization of Latent Diffusion Model
get_logger 3 other papers
3 later
2502.01384 (2025-02)
Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods
2505.18883 (2025-05)
Partition Generative Modeling: Masked Modeling Without Masks
2509.18577 (2025-09)
Prior-based Noisy Text Data Filtering: Fast and Strong Alternative For Perplexity

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

Recent studies have demonstrated the strong empirical performance of diffusion models on discrete sequences (i.e., discrete diffusion models) across domains from natural language to biological sequence generation. For example, in the protein inverse folding task, where the goal is to generate a protein sequence from a given backbone structure, conditional diffusion models have achieved impressive results in generating natural-like sequences that fold back into the original structure. However, practical design tasks often require not only modeling a conditional distribution but also optimizing specific task objectives. For instance, in the inverse folding task, we may prefer protein sequences with high stability. To address this, we consider the scenario where we have pre-trained discrete diffusion models that can generate natural-like sequences, as well as reward models that map sequences to task objectives. We then formulate the reward maximization problem within discrete diffusion models, analogous to reinforcement learning (RL), while minimizing the KL divergence against pretrained diffusion models to preserve naturalness. To solve this RL problem, we propose a novel algorithm, DRAKES, that enables direct backpropagation of rewards through entire trajectories generated by diffusion models, by making the originally nondifferentiable trajectories differentiable using the Gumbel-Softmax trick. Our theoretical analysis indicates that our approach can generate sequences that are both natural-like (i.e., have a high probability under a pretrained model) and yield high rewards. While similar tasks have been recently explored in diffusion models for continuous domains, our work addresses unique algorithmic and theoretical challenges specific to discrete diffusion models, which arise from their foundation in continuous-time Markov chains rather than Brownian motion. Finally, we demonstrate the effectiveness of our algorithm in generating DNA and protein sequences that optimize enhancer activity and protein stability, respectively, important tasks for gene therapies and protein-based therapeutics. The code is available at https://github.com/ChenyuWang-Monica/DRAKES.

For agents

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

get_harvested_code_for_paper("2410.13643")
get_code_for_paper("2410.13643")
have("2410.13643")

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

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

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

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

Connect an agent — have() is free.