SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.11601 · 2024

Standardizing Structural Causal Models

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 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/2406.11601.json · badge: /api/ran/2406.11601.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
werkaaa/iscm canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
convert_to_binary_matrix Ran
ran, honoured the contract we drafted
werkaaa/iscm/iscm/graph_utils.py
code served (permissive licence) · get_code("b2399067bdec2bea")
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 (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

# Create a small weight matrix with some zeros and non-zeros
weight_matrix = np.array([
    [1.0, 0.0, 2.5, 0.0],
    [0.0, 3.1, 0.0, -1.2],
    [4.0, 0.0, 0.0, 5.5]
], dtype=float)

ARGS = {
    "weight_matrix": weight_matrix
}
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 (3, 4) — shape (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
draw_rff_params Ran
ran; our contract draft was wrong, not the code
werkaaa/iscm/iscm/mechanisms/rff.py
code served (permissive licence) · get_code("7498f406618c10c6")
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.

import numpy as np

# Create a random number generator
rng = np.random.RandomState(seed=42)

# Define the arguments
ARGS = {
    'rng': rng,
    'd': 5,
    'length_scale_range': (0.1, 1.0),
    'output_scale_range': (0.5, 2.0),
    'n_rff': 100
}
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 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
get_data_samples_from_noise_vars Ran
ran; our contract draft was wrong, not the code
werkaaa/iscm/iscm/closed_form_data_generator.py
code served (permissive licence) · get_code("1e3c2a4dd856e0d0")
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 (4, 5) 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

# Set random seed for reproducibility
rng = np.random.Generator(np.random.PCG64(seed=42))

# Define noise_vars as a dict mapping indices to variance values
noise_vars = {
    0: 0.5,
    1: 0.3,
    2: 0.4,
    3: 0.2
}

# Define weights as a numpy array
# Shape should be (4, 4) to match the number of noise variables
# Using small values to ensure the matrix (I - weights.T) is invertible
weights = np.array([
    [0.1, 0.05, 0.02, 0.01],
    [0.03, 0.1, 0.04, 0.02],
    [0.02, 0.01, 0.1, 0.03],
    [0.01, 0.02, 0.03, 0.1]
], dtype=np.float64)

# Define number of samples
num_samples = 5

ARGS = {
    "noise_vars": noise_vars,
    "weights": weights,
    "num_samples": num_samples,
    "rng": rng
}
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 (4, 5) — shape (4, 5) 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
has_cycles Ran
ran, violated the contract we drafted
werkaaa/iscm/iscm/graph_utils.py
code served (permissive licence) · get_code("5f38cecff3d354ae")
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 bool, 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 numpy as np
from collections import defaultdict

class Graph:

    def __init__(self, weight_dict=None, weight_matrix=None, schema=None):
        if weight_matrix is not None:
            self.weight_dict = dict()
            for start_node in range(weight_matrix.shape[0]):
                for end_node in range(weight_matrix.shape[1]):
                    if weight_matrix[start_node, end_node] == 0:
                        continue
                    self.weight_dict[start_node, end_node] = weight_matrix[start_node, end_node]
        elif weight_dict is not None:
            self.weight_dict = weight_dict
        elif schema is not None:
            self.weight_dict = {edge: None for edge in schema}
        else:
            self.weight_dict = dict()
        self.nodes = set()
        self.children = defaultdict(list)
        self.parents = defaultdict(list)
        for node_start, node_end in self.weight_dict.keys():
            self.nodes.add(node_start)
            self.nodes.add(node_end)
            self.children[node_start].append(node_end)
            self.parents[node_end].append(node_start)

    def get_children(self, node):
        return self.children[node]

    def get_parents(self, node):
        return self.parents[node]

    def get_roots(self):
        all_children = [child for child, parents in self.parents.items() if len(parents) > 0]
        roots = self.nodes.difference(all_children)
        return roots

    def get_leafs(self):
        leafs = self.nodes.difference(self.children.keys())
        return leafs

    def get_weight(self, node_begin, node_end):
        return self.weight_dict[node_begin, node_end]

    def get_matrix_representation(self, boolean=False):
        W = np.zeros((self.get_num_nodes(), self.get_num_nodes()))
        for (node_begin, node_end), w in self.weight_dict.items():
            if boolean:
                W[node_begin, node_end] = True
            else:
                W[node_begin, node_end] = w
        return W

    def get_undirected_matrix_representation(self, boolean=False):
        W = np.zeros((self.get_num_nodes(), self.get_num_nodes()))
        for (node_begin, node_end), w in self.weight_dict.items():
            if boolean:
                W[node_begin, node_end] = True
                W[node_end, node_begin] = True
            else:
                W[node_begin, node_end] = w
                W[node_end, node_begin] = w
        return W

    def get_children_gen(self, node):
        for child in self.children[node]:
            yield child

    def get_num_nodes(self):
        return len(self.nodes)

    def get_nodes(self):
        return sorted(self.nodes)

    def set_num_nodes(self, num_nodes):
        for i in range(num_nodes):
            self.nodes.add(i)

    def add_edge(self, node_start, node_end, weight=1):
        if (node_start, node_end) in self.weight_dict:
            pass
        else:
            self.children[node_start].append(node_end)
            self.parents[node_end].append(node_start)
        self.weight_dict[node_start, node_end] = weight
        self.nodes.add(node_start)
        self.nodes.add(node_end)

    def has_edge(self, node_start, node_end):
        return node_end in self.children[node_start]


weight_dict = {
    (0, 1): 1.0,
    (1, 2): 1.0,
    (2, 3): 1.0,
}

G = Graph(weight_dict=weight_dict)

ARGS = {
    "G": G
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
rff_mechanism_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
werkaaa/iscm/iscm/mechanisms/rff.py
code served (permissive licence) · get_code("6e1d5ddcdecc486b")
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 1, dtype family float, shape (2,) 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

# Analyze the function signature and usage:
# - parents: used in einsum 'db,...d->...b', so shape (..., d) where d is a dimension
# - noise: added to f_j, so shape (...,)
# - omega: used in einsum 'db,...d->...b', so shape (d, b)
# - b: added as bias, so shape (b,)
# - w: used in einsum 'b,...b->...', so shape (b,)
# - c: scalar multiplier
# - n_rff: scalar for normalization

# Set dimensions with distinct sizes for clarity
d = 4  # parent dimension
b_dim = 3  # RFF feature dimension
batch_size = 2  # batch dimension

# Create arguments
parents = np.random.randn(batch_size, d).astype(np.float32)
omega = np.random.randn(d, b_dim).astype(np.float32)
b_bias = np.random.randn(b_dim).astype(np.float32)
w = np.random.randn(b_dim).astype(np.float32)
c = 1.5  # scalar
n_rff = 3  # number of RFF features
noise = np.random.randn(batch_size).astype(np.float32)

ARGS = {
    'parents': parents,
    'noise': noise,
    'omega': omega,
    'b': b_bias,
    'w': w,
    'c': c,
    'n_rff': n_rff
}
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 1, dtype family float, shape (2,) — shape (2,) 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
sample_weight Ran
ran, honoured the contract we drafted
werkaaa/iscm/iscm/mechanisms/linear.py
code served (permissive licence) · get_code("1ddad73a7e261d04")
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 float, 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 numpy as np

ARGS = {
    "a": 0.5,
    "b": 2.0,
    "rng": np.random.default_rng(seed=42),
}
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 float, 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
topo_sort Not yet run
unverified (harvested, no recorded run)
werkaaa/iscm/iscm/graph_utils.py
code served (permissive licence) · get_code("0b9b470c0dcf86ea")
How it ran

no invocation recorded.

Also present in other papers' code

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

Synthetic datasets generated by structural causal models (SCMs) are commonly used for benchmarking causal structure learning algorithms. However, the variances and pairwise correlations in SCM data tend to increase along the causal ordering. Several popular algorithms exploit these artifacts, possibly leading to conclusions that do not generalize to real-world settings. Existing metrics like $\operatorname{Var}$-sortability and $\operatorname{R^2}$-sortability quantify these patterns, but they do not provide tools to remedy them. To address this, we propose internally-standardized structural causal models (iSCMs), a modification of SCMs that introduces a standardization operation at each variable during the generative process. By construction, iSCMs are not $\operatorname{Var}$-sortable. We also find empirical evidence that they are mostly not $\operatorname{R^2}$-sortable for commonly-used graph families. Moreover, contrary to the post-hoc standardization of data generated by standard SCMs, we prove that linear iSCMs are less identifiable from prior knowledge on the weights and do not collapse to deterministic relationships in large systems, which may make iSCMs a useful model in causal inference beyond the benchmarking problem studied here. Our code is publicly available at: https://github.com/werkaaa/iscm.

For agents

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

get_harvested_code_for_paper("2406.11601")
get_code_for_paper("2406.11601")
have("2406.11601")

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

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

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

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

Connect an agent — have() is free.