SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.04635 · AAAI · 2023

Diffusing Gaussian Mixtures for Generating Categorical Data

Mark Coates, Florence Regol

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 2 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/2303.04635.json · badge: /api/ran/2303.04635.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
networkslab/gmcd canonical (classifier label)
classifier basis not recorded on the link
5 ran · 2 no recorded run
FunctionStatusWhere it lives
get_key_from_pos_k Ran
ran on a synthesized input
networkslab/gmcd/src/metrics.py
code served (permissive licence) · get_code("9547a8dd87a34b07")
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)

# Analyzing the function:
# def get_key_from_pos_k(i, k):
#     return str(int(float(i))) + '_' + str(int(float(k)))
#
# The function takes two parameters:
# - i: converted to float, then int, then str
# - k: converted to float, then int, then str
# Both can be scalars, tensors, or anything convertible to float

# Creating valid arguments
i_value = 42.7  # A float that will become 42 when converted
k_value = 3.2   # A float that will become 3 when converted

ARGS = {
    'i': i_value,
    'k': k_value
}
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
get_key_from_pos_k1k2 Ran
ran on a synthesized input
networkslab/gmcd/src/metrics.py
code served (permissive licence) · get_code("4dfec81a8183bd5f")
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

def get_key_from_pos_k(i, k):
    return str(int(float(i))) + '_' + str(int(float(k)))

def get_key_from_pos_k1k2(i, j, k_1, k_2):
    pos_key_k1 = get_key_from_pos_k(i, k_1)
    pos_key_k2 = get_key_from_pos_k(j, k_2)
    pos_pair_key = pos_key_k1 + ':' + pos_key_k2
    return pos_pair_key

torch.manual_seed(0)

ARGS = {
    'i': 5.7,
    'j': 3.2,
    'k_1': 2.1,
    'k_2': 7.9
}
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
get_param_val Ran
ran on a synthesized input
networkslab/gmcd/src/mutils.py
code served (permissive licence) · get_code("77d0f4dd52c30fc6")
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

torch.manual_seed(0)

# Setup for get_param_val function
param_dict = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 100,
    'model_type': 'transformer'
}

ARGS = {
    'param_dict': param_dict,
    'key': 'learning_rate',
    'default_val': 0.0001,
    'allow_default': True,
    'error_location': 'model_config',
    'warning_if_default': 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 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
get_sampling_stat_if_not_too_long Ran
ran on a synthesized input
networkslab/gmcd/src/train_helper.py
code served (permissive licence) · get_code("1d8b62769fe4cbfd")
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 dict. 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 MockEvaluator:
    """Mock evaluate_sample callable that tracks num_samples and return_empty"""
    def __call__(self, num_samples=0, return_empty=False):
        if return_empty:
            return {"status": "empty", "num_samples": 0}
        else:
            return {"status": "evaluated", "num_samples": num_samples}

ARGS = {
    "time_for_sampling": 1.5,
    "train_time_avg": 0.5,
    "loss_freq": 10,
    "evaluate_sample": MockEvaluator(),
    "NUM_SAMPLES": 100,
    "overide": 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
single_pos_freq Ran
ran on a synthesized input
networkslab/gmcd/src/metrics.py
code served (permissive licence) · get_code("d78a77d34cd7b627")
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 dict. 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)

# Create a small tensor with shape (num_samples=2, S=4)
# The function expects seq to have .shape attribute and support indexing
# Values should be convertible to int via int(float(x))
seq = torch.tensor([
    [0, 1, 2, 1],
    [1, 0, 1, 2]
], dtype=torch.float32)

ARGS = {
    "seq": seq
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
load_model Not yet run
unverified (harvested, no recorded run)
networkslab/gmcd/src/mutils.py
code served (permissive licence) · get_code("b489ebfbb742d529")
How it ran

no invocation recorded.

prepare_checkpoint Not yet run
unverified (harvested, no recorded run)
networkslab/gmcd/src/train_helper.py
code served (permissive licence) · get_code("1a4e54b08183a91e")
How it ran

no invocation recorded.

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, 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 7 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

Learning a categorical distribution comes with its own set of challenges. A successful approach taken by state-of-theart works is to cast the problem in a continuous domain to take advantage of the impressive performance of the generative models for continuous data. Amongst them are the recently emerging diffusion probabilistic models, which have the observed advantage of generating high-quality samples. Recent advances for categorical generative models have focused on log likelihood improvements. In this work, we propose a generative model for categorical data based on diffusion models with a focus on high-quality sample generation, and propose sampled-based evaluation methods. The efficacy of our method stems from performing diffusion in the continuous domain while having its parameterization informed by the structure of the categorical nature of the target distribution. Our method of evaluation highlights the capabilities and limitations of different generative models for generating categorical data, and includes experiments on synthetic and real-world protein datasets.

For agents

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

get_harvested_code_for_paper("2303.04635")
get_code_for_paper("2303.04635")
have("2303.04635")

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

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

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

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

Connect an agent — have() is free.