SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.05169 · 2023

Causal Triplet: An Open Challenge for Intervention-centric Causal Representation Learning

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 (0 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; 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/2301.05169.json · badge: /api/ran/2301.05169.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
CausalTriplet/causaltriplet canonical (classifier label)
classifier basis not recorded on the link
9 ran · 3 no recorded run
FunctionStatusWhere it lives
analyze_log Ran
ran on a synthesized input
CausalTriplet/causaltriplet/analysis/common.py
code served (permissive licence) · get_code("9da0bea29037001a")
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 list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 re
from io import StringIO

def analyze_log(f):
    stat = list()
    for line in f:
        if len(line) > 5 and line[:5] == 'epoch':
            raw = re.split('#|\\(|\\)|=|\n|,| ', line)
            num = [s for s in raw if re.match('^[-+]?[0-9.]+$', s)]
            stat.append(num)
    return stat

# Create a file-like object with test log data
log_content = """epoch 1 # loss=0.5 (acc=0.9, f1=0.85)
epoch 2 # loss=0.3 (acc=0.95, f1=0.92)
other line without epoch
epoch 3 # loss=0.2 (acc=0.97, f1=0.96)
"""

f = StringIO(log_content)

ARGS = {
    'f': f
}
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 list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
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
build_grid Ran
ran on a synthesized input
CausalTriplet/causaltriplet/model/slotpair.py
code served (permissive licence) · get_code("3e53111511bb1304")
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 4, dtype family float, shape (1, 4, 3, 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

ARGS = {
    "resolution": (4, 3)
}
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 4, dtype family float, shape (1, 4, 3, 4) — shape (1, 4, 3, 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
count_param Ran
ran on a synthesized input
CausalTriplet/causaltriplet/util.py
code served (permissive licence) · get_code("91e6bfc2eccdd5b5")
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, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import numpy as np

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        # Freeze one parameter to test requires_grad filtering
        self.linear2.bias.requires_grad = False
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
df_to_dict Ran
ran on a synthesized input
CausalTriplet/causaltriplet/dataset.py
code served (permissive licence) · get_code("b330034564283acc")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 pandas as pd
import collections

# Create a small DataFrame with the required columns
data = {
    'verb_class': ['v1', 'v1', 'v2', 'v2'],
    'noun_class': ['n1', 'n2', 'n1', 'n2'],
}

df = pd.DataFrame(data)
# Set meaningful indices/names for rows
df.index = ['sample_0', 'sample_1', 'sample_2', 'sample_3']

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
extract_pair Ran
ran on a synthesized input
CausalTriplet/causaltriplet/dataset.py
code served (permissive licence) · get_code("cdfac8247641f7cf")
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, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 PIL import Image
import tempfile
import os
from torchvision import transforms

# Create temporary test images
temp_dir = tempfile.mkdtemp()

# Create a simple test image file for start_name
start_img_path = os.path.join(temp_dir, "start.png")
start_img = Image.new('RGB', (100, 100), color=(73, 109, 137))
start_img.save(start_img_path)

# Create a simple test image file for stop_name
stop_img_path = os.path.join(temp_dir, "stop.png")
stop_img = Image.new('RGB', (100, 100), color=(200, 50, 100))
stop_img.save(stop_img_path)

# Define a simple transform that converts PIL image to tensor
transform = transforms.Compose([
    transforms.ToTensor(),
])

# Define bbox as (left, upper, right, lower)
bbox = (10, 10, 90, 90)

ARGS = {
    "start_name": start_img_path,
    "stop_name": stop_img_path,
    "transform": transform,
    "bbox": bbox,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, skimage, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
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
extract_setting Ran
ran on a synthesized input
CausalTriplet/causaltriplet/analysis/common.py
code served (permissive licence) · get_code("f5669e360fe43efa")
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 pandas as pd
import numpy as np

# Create sample dataframes with the required columns
def create_sample_df():
    data = {
        'bbox': ['bbox1', 'bbox1', 'bbox1'],
        'split': ['train', 'train', 'train'],
        'model': ['model_a', 'model_a', 'model_a'],
        'critic_action': ['ca1', 'ca1', 'ca1'],
        'critic_state': ['cs1', 'cs1', 'cs1'],
        'encoder': ['enc1', 'enc1', 'enc1'],
        'tran': ['tran1', 'tran1', 'tran1'],
        'mask': ['mask1', 'mask1', 'mask1'],
        'amin': [0.1, 0.1, 0.1],
        'sparsity': [-1, -1, -1],
        'epoch': [1, 2, 3],
        'train': [0.5, 0.6, 0.7],
        'iid': [0.4, 0.5, 0.6],
        'ood': [0.3, 0.4, 0.5],
        'val': [0.45, 0.55, 0.65],
        'obj_action': [0.2, 0.3, 0.4],
        'obj_state': [0.1, 0.2, 0.3]
    }
    return pd.DataFrame(data)

df = create_sample_df()

sel_iid = pd.DataFrame({
    'bbox': ['bbox1', 'bbox1'],
    'split': ['train', 'train'],
    'model': ['model_a', 'model_a'],
    'critic_action': ['ca1', 'ca1'],
    'critic_state': ['cs1', 'cs1'],
    'encoder': ['enc1', 'enc1'],
    'tran': ['tran1', 'tran1'],
    'mask': ['mask1', 'mask1'],
    'amin': [0.1, 0.1],
    'sparsity': [-1, -1],
    'seed': [0, 1],
    'iid_metric': [0.8, 0.85]
})

sel_ood = pd.DataFrame({
    'bbox': ['bbox1', 'bbox1'],
    'split': ['train', 'train'],
    'model': ['model_a', 'model_a'],
    'critic_action': ['ca1', 'ca1'],
    'critic_state': ['cs1', 'cs1'],
    'encoder': ['enc1', 'enc1'],
    'tran': ['tran1', 'tran1'],
    'mask': ['mask1', 'mask1'],
    'amin': [0.1, 0.1],
    'sparsity': [-1, -1],
    'seed': [0, 1],
    'ood_metric': [0.7, 0.75]
})

ARGS = {
    'df': df,
    'sel_iid': sel_iid,
    'sel_ood': sel_ood,
    'bbox': 'bbox1',
    'split': 'train',
    'model': 'model_a',
    'critic_action': 'ca1',
    'critic_state': 'cs1',
    'encoder': 'enc1',
    'tran': 'tran1',
    'mask': 'mask1',
    'amin': 0.1,
    'sparsity': -1,
    'plot': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
reparametrize Ran
ran, honoured the contract we drafted
CausalTriplet/causaltriplet/model/slotpair.py
code served (permissive licence) · get_code("863fc64cd51264f0")
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, 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
from torch.autograd import Variable

torch.manual_seed(0)

# The function reparametrize expects:
# - mu: a tensor (used with arithmetic operations and passed to std.data.new)
# - logvar: a tensor (used with .div(2).exp() and .data.new and .size())

# Create small tensors for mu and logvar
# logvar should be a log variance tensor
mu = torch.randn(2, 4)
logvar = torch.randn(2, 4)

ARGS = {
    "mu": mu,
    "logvar": logvar,
}
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, 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
split_df Ran
ran on a synthesized input
CausalTriplet/causaltriplet/dataset.py
code served (permissive licence) · get_code("3bc01008287f02c5")
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 pandas as pd
import random

# Create a minimal DataFrame that satisfies the function's requirements
# The function expects: verb_class, noun_class, xmax, ymax, xmin, ymin columns

random.seed(0)

# Create sample data for the DataFrame
data = {
    'verb_class': ['run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk'],
    'noun_class': ['fast', 'slow', 'high', 'fast', 'slow', 'high', 'fast', 'slow'],
    'xmax': [100, 200, 150, 300, 250, 180, 320, 220],
    'ymax': [120, 180, 160, 240, 200, 170, 280, 210],
    'xmin': [50, 100, 80, 150, 120, 90, 160, 110],
    'ymin': [60, 90, 80, 120, 100, 85, 140, 105],
}

df = pd.DataFrame(data)

# Test with different axis values to ensure robustness
ARGS = {
    'df': df,
    'axis': 'verb',
    'seed': 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, procthor — 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
unstack_and_split Ran
ran on a synthesized input
CausalTriplet/causaltriplet/model/slotpair.py
code served (permissive licence) · get_code("55fe5a20a8c9e4f0")
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:
# - input: a tensor that will be viewed and indexed
# - batch_size: an integer
#
# Looking at the function body:
# - input.view((batch_size, -1, *input.shape[1:]))
#   This reshapes input into (batch_size, something, *remaining_dims)
# - unstacked[:, :, 3, :, :] indexes the 3rd index in dimension 2
#   This means dimension 2 must have at least 4 elements (indices 0-3)
# - unstacked[:, :, :3, :, :] takes first 3 elements of dimension 2
# - The result suggests input should have shape compatible with 4D or 5D tensor
#
# From the indexing pattern, input needs to be reshaped to at least 5D
# with dimension 2 having size 4 (for RGBA: channels 0,1,2 and alpha at 3)
# and dimensions 3,4 being spatial (height, width)

batch_size = 2

# Create input tensor
# We need: view((batch_size, -1, 4, height, width)) to work
# So input should have shape (batch_size * num_frames, 4, height, width)
# or be reshaped appropriately
# Let's make it: (batch_size, num_frames * 4, height, width)
# where view will reshape to (batch_size, num_frames, 4, height, width)

num_frames = 3
height = 5
width = 6

# Shape: (batch_size * num_frames, 4, height, width)
input_shape = (batch_size * num_frames, 4, height, width)
input_tensor = torch.randn(input_shape)

ARGS = {
    "input": input_tensor,
    "batch_size": batch_size,
}
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
extract_csv Not yet run
unverified (harvested, no recorded run)
CausalTriplet/causaltriplet/analysis/common.py
code served (permissive licence) · get_code("c4fa1be5e27bafd8")
How it ran

no invocation recorded.

group_to_map Not yet run
unverified (harvested, no recorded run)
CausalTriplet/causaltriplet/model/grouppair.py
code served (permissive licence) · get_code("cb7ac709b70d901a")
How it ran

no invocation recorded.

resize_attn_map Not yet run
unverified (harvested, no recorded run)
CausalTriplet/causaltriplet/model/grouppair.py
code served (permissive licence) · get_code("cfc85dbaaf297834")
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, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 10 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
reparametrize 10 other papers
3 dated earlier, 7 later · 2 only as an assembly brick
2105.14203 (2021-05)
Understanding Instance-based Interpretability of Variational Auto-Encoders
2111.02338 (2021-11)
Drop, Swap, and Generate: A Self-Supervised Approach for Generating Neural Activity
2210.13647 (2022-10)
Temporally Disentangled Representation Learning
and 7 more not named here
resize_attn_map 1 other paper
1 later
2310.19001 (2023-10)
Uncovering Prototypical Knowledge for Weakly Open-Vocabulary Semantic Segmentation

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

Recent years have seen a surge of interest in learning high-level causal representations from low-level image pairs under interventions. Yet, existing efforts are largely limited to simple synthetic settings that are far away from real-world problems. In this paper, we present Causal Triplet, a causal representation learning benchmark featuring not only visually more complex scenes, but also two crucial desiderata commonly overlooked in previous works: (i) an actionable counterfactual setting, where only certain object-level variables allow for counterfactual observations whereas others do not; (ii) an interventional downstream task with an emphasis on out-of-distribution robustness from the independent causal mechanisms principle. Through extensive experiments, we find that models built with the knowledge of disentangled or object-centric representations significantly outperform their distributed counterparts. However, recent causal representation learning methods still struggle to identify such latent structures, indicating substantial challenges and opportunities for future work. Our code and datasets will be available at https://sites.google.com/view/causaltriplet.

For agents

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

get_harvested_code_for_paper("2301.05169")
get_code_for_paper("2301.05169")
have("2301.05169")

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

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

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

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

Connect an agent — have() is free.