SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.10193 · ICLR · 2025

Simple Guidance Mechanisms for Discrete Diffusion Models

Alexander Rush, Yair Schiff, Thomas Pierrot, Volodymyr Kuleshov, Subham Sahoo, Hao Phung, Guanghan Wang, Hugo Dalla-Torre, Sam Boshar, Bernardo De Almeida

arXiv · PDF · Open in the Atlas

Code that ran

18 of 23 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 14 failures of our instrument; 5 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/2412.10193.json · badge: /api/ran/2412.10193.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
kuleshov-group/discrete-diffusion-guidance canonical (classifier label)
classifier basis: census
14 ran · 1 no recorded run
w86763777/pytorch-image-generation-metrics canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
FunctionStatusWhere it lives
bias_dropout_add_scale Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kuleshov-group/discrete-diffusion-guidance/models/dit.py
code served (permissive licence) · get_code("c0f26d4e2599cc88")
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 2, dtype family float, shape (2, 4) 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 torch.nn.functional as F

torch.manual_seed(0)

# Create small test tensors
batch_size = 2
dim = 4

x = torch.randn(batch_size, dim)
bias = torch.randn(batch_size, dim)
scale = torch.randn(1)
residual = torch.randn(batch_size, dim)
prob = 0.5
training = True

ARGS = {
    "x": x,
    "bias": bias,
    "scale": scale,
    "residual": residual,
    "prob": prob,
    "training": training,
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
binary_discretization Ran
ran; our contract draft was wrong, not the code
kuleshov-group/discrete-diffusion-guidance/noise_schedule.py
pointer only (licence: Apache-2.0); 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: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ChenyuWang-Monica/DRAKES, 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.

compute_kmer_frequencies Ran
ran; our contract draft was wrong, not the code
kuleshov-group/discrete-diffusion-guidance/guidance_eval/ten_species_eval.py
code served (permissive licence) · get_code("91e57aeb1d43de7c")
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 2, 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 numpy as np

# Define ARGS for compute_kmer_frequencies
ARGS = {
    "seqs": ["AGCT", "AAAA", "CGTA"],
    "kmer_length": 2
}
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 tuple, ndim 2, 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
cross_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kuleshov-group/discrete-diffusion-guidance/models/dimamba.py
code served (permissive licence) · get_code("487d2cdc607e7b22")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create logits: shape (batch_size, num_classes)
# batch_size=2, num_classes=4
logits = torch.randn(2, 4)

# Create target labels: shape (batch_size,)
# Values should be in range [0, num_classes) or ignore_index
y = torch.tensor([0, 2], dtype=torch.long)

# Create ignore_index parameter
ignore_index = -100

ARGS = {
    "logits": logits,
    "y": y,
    "ignore_index": ignore_index,
}
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
default_init Ran
ran; our contract draft was wrong, not the code
kuleshov-group/discrete-diffusion-guidance/models/unet.py
code served (permissive licence) · get_code("fdd6aad96accd488")
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 torch
import numpy as np

torch.manual_seed(0)

# The function `default_init` takes a single parameter `scale`
# It returns a variance_scaling initializer function
# The returned function is designed to be called with a shape tensor

ARGS = {
    'scale': 1.0
}
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 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
gather Ran
ran, honoured the contract we drafted
w86763777/pytorch-image-generation-metrics/pytorch_image_generation_metrics/districuted.py
code served (permissive licence) · get_code("7ab4a7f63870dca5")
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 2, dtype family float, shape (2, 4) 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 torch.nn as nn

torch.manual_seed(0)

# The function gather() takes a tensor and a cat_dim parameter
# Looking at the body:
# - x is used as a torch.Tensor with .shape, .device attributes
# - cat_dim is used as an int for indexing and torch.cat()
# The function works with or without distributed initialization (we won't initialize it)

# Create a small test tensor with distinct dimensions
x = torch.randn(2, 4)  # batch=2, features=4

ARGS = {
    "x": x,
    "cat_dim": 0,
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
gather_shape Ran
ran, honoured the contract we drafted
w86763777/pytorch-image-generation-metrics/pytorch_image_generation_metrics/districuted.py
code served (permissive licence) · get_code("91c463290b953631")
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 list, ndim 2, dtype family int; 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.distributed

torch.manual_seed(0)

# The function gather_shape takes a tensor and a dimension
# It gathers shapes along that dimension from all processes
# Since we're not initializing distributed training, world_size() returns 1
# and the function just returns [x.shape]

x = torch.randn(2, 4, 3)
dim = 0

ARGS = {
    "x": x,
    "dim": dim,
}
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 list, ndim 2, dtype family int — a list 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
generate_ordered_kmers Ran
ran; our contract draft was wrong, not the code
kuleshov-group/discrete-diffusion-guidance/guidance_eval/ten_species_eval.py
code served (permissive licence) · get_code("7ba4266c8072c406")
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 list, 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 itertools
import typing

def kmer_to_index(kmer: str) -> int:
    """
  Function that converts a given kmer to a unique value
  system.

  Args:
      kmer (str): The given kmer

  Returns:
      int: The associated unique value

  Example:
      >>> kmer_to_index("AAC")
      1

  """
    mapping = {'A': 0, 'C': 1, 'G': 2, 'T': 3}
    index = 0
    for char in kmer:
        index = index * 4 + mapping[char]
    return index

def generate_ordered_kmers(kmer_length: int) -> typing.List[str]:
    """
  Function that generates all kmers of a given length and orders them by their index
  defined by the kmer_to_index function.

  Args:
      kmer_length (int): The length of the kmers to generate

  Returns:
      List[str]: A list of all kmers of the given length ordered by their index
  """
    characters = ['A', 'C', 'G', 'T']
    kmers = [''.join(kmer) for kmer in itertools.product(characters, repeat=kmer_length)]
    ordered_kmers = sorted(kmers, key=kmer_to_index)
    return ordered_kmers


ARGS = {
    'kmer_length': 3
}
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 list, ndim 1, dtype family float — a list 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_bias_dropout_add_scale Ran
ran; our contract draft was wrong, not the code
kuleshov-group/discrete-diffusion-guidance/models/dit.py
code served (permissive licence) · get_code("ea21d1c58225a226")
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 torch
import torch.nn.functional as F
import typing

torch.manual_seed(0)

# Define ARGS dict for get_bias_dropout_add_scale
ARGS = {
    "training": True
}
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 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
get_noise Ran
ran; our contract draft was wrong, not the code
kuleshov-group/discrete-diffusion-guidance/noise_schedule.py
code served (permissive licence) · get_code("63ffe982a59e3d2c")
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 Linear. 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 torch.nn as nn

torch.manual_seed(0)

class Config:
    def __init__(self, noise_type, sigma_min=0.001, sigma_max=1.0):
        self.noise = NoiseConfig(noise_type, sigma_min, sigma_max)

class NoiseConfig:
    def __init__(self, noise_type, sigma_min=0.001, sigma_max=1.0):
        self.type = noise_type
        self.sigma_min = sigma_min
        self.sigma_max = sigma_max

config_geometric = Config('geometric', sigma_min=0.001, sigma_max=1.0)
config_loglinear = Config('loglinear')
config_cosine = Config('cosine')
config_cosinesqr = Config('cosinesqr')
config_linear = Config('linear', sigma_min=0.0, sigma_max=10.0)

ARGS = {
    'config': config_linear,
    'dtype': torch.float32,
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
kmer_to_index Ran
ran, honoured the contract we drafted
kuleshov-group/discrete-diffusion-guidance/guidance_eval/ten_species_eval.py
code served (permissive licence) · get_code("812d7f03e99d6b42")
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

ARGS = {
    "kmer": "AAC"
}
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 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
lm1b_detokenizer Ran
ran; our contract draft was wrong, not the code
kuleshov-group/discrete-diffusion-guidance/dataloader.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jdeschena/blockgen, is pointer only (licence: NONE) · get_code("576e1b9b9bcae8ff")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from jdeschena/blockgen, 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.

modulate Ran
ran, honoured the contract we drafted
kuleshov-group/discrete-diffusion-guidance/models/dit.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from hxixixh/gumbel-distill, is pointer only (licence: NONE) · get_code("78b555034273f3c7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from hxixixh/gumbel-distill, 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.

sqrt_newton_schulz Ran
ran; our contract draft was wrong, not the code
w86763777/pytorch-image-generation-metrics/pytorch_image_generation_metrics/core.py
code served (permissive licence) · get_code("2dfa8886e774088c")
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 3, dtype family float, shape (2, 4, 4) 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)

# Create a small batch of symmetric positive definite matrices
# Shape: (batch_size, dim, dim)
batch_size = 2
dim = 4

# Create random matrices and make them symmetric positive definite
# by computing A = M^T @ M for random M
M = torch.randn(batch_size, dim, dim)
A = torch.bmm(M.transpose(1, 2), M)

numIters = 3
dtype = None

ARGS = {
    "A": A,
    "numIters": numIters,
    "dtype": dtype,
}
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 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 4) 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
torch_cov Ran
ran; our contract draft was wrong, not the code
w86763777/pytorch-image-generation-metrics/pytorch_image_generation_metrics/core.py
code served (permissive licence) · get_code("7f018aa22ac761c4")
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 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 torch

torch.manual_seed(0)

# Create a 2-D tensor with shape (3, 5) - 3 variables, 5 observations
m = torch.randn(3, 5)

ARGS = {
    "m": m,
    "rowvar": 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 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
transformer_timestep_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kuleshov-group/discrete-diffusion-guidance/models/unet.py
code served (permissive licence) · get_code("c40a24e67f67c90e")
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 2, dtype family float, shape (2, 4) 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 math

torch.manual_seed(0)

# Analyze the function:
# - timesteps: 1D tensor of shape (batch_size,)
# - embedding_dim: int, dimension of output embedding
# - max_positions: int with default 10000

ARGS = {
    "timesteps": torch.tensor([0, 5], dtype=torch.long),
    "embedding_dim": 4,
    "max_positions": 10000,
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
variance_scaling Ran
ran; our contract draft was wrong, not the code
kuleshov-group/discrete-diffusion-guidance/models/unet.py
code served (permissive licence) · get_code("3ac11bfe0ae80195")
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 torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    'scale': 2.0,
    'mode': 'fan_in',
    'distribution': 'normal',
    'in_axis': 1,
    'out_axis': 0,
    'dtype': torch.float32,
    'device': 'cpu'
}
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 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
weighted_cross_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kuleshov-group/discrete-diffusion-guidance/models/dimamba.py
code served (permissive licence) · get_code("65cdc9d10f6e1a05")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Construct arguments for weighted_cross_entropy

# logits: shape (batch_size, num_classes)
# batch_size=2, num_classes=4
logits = torch.randn(2, 4)

# y: shape (batch_size,) with class indices
# Values should be in range [0, num_classes) or ignore_index
y = torch.tensor([0, 2])

# loss_weights: shape (batch_size,) with positive weights
# Must have same length as flattened y
loss_weights = torch.tensor([1.0, 2.0])

# ignore_index: default value
ignore_index = -100

ARGS = {
    "logits": logits,
    "y": y,
    "loss_weights": loss_weights,
    "ignore_index": ignore_index
}
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
compute_sentiment_classifier_score Not yet run
unverified (harvested, no recorded run)
kuleshov-group/discrete-diffusion-guidance/guidance_eval/amazon_polarity_eval.py
code served (permissive licence) · get_code("4dac586070ccdff9")
How it ran

no invocation recorded.

get_fid Not yet run
unverified (harvested, no recorded run)
w86763777/pytorch-image-generation-metrics/pytorch_image_generation_metrics/utils.py
code served (permissive licence) · get_code("3fd8d7b12bca9c19")
How it ran

no invocation recorded.

get_inception_feature Not yet run
unverified (harvested, no recorded run)
w86763777/pytorch-image-generation-metrics/pytorch_image_generation_metrics/core.py
code served (permissive licence) · get_code("0f88713afaab9235")
How it ran

no invocation recorded.

get_inception_score_and_fid Not yet run
unverified (harvested, no recorded run)
w86763777/pytorch-image-generation-metrics/pytorch_image_generation_metrics/utils.py
code served (permissive licence) · get_code("65940a24bb9ed8f6")
How it ran

no invocation recorded.

get_inception_score_and_fid_from_directory Not yet run
unverified (harvested, no recorded run)
w86763777/pytorch-image-generation-metrics/pytorch_image_generation_metrics/utils.py
code served (permissive licence) · get_code("69c2b0660306d29c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 1 the same month, 9 later) and 12 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
variance_scaling 28 other papers
22 dated earlier, 2 the same month, 4 later
2106.05527 (2021-06)
Soft Truncation: A Universal Training Technique of Score-based Diffusion Model for High Precision Score Estimation
2110.05243 (2021-10)
Score-based diffusion models for accelerated MRI
2205.01490 (2022-05)
Subspace Diffusion Generative Models
and 25 more not named here
torch_cov 12 other papers
12 dated earlier
1406.2661 (2014-06)
Generative Adversarial Networks
1811.10597 (2018-11)
GAN Dissection: Visualizing and Understanding Generative Adversarial Networks
1912.05270 (2019-12)
MineGAN: effective knowledge transfer from GANs to target domains with few images
and 9 more not named here
lm1b_detokenizer 11 other papers
2 dated earlier, 9 later
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2406.03736 (2024-06)
Your Absorbing Discrete Diffusion Secretly Models the Conditional Distributions of Clean Data
2503.09573 (2025-03)
BLOCK DIFFUSION: INTERPOLATING BETWEEN AU-TOREGRESSIVE AND DIFFUSION LANGUAGE MODELS
and 8 more not named here
modulate 9 other papers
1 dated earlier, 8 later · 1 only as an assembly brick
2410.21035 (2024-10)
Beyond Autoregression: Fast LLMs via Self-Distillation Through Time
2503.09573 (2025-03)
BLOCK DIFFUSION: INTERPOLATING BETWEEN AU-TOREGRESSIVE AND DIFFUSION LANGUAGE MODELS
2505.18883 (2025-05)
Partition Generative Modeling: Masked Modeling Without Masks
and 6 more not named here
default_init 8 other papers
7 dated earlier, 1 later
2206.11892 (2022-06)
DDPM-CD: Denoising Diffusion Probabilistic Models as Feature Extractors for Change Detection
2211.13449 (2022-11)
Fast Sampling of Diffusion Models via Operator Learning
2305.19693 (2023-05)
Spontaneous Symmetry Breaking in Generative Diffusion Models
and 5 more not named here
get_bias_dropout_add_scale 8 other papers
3 dated earlier, 5 later
2310.16834 (2023-10)
Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution
2405.20971 (2024-05)
Amortizing intractable inference in diffusion models for vision, language, and control
2410.21035 (2024-10)
Beyond Autoregression: Fast LLMs via Self-Distillation Through Time
and 5 more not named here
cross_entropy 6 other papers
2 dated earlier, 4 later
2305.04120 (2023-05)
A Latent Diffusion Model for Protein Structure Generation
2403.03234 (2024-03)
Caduceus: Bi-Directional Equivariant Long-Range DNA Sequence Modeling
2505.17257 (2025-05)
JanusDNA: A Powerful Bi-directional Hybrid DNA Foundation Model
and 3 more not named here
weighted_cross_entropy 6 other papers
2 dated earlier, 4 later
2305.04120 (2023-05)
A Latent Diffusion Model for Protein Structure Generation
2403.03234 (2024-03)
Caduceus: Bi-Directional Equivariant Long-Range DNA Sequence Modeling
2505.17257 (2025-05)
JanusDNA: A Powerful Bi-directional Hybrid DNA Foundation Model
and 3 more not named here
binary_discretization 5 other papers
1 dated earlier, 4 later
2410.13643 (2024-10)
Fine-Tuning Discrete Diffusion Models via Reward Optimization with Applications to DNA and Protein Design
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
sqrt_newton_schulz 5 other papers
5 dated earlier
2305.19638 (2023-05)
A Unified Framework for U-Net Design and Analysis
2310.03337 (2023-10)
Denoising Diffusion Step-aware Models
2310.11440 (2023-10)
EvalCrafter: Benchmarking and Evaluating Large Video Generation Models
and 2 more not named here
transformer_timestep_embedding 4 other papers
3 dated earlier, 1 later · 1 only as an assembly brick
2402.04997 (2024-02)
Generative Flows on Discrete State-Spaces: Enabling Multimodal Flows with Applications to Protein Co-Design
2410.06264 (2024-10)
Think While You Generate: Discrete Diffusion with Planned Denoising
2410.08709 (2024-10)
Distillation of Discrete Diffusion through Dimensional Correlations
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-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

Diffusion models for continuous data gained widespread adoption owing to their high quality generation and control mechanisms. However, controllable diffusion on discrete data faces challenges given that continuous guidance methods do not directly apply to discrete diffusion. Here, we provide a straightforward derivation of classifier-free and classifier-based guidance for discrete diffusion, as well as a new class of diffusion models that leverage uniform noise and that are more guidable because they can continuously edit their outputs. We improve the quality of these models with a novel continuous-time variational lower bound that yields state-of-the-art performance, especially in settings involving guidance or fast generation. Empirically, we demonstrate that our guidance mechanisms combined with uniform noise diffusion improve controllable generation relative to autoregressive and diffusion baselines on several discrete data domains, including genomic sequences, small molecule design, and discretized image generation. Code to reproduce our experiments is available here.

For agents

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

get_harvested_code_for_paper("2412.10193")
get_code_for_paper("2412.10193")
have("2412.10193")

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

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

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

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

Connect an agent — have() is free.