SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.15133 · 2026

Causal Foundation Models with Continuous Treatments

Jesse Cresswell, Rahul Krishnan, Vahid Balazadeh, Christopher Stith, Medha Barath

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 6 failures of our instrument; 3 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/2605.15133.json · badge: /api/ran/2605.15133.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
layer6ai-labs/CCPFN-inference community
Papers with Code archive
9 ran · 3 no recorded run
FunctionStatusWhere it lives
DictToObject Ran
ran on a synthesized input · constructed an object; no result was computed
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("94a8e81c5b05b100")
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, DictToObject: 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
import numpy as np

torch.manual_seed(0)

# Analyze the function: __init__ takes a dict 'd' and converts it to an object
# by iterating through items, recursively converting nested dicts, and setting attributes

# Create a test dictionary with various types of values
test_dict = {
    "name": "test_object",
    "value": 42,
    "nested": {
        "inner_key": "inner_value",
        "inner_number": 3.14,
        "deep_nested": {
            "level3": "deep_value"
        }
    },
    "list_attr": [1, 2, 3],
    "tensor_attr": torch.randn(2, 4),
    "numpy_attr": np.array([1, 2, 3, 4]),
    "flag": True
}

ARGS = {
    "d": test_dict
}
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 DictToObject — 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 DictToObject 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
RMSNorm Ran
ran on a synthesized input · constructed an object; no result was computed
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("8ebbbd4e10f29278")
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, RMSNorm: 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
import torch.nn as nn

torch.manual_seed(0)

class RMSNorm(torch.nn.Module):

    def __init__(self, dim: int, eps: float=1e-06):
        super().__init__()
        self.eps = eps
        self.weight = nn.Parameter(torch.ones(dim))

    def _norm(self, x):
        return x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps)

    def forward(self, x):
        output = self._norm(x.float()).type_as(x)
        return output * self.weight

# Create test input tensor: batch_size=2, dim=4
x = torch.randn(2, 4)

ARGS = {
    "dim": 4,
    "eps": 1e-06
}
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 RMSNorm — 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 RMSNorm 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
TabDPTLongContextModel Ran
ran on a synthesized input · constructed an object; no result was computed
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("48d311d34348cb05")
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, TabDPTLongContextModel: 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'dropout': 0.1,
    'n_out': 10,
    'nhead': 2,
    'nhid': 16,
    'ninp': 8,
    'nlayers': 2,
    'num_covariates': 4,
    'treatment_dim': 3,
    'nbins': 5,
}
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 TabDPTLongContextModel — 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 TabDPTLongContextModel 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
_cfg_to_dict Ran
ran; our contract draft was wrong, not the code
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("500a0c25abda76e7")
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 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.

from omegaconf import OmegaConf

# Test case 1: OmegaConf DictConfig
cfg_dict = OmegaConf.create({
    "model": "resnet50",
    "learning_rate": 0.001,
    "batch_size": 32,
    "nested": {
        "param1": "value1",
        "param2": 42
    }
})

# Test case 2: Plain Python dict (should pass through unchanged)
plain_dict = {
    "key1": "value1",
    "key2": 123,
    "nested": {"inner": "data"}
}

# Test case 3: OmegaConf ListConfig wrapped in DictConfig
cfg_with_list = OmegaConf.create({
    "items": [1, 2, 3, 4, 5],
    "name": "test_config"
})

# Use the OmegaConf DictConfig as the primary test case
ARGS = {
    "cfg": cfg_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — 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
clip_outliers Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("a8db41cd982f90f0")
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 3, dtype family float, shape (5, 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 torch

torch.manual_seed(0)

# Create a 3D tensor with shape (T, B, H) = (5, 2, 4)
# T=5 (time steps), B=2 (batch), H=4 (hidden/features)
data = torch.randn(5, 2, 4)

# Add some NaN values to test the masking functionality
data[1, 0, 1] = float('nan')
data[3, 1, 2] = float('nan')

# eval_pos: position up to which to evaluate for computing statistics
eval_pos = 4

# n_sigma: number of standard deviations for outlier clipping
n_sigma = 4

ARGS = {
    'data': data,
    'eval_pos': eval_pos,
    'n_sigma': n_sigma,
}
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 3, dtype family float, shape (5, 2, 4) — shape (5, 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
maskmean Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("a627013811283b2d")
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 2, dtype family float, shape (1, 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 torch

torch.manual_seed(0)

# Create a small tensor (batch=2, features=4)
x = torch.randn(2, 4)

# Create a boolean mask of the same shape
mask = torch.rand(2, 4) > 0.5

# Choose a dimension to reduce over
dim = 0

ARGS = {
    "x": x,
    "mask": mask,
    "dim": dim,
}
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 2, dtype family float, shape (1, 4) — shape (1, 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
maskstd Ran
ran; our contract draft was wrong, not the code
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("6d49d6a89a247bfe")
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 2, dtype family float, shape (1, 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 torch

torch.manual_seed(0)

# Create small test tensors
# x: shape (2, 4) - batch of 2, feature dim 4
x = torch.randn(2, 4)

# mask: shape (2, 4) - boolean mask with same shape as x
mask = torch.tensor([[True, False, True, True],
                     [True, True, False, True]])

# dim: dimension along which to compute statistics
dim = 0

ARGS = {
    "x": x,
    "mask": mask,
    "dim": dim
}
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 2, dtype family float, shape (1, 4) — shape (1, 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
normalize_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("bfe4bda00433fd59")
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 2, dtype family float, shape (5, 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 torch

torch.manual_seed(0)

# Create sample data tensor with shape (batch=5, features=4)
# Include some NaN values to test masking
data = torch.randn(5, 4)
data[1, 2] = float('nan')
data[3, 0] = float('nan')

# eval_pos parameter - a position to split training vs eval data
eval_pos = 3

ARGS = {
    "data": data,
    "eval_pos": eval_pos
}
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 2, dtype family float, shape (5, 4) — shape (5, 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
pad_x_and_t Ran
ran; our contract draft was wrong, not the code
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("9c32df2a208b8d35")
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 2, dtype family float, shape (2, 10) 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

torch.manual_seed(0)

ARGS = {
    "X": torch.randn(2, 4),
    "num_features": 10,
    "pad_value": 0.0,
}
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 2, dtype family float, shape (2, 10) — shape (2, 10) 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
ContinuousInContextModel Not yet run
unverified (harvested, no recorded run)
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("bbedd89f7ab7ec7b")
How it ran

no invocation recorded.

TransformerEncoderLayer Not yet run
unverified (harvested, no recorded run)
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("0b8a82e2f7ecf3f0")
How it ran

no invocation recorded.

load_pretrained_tabdpt_model Not yet run
unverified (harvested, no recorded run)
layer6ai-labs/CCPFN-inference/src/ccpfn/models/continuous_icl_model.py
code served (permissive licence) · get_code("2f90b47664d754ab")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 3 the same month, 1 later) and 8 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
RMSNorm
brick of this paper's assembly: helper
5 other papers
4 dated earlier, 1 later · 3 only as an assembly brick
2310.15747 (2023-10)
Large Language Models are Temporal and Causal Reasoners for Video Question Answering
2405.13911 (2024-05)
TOPA: Extending Large Language Models for Video Understanding via Text-Only Pre-Alignment
2410.10356 (2024-10)
FasterDiT: Towards Faster Diffusion Transformers Training without Architecture Modification
and 2 more not named here
maskmean
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 1 only as an assembly brick
2410.18164 (2024-10)
TabDPT: Scaling Tabular Foundation Models on Real Data
2605.15488 (2026-05)
SurvivalPFN: Amortizing Survival Prediction via In-Context Bayesian Inference
clip_outliers
brick of this paper's assembly: data_transform
1 other paper
1 the same month · 1 only as an assembly brick
2605.15488 (2026-05)
SurvivalPFN: Amortizing Survival Prediction via In-Context Bayesian Inference
maskstd
brick of this paper's assembly: helper
1 other paper
1 the same month · 1 only as an assembly brick
2605.15488 (2026-05)
SurvivalPFN: Amortizing Survival Prediction via In-Context Bayesian Inference

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

Causal inference, estimating causal effects from observational data, is a fundamental tool in many disciplines. Of particular importance across a variety of domains is the continuous treatment setting, where the variable of intervention has a continuous range. This setting is far less explored and represents a substantial shift from the binary treatment setting, with models needing to represent effects across a continuum of treatment values. In this paper, we present the first causal foundation model for the continuous treatment setting. Our model meta-learns the ability to predict causal effects across a wide variety of unseen tasks without additional training or fine-tuning. First, we design a novel prior over data-generating processes with continuous treatment variables in order to generate a rich causal training corpus. We then train a transformer to reconstruct individual treatment-response curves given only observational data, leveraging in-context learning to amortize expensive Bayesian posterior inference. Our model achieves state-of-the-art performance on individual treatment-response curve reconstruction tasks compared to causal models which are trained specifically for those tasks. Inference code (including trained model weights) can be found at github.com/layer6ai-labs/CCPFN-inference. Figure 1: Estimating causal effects for continuous treatments (right) is much more challenging than for binary treatments (left), as multiple treatment-response curves fit the observed data equally well.

For agents

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

get_harvested_code_for_paper("2605.15133")
get_code_for_paper("2605.15133")
have("2605.15133")

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

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

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

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

Connect an agent — have() is free.