SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.05993 · 2026

TabCF: Distributional Control Function Estimation with Tabular Foundation Models

Jing Zhou, Zhengyuan Zhu, Chunlin Li, Geping Chen, Tianzhong Yang

arXiv · PDF · Open in the Atlas

Code that ran

18 of 43 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 9 failures of our instrument; 25 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/2605.05993.json · badge: /api/ran/2605.05993.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
py-why/EconML canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
GepingChen/TabCF community
Papers with Code archive
8 ran · 6 no recorded run
jhartford/DeepIV community
Papers with Code archive
4 ran · 11 no recorded run
CausalML/DeepGMM community
Papers with Code archive
4 ran · 7 no recorded run
FunctionStatusWhere it lives
BinCritic Ran
ran on a synthesized input · constructed an object; no result was computed
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("21215dbd31cb5d2a")
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, BinCritic: 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 tensorflow as tf
import numpy as np

# Set random seeds for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create a small Leaf tensor (batch_size=2, num_trees=4)
# This represents leaf assignments for 2 samples across 4 trees
Leaf = tf.constant([[1, 2, 3, 0], [2, 1, 0, 3]], dtype=tf.int32)

# Create leaf_id as [tree_id, tree_leaf_id]
# Specifying tree 0 (first dimension) and leaf 1
leaf_id = tf.constant([0, 1], dtype=tf.int32)

# Create a simple optimizer
optimizer = tf.keras.optimizers.Adam(learning_rate=0.01)

# Create Z (not directly used in the function, but required as parameter)
Z = tf.constant([[1.0, 2.0], [3.0, 4.0]], dtype=tf.float32)

# Normalizer - used to scale the output
normalizer = 2.0

# id parameter for the name scope
id_param = 0

ARGS = {
    'Z': Z,
    'Leaf': Leaf,
    'leaf_id': leaf_id,
    'optimizer': optimizer,
    'id': id_param,
    'normalizer': normalizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BinCritic — 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 BinCritic 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
GroupedLocalDistributionAdapter Ran
ran on a synthesized input · constructed an object; no result was computed
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("b9a19d2811603c1a")
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, GroupedLocalDistributionAdapter: 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

class MockAdapter:
    """Stand-in adapter that implements the methods called by GroupedLocalDistributionAdapter."""
    
    def __init__(self, n_samples: int):
        self.n_samples = n_samples
    
    def cdf(self, values: np.ndarray) -> np.ndarray:
        """Return CDF values."""
        arr = np.asarray(values, dtype=float)
        if arr.ndim == 0:
            return np.array(0.5)
        if arr.ndim == 1:
            return np.ones(arr.shape[0], dtype=float) * 0.5
        if arr.ndim == 2:
            return np.ones(arr.shape, dtype=float) * 0.5
        return arr
    
    def pdf(self, values: np.ndarray) -> np.ndarray:
        """Return PDF values."""
        arr = np.asarray(values, dtype=float)
        if arr.ndim == 0:
            return np.array(0.1)
        if arr.ndim == 1:
            return np.ones(arr.shape[0], dtype=float) * 0.1
        if arr.ndim == 2:
            return np.ones(arr.shape, dtype=float) * 0.1
        return arr
    
    def icdf(self, alphas: np.ndarray) -> np.ndarray:
        """Return inverse CDF values."""
        arr = np.asarray(alphas, dtype=float)
        if arr.ndim == 0:
            return np.array(1.5)
        if arr.ndim == 1:
            return np.ones(arr.shape[0], dtype=float) * 1.5
        if arr.ndim == 2:
            return np.ones(arr.shape, dtype=float) * 1.5
        return arr
    
    def mean(self) -> np.ndarray:
        """Return mean."""
        return np.array(0.0)
    
    def variance(self) -> np.ndarray:
        """Return variance."""
        return np.array(1.0)


n_samples = 6
group_indices = [
    np.array([0, 1, 2], dtype=int),
    np.array([3, 4, 5], dtype=int)
]
group_adapters = [
    MockAdapter(n_samples),
    MockAdapter(n_samples)
]

ARGS = {
    'n_samples': n_samples,
    'group_indices': group_indices,
    'group_adapters': group_adapters
}
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 GroupedLocalDistributionAdapter — 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 GroupedLocalDistributionAdapter 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
LocalContextConfig Ran
ran on a synthesized input · constructed an object; no result was computed
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("1532d46505e4afe2")
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, LocalContextConfig: 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
from dataclasses import dataclass

torch.manual_seed(0)

ARGS = {
    'strategy': 'global',
    'k_neighbors': None,
    'metric': 'euclidean',
    'scale_features': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LocalContextConfig — 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 LocalContextConfig 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
LoopIterator Ran
ran on a synthesized input · constructed an object; no result was computed
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("55228c2964526630")
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, LoopIterator: 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

# Create sample data for LoopIterator
# The function expects data to be a numpy array with a .shape attribute
# It accesses data.shape[0] to get the number of samples
# It also uses fancy indexing: data[indices]
data = np.random.randn(10, 4)  # 10 samples, 4 features

batch_size = 3

random_flag = False

ARGS = {
    "data": data,
    "batch_size": batch_size,
    "random": random_flag
}
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 LoopIterator — 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 LoopIterator 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
OnesidedUnbaised Ran
ran on a synthesized input · constructed an object; no result was computed
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("2ab4162cdbe2d47f")
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, OnesidedUnbaised: 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
import keras.utils

# Create a simple sampler function that takes sampler_input and n_samples
# and returns synthetic treatment samples
def simple_sampler(sampler_input, n_samples):
    # sampler_input is [instruments] + [features...]
    # instruments shape: (batch_size, n_instruments)
    # features shapes: (batch_size, n_features_i)
    # We need to return (n_samples * batch_size, n_treatments)
    batch_size = sampler_input[0].shape[0]
    n_treatments = 3
    return numpy.random.randn(batch_size * n_samples, n_treatments)

# Create small numpy arrays with distinct dimensions
n_samples_data = 8
n_instruments = 3
n_features = 4
n_treatments = 3
n_outputs = 2
batch_size = 2

features = numpy.random.randn(n_samples_data, n_features).astype(numpy.float32)
instruments = numpy.random.randn(n_samples_data, n_instruments).astype(numpy.float32)
outputs = numpy.random.randn(n_samples_data, n_outputs).astype(numpy.float32)
treatments = numpy.random.randn(n_samples_data, n_treatments).astype(numpy.float32)

ARGS = {
    'features': features,
    'instruments': instruments,
    'outputs': outputs,
    'treatments': treatments,
    'batch_size': batch_size,
    'sampler': simple_sampler,
    'n_samples': 2,
    'seed': 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OnesidedUnbaised — the run constructed an instance of its own class and did not call it; no shape 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
SampledSequence Ran
ran on a synthesized input · constructed an object; no result was computed
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("18cb68c93c76d1a4")
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, SampledSequence: 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
import keras.utils

# Create a simple sampler callable that takes sampler_input and n_samples
# and returns samples as a numpy array
def dummy_sampler(sampler_input, n_samples):
    # sampler_input is [instruments] + features
    # instruments shape: (batch_size, n_instruments)
    # features: list of arrays with shape (batch_size, feature_dim)
    instruments = sampler_input[0]
    batch_size = instruments.shape[0]
    # Return samples with shape (batch_size * n_samples, output_dim)
    return numpy.random.randn(batch_size * n_samples, 5)

# Create small numpy arrays with distinct dimensions
n_samples_data = 16  # number of data samples
n_instruments = 4
n_features = 3
output_dim = 2

features = numpy.random.randn(n_samples_data, n_features).astype(numpy.float32)
instruments = numpy.random.randn(n_samples_data, n_instruments).astype(numpy.float32)
outputs = numpy.random.randn(n_samples_data, output_dim).astype(numpy.float32)

batch_size = 4
sampler = dummy_sampler
n_samples = 2
seed = 42

ARGS = {
    "features": features,
    "instruments": instruments,
    "outputs": outputs,
    "batch_size": batch_size,
    "sampler": sampler,
    "n_samples": n_samples,
    "seed": seed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SampledSequence — the run constructed an instance of its own class and did not call it; no shape 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
_tabpfn_cache_dir Ran
ran on a synthesized input
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("2cb8fcf86ff0f342")
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 os
from pathlib import Path

# This function takes no parameters, so ARGS should be an empty dict
ARGS = {}
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
ensure_finite_kwargs Ran
ran; our contract draft was wrong, not the code
py-why/EconML/econml/_sklearn_compat.py
pointer only (licence: NOASSERTION) · get_code("5acca7d382d58bda")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, py-why/EconML (NOASSERTION). 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.

ensure_local_context_config Ran
ran; our contract draft was wrong, not the code
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("ad3e3bce3d8675f4")
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 LocalContextConfig. 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
from dataclasses import dataclass

torch.manual_seed(0)

# Test case 1: None input
test_none = None

# Test case 2: LocalContextConfig instance
@dataclass(frozen=True)
class LocalContextConfig:
    strategy: str = 'global'
    k_neighbors: int | None = None
    metric: str = 'euclidean'
    scale_features: bool = True

    def __post_init__(self) -> None:
        strategy = str(self.strategy or 'global').strip().lower()
        metric = str(self.metric or 'euclidean').strip().lower()
        SUPPORTED_LOCAL_STRATEGIES = ('global', 'local_knn')
        SUPPORTED_LOCAL_METRICS = ('euclidean',)
        if strategy not in SUPPORTED_LOCAL_STRATEGIES:
            raise ValueError(f"Unsupported local-context strategy '{self.strategy}'. Expected one of {SUPPORTED_LOCAL_STRATEGIES}.")
        if metric not in SUPPORTED_LOCAL_METRICS:
            raise ValueError(f"Unsupported local-context metric '{self.metric}'. Expected one of {SUPPORTED_LOCAL_METRICS}.")
        if self.k_neighbors is not None and int(self.k_neighbors) <= 0:
            raise ValueError('k_neighbors must be positive when provided.')
        object.__setattr__(self, 'strategy', strategy)
        object.__setattr__(self, 'metric', metric)
        if self.k_neighbors is not None:
            object.__setattr__(self, 'k_neighbors', int(self.k_neighbors))
        object.__setattr__(self, 'scale_features', bool(self.scale_features))

test_config_instance = LocalContextConfig(strategy='global', k_neighbors=5, metric='euclidean', scale_features=True)

# Test case 3: Mapping (dict)
test_mapping = {
    'strategy': 'local_knn',
    'k_neighbors': 10,
    'metric': 'euclidean',
    'scale_features': False
}

# Test case 4: Object with required attributes
class LocalContextObject:
    def __init__(self):
        self.strategy = 'global'
        self.k_neighbors = None
        self.metric = 'euclidean'
        self.scale_features = True

test_object = LocalContextObject()

ARGS = {
    'local_context': test_none
}
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 LocalContextConfig — a LocalContextConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LocalContextConfig 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
gaussian_kernel Ran
ran; our contract draft was wrong, not the code
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("40939406cc6a9f16")
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 EagerTensor, ndim 2, dtype family float, shape (2, 1) 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 tensorflow as tf
import math

# Create a small 2D tensor with batch size 2 and dimension 4
x = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# precision: a scalar value used in the gaussian kernel computation
precision = 0.5

# normalizer: a scalar value used to normalize the final kernel output
normalizer = 1.0

ARGS = {
    "x": x,
    "precision": precision,
    "normalizer": normalizer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 1) — shape (2, 1) 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
import_tabicl_regressor Ran
ran on a synthesized input
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("8bb14323d3fd0ae6")
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 type. 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 sys
from pathlib import Path
from unittest.mock import MagicMock, patch

# The function takes no parameters, so ARGS should be empty
ARGS = {}

# However, we should set up the environment so the function can be called
# without errors. The function checks for TABICL_SRC_DIR existence and
# manipulates sys.path, so we'll mock that behavior.

# Create a mock TabICLRegressor class
class MockTabICLRegressor:
    """Minimal mock of TabICLRegressor for testing import_tabicl_regressor."""
    def __init__(self):
        pass

# Mock the tabicl module and its TabICLRegressor
sys.modules['tabicl'] = MagicMock()
sys.modules['tabicl'].TabICLRegressor = MockTabICLRegressor
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tabicl — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
normalize_backend_name Ran
ran; our contract draft was wrong, not the code
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("d616c028b8825d2a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Setup for normalize_backend_name function
ARGS = {
    'backend_name': 'tabpfn',
    'use_tabpfn': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
one_hot_encoder Ran
ran; our contract draft was wrong, not the code
py-why/EconML/econml/_sklearn_compat.py
pointer only (licence: NOASSERTION) · get_code("cc963910bceeb426")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, py-why/EconML (NOASSERTION). 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.

resolve_local_k_neighbors Ran
ran, honoured the contract we drafted
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("51c32ad4de9dee98")
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 numpy as np
from dataclasses import dataclass

GLOBAL_LOCAL_STRATEGY = 'global'
LOCAL_KNN_STRATEGY = 'local_knn'

SUPPORTED_LOCAL_METRICS = ('euclidean',)
SUPPORTED_LOCAL_STRATEGIES = (GLOBAL_LOCAL_STRATEGY, LOCAL_KNN_STRATEGY)

@dataclass(frozen=True)
class LocalContextConfig:
    strategy: str = GLOBAL_LOCAL_STRATEGY
    k_neighbors: int | None = None
    metric: str = 'euclidean'
    scale_features: bool = True

    def __post_init__(self) -> None:
        strategy = str(self.strategy or GLOBAL_LOCAL_STRATEGY).strip().lower()
        metric = str(self.metric or 'euclidean').strip().lower()
        if strategy not in SUPPORTED_LOCAL_STRATEGIES:
            raise ValueError(f"Unsupported local-context strategy '{self.strategy}'. Expected one of {SUPPORTED_LOCAL_STRATEGIES}.")
        if metric not in SUPPORTED_LOCAL_METRICS:
            raise ValueError(f"Unsupported local-context metric '{self.metric}'. Expected one of {SUPPORTED_LOCAL_METRICS}.")
        if self.k_neighbors is not None and int(self.k_neighbors) <= 0:
            raise ValueError('k_neighbors must be positive when provided.')
        object.__setattr__(self, 'strategy', strategy)
        object.__setattr__(self, 'metric', metric)
        if self.k_neighbors is not None:
            object.__setattr__(self, 'k_neighbors', int(self.k_neighbors))
        object.__setattr__(self, 'scale_features', bool(self.scale_features))

def ensure_local_context_config(local_context: object | None) -> LocalContextConfig:
    if local_context is None:
        return LocalContextConfig()
    if isinstance(local_context, LocalContextConfig):
        return local_context
    if isinstance(local_context, dict):
        return LocalContextConfig(**local_context)
    if all((hasattr(local_context, attr) for attr in ('strategy', 'k_neighbors', 'metric', 'scale_features'))):
        return LocalContextConfig(strategy=str(getattr(local_context, 'strategy')), k_neighbors=getattr(local_context, 'k_neighbors'), metric=str(getattr(local_context, 'metric')), scale_features=bool(getattr(local_context, 'scale_features')))
    raise TypeError(f'local_context must be None, LocalContextConfig, or a mapping; got {type(local_context).__name__}.')

def resolve_local_k_neighbors(local_context: object | None, n_train_samples: int) -> int | None:
    cfg = ensure_local_context_config(local_context)
    if cfg.strategy == GLOBAL_LOCAL_STRATEGY:
        return None
    n_train = int(n_train_samples)
    if n_train <= 0:
        raise ValueError('n_train_samples must be positive to resolve local_knn neighbors.')
    if cfg.k_neighbors is None:
        resolved = min(int(10.0 * np.sqrt(n_train)), 1000, n_train)
    else:
        resolved = min(int(cfg.k_neighbors), n_train)
    return max(1, int(resolved))

ARGS = {
    'local_context': LocalContextConfig(
        strategy=LOCAL_KNN_STRATEGY,
        k_neighbors=5,
        metric='euclidean',
        scale_features=True
    ),
    'n_train_samples': 100
}
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 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
resolve_model_path Ran
ran; our contract draft was wrong, not the code
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("32662710c301f6db")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from pathlib import Path

# Define ARGS dictionary with all parameters for resolve_model_path
ARGS = {
    'backend_name': 'tabpfn',
    'model_path': 'auto',
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split Ran
ran; our contract draft was wrong, not the code
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("de28a56fedb8f6ac")
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 Lambda. 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
from keras.layers import Lambda, InputLayer

# The split function takes two parameters: start and stop
# These are used to slice a tensor along dimension 1 (columns)
# The Lambda layer expects integer indices for slicing

ARGS = {
    'start': 1,
    'stop': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Lambda — a Lambda output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Lambda 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
split_mixture_of_gaussians Ran
ran; our contract draft was wrong, not the code
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("3c8d277900355042")
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
from keras.layers import Lambda, InputLayer
from tensorflow.keras import Input
import tensorflow as tf

torch.manual_seed(0)

def split(start, stop):
    return Lambda(lambda x: x[:, start:stop], output_shape=(None, stop - start))

def split_mixture_of_gaussians(x, n_components):
    pi = split(0, n_components)(x)
    mu = split(n_components, 2 * n_components)(x)
    log_sig = split(2 * n_components, 3 * n_components)(x)
    return (pi, mu, log_sig)

# Create a mock input tensor that will be passed to split_mixture_of_gaussians
# The function expects x to be a tensor with shape (batch_size, feature_dim)
# where feature_dim = 3 * n_components
n_components = 4
batch_size = 2
total_features = 3 * n_components  # 12

# Create input using Keras/TensorFlow
x_input = Input(shape=(total_features,), batch_size=batch_size)

ARGS = {
    "x": x_input,
    "n_components": n_components
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, tensorflow, 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
uniform_kernel Ran
ran; our contract draft was wrong, not the code
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("4bf47bda9efdd1c3")
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 EagerTensor, ndim 1, dtype family float, shape (2,) 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 tensorflow as tf
import numpy as np

# Construct arguments for uniform_kernel function
leaf = tf.constant([
    [0, 1, 2, 3],
    [1, 0, 1, 2]
], dtype=tf.int64)

leaf_id = tf.constant([0, 1], dtype=tf.int64)

normalizer = 2.0

ARGS = {
    "leaf": leaf,
    "leaf_id": leaf_id,
    "normalizer": normalizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
DeepGMM Not yet run
unverified (harvested, no recorded run)
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("db14d6bef0bb9133")
How it ran

no invocation recorded.

GMMGameGraph Not yet run
unverified (harvested, no recorded run)
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("2327c4d83e773e1f")
How it ran

no invocation recorded.

GaussianCritic Not yet run
unverified (harvested, no recorded run)
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("70c2baa0909529d5")
How it ran

no invocation recorded.

LocalKNNRegressorWrapper Not yet run
unverified (harvested, no recorded run)
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("f9539636b99f8b16")
How it ran

no invocation recorded.

Modeler Not yet run
unverified (harvested, no recorded run)
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("1eec9fee2b64010d")
How it ran

no invocation recorded.

Response Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("c2ab99a0e9553a27")
How it ran

no invocation recorded.

StructuralFunctionModel Not yet run
unverified (harvested, no recorded run)
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("b5efdfed089bbba3")
How it ran

no invocation recorded.

Treatment Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("cd95f33e8733af08")
How it ran

no invocation recorded.

_ensure_tabicl_src_path Not yet run
unverified (harvested, no recorded run)
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("0f5b6f5dcf69a823")
How it ran

no invocation recorded.

_make_base_regressor_backend Not yet run
unverified (harvested, no recorded run)
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("e1abeb6c600ab9d2")
How it ran

no invocation recorded.

dnn_regressor Not yet run
unverified (harvested, no recorded run)
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("ad0d4113c728b800")
How it ran

no invocation recorded.

get_gradients Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("d857136dd4c35240")
How it ran

no invocation recorded.

get_selector Not yet run
unverified (harvested, no recorded run)
py-why/EconML/econml/sklearn_extensions/model_selection.py
pointer only (licence: NOASSERTION) · get_code("407bca813dad3da5")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, py-why/EconML (NOASSERTION). 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.

import_tabpfn_regressor Not yet run
unverified (harvested, no recorded run)
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("ce1a88c6d9db0a32")
How it ran

no invocation recorded.

log_function Not yet run
unverified (harvested, no recorded run)
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("81d115a036772486")
How it ran

no invocation recorded.

log_norm_pdf Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("af71f8b98378fbf3")
How it ran

no invocation recorded.

make_regressor_backend Not yet run
unverified (harvested, no recorded run)
GepingChen/TabCF/tabcf_core/stage2_outcome.py
code served (permissive licence) · get_code("efdd980fc6b15f15")
How it ran

no invocation recorded.

mix_gaussian_loss Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("f2fed6db81bd010d")
How it ran

no invocation recorded.

mixture_of_gaussian_loss Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("d4af015b65e62f3c")
How it ran

no invocation recorded.

random_gmm Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("7d906b18ef843ed2")
How it ran

no invocation recorded.

random_laplace Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("9f8121b2bff02590")
How it ran

no invocation recorded.

random_multinomial Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("adefb97b3798d191")
How it ran

no invocation recorded.

random_normal Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("1c5c524131d5f2c4")
How it ran

no invocation recorded.

replace_gradients_mse Not yet run
unverified (harvested, no recorded run)
jhartford/DeepIV/deepiv/models.py
code served (permissive licence) · get_code("27198989b21ef10b")
How it ran

no invocation recorded.

scope_variables Not yet run
unverified (harvested, no recorded run)
CausalML/DeepGMM/baselines/agmm/deep_gmm.py
code served (permissive licence) · get_code("ea747cae9fa80c40")
How it ran

no invocation recorded.

Also present in other papers' code

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

Instrumental variable (IV) and control function (CF) methods are powerful tools for causal effect estimation in the presence of unmeasured confounding, yet most existing approaches target only mean effects and/or demand substantial fitting and tuning effort. In this paper, we introduce a simple method, TabCF, for control function regression using tabular foundation models, which enables accurate, fast, identification-transparent, and tuning-light causal estimation of distributional quantities, such as interventional means and quantiles; we also propose a copulabased approximation for multivariate outcomes. TabCF performs favorably against representative methods across a broad range of small-to medium-sized synthetic and real data scenarios. The central message is two-fold: for practitioners, it highlights that TabCF is an effective tool for distributional causal inference; for researchers, it suggests that the proposed approach could be considered a strong baseline for future method development. Code is available at https://github.com/GepingChen/TabCF.

For agents

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

get_harvested_code_for_paper("2605.05993")
get_code_for_paper("2605.05993")
have("2605.05993")

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

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

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

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

Connect an agent — have() is free.