SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.14329 · ICML · 2025

Adjustment for Confounding using Pre-Trained Representations

David Ügamer, Thomas Nagler, Rickmer Schulte

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 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2506.14329.json · badge: /api/ran/2506.14329.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
rickmer-schulte/Pretrained-Causal-Adjust canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
collate_batch Ran
ran; our contract draft was wrong, not the code
rickmer-schulte/Pretrained-Causal-Adjust/src/data_setup/create_data_imdb.py
code served (permissive licence) · get_code("edbf00ba07cb1a88")
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

torch.manual_seed(0)

# The function expects a batch parameter which is an iterable of tuples
# Each tuple contains: (input_ids, metadata, raw_text)
# input_ids should be a tensor that can be passed to pad_sequence
# metadata can be any object
# raw_text can be any object (typically a string)

batch = [
    (torch.tensor([1, 2, 3]), {"id": 0}, "sample text one"),
    (torch.tensor([4, 5]), {"id": 1}, "sample text two"),
]

ARGS = {
    "batch": batch,
}
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 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
collect_images Ran
ran; our contract draft was wrong, not the code
rickmer-schulte/Pretrained-Causal-Adjust/src/data_setup/remove_duplicates.py
code served (permissive licence) · get_code("60c48af99a755db8")
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 defaultdict. 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
from collections import defaultdict

# Create temporary directory structure with test files
temp_base = tempfile.mkdtemp()

# Create folder structure
folder1 = os.path.join(temp_base, 'dataset1')
os.makedirs(folder1)

# Create NORMAL and PNEUMONIA subdirectories
normal_dir = os.path.join(folder1, 'NORMAL')
pneumonia_dir = os.path.join(folder1, 'PNEUMONIA')
os.makedirs(normal_dir)
os.makedirs(pneumonia_dir)

# Create some dummy .jpeg files
open(os.path.join(normal_dir, 'normal_001.jpeg'), 'w').close()
open(os.path.join(normal_dir, 'normal_002.JPEG'), 'w').close()
open(os.path.join(pneumonia_dir, 'pneumonia_001.jpeg'), 'w').close()
open(os.path.join(pneumonia_dir, 'pneumonia_002.jpeg'), 'w').close()

# Create another dataset folder
folder2 = os.path.join(temp_base, 'dataset2')
os.makedirs(folder2)
normal_dir2 = os.path.join(folder2, 'NORMAL')
os.makedirs(normal_dir2)
open(os.path.join(normal_dir2, 'normal_003.jpeg'), 'w').close()

# Define ARGS with input_dirs parameter
ARGS = {
    'input_dirs': [folder1, folder2]
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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_block_diagonal_rotation_matrix Ran
ran; our contract draft was wrong, not the code
rickmer-schulte/Pretrained-Causal-Adjust/src/helpers/feature_rotation.py
code served (permissive licence) · get_code("f1bc9a163ad18f18")
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 ndarray, ndim 2, dtype family float, shape (6, 6) 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

ARGS = {
    "feature_dim": 6,
    "dimensions": [(0, 1), (2, 3), (4, 5)],
    "angles_degrees": [45.0, 90.0, 30.0]
}
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 ndarray, ndim 2, dtype family float, shape (6, 6) — shape (6, 6) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fit_autoencoder Ran
ran; our contract draft was wrong, not the code
rickmer-schulte/Pretrained-Causal-Adjust/src/helpers/ae.py
code served (permissive licence) · get_code("00025b9d92164af5")
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 numpy as np
from sklearn.preprocessing import StandardScaler
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Dense
from tensorflow.keras.optimizers import Adam

np.random.seed(42)

X = np.random.randn(10, 4).astype(np.float32)

ARGS = {
    'X': X,
    'latent_dim': 5,
    'epochs': 2,
    'batch_size': 2,
    'validation_split': 0.1,
    'learning_rate': 0.001,
    'random_seed': 42,
    'verbose': 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, tensorflow — 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
rotate_latent_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rickmer-schulte/Pretrained-Causal-Adjust/src/helpers/feature_rotation.py
code served (permissive licence) · get_code("3a5bed001d14b231")
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 ndarray, ndim 2, dtype family float, shape (2, 4) 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

np.random.seed(42)

# Create sample feature data
# Shape: (N_samples, feature_dim)
N_samples = 2
feature_dim = 4
all_features = np.random.randn(N_samples, feature_dim).astype(np.float32)

# Define arguments for rotate_latent_features
ARGS = {
    "all_features": all_features,
    "angle_degrees": 45.0,
    "num_pairs": 2,
}
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 ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

There is growing interest in extending average treatment effect (ATE) estimation to incorporate non-tabular data, such as images and text, which may act as sources of confounding. Neglecting these effects risks biased results and flawed scientific conclusions. However, incorporating nontabular data necessitates sophisticated feature extractors, often in combination with ideas of transfer learning. In this work, we investigate how latent features from pre-trained neural networks can be leveraged to adjust for sources of confounding. We formalize conditions under which these latent features enable valid adjustment and statistical inference in ATE estimation, demonstrating results along the example of double machine learning. We discuss critical challenges inherent to latent feature learning and downstream parameter estimation arising from the high dimensionality and non-identifiability of representations. Common structural assumptions for obtaining fast convergence rates with additive or sparse linear models are shown to be unrealistic for latent features. We argue, however, that neural networks are largely insensitive to these issues. In particular, we show that neural networks can achieve fast convergence rates by adapting to intrinsic notions of sparsity and dimension of the learning problem.

For agents

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

get_harvested_code_for_paper("2506.14329")
get_code_for_paper("2506.14329")
have("2506.14329")

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

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

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

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

Connect an agent — have() is free.