SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.19788 · ICML · 2026

Bayesian Meta-Learning with Expert Feedback for Task-Shift Adaptation through Causal Embeddings

Samuel Kaski, Jorge Loría, Lotta Mäkinen

arXiv · PDF · Open in the Atlas

Code that ran

14 of 15 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; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 13 failures of our instrument; 1 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.19788.json · badge: /api/ran/2602.19788.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
lottamakinen/causal-meta-learning canonical (classifier label)
classifier basis: census
14 ran · 1 no recorded run
FunctionStatusWhere it lives
avg_task_classification_metrics Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/metrics/accuracy.py
code served (permissive licence) · get_code("ab666833902be02f")
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

# Construct task_metrics with the expected structure:
# {task_label : {metric: value}}
task_metrics = {
    'task_1': {
        'accuracy': 0.85,
        'precision': 0.82,
        'recall': 0.88,
        'f1': 0.85
    },
    'task_2': {
        'accuracy': 0.92,
        'precision': 0.90,
        'recall': 0.91,
        'f1': 0.905
    },
    'task_3': {
        'accuracy': 0.78,
        'precision': 0.75,
        'recall': 0.80,
        'f1': 0.775
    }
}

ARGS = {
    'task_metrics': task_metrics
}
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
bernoulli_entropy Ran
ran, violated the contract we drafted
lottamakinen/causal-meta-learning/expert_model/expert_inference.py
code served (permissive licence) · get_code("8d9ac15c77d941e1")
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

# The function takes a single parameter 'p' which should be a numpy array
# or array-like object containing probability values between 0 and 1.
# The function computes Bernoulli entropy element-wise.

# Create a small numpy array with probability values
p_values = np.array([0.1, 0.5, 0.9, 0.3])

ARGS = {
    "p": p_values
}
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
classification_metrics Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lottamakinen/causal-meta-learning/metrics/accuracy.py
code served (permissive licence) · get_code("5831505484c20cbc")
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

# Set random seed for reproducibility
np.random.seed(0)

# Create small test data for binary classification
# y_pred: probabilities of positive class (values between 0 and 1)
y_pred = np.array([0.1, 0.3, 0.6, 0.8, 0.2, 0.9, 0.4, 0.7])

# y_true: ground truth binary labels (0 or 1)
y_true = np.array([0, 0, 1, 1, 0, 1, 0, 1])

# y_pred_bin: optional pre-computed binary predictions
# Set to None to let the function compute it using the threshold
y_pred_bin = None

# threshold: cutoff value for converting probabilities to binary
threshold = 0.5

ARGS = {
    'y_pred': y_pred,
    'y_true': y_true,
    'y_pred_bin': y_pred_bin,
    'threshold': threshold
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
compute_class_weights Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/method/hierarchical_model.py
code served (permissive licence) · get_code("a14916935ef030e3")
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 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 torch

torch.manual_seed(0)

# Create a small label tensor with class imbalance
# 5 samples total: class 0 appears 3 times, class 1 appears 2 times
y = torch.tensor([0, 0, 0, 1, 1])

ARGS = {
    'y': y,
    'device': 'cpu'
}
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 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
euclidean_distance Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/expert_model/expert_inference.py
code served (permissive licence) · get_code("381e3729de2de5d9")
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 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 torch

torch.manual_seed(0)

# Create two small tensors with distinct dimensions
x = torch.randn(4)  # 1D tensor of size 4
y = torch.randn(4)  # 1D tensor of size 4

ARGS = {
    "x": x,
    "y": y,
}
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 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
generate_task_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lottamakinen/causal-meta-learning/data_generator/data_generator.py
code served (permissive licence) · get_code("2df0e47bedd66200")
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 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 numpy as np

# Create small random number generator with seed for reproducibility
rng = np.random.RandomState(42)

# Create X: shape (2, 4) - 2 samples, 4 features
X = rng.randn(2, 4)

# Create e_t: shape (4,) - coefficients for each feature
e_t = rng.randn(4)

# Define parents: tuple of indices into e_t and columns of X
parents = (0, 1, 2)

# Set sigma_y: standard deviation for noise
sigma_y = 1.0

# Set pos_rate: positive rate for binarization threshold
pos_rate = 0.5

ARGS = {
    "X": X,
    "e_t": e_t,
    "parents": parents,
    "sigma_y": sigma_y,
    "pos_rate": pos_rate,
    "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 tuple, ndim 2, 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
get_ci Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/metrics/explainability.py
code served (permissive licence) · get_code("98c21eecf92b6f89")
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 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 torch
import numpy as np
from scipy import stats

torch.manual_seed(0)

# Create a small tensor with shape (2, 4)
# The function calls:
# - data.mean(dim=0)
# - data.std(dim=0)
# - data.shape[0]
# So we need a tensor with these capabilities
data = torch.randn(2, 4, dtype=torch.float32)

ARGS = {
    "data": data,
    "confidence": 0.95
}
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 tuple, ndim 2, 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
get_integrated_gradients Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/metrics/explainability.py
code served (permissive licence) · get_code("050d9253698191a2")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from captum.attr import IntegratedGradients

torch.manual_seed(0)

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1_tab = nn.Linear(4, 8)
        self.fc1_long = nn.Linear(3, 8)
        self.fc_out = nn.Linear(16, 1)
    
    def forward(self, X_tab, X_long):
        tab_out = self.fc1_tab(X_tab)
        long_out = self.fc1_long(X_long)
        combined = torch.cat([tab_out, long_out], dim=1)
        output = self.fc_out(combined)
        return output

model = DummyModel()
model.eval()

X_tab = torch.randn(2, 4)
X_long = torch.randn(2, 3)

ARGS = {
    'model': model,
    'X_tab': X_tab,
    'X_long': X_long,
    'batch_size': 2000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
captum, torch, tqdm — 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
linear_nn_model Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/utils/bnn_models.py
code served (permissive licence) · get_code("6abe6fde60ccfbe1")
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 LinearNNModel. 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 = {
    "in_features": 4,
    "n_layers": 2,
    "out_features_list": [8, 6],
}
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 LinearNNModel — a LinearNNModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LinearNNModel 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
load_task_embeddings Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/method/embedding_conditional_prior.py
code served (permissive licence) · get_code("fcb10069f6f22115")
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 torch
import pandas as pd
import tempfile
import os

torch.manual_seed(0)

# Create a temporary CSV file with task embeddings
with tempfile.NamedTemporaryFile(mode='w', suffix='.csv', delete=False) as f:
    temp_file = f.name
    # Write header with task column and embedding columns
    f.write('task,z_0,z_1,z_2,z_3\n')
    # Write data rows
    f.write('task_A,0.1,0.2,0.3,0.4\n')
    f.write('task_B,0.5,0.6,0.7,0.8\n')

ARGS = {
    'embedding_file': temp_file,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, 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 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
make_W_and_b Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/data_generator/data_generator.py
code served (permissive licence) · get_code("276ac60ddb84440d")
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 numpy as np
from dataclasses import dataclass
from typing import Tuple

@dataclass
class GeneratorConfig:
    num_predictors: int = 10
    parents: Tuple[int, ...] = (0, 1, 2, 3)
    z_dim: int = 4
    num_train_tasks: int = 20
    samples_per_task: int = 500
    source_z_std: float = 1.0
    target_ood_levels: Tuple[float, ...] = (0.5, 1.0, 1.5, 2.0, 3.0)
    sigma_e: float = 0.15
    sigma_y: float = 0.6
    pos_rate: float = 0.3
    shortcut_feature: int = 9
    shortcut_strength: float = 2.5
    shortcut_in_targets: str = 'soft'
    embedding_noise_levels: Tuple[float, ...] = (0.0, 0.2, 0.5, 0.8)
    seed: int = 123
    outprefix: str = 'data/toy2/latent'

cfg = GeneratorConfig(
    num_predictors=10,
    parents=(0, 1, 2, 3),
    z_dim=4,
    num_train_tasks=20,
    samples_per_task=500,
    source_z_std=1.0,
    target_ood_levels=(0.5, 1.0, 1.5, 2.0, 3.0),
    sigma_e=0.15,
    sigma_y=0.6,
    pos_rate=0.3,
    shortcut_feature=9,
    shortcut_strength=2.5,
    shortcut_in_targets='soft',
    embedding_noise_levels=(0.0, 0.2, 0.5, 0.8),
    seed=123,
    outprefix='data/toy2/latent'
)

rng = np.random.RandomState(42)

ARGS = {
    'cfg': cfg,
    '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 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
normalize_embedding Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/expert_model/expert_inference.py
code served (permissive licence) · get_code("1038c6cb8399eb78")
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

torch.manual_seed(0)

# The function takes a single parameter 'z' which is a tensor
# It computes the norm of z and normalizes it by dividing by the norm
# if the norm is greater than 1e-08

z = torch.randn(2, 4)

ARGS = {
    "z": z
}
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
sample_task_effects Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/data_generator/data_generator.py
code served (permissive licence) · get_code("71fdf177db52cc3f")
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

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

# Create a RandomState instance
rng = np.random.RandomState(42)

# Define dimensions
D = 4  # dimension of task coefficients / output
K = 3  # dimension of latent task representation

# Create z_t: latent task representation
z_t = np.random.randn(K)

# Create W: weight matrix that projects z_t to task space
# Shape: (D, K) so that W @ z_t produces a vector of size D
W = np.random.randn(D, K)

# Create b: bias vector
# Shape: (D,) matching the output dimension
b = np.random.randn(D)

# Create sigma_e: noise standard deviation
sigma_e = 0.5

ARGS = {
    "z_t": z_t,
    "W": W,
    "b": b,
    "sigma_e": sigma_e,
    "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 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
task_classification_metrics Ran
ran; our contract draft was wrong, not the code
lottamakinen/causal-meta-learning/metrics/accuracy.py
code served (permissive licence) · get_code("a08708159563fdb0")
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

torch_manual_seed = 0

# Build task_preds according to the expected structure:
# task_preds = {task_label : {'y_actual': [], 'y_pred': [], 'y_pred_bin': []}}

np.random.seed(0)

# Create sample data for two tasks
task_preds = {
    'task_1': {
        'y_actual': np.array([0, 1, 1, 0, 1, 0]),
        'y_pred': np.array([0.1, 0.8, 0.9, 0.2, 0.7, 0.3]),
        'y_pred_bin': np.array([0, 1, 1, 0, 1, 0])
    },
    'task_2': {
        'y_actual': np.array([1, 0, 1, 1, 0, 0]),
        'y_pred': np.array([0.6, 0.4, 0.75, 0.85, 0.25, 0.15]),
        'y_pred_bin': np.array([1, 0, 1, 1, 0, 0])
    }
}

ARGS = {
    'task_preds': task_preds
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
integrated_gradients_importance Not yet run
unverified (harvested, no recorded run)
lottamakinen/causal-meta-learning/metrics/explainability.py
code served (permissive licence) · get_code("52d82e515d2d6b42")
How it ran

no invocation recorded.

Also present in other papers' code

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

Meta-learning methods perform well on new within-distribution tasks but often fail when adapting to out-of-distribution target tasks, where transfer from source tasks can induce negative transfer. We propose a causally-aware Bayesian metalearning method, by conditioning task-specific priors on precomputed latent causal task embeddings, enabling transfer based on mechanistic similarity rather than spurious correlations. Our approach explicitly considers realistic deployment settings where access to target-task data is limited, and adaptation relies on noisy (expert-provided) pairwise judgments of causal similarity between source and target tasks. We provide a theoretical analysis showing that conditioning on causal embeddings controls prior mismatch and mitigates negative transfer under task shift. Empirically, we demonstrate reductions in negative transfer and improved out-of-distribution adaptation in both controlled simulations and a large-scale realworld clinical prediction setting for cross-disease transfer, where causal embeddings align with underlying clinical mechanisms.

For agents

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

get_harvested_code_for_paper("2602.19788")
get_code_for_paper("2602.19788")
have("2602.19788")

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

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

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

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

Connect an agent — have() is free.