SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.04216 · NeurIPS · 2024

Debiasing Synthetic Data Generated by Deep Generative Models

Paloma Rabaey, Thomas Demeester, Alexander Decruyenaere, Heidelinde Dehaene, Christiaan Polet, Johan Decruyenaere, Stijn Vansteelandt

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2411.04216.json · badge: /api/ran/2411.04216.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
syndara-lab/debiased-generation canonical (classifier label)
classifier basis: classifier_2025
8 ran · 0 no recorded run
FunctionStatusWhere it lives
E_hat_Y_and_A_given_X Ran
ran; our contract draft was wrong, not the code
syndara-lab/debiased-generation/sim_generate.py
code served (permissive licence) · get_code("c58908b293bf8193")
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) 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
import pandas as pd
import torch
import random


class MockGenerativeModel:
    """Mock generative model that implements the interface used by the function."""
    
    def __init__(self):
        self._name = "custom_model"
    
    def name(self):
        return self._name
    
    def sample(self, n: int, seed: int):
        """Generate synthetic data with specified number of samples."""
        random.seed(seed)
        np.random.seed(seed)
        
        # Create synthetic data with columns X, Y, A
        data = {
            'X': np.random.choice([0, 1, 2], size=n),
            'Y': np.random.normal(loc=5, scale=2, size=n),
            'A': np.random.binomial(n=1, p=0.5, size=n)
        }
        return pd.DataFrame(data)


# Create a small condition sample
condition_data = {
    'X': [0, 1, 2, 0, 1],
    'Y': [4.5, 5.2, 6.1, 4.8, 5.5],
    'A': [0, 1, 1, 0, 1]
}
condition_sample = pd.DataFrame(condition_data)

# Create the generative model
generative_model = MockGenerativeModel()

# Define all arguments for E_hat_Y_and_A_given_X
ARGS = {
    'condition_sample': condition_sample,
    'generative_model': generative_model,
    'Y': 'Y',
    'A': 'A',
    'X': 'X'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
binary_mapping_outcome Ran
ran; our contract draft was wrong, not the code
syndara-lab/debiased-generation/case_study1/IST_generate.py
code served (permissive licence) · get_code("917923b70578c40f")
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) 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

# The function takes a single parameter 'interest' which is a string
# It checks the value against specific strings: 'death', 'dependent', 'not_recovered', 'recovered'
# and returns a binary_mapping dictionary accordingly

ARGS = {
    'interest': 'death'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
create_metadata Ran
ran; our contract draft was wrong, not the code
syndara-lab/debiased-generation/sim_evaluate.py
code served (permissive licence) · get_code("5aa043e8deec6e02")
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) 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 pandas as pd
import numpy as np

# Create sample data structure matching the function's expectations
# The function expects: data[n_sample][run][dataset_name] = DataFrame

# Create some sample DataFrames for different datasets
df1 = pd.DataFrame({'col1': np.random.randn(10), 'col2': np.random.randn(10)})
df2 = pd.DataFrame({'col1': np.random.randn(15), 'col2': np.random.randn(15)})
df3 = pd.DataFrame({'col1': np.random.randn(8), 'col2': np.random.randn(8)})

# Build the nested dictionary structure
data = {
    'n_100': {
        'run_1': {
            'model_a_output': df1,
            'model_b_output': df2,
            'meta_info': pd.DataFrame({'x': [1, 2]}),  # Should be filtered out
            'bias_correction': pd.DataFrame({'x': [1]}),  # Should be filtered out
        },
        'run_2': {
            'model_a_output': df3,
            'model_c_output': df1,
            'expected_values': pd.DataFrame({'x': [1, 2, 3]}),  # Should be filtered out
        }
    },
    'n_200': {
        'run_1': {
            'model_a_output': df2,
            'model_d_output': df3,
        }
    }
}

ARGS = {
    'data': data,
    'export': False,
    'sim_dir': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas — 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
create_metadiagnostics Ran
ran; our contract draft was wrong, not the code
syndara-lab/debiased-generation/sim_evaluate.py
code served (permissive licence) · get_code("a6fd92280347187a")
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) 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 pandas as pd
import numpy as np

# Create sample data structure matching the function's expectations
# The function expects: data[n_sample][run][name] where name contains 'bias' or 'expected'

# Create bias data frames
bias_df_1 = pd.DataFrame({
    'value': [0.1, 0.2, 0.3],
    'metric': ['mse', 'mae', 'rmse']
})

bias_df_2 = pd.DataFrame({
    'value': [0.15, 0.25],
    'metric': ['mse', 'mae']
})

# Create expected data frames with a column for conditioning variable
expected_df_1 = pd.DataFrame({
    'condition': ['A', 'B'],
    'stat1': [1.0, 2.0],
    'stat2': [3.0, 4.0]
})

expected_df_2 = pd.DataFrame({
    'condition': ['X', 'Y', 'Z'],
    'stat1': [5.0, 6.0, 7.0],
    'stat2': [8.0, 9.0, 10.0]
})

# Build nested dictionary structure
data = {
    'n_100': {
        'run_1': {
            'generator_model_bias': bias_df_1,
            'generator_model_expected': expected_df_1,
            'other_generator_bias': bias_df_2,
            'other_generator_expected': expected_df_2,
        },
        'run_2': {
            'generator_model_bias': bias_df_1.copy(),
            'generator_model_expected': expected_df_1.copy(),
        }
    },
    'n_200': {
        'run_1': {
            'generator_model_bias': bias_df_2.copy(),
            'generator_model_expected': expected_df_2.copy(),
        }
    }
}

ARGS = {
    'data': data,
    'export': False,
    'sim_dir': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas — 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_data Ran
ran; our contract draft was wrong, not the code
syndara-lab/debiased-generation/sim_evaluate.py
code served (permissive licence) · get_code("e07849e21c9ec2da")
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) 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 os
import tempfile
import pandas as pd

# Create a temporary directory structure with CSV files
temp_dir = tempfile.mkdtemp()

# Create directory structure: sim_dir/n_X/run_Y/filename.csv
for n_sample in [10, 20]:
    for run_idx in range(2):
        run_dir = os.path.join(temp_dir, f'n_{n_sample}', f'run_{run_idx}')
        os.makedirs(run_dir, exist_ok=True)
        
        # Create sample CSV files
        df = pd.DataFrame({
            'col1': [1, 2, 3],
            'col2': [4, 5, 6]
        })
        df.to_csv(os.path.join(run_dir, 'original.csv'), index=False)
        df.to_csv(os.path.join(run_dir, 'synthetic.csv'), index=False)

ARGS = {
    'n_samples': [10, 20],
    'n_runs': 2,
    'sim_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
pandas — 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
preproces_IST_aspirin Ran
ran; our contract draft was wrong, not the code
syndara-lab/debiased-generation/case_study1/IST_generate.py
code served (permissive licence) · get_code("6d990110268a5933")
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) and returned DataFrame. 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
import numpy as np

def multi_mapping_outcome():
    multi_mapping = {0: None, 1: 1, 2: 2, 3: 3, 4: 4, 9: None}
    return multi_mapping

# Create a minimal DataFrame that matches what preproces_IST_aspirin expects
IST_gt = pd.DataFrame({
    'RXASP': ['N', 'Y', 'N', 'Y', 'N'],
    'OCCODE': [1, 2, 3, 4, 9]
})

ARGS = {
    'IST_gt': IST_gt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
preproces_IST_heparin Ran
ran; our contract draft was wrong, not the code
syndara-lab/debiased-generation/case_study1/IST_generate.py
code served (permissive licence) · get_code("c6f2c88635769a74")
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) and returned DataFrame. 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
import numpy as np

def multi_mapping_outcome():
    multi_mapping = {0: None, 1: 1, 2: 2, 3: 3, 4: 4, 9: None}
    return multi_mapping

# Create a small sample DataFrame that matches what the function expects
IST_gt = pd.DataFrame({
    'RXHEP': ['N', 'L', 'M', 'H', 'N', 'L'],
    'OCCODE': [0, 1, 2, 3, 4, 9]
})

ARGS = {
    'IST_gt': IST_gt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
sample_synthetic Ran
ran, honoured the contract we drafted
syndara-lab/debiased-generation/sim_generate.py
code served (permissive licence) · get_code("689f741241a788f7")
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) and returned DataFrame. 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 torch
import random

torch.manual_seed(0)

class CustomGenerativeModel:
    """A custom generative model with 'custom' in its name."""
    
    def name(self):
        return "custom_model"
    
    def sample(self, n: int, seed: int):
        """Generate synthetic data by sampling."""
        random.seed(seed)
        np.random.seed(seed)
        torch.manual_seed(seed)
        # Return a small DataFrame
        return pd.DataFrame({
            'feature_1': np.random.randn(n),
            'feature_2': np.random.randn(n),
            'feature_3': np.random.randn(n)
        })


class StandardGenerativeModel:
    """A standard generative model without 'custom' in its name."""
    
    def name(self):
        return "standard_model"
    
    def generate(self, count: int, random_state: int):
        """Generate synthetic data."""
        random.seed(random_state)
        np.random.seed(random_state)
        torch.manual_seed(random_state)
        
        class DataframeWrapper:
            def dataframe(self):
                return pd.DataFrame({
                    'col_a': np.random.randn(count),
                    'col_b': np.random.randn(count),
                    'col_c': np.random.randn(count)
                })
        
        return DataframeWrapper()


# Create instances for testing
custom_model = CustomGenerativeModel()
standard_model = StandardGenerativeModel()

ARGS = {
    'generative_model': custom_model,
    'm': 5,
    'seed': 2024
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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

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, 1 are also present in other papers whose code we hold (1 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.

FunctionAlso present inEarliest-datedOthers named
load_data 1 other paper
1 dated earlier
2312.07837 (2023-12)
The Real Deal Behind the Artificial Appeal: Inferential Utility of Tabular Synthetic Data

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

While synthetic data hold great promise for privacy protection, their statistical analysis poses significant challenges that necessitate innovative solutions. The use of deep generative models (DGMs) for synthetic data generation is known to induce considerable bias and imprecision into synthetic data analyses, compromising their inferential utility as opposed to original data analyses. This bias and uncertainty can be substantial enough to impede statistical convergence rates, even in seemingly straightforward analyses like mean calculation. The standard errors of such estimators then exhibit slower shrinkage with sample size than the typical 1 over root-n rate. This complicates fundamental calculations like p-values and confidence intervals, with no straightforward remedy currently available. In response to these challenges, we propose a new strategy that targets synthetic data created by DGMs for specific data analyses. Drawing insights from debiased and targeted machine learning, our approach accounts for biases, enhances convergence rates, and facilitates the calculation of estimators with easily approximated large sample variances. We exemplify our proposal through a simulation study on toy data and two case studies on real-world data, highlighting the importance of tailoring DGMs for targeted data analysis. This debiasing strategy contributes to advancing the reliability and applicability of synthetic data in statistical inference.

For agents

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

get_harvested_code_for_paper("2411.04216")
get_code_for_paper("2411.04216")
have("2411.04216")

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

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

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

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

Connect an agent — have() is free.