SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.00163 · 2020

Identifying Causal-Effect Inference Failure with Uncertainty-Aware Models

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2007.00163.json · badge: /api/ran/2007.00163.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
OATML/ucate canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
branch_bias_l2 Ran
ran on a synthesized input
OATML/ucate/ucate/library/layers.py
code served (permissive licence) · get_code("8a450eb7c9c79fe7")
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 function. 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

def branch_bias_l2(rate):
    def func(x):
        l2 = tf.reduce_sum(tf.square(x), axis=-1)
        return 0.5 * tf.reduce_sum(l2 / rate)
    return func

# Create a small test tensor
x = tf.constant(np.random.randn(2, 4).astype(np.float32))

# The rate parameter should be a scalar or array that can be divided into l2
# Looking at the function, l2 has shape (batch_size,) and rate divides it
# So rate should be a scalar or have compatible shape
rate = tf.constant(1.0, dtype=tf.float32)

ARGS = {
    "rate": rate
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
branch_l2 Ran
ran on a synthesized input
OATML/ucate/ucate/library/layers.py
code served (permissive licence) · get_code("fd0b693f8a80043b")
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 function. 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

# Construct a valid rate parameter (a float/int used as divisor)
rate = 2.0

# Construct a valid x tensor that will be used in the function
# The function does: tf.reduce_sum(tf.square(x), axis=[1, 2])
# So x needs at least 3 dimensions where axes 1 and 2 can be reduced
# Shape: (batch=2, dim1=4, dim2=3, ...)
x = tf.constant([
    [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0], [10.0, 11.0, 12.0]],
    [[13.0, 14.0, 15.0], [16.0, 17.0, 18.0], [19.0, 20.0, 21.0], [22.0, 23.0, 24.0]]
], dtype=tf.float32)

ARGS = {
    "rate": rate
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_density_estimator Ran
ran on a synthesized input
OATML/ucate/ucate/library/scratch.py
code served (permissive licence) · get_code("235deecbc29e97e9")
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 KernelDensity. 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

# Set random seed for reproducibility
np.random.seed(0)

# Create a small sample dataset with shape (3000, 2)
# The function will sample 2000 points from this, so we need at least 2000 points
x = np.random.randn(3000, 2)

# Define all parameters
ARGS = {
    'x': x,
    'bandwidth': 1.0,
    'kernel': 'gaussian'
}
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 KernelDensity — a KernelDensity output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a KernelDensity 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
mmd Ran
ran on a synthesized input
OATML/ucate/ucate/library/models/tarnet.py
code served (permissive licence) · get_code("6226c7421bb125b3")
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 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 tensorflow as tf
import numpy as np

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

# Create small sample tensors
# t should have shape (batch_size, 2) - two columns for t[:, 0] and t[:, 1]
# phi should have shape (batch_size, feature_dim)

batch_size = 2
feature_dim = 4

# t: shape (2, 2) - batch of 2 samples, each with 2 values (for indexing [:, 0] and [:, 1])
t = tf.constant([[1.0, 0.0],
                 [0.0, 1.0]], dtype=tf.float32)

# phi: shape (2, 4) - batch of 2 samples, each with 4 features
phi = tf.constant([[1.0, 2.0, 3.0, 4.0],
                   [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

ARGS = {
    "t": t,
    "phi": phi
}
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 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
propensity_loss Ran
ran on a synthesized input
OATML/ucate/ucate/library/models/tarnet.py
code served (permissive licence) · get_code("67a5d0b74aeaad68")
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 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 tensorflow as tf
import numpy as np

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

# Create small batch tensors
batch_size = 2
num_classes = 4

# t_true: one-hot encoded treatment labels (batch_size, num_classes)
t_true = tf.constant([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0]
], dtype=tf.float32)

# t_pred: predicted treatment probabilities (batch_size, num_classes)
t_pred = tf.constant([
    [0.7, 0.1, 0.1, 0.1],
    [0.1, 0.8, 0.05, 0.05]
], dtype=tf.float32)

# y_true: target outcome values (batch_size,) or (batch_size, 1)
y_true = tf.constant([[1.5], [2.3]], dtype=tf.float32)

# y_pred: predicted outcome values (batch_size,) or (batch_size, 1)
y_pred = tf.constant([[1.4], [2.1]], dtype=tf.float32)

# y_loss: a callable loss function that takes (y_true, y_pred) and returns a scalar or vector
# Using MSE loss as a simple example
y_loss = tf.keras.losses.MeanSquaredError()

ARGS = {
    "t_true": t_true,
    "t_pred": t_pred,
    "y_true": y_true,
    "y_pred": y_pred,
    "y_loss": y_loss
}
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 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

Also present in other papers' code

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

Recommending the best course of action for an individual is a major application of individual-level causal effect estimation. This application is often needed in safety-critical domains such as healthcare, where estimating and communicating uncertainty to decision-makers is crucial. We introduce a practical approach for integrating uncertainty estimation into a class of state-of-the-art neural network methods used for individual-level causal estimates. We show that our methods enable us to deal gracefully with situations of "no-overlap", common in high-dimensional data, where standard applications of causal effect approaches fail. Further, our methods allow us to handle covariate shift, where test distribution differs to train distribution, common when systems are deployed in practice. We show that when such a covariate shift occurs, correctly modeling uncertainty can keep us from giving overconfident and potentially harmful recommendations. We demonstrate our methodology with a range of state-of-the-art models. Under both covariate shift and lack of overlap, our uncertainty-equipped methods can alert decisions makers when predictions are not to be trusted while outperforming their uncertainty-oblivious counterparts.

For agents

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

get_harvested_code_for_paper("2007.00163")
get_code_for_paper("2007.00163")
have("2007.00163")

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

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

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

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

Connect an agent — have() is free.