SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.22337 · 2026

TabSCM: A practical Framework for Generating Realistic Tabular Data

Gjergji Kasneci, Bardh Prenkaj, Sven Jacob, Weijia Shao

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 5 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2604.22337.json · badge: /api/ran/2604.22337.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
jsve96/TabSCM community
Papers with Code archive
7 ran · 1 no recorded run
FunctionStatusWhere it lives
DiffusionRegressor Ran
ran on a synthesized input · constructed an object; no result was computed
jsve96/TabSCM/tabscm/model.py
code served (permissive licence) · get_code("8d261e6e72d92c1c")
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 an instance of its own class, DiffusionRegressor: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn
from sklearn.preprocessing import StandardScaler

torch.manual_seed(0)

# Small sample data
X = np.random.randn(10, 4).astype('float32')
y = np.random.randn(10).astype('float32')

ARGS = {
    'timesteps': 50,
    'epochs': 2,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DiffusionRegressor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DiffusionRegressor 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
FourierTimestepEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
jsve96/TabSCM/tabscm/model.py
code served (permissive licence) · get_code("b7dcdb3a1c66df6d")
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 an instance of its own class, FourierTimestepEmbed: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)

# FourierTimestepEmbed expects:
# - embed_dim: int (dimension of embedding, must be even since divided by 2)
# - scale: float (default 10, used to scale random freqs)
# - forward() receives t: a tensor

# For forward(), the function does: t @ self.freqs.unsqueeze(0)
# This means t should be a 2D tensor where the last dimension matches embed_dim // 2
# So t should be shape (batch_size, embed_dim // 2)

embed_dim = 4
scale = 10.0

# Create a small input tensor for t
# t should be shape (batch_size, embed_dim // 2) = (2, 2)
t = torch.randn(2, 2)

ARGS = {
    "embed_dim": embed_dim,
    "scale": scale,
}
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 FourierTimestepEmbed — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FourierTimestepEmbed 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
MLPConditionedUNet Ran
ran on a synthesized input · constructed an object; no result was computed
jsve96/TabSCM/tabscm/model.py
code served (permissive licence) · get_code("55211297e7bbcbf1")
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 an instance of its own class, MLPConditionedUNet: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)

# Define the small model classes from the function
class FourierTimestepEmbed(nn.Module):
    def __init__(self, embed_dim, scale=10):
        super().__init__()
        self.freqs = nn.Parameter(torch.randn(embed_dim // 2) * scale, requires_grad=False)

    def forward(self, t):
        angles = 2 * np.pi * t @ self.freqs.unsqueeze(0)
        return torch.cat([angles.sin(), angles.cos()], dim=-1)

class MLPConditionedUNet(nn.Module):
    def __init__(self, input_dim, cond_dim, hidden_dim=256, time_embed_dim=64):
        super().__init__()
        self.time_embed = FourierTimestepEmbed(embed_dim=time_embed_dim)
        self.net = nn.Sequential(
            nn.Linear(input_dim + cond_dim + time_embed_dim, hidden_dim),
            nn.SiLU(),
            nn.Linear(hidden_dim, hidden_dim),
            nn.SiLU(),
            nn.Linear(hidden_dim, hidden_dim),
            nn.SiLU(),
            nn.Linear(hidden_dim, input_dim)
        )
        self.net.apply(self.init_weights)

    def init_weights(self, m):
        if isinstance(m, nn.Linear):
            nn.init.xavier_uniform_(m.weight)
            nn.init.zeros_(m.bias)

    def forward(self, y, cond, t):
        t_emb = self.time_embed(t)
        x = torch.cat([y, cond, t_emb], dim=-1)
        return self.net(x)

# Create arguments for MLPConditionedUNet
input_dim = 4
cond_dim = 3
hidden_dim = 128
time_embed_dim = 8

ARGS = {
    'input_dim': input_dim,
    'cond_dim': cond_dim,
    'hidden_dim': hidden_dim,
    'time_embed_dim': time_embed_dim
}
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 MLPConditionedUNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLPConditionedUNet 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
RootSamplerCategorical Ran
ran on a synthesized input · constructed an object; no result was computed
jsve96/TabSCM/tabscm/model.py
code served (permissive licence) · get_code("9d5c64cb322cb254")
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 an instance of its own class, RootSamplerCategorical: the run constructed the object and did not call it, so no result was computed. 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

# RootSamplerCategorical.__init__ takes parameter 'y'
# It calls np.unique(y, return_counts=True)
# So y should be a numpy array with categorical values

y = np.array([0, 1, 1, 2, 2, 2, 0, 1])

ARGS = {
    "y": y
}
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 RootSamplerCategorical — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RootSamplerCategorical 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
RootSamplerKDE Ran
ran on a synthesized input · constructed an object; no result was computed
jsve96/TabSCM/tabscm/model.py
code served (permissive licence) · get_code("553707e6dbafe92b")
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 an instance of its own class, RootSamplerKDE: the run constructed the object and did not call it, so no result was computed. 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
from sklearn.neighbors import KernelDensity

# Create sample data for y parameter
# The function expects y to be array-like that can be reshaped to (-1, 1)
y_data = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8])

# Define ARGS dict with all parameters
ARGS = {
    'y': y_data,
    'bandwidth': 0.05
}
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 RootSamplerKDE — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RootSamplerKDE 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_num_classes Ran
ran, honoured the contract we drafted
jsve96/TabSCM/tabscm/model.py
code served (permissive licence) · get_code("a1fffc6a33fa28c3")
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
import numpy as np

torch.manual_seed(0)

# The function accesses INFO['n_classes'][node]
# So INFO needs to be a dict with 'n_classes' key that supports indexing by node
# 'n_classes' should be a dict or list-like mapping node indices to class counts

# Create a simple INFO dict
INFO = {
    'n_classes': {
        0: 5,
        1: 10,
        2: 7,
        3: 3
    }
}

# node parameter should be an integer key that exists in INFO['n_classes']
node = 1

ARGS = {
    'node': node,
    'INFO': INFO
}
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 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
is_categorical Ran
ran, violated the contract we drafted
jsve96/TabSCM/tabscm/model.py
code served (permissive licence) · get_code("aeb8d135315f48e5")
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 bool, 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)

ARGS = {
    'node': 2,
    'INFO': {
        'task_type': 'binclass',
        'cat_col_idx': [0, 1, 2],
        'target_col_idx': [3, 4]
    }
}
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 bool, 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
fit_scm_from_dag Not yet run
unverified (harvested, no recorded run)
jsve96/TabSCM/tabscm/model.py
code served (permissive licence) · get_code("f34a18df4a79cb49")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 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 8 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

Most tabular-data generators match marginal statistics yet ignore causal structure, leading downstream models to learn spurious or unfair patterns. We present TabSCM, a mixed-type generator that preserves those causal dependencies. Starting from a Completed Partially Directed Acyclic Graph (CPDAG) found by any causal structure discovery algorithm, TabSCM (i) orients edges to a DAG, (ii) fits root-node marginals with KDE or categorical frequencies, and (iii) learns topologically ordered structural assignments. Such assignments are achieved using conditional diffusion models for continuous variables as child nodes and gradient-boosted trees for categorical ones. Ancestral sampling yields semantically valid records and enables exact counterfactual queries. On seven public datasets, encompassing healthcare, finance, housing, environment, TabSCM matches or surpasses state-of-the-art GAN, diffusion, and LLM baselines in statistical fidelity, downstream utility, and privacy risk, while also cutting rule-violation rates and providing causally meaningful and robust conditional interventions. Because generation is decomposed into explicit equations, it runs up to 583× faster than diffusiononly models and exposes interpretable knobs for fairness auditing and policy simulation, making TabSCM a practical choice for realism, explainability, and causal soundness.

For agents

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

get_harvested_code_for_paper("2604.22337")
get_code_for_paper("2604.22337")
have("2604.22337")

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

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

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

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

Connect an agent — have() is free.