SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.02120 · 2019

Adapting Neural Networks for the Estimation of Treatment Effects

arXiv · PDF · Open in the Atlas

Code that ran

2 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 2 have no contract verdict; 0 failures of our instrument; 3 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/1906.02120.json · badge: /api/ran/1906.02120.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
claudiashi57/dragonnet canonical (classifier label)
classifier basis: classifier_2025
0 ran · 3 no recorded run
farazmah/dragonnet-pytorch community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
FunctionStatusWhere it lives
dragonnet_loss Ran
ran on a synthesized input
farazmah/dragonnet-pytorch/dragonnet/model.py
code served (permissive licence) · get_code("f0493e1c7ef19d3e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2

# y_true: actual target variable - shape (batch_size,)
y_true = torch.randn(batch_size)

# t_true: actual treatment variable (binary) - shape (batch_size,)
t_true = torch.randint(0, 2, (batch_size,)).float()

# t_pred: predicted treatment (probabilities) - shape (batch_size,)
t_pred = torch.rand(batch_size)

# y0_pred: predicted target under control - shape (batch_size,)
y0_pred = torch.randn(batch_size)

# y1_pred: predicted target under treatment - shape (batch_size,)
y1_pred = torch.randn(batch_size)

# eps: trainable epsilon parameter - shape (1,) or scalar
eps = torch.tensor(0.1, requires_grad=True)

# alpha: loss component weighting hyperparameter
alpha = 0.5

ARGS = {
    'y_true': y_true,
    't_true': t_true,
    't_pred': t_pred,
    'y0_pred': y0_pred,
    'y1_pred': y1_pred,
    'eps': eps,
    'alpha': alpha
}
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 Tensor, 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
tarreg_loss Ran
ran on a synthesized input
farazmah/dragonnet-pytorch/dragonnet/model.py
code served (permissive licence) · get_code("1af5e3ba1bd7d55b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for the function arguments
batch_size = 2

# y_true: actual target variable (continuous, batch_size)
y_true = torch.randn(batch_size)

# t_true: actual treatment variable (binary, batch_size)
t_true = torch.randint(0, 2, (batch_size,)).float()

# t_pred: predicted treatment (probabilities, batch_size)
t_pred = torch.sigmoid(torch.randn(batch_size))

# y0_pred: predicted target under control (batch_size)
y0_pred = torch.randn(batch_size)

# y1_pred: predicted target under treatment (batch_size)
y1_pred = torch.randn(batch_size)

# eps: trainable epsilon parameter (scalar)
eps = torch.tensor(0.1, requires_grad=True)

# alpha: loss component weighting hyperparameter
alpha = 0.5

# beta: targeted regularization hyperparameter
beta = 0.3

ARGS = {
    'y_true': y_true,
    't_true': t_true,
    't_pred': t_pred,
    'y0_pred': y0_pred,
    'y1_pred': y1_pred,
    'eps': eps,
    'alpha': alpha,
    'beta': beta
}
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 Tensor, 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
psi_iptw Not yet run
unverified (harvested, no recorded run)
claudiashi57/dragonnet/src/semi_parametric_estimation/ate.py
pointer only (licence: NONE) · get_code("4c1ead3cf8e7085e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, claudiashi57/dragonnet when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

psi_tmle_bin_outcome Not yet run
unverified (harvested, no recorded run)
claudiashi57/dragonnet/src/semi_parametric_estimation/ate.py
pointer only (licence: NONE) · get_code("5a93c54bf76c6995")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, claudiashi57/dragonnet when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

psi_tmle_cont_outcome Not yet run
unverified (harvested, no recorded run)
claudiashi57/dragonnet/src/semi_parametric_estimation/ate.py
pointer only (licence: NONE) · get_code("a74e29ba350581b7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, claudiashi57/dragonnet when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

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

This paper addresses the use of neural networks for the estimation of treatment effects from observational data. Generally, estimation proceeds in two stages. First, we fit models for the expected outcome and the probability of treatment (propensity score) for each unit. Second, we plug these fitted models into a downstream estimator of the effect. Neural networks are a natural choice for the models in the first step. The question we address is: how can we adapt the design and training of the neural networks used in the first step in order to improve the quality of the final estimate of the treatment effect? We propose two adaptations based on insights from the statistical literature on the estimation of treatment effects. The first is a new architecture, the Dragonnet, that exploits the sufficiency of the propensity score for estimation adjustment. The second is a regularization procedure, targeted regularization, that induces a bias towards models that have non-parametrically optimal asymptotic properties `out-of-the-box`. Studies on benchmark datasets for causal inference show these adaptations outperform existing methods. Code is available at github.com/claudiashi57/dragonnet.

For agents

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

get_harvested_code_for_paper("1906.02120")
get_code_for_paper("1906.02120")
have("1906.02120")

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

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

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

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

Connect an agent — have() is free.