SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.20690 · ICLR · 2025

DiffPuter: Empowering Diffusion Models for Missing Data Imputation

Qitian Wu, Hengrui Zhang, Philip Yu, Liancheng Fang

arXiv · PDF · Open in the Atlas

Code that ran

19 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 11 failures of our instrument; 3 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/2405.20690.json · badge: /api/ran/2405.20690.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
hengruizhang98/DiffPuter canonical (classifier label)
classifier basis: census
13 ran · 1 no recorded run
hezgit/TDM canonical (classifier label)
classifier basis: census
2 ran · 0 no recorded run
tydusky/remasker unrelated (classifier label)
classifier basis: classifier_2025
2 ran · 2 no recorded run
G-AILab/IGRM community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
ActiveEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
tydusky/remasker/model_mae.py
pointer only (licence: NONE) · get_code("4345e594c0696450")
How it ran

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

GCNLayer Ran
ran on a synthesized input · constructed an object; no result was computed
G-AILab/IGRM/training/gae.py
pointer only (licence: NONE) · get_code("2bf6368bf67d5224")
How it ran

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

MAE Ran
ran, honoured the contract we drafted
hezgit/TDM/utils.py
pointer only (licence: GPL-3.0) · get_code("8d036d1ee3960752")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, hezgit/TDM, is not in the permissive set Syntology serves inline. 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.

MAR_mask Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/generate_mask.py
code served (permissive licence) · get_code("045f0b1269a7b5bb")
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 numpy as np

torch.manual_seed(0)

# Create a small dataset: n=2 samples, d=4 features
X = torch.randn(2, 4, dtype=torch.float64)

# Parameters for MAR_mask
p = 0.3  # Proportion of missing values
p_obs = 0.5  # Proportion of variables with no missing values

ARGS = {
    "X": X,
    "p": p,
    "p_obs": p_obs,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, 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
MaskEmbed Ran
ran on a synthesized input
tydusky/remasker/model_mae.py
pointer only (licence: NONE) · get_code("8edce0e0984afeff")
How it ran

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

VGAE Ran
ran on a synthesized input · constructed an object; no result was computed
G-AILab/IGRM/training/gae.py
pointer only (licence: NONE) · get_code("745618f1f5017c7b")
How it ran

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

geglu Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/model.py
pointer only (licence: MIT); the stored copy get_code serves, from fangzy96/tabcutmix, is pointer only (licence: NONE) · get_code("49f8fe0655f00ee5")
How it ran

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

get_eval Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/dataset.py
code served (permissive licence) · get_code("2f212d29fbe5460e")
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 json
import tempfile
import os

# Create temporary dataset structure
temp_dir = tempfile.mkdtemp()
datasets_dir = os.path.join(temp_dir, 'datasets')
info_dir = os.path.join(datasets_dir, 'Info')
os.makedirs(info_dir, exist_ok=True)

# Create a mock info.json file
info_data = {
    'num_col_idx': [0, 1],
    'cat_col_idx': [2, 3]
}
info_path = os.path.join(info_dir, 'test_data.json')
with open(info_path, 'w') as f:
    json.dump(info_data, f)

# Monkey patch to redirect dataset loading
import builtins
original_open = builtins.open

def mock_open(*args, **kwargs):
    if 'datasets/Info/' in str(args[0]):
        return original_open(info_path, *args[1:], **kwargs)
    return original_open(*args, **kwargs)

builtins.open = mock_open

# Create test data
# X_recon: reconstructed data with num_num numerical columns followed by cat columns
# X_true: true data with num_num numerical columns followed by cat columns
# truth_cat_idx: categorical indices
# mask: binary mask indicating which values are observed

num_num = 2  # 2 numerical features
num_cat = 2  # 2 categorical features
num_samples = 5

X_recon = np.random.randn(num_samples, num_num + num_cat).astype(np.float32)
X_true = np.random.randn(num_samples, num_num + num_cat).astype(np.float32)
truth_cat_idx = np.random.randint(0, 3, size=(num_samples, num_cat))
mask = np.ones((num_samples, num_num + num_cat), dtype=np.int32)

cat_bin_num = [3, 3]  # Number of bins for each categorical variable

ARGS = {
    'dataname': 'test_data',
    'X_recon': X_recon,
    'X_true': X_true,
    'truth_cat_idx': truth_cat_idx,
    'num_num': num_num,
    'cat_bin_num': cat_bin_num,
    'mask': mask,
    'oos': False
}
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, 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_eval Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/baselines/data_utils.py
code served (permissive licence) · get_code("b1c68b94d50528a2")
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 json
import tempfile
import os

# Create temporary directory structure for DATA_DIR
temp_dir = tempfile.mkdtemp()
datasets_dir = os.path.join(temp_dir, 'datasets')
info_dir = os.path.join(datasets_dir, 'Info')
os.makedirs(info_dir, exist_ok=True)

# Create a sample info JSON file
info_data = {
    'num_col_idx': [0, 1],
    'cat_col_idx': [2, 3]
}
info_path = os.path.join(info_dir, 'test_data.json')
with open(info_path, 'w') as f:
    json.dump(info_data, f)

# Setup parameters
num_num = 2  # number of numeric columns
num_cat = 2  # number of categorical columns
num_samples = 2
cat_bin_num = np.array([2, 3])  # 2-bit and 3-bit encodings for 2 categories

# X_recon: batch_size x (num_num + sum(cat_bin_num))
# numeric part (2 cols) + binary encoded categorical (2+3=5 bits)
X_recon = np.random.rand(num_samples, num_num + 5).astype(np.float32)

# X_true: batch_size x num_num (only numeric columns stored here)
X_true = np.random.rand(num_samples, num_num).astype(np.float32)

# truth_cat_idx: batch_size x num_cat (true categorical indices)
truth_cat_idx = np.array([[1, 2], [0, 1]], dtype=np.int32)

# mask: batch_size x total_columns (num_num + num_cat)
# Indicates which values are observed (not missing)
mask = np.ones((num_samples, num_num + num_cat), dtype=bool)
mask[0, 0] = False  # one missing numeric value
mask[1, 2] = False  # one missing categorical value

ARGS = {
    'dataname': 'test_data',
    'X_recon': X_recon,
    'X_true': X_true,
    'truth_cat_idx': truth_cat_idx,
    'num_num': num_num,
    'cat_bin_num': cat_bin_num,
    'mask': mask,
    'DATA_DIR': datasets_dir
}
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, 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
impute_mask Ran
ran on a synthesized input
hengruizhang98/DiffPuter/diffusion_utils.py
code served (permissive licence) · get_code("329a8965f396e186")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np

torch.manual_seed(0)

class MockDiffusionNet(nn.Module):
    """Minimal diffusion network that implements the required interface."""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
        self.sigma_min = 0.002
        self.sigma_max = 80.0
    
    def forward(self, x, t):
        """
        Args:
            x: tensor of shape [batch, dim]
            t: scalar tensor (sigma value)
        Returns:
            denoised tensor of shape [batch, dim]
        """
        return self.linear(x)
    
    def round_sigma(self, sigma):
        """Round sigma to nearest valid value."""
        return sigma

net = MockDiffusionNet()

num_samples = 2
dim = 4
num_steps = 50

x = torch.randn(num_samples, dim)
mask = torch.randint(0, 2, (num_samples, dim))

ARGS = {
    'net': net,
    'x': x,
    'mask': mask,
    'num_samples': num_samples,
    'dim': dim,
    'num_steps': num_steps,
    '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 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
load_dataset Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/dataset.py
code served (permissive licence) · get_code("d59457aafc8263eb")
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
import json
import tempfile
import os

# Create temporary directory structure
temp_dir = tempfile.mkdtemp()
datasets_dir = os.path.join(temp_dir, 'datasets')
info_dir = os.path.join(datasets_dir, 'Info')
dataset_dir = os.path.join(datasets_dir, 'test_dataset')
masks_dir = os.path.join(dataset_dir, 'masks', 'rate30', 'MCAR')

os.makedirs(masks_dir, exist_ok=True)
os.makedirs(info_dir, exist_ok=True)

# Create sample data
n_samples = 10
n_numeric = 3
n_categorical = 2

# Create numeric columns
numeric_data = np.random.randn(n_samples, n_numeric).astype(np.float32)
numeric_cols = [f'num_{i}' for i in range(n_numeric)]

# Create categorical columns
categorical_data = {
    f'cat_{i}': np.random.choice(['A', 'B', 'C'], n_samples) 
    for i in range(n_categorical)
}
categorical_cols = list(categorical_data.keys())

# Create target column
target_col = 'target'
target_data = np.random.randint(0, 2, n_samples)

# Build full dataframe
data_dict = {col: numeric_data[:, i] for i, col in enumerate(numeric_cols)}
data_dict.update(categorical_data)
data_dict[target_col] = target_data

data_df = pd.DataFrame(data_dict)

# Split into train/test
train_df = data_df.iloc[:7]
test_df = data_df.iloc[7:]

# Save CSVs
data_df.to_csv(os.path.join(dataset_dir, 'data.csv'), index=False)
train_df.to_csv(os.path.join(dataset_dir, 'train.csv'), index=False)
test_df.to_csv(os.path.join(dataset_dir, 'test.csv'), index=False)

# Create masks
train_mask = np.random.rand(7, n_numeric + n_categorical) > 0.7
test_mask = np.random.rand(3, n_numeric + n_categorical) > 0.7

np.save(os.path.join(masks_dir, 'train_mask_0.npy'), train_mask)
np.save(os.path.join(masks_dir, 'test_mask_0.npy'), test_mask)

# Create info file
info = {
    'num_col_idx': list(range(n_numeric)),
    'cat_col_idx': list(range(n_numeric, n_numeric + n_categorical)),
    'target_col_idx': [n_numeric + n_categorical]
}

with open(os.path.join(info_dir, 'test_dataset.json'), 'w') as f:
    json.dump(info, f)

# Override the datasets path in the function's module
import sys
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'dataname': 'test_dataset',
    'idx': 0,
    'mask_type': 'MCAR',
    'ratio': '30'
}
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
load_dataset Ran
ran on a synthesized input
hengruizhang98/DiffPuter/generate_mask.py
code served (permissive licence) · get_code("d26d22eef9325fc4")
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
import os
import json
import tempfile
import shutil

# Create a temporary directory structure for the dataset
temp_dir = tempfile.mkdtemp()
DATA_DIR = temp_dir
datasets_dir = os.path.join(temp_dir, 'datasets')
info_dir = os.path.join(datasets_dir, 'Info')
data_dir = os.path.join(datasets_dir, 'test_dataset')

os.makedirs(info_dir, exist_ok=True)
os.makedirs(data_dir, exist_ok=True)

# Create sample data
np.random.seed(0)
n_samples = 10
n_numeric = 3
n_categorical = 2

# Create dataframe with numeric and categorical columns
numeric_cols = [f'num_{i}' for i in range(n_numeric)]
categorical_cols = [f'cat_{i}' for i in range(n_categorical)]
target_cols = ['target']

all_cols = numeric_cols + categorical_cols + target_cols

# Generate sample data
numeric_data = np.random.randn(n_samples, n_numeric).astype(np.float32)
categorical_data = np.array([['cat_a', 'dog_x'] if i % 2 == 0 else ['cat_b', 'dog_y'] 
                             for i in range(n_samples)])
target_data = np.random.randint(0, 2, n_samples)

data_dict = {}
for i, col in enumerate(numeric_cols):
    data_dict[col] = numeric_data[:, i]
for i, col in enumerate(categorical_cols):
    data_dict[col] = categorical_data[:, i]
for col in target_cols:
    data_dict[col] = target_data

data_df = pd.DataFrame(data_dict)

# Split into train and test
train_df = data_df.iloc[:7]
test_df = data_df.iloc[7:]

# Save CSVs
data_df.to_csv(os.path.join(data_dir, 'data.csv'), index=False)
train_df.to_csv(os.path.join(data_dir, 'train.csv'), index=False)
test_df.to_csv(os.path.join(data_dir, 'test.csv'), index=False)

# Create info JSON
num_col_idx = list(range(n_numeric))
cat_col_idx = list(range(n_numeric, n_numeric + n_categorical))
target_col_idx = list(range(n_numeric + n_categorical, n_numeric + n_categorical + len(target_cols)))

info = {
    'num_col_idx': num_col_idx,
    'cat_col_idx': cat_col_idx,
    'target_col_idx': target_col_idx
}

info_path = os.path.join(info_dir, 'test_dataset.json')
with open(info_path, 'w') as f:
    json.dump(info, f)

# Update the global DATA_DIR used by load_dataset
import sys
current_module = sys.modules[__name__]

ARGS = {
    'dataname': 'test_dataset',
    'idx': 0
}
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
load_dataset Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/baselines/data_utils.py
code served (permissive licence) · get_code("fa76114f7d86f862")
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
import os
import tempfile
import json

# Create a temporary directory structure with necessary files
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'datasets', 'test_data')
info_dir = os.path.join(temp_dir, 'datasets', 'Info')
os.makedirs(data_dir, exist_ok=True)
os.makedirs(info_dir, exist_ok=True)

# Create sample data
np.random.seed(0)
n_samples = 10
n_num_cols = 3
n_cat_cols = 2

# Create DataFrames
num_cols = [f'num_{i}' for i in range(n_num_cols)]
cat_cols = [f'cat_{i}' for i in range(n_cat_cols)]
target_col = 'target'
all_cols = num_cols + cat_cols + [target_col]

data_dict = {col: np.random.randn(n_samples) for col in num_cols}
data_dict.update({col: np.random.choice(['a', 'b', 'c'], n_samples) for col in cat_cols})
data_dict[target_col] = np.random.randint(0, 2, n_samples)

data_df = pd.DataFrame(data_dict)
train_df = data_df.iloc[:7].copy()
test_df = data_df.iloc[7:].copy()

# Save CSVs
data_df.to_csv(os.path.join(data_dir, 'data.csv'), index=False)
train_df.to_csv(os.path.join(data_dir, 'train.csv'), index=False)
test_df.to_csv(os.path.join(data_dir, 'test.csv'), index=False)

# Create info JSON
info = {
    'num_col_idx': list(range(n_num_cols)),
    'cat_col_idx': list(range(n_num_cols, n_num_cols + n_cat_cols)),
    'target_col_idx': [n_num_cols + n_cat_cols]
}
with open(os.path.join(info_dir, 'test_data.json'), 'w') as f:
    json.dump(info, f)

# Create mask files
train_mask = np.ones((len(train_df), len(all_cols)), dtype=bool)
test_mask = np.ones((len(test_df), len(all_cols)), dtype=bool)

np.save(os.path.join(data_dir, 'train_mask_0.npy'), train_mask)
np.save(os.path.join(data_dir, 'test_mask_0.npy'), test_mask)

# Define ARGS
ARGS = {
    'dataname': 'test_data',
    'idx': 0,
    'mask_dir': None,
    'DATA_DIR': os.path.join(temp_dir, 'datasets')
}
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
mean_std Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/dataset.py
code served (permissive licence) · get_code("b562880458cb56e8")
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 numpy as np

# Create small test data
np.random.seed(0)

# data: 2D array (batch_size, features)
# The function will compute mean and std across the batch dimension (axis 0)
data = np.random.randn(2, 4).astype(np.float32)

# mask: boolean array with same shape as data
# True values indicate positions to ignore, False values are used in computation
mask = np.array([
    [False, True, False, True],
    [True, False, False, False]
], dtype=bool)

ARGS = {
    "data": data,
    "mask": mask,
}
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, 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
nanmean Ran
ran; our contract draft was wrong, not the code
hezgit/TDM/utils.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from hezgit/tdm, is pointer only (licence: GPL-3.0) · get_code("bbbb6c22bd6a9a4a")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, hezgit/TDM, is not in the permissive set Syntology serves inline. 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.

recover_num_cat Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/baselines/data_utils.py
code served (permissive licence) · get_code("ab7fbfe5ec2f4127")
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 int, shape (2, 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

# Analyze the function to understand what it needs:
# - pred_cat_bin: numpy array of shape (batch_size, num_binary_features) with float values
# - num_cat: integer, number of categorical variables
# - cat_bin_num: numpy array of integers indicating how many binary features each category needs

# Create small test data
batch_size = 2  # Small batch
num_cat = 3  # 3 categorical variables

# cat_bin_num specifies how many binary bits each categorical variable needs
# For example: [2, 3, 2] means first cat needs 2 bits, second needs 3, third needs 2
cat_bin_num = np.array([2, 3, 2], dtype=np.int32)

# Total binary features needed: 2 + 3 + 2 = 7
total_bin_features = cat_bin_num.sum()

# Create pred_cat_bin with random values between 0 and 1
# Shape: (batch_size, total_binary_features)
np.random.seed(0)
pred_cat_bin = np.random.rand(batch_size, total_bin_features).astype(np.float32)

ARGS = {
    "pred_cat_bin": pred_cat_bin,
    "num_cat": num_cat,
    "cat_bin_num": cat_bin_num,
}
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 2, dtype family int, shape (2, 3) — shape (2, 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
reglu Ran
ran; our contract draft was wrong, not the code
hengruizhang98/DiffPuter/model.py
pointer only (licence: MIT); the stored copy get_code serves, from fangzy96/tabcutmix, is pointer only (licence: NONE) · get_code("58bd3831c7fb6729")
How it ran

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

sample Ran
ran, honoured the contract we drafted
hengruizhang98/DiffPuter/diffusion_utils.py
code served (permissive licence) · get_code("4082fa134dd9d79d")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import numpy as np

torch.manual_seed(0)

class DummyNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.sigma_min = 0.002
        self.sigma_max = 80.0
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t):
        # x: [batch, dim], t: scalar or tensor
        # Returns denoised output of same shape as x
        return self.linear(x)
    
    def round_sigma(self, sigma):
        # Returns rounded sigma value(s)
        if isinstance(sigma, torch.Tensor):
            return torch.round(sigma * 100) / 100
        return round(sigma * 100) / 100

net = DummyNet()
net.eval()

ARGS = {
    'net': net,
    'num_samples': 2,
    'dim': 4,
    'num_steps': 5,
    '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 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
sample_step Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hengruizhang98/DiffPuter/diffusion_utils.py
code served (permissive licence) · get_code("076c864a096ef0c9")
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 numpy as np

torch.manual_seed(0)

class SimpleNet(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = torch.nn.Linear(4, 4)
    
    def forward(self, x, t):
        # x shape: (batch, features)
        # t is a scalar sigma value
        # Returns denoised output same shape as x
        return self.linear(x)
    
    def round_sigma(self, sigma):
        # Returns a rounded sigma value
        return torch.tensor(float(sigma))

net = SimpleNet()

ARGS = {
    'net': net,
    'num_steps': 5,
    'i': 0,
    't_cur': torch.tensor(2.0),
    't_next': torch.tensor(1.0),
    'x_next': torch.randn(2, 4)
}
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 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
MaskedAutoencoder Not yet run
unverified (harvested, no recorded run)
tydusky/remasker/model_mae.py
pointer only (licence: NONE) · get_code("14d38873e8e0964e")
How it ran

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

get_1d_sincos_pos_embed Not yet run
unverified (harvested, no recorded run)
tydusky/remasker/model_mae.py
pointer only (licence: NONE) · get_code("39c6826eb272e211")
How it ran

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

quantile Not yet run
unverified (harvested, no recorded run)
hengruizhang98/DiffPuter/generate_mask.py
code served (permissive licence) · get_code("4db664a683098ffe")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 2 later) and 15 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
geglu 8 other papers
6 dated earlier, 2 later
2102.08921 (2021-02)
How Faithful is your Synthetic Data? Sample-level Metrics for Evaluating and Auditing Generative Models
2207.03208 (2022-07)
Revisiting Pretraining Objectives for Tabular Deep Learning
2209.15421 (2022-09)
TabDDPM: Modelling Tabular Data with Diffusion Models
and 5 more not named here
reglu 8 other papers
6 dated earlier, 2 later
2102.08921 (2021-02)
How Faithful is your Synthetic Data? Sample-level Metrics for Evaluating and Auditing Generative Models
2207.03208 (2022-07)
Revisiting Pretraining Objectives for Tabular Deep Learning
2209.15421 (2022-09)
TabDDPM: Modelling Tabular Data with Diffusion Models
and 5 more not named here
nanmean 2 other papers
2 dated earlier
2302.10363 (2023-02)
Transformed Distribution Matching for Missing Value Imputation
2309.16779 (2023-09)
Intriguing properties of generative classifiers
MAE 1 other paper
1 dated earlier
2302.10363 (2023-02)
Transformed Distribution Matching for Missing Value Imputation
quantile 1 other paper
1 dated earlier
2309.16779 (2023-09)
Intriguing properties of generative classifiers
sample 1 other paper
1 dated earlier
2404.08254 (2024-04)
Balanced Mixed-Type Tabular Data Synthesis with Diffusion Models
sample_step 1 other paper
1 dated earlier
2404.08254 (2024-04)
Balanced Mixed-Type Tabular Data Synthesis with Diffusion Models

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

Generative models play an important role in missing data imputation in that they aim to learn the joint distribution of full data. However, applying advanced deep generative models (such as Diffusion models) to missing data imputation is challenging due to 1) the inherent incompleteness of the training data and 2) the difficulty in performing conditional inference from unconditional generative models. To deal with these challenges, this paper introduces DIFFPUTER, a tailored diffusion model combined with the Expectation-Maximization (EM) algorithm for missing data imputation. DIFFPUTER iteratively trains a diffusion model to learn the joint distribution of missing and observed data and performs an accurate conditional sampling to update the missing values using a tailored reversed sampling strategy. Our theoretical analysis shows that DIFFPUTER's training step corresponds to the maximum likelihood estimation of data density (M-step), and its sampling step represents the Expected A Posteriori estimation of missing values (E-step). Extensive experiments across ten diverse datasets and comparisons with 17 different imputation methods demonstrate DIFFPUTER's superior performance. Notably, DIFFPUTER achieves an average improvement of 6.94% in MAE and 4.78% in RMSE compared to the most competitive existing method.

For agents

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

get_harvested_code_for_paper("2405.20690")
get_code_for_paper("2405.20690")
have("2405.20690")

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

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

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

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

Connect an agent — have() is free.