SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.06821 · 2022

DoWhy-GCM: An extension of DoWhy for causal inference in graphical causal models

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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 2 have no contract verdict; 3 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/2206.06821.json · badge: /api/ran/2206.06821.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
microsoft/dowhy canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
choose_variables Ran
ran; our contract draft was wrong, not the code
microsoft/dowhy/dowhy/causal_refuter.py
code served (permissive licence) · get_code("36145701d6e173b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned list, 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 random

# Set random seed for reproducibility
random.seed(42)

# Define variables_of_interest - a list of variable names
variables_of_interest = ["confounder1", "confounder2", "instrumental_var1", "effect_modifier1", "effect_modifier2"]

# Test case 1: required_variables is False (returns None)
required_variables_false = False

# Test case 2: required_variables is True (returns all variables_of_interest)
required_variables_true = True

# Test case 3: required_variables is an int (returns random sample)
required_variables_int = 3

# Test case 4: required_variables is a list (select specific variables)
required_variables_list_select = ["confounder1", "instrumental_var1"]

# Test case 5: required_variables is a list with '-' prefix (deselect variables)
required_variables_list_deselect = ["-confounder1", "-instrumental_var1"]

# Use one of the test cases for ARGS
# Let's use the int case as it exercises the random.sample logic
ARGS = {
    "required_variables": required_variables_int,
    "variables_of_interest": variables_of_interest
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 1, 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
convert_to_binary Ran
ran on a synthesized input
microsoft/dowhy/dowhy/datasets.py
code served (permissive licence) · get_code("942ea7e9bbeed5c8")
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 int64, ndim 0, dtype family int, 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 math
from numpy.random import choice

def sigmoid(x):
    return 1 / (1 + math.exp(-x))

def convert_to_binary(x, stochastic=True):
    p = sigmoid(x)
    if stochastic:
        return choice([0, 1], p=[1 - p, p])
    else:
        return int(p > 0.5)

ARGS = {
    "x": 0.5,
    "stochastic": True,
}
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 int64, ndim 0, dtype family int, 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
perform_bootstrap_test Ran
ran; our contract draft was wrong, not the code
microsoft/dowhy/dowhy/causal_refuter.py
code served (permissive licence) · get_code("80b0ffe65b0c7576")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned float64, 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

class Estimate:
    def __init__(self, value):
        self.value = value

estimate = Estimate(value=0.5)
simulations = [0.3, 0.4, 0.5, 0.6, 0.7, 0.5, 0.2, 0.8, 0.45, 0.55]

ARGS = {
    "estimate": estimate,
    "simulations": simulations
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, 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
perform_normal_distribution_test Ran
ran; our contract draft was wrong, not the code
microsoft/dowhy/dowhy/causal_refuter.py
code served (permissive licence) · get_code("f00b9d8cb7351187")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned float64, 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

class Estimate:
    def __init__(self, value):
        self.value = value

estimate = Estimate(value=5.2)
simulations = [4.8, 5.1, 5.3, 4.9, 5.0, 5.2, 4.7, 5.4, 5.1, 4.8]

ARGS = {
    'estimate': estimate,
    'simulations': simulations
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, 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
sigmoid Ran
ran, honoured the contract we drafted
microsoft/dowhy/dowhy/datasets.py
code served (permissive licence) · get_code("c27e5c071e798245")
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) 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 math

def sigmoid(x):
    return 1 / (1 + math.exp(-x))

# The sigmoid function takes a single parameter x (a number)
# and returns 1 / (1 + e^(-x))

ARGS = {
    "x": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
stochastically_convert_to_three_level_categorical Ran
ran on a synthesized input
microsoft/dowhy/dowhy/datasets.py
code served (permissive licence) · get_code("8e71755d9b095ffe")
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 int64, ndim 0, dtype family int, 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 math
from numpy.random import choice

def sigmoid(x):
    return 1 / (1 + math.exp(-x))

def stochastically_convert_to_three_level_categorical(x):
    p = sigmoid(x)
    return choice([0, 1, 2], p=[0.8 * (1 - p), 0.8 * p, 0.2])

# The function takes a single parameter x, which is used as input to sigmoid
# sigmoid expects a numeric value (int, float, or similar)
# We'll provide a simple numeric value

ARGS = {
    "x": 0.5
}
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 int64, ndim 0, dtype family int, 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 1 later) and 2 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
sigmoid 8 other papers
6 dated earlier, 2 later
1509.07892 (2015-09)
Evasion and Hardening of Tree Ensemble Classifiers
1510.03336 (2015-10)
Evaluating Real-time Anomaly Detection Algorithms - the Numenta Anomaly Benchmark
1902.00981 (2019-02)
Learning Counterfactual Representations for Estimating Individual Dose-Response Curves
and 5 more not named here
choose_variables 1 other paper
1 dated earlier
2011.04216 (2020-11)
DoWhy: An End-to-End Library for Causal Inference
perform_bootstrap_test 1 other paper
1 dated earlier
2011.04216 (2020-11)
DoWhy: An End-to-End Library for Causal Inference
perform_normal_distribution_test 1 other paper
1 dated earlier
2011.04216 (2020-11)
DoWhy: An End-to-End Library for Causal 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-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

We present DoWhy-GCM, an extension of the DoWhy Python library, which leverages graphical causal models. Unlike existing causality libraries, which mainly focus on effect estimation, DoWhy-GCM addresses diverse causal queries, such as identifying the root causes of outliers and distributional changes, attributing causal influences to the data generating process of each node, or diagnosis of causal structures. With DoWhy-GCM, users typically specify cause-effect relations via a causal graph, fit causal mechanisms, and pose causal queries -- all with just a few lines of code. The general documentation is available at https://www.pywhy.org/dowhy and the DoWhy-GCM specific code at https://github.com/py-why/dowhy/tree/main/dowhy/gcm.

For agents

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

get_harvested_code_for_paper("2206.06821")
get_code_for_paper("2206.06821")
have("2206.06821")

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

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

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

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

Connect an agent — have() is free.