SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.20626 · 2024

TabDiff: a Mixed-type Diffusion Model for Tabular Data Generation

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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 1 has no contract verdict; 5 failures of our instrument; 1 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/2410.20626.json · badge: /api/ran/2410.20626.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
minkaixu/tabdiff canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_rmse Ran
ran, violated the contract we drafted
minkaixu/tabdiff/src/metrics.py
code served (permissive licence) · get_code("4f4e2f7296660ddd")
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 numpy as np

np.random.seed(0)

# Create sample data for y_true and y_pred
y_true = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
y_pred = np.array([1.1, 2.2, 2.9, 4.1, 4.8])

# Create a standard deviation value
std = 2.0

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "std": std
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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_category_sizes Ran
ran, honoured the contract we drafted
minkaixu/tabdiff/src/data.py
code served (permissive licence) · get_code("4d744cd924d61d6f")
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 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 numpy as np

torch.manual_seed(0)

# The function get_category_sizes takes X which can be either a torch.Tensor or np.ndarray
# It transposes X and converts to a list, then counts unique values in each row
# We need to create test data with categorical values

# Create a torch.Tensor with categorical values (batch_size=2, num_features=4)
X_torch = torch.tensor([
    [0, 1, 0, 2],
    [1, 1, 2, 0]
], dtype=torch.long)

# Create an np.ndarray with categorical values (batch_size=2, num_features=4)
X_numpy = np.array([
    [0, 1, 0, 2],
    [1, 1, 2, 0]
], dtype=np.int32)

# Test with torch.Tensor
ARGS = {
    "X": X_torch
}
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 list, ndim 1, 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
get_column_name_mapping Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
minkaixu/tabdiff/process_dataset.py
code served (permissive licence) · get_code("0a6d3b3a16b9f56c")
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 numpy as np
import pandas as pd

# Create a simple DataFrame with mixed column types
data_df = pd.DataFrame({
    'num_col_1': [1.0, 2.0, 3.0],
    'num_col_2': [4.0, 5.0, 6.0],
    'cat_col_1': ['a', 'b', 'c'],
    'cat_col_2': ['x', 'y', 'z'],
    'target_col': [0, 1, 0]
})

# Define indices for different column types
num_col_idx = [0, 1]  # indices of numerical columns
cat_col_idx = [2, 3]  # indices of categorical columns
target_col_idx = [4]  # indices of target columns

# Column names can be None (will use df.columns) or explicitly provided
column_names = None

ARGS = {
    'data_df': data_df,
    'num_col_idx': num_col_idx,
    'cat_col_idx': cat_col_idx,
    'target_col_idx': target_col_idx,
    'column_names': column_names
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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_path Ran
ran; our contract draft was wrong, not the code
minkaixu/tabdiff/src/env.py
code served (permissive licence) · get_code("eac7b341abfe7944")
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 PosixPath. 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 typing as ty
from pathlib import Path
import tempfile
import os

PROJ = Path('tab-ddpm/').absolute().resolve()

def get_path(path: ty.Union[str, Path]) -> Path:
    if isinstance(path, str):
        path = Path(path)
    if not path.is_absolute():
        path = PROJ / path
    return path.resolve()

# Create a temporary directory to work with
temp_dir = tempfile.mkdtemp()

# Test with a relative path string
relative_path_str = "data/dataset.csv"

# Test with a relative path Path object
relative_path_obj = Path("models/checkpoint.pt")

# Test with an absolute path string
absolute_path_str = os.path.join(temp_dir, "absolute_file.txt")

# Test with an absolute path Path object
absolute_path_obj = Path(temp_dir) / "another_file.pt"

# ARGS dict with a relative string path as the primary test case
ARGS = {
    "path": relative_path_str
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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_relative_path Ran
ran; our contract draft was wrong, not the code
minkaixu/tabdiff/src/env.py
code served (permissive licence) · get_code("170e57097113c6f4")
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 PosixPath. 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 typing as ty
from pathlib import Path

PROJ = Path('tab-ddpm/').absolute().resolve()

def get_path(path: ty.Union[str, Path]) -> Path:
    if isinstance(path, str):
        path = Path(path)
    if not path.is_absolute():
        path = PROJ / path
    return path.resolve()

def get_relative_path(path: ty.Union[str, Path]) -> Path:
    return get_path(path).relative_to(PROJ)

# Setup code
ARGS = {
    "path": "data/train.csv"
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
reorder Ran
ran; our contract draft was wrong, not the code
minkaixu/tabdiff/tabdiff/metrics.py
code served (permissive licence) · get_code("d8b268750aea91e4")
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 pandas as pd
from copy import deepcopy

# Create sample real and synthetic data
real_data = pd.DataFrame({
    0: [1.0, 2.0],
    1: [3.0, 4.0],
    2: ['a', 'b'],
    3: ['x', 'y'],
    4: [0, 1]
})

syn_data = pd.DataFrame({
    0: [1.5, 2.5],
    1: [3.5, 4.5],
    2: ['a', 'b'],
    3: ['x', 'y'],
    4: [0, 1]
})

# Create info dict with required structure
info = {
    'num_col_idx': [0, 1],
    'cat_col_idx': [2, 3],
    'target_col_idx': [4],
    'task_type': 'regression',
    'metadata': {
        'columns': {
            0: {'name': 'feature_0', 'type': 'numerical'},
            1: {'name': 'feature_1', 'type': 'numerical'},
            2: {'name': 'feature_2', 'type': 'categorical'},
            3: {'name': 'feature_3', 'type': 'categorical'},
            4: {'name': 'target', 'type': 'numerical'}
        }
    },
    'inverse_idx_mapping': {0: 0, 1: 1, 2: 2, 3: 3, 4: 4}
}

ARGS = {
    'real_data': real_data,
    'syn_data': syn_data,
    'info': info
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
split_num_cat_target Ran
ran on a synthesized input
minkaixu/tabdiff/tabdiff/trainer.py
code served (permissive licence) · get_code("75eed0dcd137f0e0")
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 torch
import numpy as np

torch.manual_seed(0)

# Create mock inverse transformation functions
def num_inverse(x):
    """Mock inverse for numerical features - returns numpy array"""
    return np.array(x) * 2.0

def int_inverse(x):
    """Mock inverse for integer features - returns numpy array"""
    return np.array(x) + 1.0

def cat_inverse(x):
    """Mock inverse for categorical features - returns numpy array"""
    return np.array(x)

# Create synthetic data
# Structure: [numerical features | categorical features]
# We'll have 3 numerical cols, 2 categorical cols, and 1 target col
# For regression: target is numerical, so 4 num features total + 2 cat = 6 cols
# For classification: target is categorical, so 3 num features + 3 cat = 6 cols

# Let's do a regression case: 4 num features (3 + 1 target) + 2 cat = 6 total
batch_size = 2
n_num_feat_base = 3
n_cat_feat = 2
n_target = 1

# Create data with shape (batch_size, n_num_feat_base + n_cat_feat + n_target)
# But organized as: [num_features | cat_features | target_as_num]
syn_data = np.random.randn(batch_size, n_num_feat_base + n_cat_feat + n_target).astype(np.float32)

info = {
    'task_type': 'regression',
    'num_col_idx': [0, 1, 2],  # indices of numerical columns
    'cat_col_idx': [3, 4],      # indices of categorical columns
    'target_col_idx': [5],      # index of target column (will be treated as numerical in regression)
}

ARGS = {
    'syn_data': syn_data,
    'info': info,
    'num_inverse': num_inverse,
    'int_inverse': int_inverse,
    'cat_inverse': cat_inverse,
}
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 — 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
train_val_test_split Ran
ran; our contract draft was wrong, not the code
minkaixu/tabdiff/process_dataset.py
code served (permissive licence) · get_code("e034defca8827e6c")
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
import pandas as pd

# Create a small dataframe with categorical columns
np.random.seed(0)
data = {
    'cat1': ['A', 'B', 'C', 'A', 'B', 'C', 'A', 'B'],
    'cat2': ['X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y'],
    'num1': np.random.randn(8)
}
data_df = pd.DataFrame(data)

cat_columns = ['cat1', 'cat2']
num_train = 5
num_test = 2

ARGS = {
    'data_df': data_df,
    'cat_columns': cat_columns,
    'num_train': num_train,
    'num_test': num_test
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
recover_data Not yet run
unverified (harvested, no recorded run)
minkaixu/tabdiff/tabdiff/trainer.py
code served (permissive licence) · get_code("0110658cf954b46a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 6 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 6 later) and 3 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_category_sizes 3 other papers
2 dated earlier, 1 later
2209.15421 (2022-09)
TabDDPM: Modelling Tabular Data with Diffusion Models
2211.16887 (2022-11)
T2G-Former: Organizing Tabular Features into Relation Graphs Promotes Heterogeneous Feature Interaction
2601.22816 (2026-01)
Cascaded Flow Matching for Heterogeneous Tabular Data with Mixed-Type Features
get_path 3 other papers
2 dated earlier, 1 later
2209.15421 (2022-09)
TabDDPM: Modelling Tabular Data with Diffusion Models
2211.16887 (2022-11)
T2G-Former: Organizing Tabular Features into Relation Graphs Promotes Heterogeneous Feature Interaction
2601.22816 (2026-01)
Cascaded Flow Matching for Heterogeneous Tabular Data with Mixed-Type Features
get_relative_path 3 other papers
2 dated earlier, 1 later
2209.15421 (2022-09)
TabDDPM: Modelling Tabular Data with Diffusion Models
2211.16887 (2022-11)
T2G-Former: Organizing Tabular Features into Relation Graphs Promotes Heterogeneous Feature Interaction
2601.22816 (2026-01)
Cascaded Flow Matching for Heterogeneous Tabular Data with Mixed-Type Features
get_column_name_mapping 1 other paper
1 later
2603.23016 (2026-03)
A Sobering Look at Tabular Data Generation via Probabilistic Circuits
recover_data 1 other paper
1 later
2504.04798 (2025-04)
TabRep: Training Tabular Diffusion Models with a Simple and Effective Continuous Representation
train_val_test_split 1 other paper
1 later
2603.23016 (2026-03)
A Sobering Look at Tabular Data Generation via Probabilistic Circuits

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

Synthesizing high-quality tabular data is an important topic in many data science tasks, ranging from dataset augmentation to privacy protection. However, developing expressive generative models for tabular data is challenging due to its inherent heterogeneous data types, complex inter-correlations, and intricate column-wise distributions. In this paper, we introduce TabDiff, a joint diffusion framework that models all mixed-type distributions of tabular data in one model. Our key innovation is the development of a joint continuous-time diffusion process for numerical and categorical data, where we propose feature-wise learnable diffusion processes to counter the high disparity of different feature distributions. TabDiff is parameterized by a transformer handling different input types, and the entire framework can be efficiently optimized in an end-to-end fashion. We further introduce a mixed-type stochastic sampler to automatically correct the accumulated decoding error during sampling, and propose classifier-free guidance for conditional missing column value imputation. Comprehensive experiments on seven datasets demonstrate that TabDiff achieves superior average performance over existing competitive baselines across all eight metrics, with up to $22.5\%$ improvement over the state-of-the-art model on pair-wise column correlation estimations. Code is available at https://github.com/MinkaiXu/TabDiff.

For agents

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

get_harvested_code_for_paper("2410.20626")
get_code_for_paper("2410.20626")
have("2410.20626")

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

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

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

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

Connect an agent — have() is free.