SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.01483 · ICML · 2026

Causal Preference Elicitation

He Zhao, Edwin Bonilla, Daniel Steinberg

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 3 violated it and 1 has no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2602.01483.json · badge: /api/ran/2602.01483.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
csiro-funml/CaPE community
Papers with Code archive
8 ran · 2 no recorded run
FunctionStatusWhere it lives
ParticlePosterior Ran
ran on a synthesized input · constructed an object; no result was computed
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("0cfa6838bcb2e04a")
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, ParticlePosterior: 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 numpy as np
from typing import List, Optional

# Create small sample weight matrices (4x4 DAGs)
np.random.seed(0)

# Particle 1: sparse DAG structure
W1 = np.array([
    [0.0, 0.5, 0.0, 0.0],
    [0.0, 0.0, 0.3, 0.0],
    [0.0, 0.0, 0.0, 0.2],
    [0.0, 0.0, 0.0, 0.0]
], dtype=float)

# Particle 2: different sparse DAG structure
W2 = np.array([
    [0.0, 0.0, 0.4, 0.0],
    [0.6, 0.0, 0.0, 0.1],
    [0.0, 0.0, 0.0, 0.3],
    [0.0, 0.0, 0.0, 0.0]
], dtype=float)

# Particle 3: another sparse DAG
W3 = np.array([
    [0.0, 0.2, 0.0, 0.7],
    [0.0, 0.0, 0.4, 0.0],
    [0.0, 0.0, 0.0, 0.5],
    [0.0, 0.0, 0.0, 0.0]
], dtype=float)

particles = [W1, W2, W3]

# Optional: explicit weights (will be normalized)
weights = np.array([1.0, 1.5, 0.8])

ARGS = {
    'particles': particles,
    'weights': weights
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ParticlePosterior — 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 ParticlePosterior 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
bt_threeway_hier Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("b4ddc14a1a58ea41")
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 (3,) 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
import math
from scipy.special import expit

# Create a small weight matrix W
# Shape: (5, 5) - a small adjacency/weight matrix
np.random.seed(0)
W = np.random.randn(5, 5) * 0.5

# Define all parameters for bt_threeway_hier
ARGS = {
    "W": W,
    "i": 0,
    "j": 1,
    "tau": 0.1,
    "beta_edge": 5.0,
    "beta_dir": 5.0,
    "lam": 0.0,
    "phi_ij": 0.0,
    "phi_ji": 0.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (3,) — shape (3,) 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
direction_score Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("9ae1aa660e91556c")
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
import math

# Create a small weight matrix
W = np.random.randn(4, 5)

# Set up indices for matrix access
i = 1
j = 2

# Set up hyperparameters
tau = 0.1
eps = 1e-06
lam = 0.5
phi_ij = 2.0

ARGS = {
    "W": W,
    "i": i,
    "j": j,
    "tau": tau,
    "eps": eps,
    "lam": lam,
    "phi_ij": phi_ij,
}
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
entropy_categorical Ran
ran, honoured the contract we drafted
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("b60b1a0d6422f0f1")
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

# Create a probability distribution (categorical distribution)
# The function uses np.clip and np.log, so we need a valid probability array
# that sums to approximately 1 and has values between 0 and 1

p = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)

ARGS = {
    "p": p
}
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
is_acyclic Ran
ran, violated the contract we drafted
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("7911aa671a0408c5")
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

# The function is_acyclic takes a weight matrix W (numpy array) and checks if the
# adjacency graph it implies is acyclic using depth-first search.
# W should be a 2D numpy array where non-zero entries indicate edges.

# Create a small acyclic graph (no cycles)
# We'll create a 4x4 weight matrix representing a DAG
W_acyclic = np.array([
    [0.0, 0.5, 0.3, 0.0],
    [0.0, 0.0, 0.2, 0.4],
    [0.0, 0.0, 0.0, 0.1],
    [0.0, 0.0, 0.0, 0.0]
], dtype=float)

ARGS = {
    "W": W_acyclic
}
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 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
log_expert_likelihood_bt_threeway Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("9390a5a92e6a4225")
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
import math
from scipy.special import expit

def direction_score(W: np.ndarray, i: int, j: int, tau: float=0.1, eps: float=1e-06, lam: float=0.0, phi_ij: float=0.0) -> float:
    return math.log(eps + abs(W[i, j]) / tau) + lam * phi_ij

def logistic(x):
    return expit(x)

def bt_threeway_hier(W: np.ndarray, i: int, j: int, tau: float=0.1, beta_edge: float=5.0, beta_dir: float=5.0, lam: float=0.0, phi_ij: float=0.0, phi_ji: float=0.0):
    s_ij = direction_score(W, i, j, tau=tau, eps=1e-06, lam=lam, phi_ij=phi_ij)
    s_ji = direction_score(W, j, i, tau=tau, eps=1e-06, lam=lam, phi_ij=phi_ji)
    a = max(s_ij, s_ji)
    d = s_ij - s_ji
    p_edge = logistic(beta_edge * a)
    p_ij_edge = logistic(beta_dir * d)
    p_ij = p_edge * p_ij_edge
    p_ji = p_edge * (1.0 - p_ij_edge)
    p_none = 1.0 - p_edge
    return np.array([p_ij, p_ji, p_none], dtype=float)

def log_expert_likelihood_bt_threeway(y: int, W: np.ndarray, i: int, j: int, tau: float=0.1, beta_edge: float=5.0, beta_dir: float=5.0, lam: float=0.0, phi_ij: float=0.0, phi_ji: float=0.0):
    """
    Compute log p(y | W) for y ∈ {0,1,2} (0=i->j, 1=j->i, 2=none),
    using the hierarchical expert model but working directly with logits.
    """
    if y not in (0, 1, 2):
        raise ValueError('y must be 0 (i->j), 1 (j->i), or 2 (none)')
    p = bt_threeway_hier(W, i, j, tau=tau, beta_edge=beta_edge, beta_dir=beta_dir, lam=lam, phi_ij=phi_ij, phi_ji=phi_ji)
    return math.log(1e-12 + p[y])

# Create a small weight matrix (5x5 to allow indexing of nodes 0,1,2,3,4)
W = np.random.randn(5, 5).astype(np.float32)

ARGS = {
    'y': 0,
    'W': W,
    'i': 1,
    'j': 2,
    'tau': 0.1,
    'beta_edge': 5.0,
    'beta_dir': 5.0,
    'lam': 0.0,
    'phi_ij': 0.0,
    'phi_ji': 0.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
logistic Ran
ran, violated the contract we drafted
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("c6072629f9307bf4")
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 (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
import numpy as np
from scipy.special import expit

torch.manual_seed(0)

# The function logistic(x) takes a single parameter x and applies scipy.special.expit to it
# expit is the logistic sigmoid function that works on array-like inputs
# We need to provide a valid input - can be a scalar, list, numpy array, or torch tensor

# Create a small numpy array as input
x = np.array([0.0, 1.5, -2.3, 0.8])

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — 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 (4,) — shape (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 Ran
ran, violated the contract we drafted
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("f9308298c0f23a8f")
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 (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 simple test case for the normalize function
# The function takes weights as a numpy array and normalizes them

# Test case 1: positive weights
weights = np.array([1.0, 2.0, 3.0, 4.0])

ARGS = {
    "weights": weights
}
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 (4,) — shape (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
select_pair Not yet run
unverified (harvested, no recorded run)
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("87220e06d5f38d97")
How it ran

no invocation recorded.

select_pair_dynamic Not yet run
unverified (harvested, no recorded run)
csiro-funml/CaPE/inference/candidate_selection.py
code served (permissive licence) · get_code("d9d68fd4473662fc")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

We propose causal preference elicitation, a Bayesian framework for expert-in-the-loop causal discovery that actively queries local edge relations to concentrate a posterior over directed acyclic graphs (DAGs). From any black-box observational posterior, we model noisy expert judgments with a three-way likelihood over edge existence and direction. Posterior inference uses a flexible particle approximation, and queries are selected by an efficient expected information gain criterion on the expert's categorical response. Experiments on synthetic graphs, protein signaling data, and a human gene perturbation benchmark show faster posterior concentration and improved recovery of directed effects under tight query budgets.

For agents

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

get_harvested_code_for_paper("2602.01483")
get_code_for_paper("2602.01483")
have("2602.01483")

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

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

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

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

Connect an agent — have() is free.