SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.03705 · September 2026

Federated Causal Discovery via Regression-Directed Cumulants

Fabio Stella, Pablo Torrijos, José A. Gámez, José M. Puerta, José Puerta

arXiv · PDF · Open in the Atlas

Code that ran

9 of 16 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; 8 failures of our instrument; 7 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/2609.03705.json · badge: /api/ran/2609.03705.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
ptorrijos99/FedLiNGAM canonical (classifier label)
classifier basis: census
9 ran · 7 no recorded run
FunctionStatusWhere it lives
aggregate_and_compute_cumulants Ran
ran; our contract draft was wrong, not the code
ptorrijos99/FedLiNGAM/src/common/cumulants.py
code served (permissive licence) · get_code("14fd3875c581ed5a")
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
from typing import Dict, List, Union

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

# Create minimal client stats dictionaries
# Each client contributes raw moment statistics
p = 4  # dimension of variables

def create_client_stats(n_samples: int, p: int, include_4th: bool = True) -> Dict[str, Union[int, np.ndarray]]:
    """Create a single client's raw statistics."""
    stats = {
        'n': n_samples,
        'sum_x': np.random.randn(p),
        'sum_xx': np.random.randn(p, p),
        'sum_x3': np.random.randn(p),
        'sum_x1y2': np.random.randn(p, p),
        'sum_x2y1': np.random.randn(p, p),
    }
    if include_4th:
        stats.update({
            'sum_x4': np.random.randn(p),
            'sum_x1y3': np.random.randn(p, p),
            'sum_x3y1': np.random.randn(p, p),
            'sum_x2y2': np.random.randn(p, p),
        })
    return stats

# Create multiple client stats (at least 3 clients for reliable 3rd-order)
client_stats_list = [
    create_client_stats(n_samples=10, p=p, include_4th=True),
    create_client_stats(n_samples=15, p=p, include_4th=True),
    create_client_stats(n_samples=12, p=p, include_4th=True),
]

ARGS = {
    'client_stats_list': client_stats_list,
}
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
compute_local_raw_stats Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ptorrijos99/FedLiNGAM/src/common/cumulants.py
code served (permissive licence) · get_code("c5695134086906ff")
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 small dataset with n=5 samples and p=3 variables
np.random.seed(0)
X = np.random.randn(5, 3).astype(float)

# Test with order=4 (default)
ARGS = {
    'X': X,
    'order': 4
}
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
compute_tau_matrix_3rd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ptorrijos99/FedLiNGAM/src/common/metrics.py
code served (permissive licence) · get_code("a555904cf15cdfcc")
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, 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

# Create small test arrays
n_nodes = 5
n_active = 3

# c3: 1D array of size n_nodes
c3 = np.array([1.0, 2.0, 3.0, 4.0, 5.0])

# c12: 2D array of size (n_nodes, n_nodes)
c12 = np.random.randn(5, 5)

# c21: 2D array of size (n_nodes, n_nodes)
c21 = np.random.randn(5, 5)

# active_indices: list of indices to select from the arrays
active_indices = [0, 2, 4]

ARGS = {
    "c3": c3,
    "c12": c12,
    "c21": c21,
    "active_indices": active_indices,
}
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, 3) — shape (3, 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
compute_tau_matrix_4th_stats Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ptorrijos99/FedLiNGAM/src/common/metrics.py
code served (permissive licence) · get_code("2fa743788f655ba5")
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, 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

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

# Define dimensions
p = 5  # number of variables
n_active = 3  # number of active variables

# Create small stand-in arrays for cumulants
c4 = np.random.randn(p)  # (p,) array of marginal 4th cumulants
c13 = np.random.randn(p, p)  # (p, p) array - Cum(xi, xj, xj, xj)
c31 = np.random.randn(p, p)  # (p, p) array - Cum(xi, xi, xi, xj)
c22 = np.random.randn(p, p)  # (p, p) array - Cum(xi, xi, xj, xj)

# Create list of active variable indices
active_indices = [0, 2, 4]  # Select 3 indices from the 5 variables

ARGS = {
    "c4": c4,
    "c13": c13,
    "c31": c31,
    "c22": c22,
    "active_indices": active_indices,
}
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, 3) — shape (3, 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
enforce_dag Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ptorrijos99/FedLiNGAM/src/common/ica_postprocess.py
code served (permissive licence) · get_code("73065e1f6707a47d")
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, 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 adjacency matrix (4x4)
B = np.array([
    [0.0, 0.5, 0.3, 0.1],
    [0.2, 0.0, 0.4, 0.6],
    [0.1, 0.2, 0.0, 0.3],
    [0.4, 0.1, 0.2, 0.0]
], dtype=np.float64)

# Define a causal ordering (topological order)
# This means node 0 → node 1 → node 2 → node 3
causal_order = [0, 1, 2, 3]

ARGS = {
    "B": B,
    "causal_order": causal_order
}
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, 4) — shape (4, 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
estimate_B Ran
ran; our contract draft was wrong, not the code
ptorrijos99/FedLiNGAM/src/common/solvers.py
code served (permissive licence) · get_code("b00cc9aa19564093")
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, 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
from typing import List

# Create a small covariance matrix (4x4)
np.random.seed(0)
p = 4
# Generate a positive semi-definite covariance matrix
temp = np.random.randn(p, p)
cov = temp @ temp.T
# Normalize to make it a valid covariance
cov = cov / np.linalg.norm(cov)

# Create a valid causal order (topological ordering of variables)
causal_order = [0, 1, 2, 3]

# Define arguments for estimate_B
ARGS = {
    'causal_order': causal_order,
    'cov': cov,
    'use_lasso': False,
    'n_samples': 1000,
    'lmbda_type': 'fixed',
    'prune_thres': 0.0,
    'gamma': 1.0
}
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, 4) — shape (4, 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
ica_to_lingam Ran
ran; our contract draft was wrong, not the code
ptorrijos99/FedLiNGAM/src/common/ica_postprocess.py
code served (permissive licence) · get_code("7155ff2fe8a8fbd9")
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 scipy.optimize import linear_sum_assignment

# Create a small estimated unmixing matrix W_est
# Shape (p, p) where p=4
np.random.seed(42)
p = 4

# Generate a random matrix that resembles an unmixing matrix
# ICA typically produces matrices with relatively small but non-negligible entries
W_est = np.random.randn(p, p) * 0.5 + np.eye(p)

# Ensure it's invertible and well-conditioned for realistic behavior
W_est = np.linalg.qr(W_est)[0]

# Define the arguments dictionary
ARGS = {
    "W_est": W_est,
    "prune_thres": 0.05,
}
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 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
try_topological_sort Ran
ran; our contract draft was wrong, not the code
ptorrijos99/FedLiNGAM/src/common/ica_postprocess.py
code served (permissive licence) · get_code("3f646ccc14d92655")
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 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 numpy as np

# Test case 1: Valid DAG (should return a topological order)
# Create a simple directed acyclic graph represented as adjacency matrix
# Convention: B[i, j] != 0 means j → i (j is parent of i)
# Let's create a 4x4 matrix for a simple DAG: 0 -> 1 -> 2 -> 3
B_dag = np.array([
    [0, 1, 0, 0],  # node 0 has parent 1
    [0, 0, 1, 0],  # node 1 has parent 2
    [0, 0, 0, 1],  # node 2 has parent 3
    [0, 0, 0, 0],  # node 3 has no parents
], dtype=float)

ARGS = {
    "B": B_dag
}
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 list, ndim 1, dtype family int — 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
unbiased_cumulant3 Ran
ran, violated the contract we drafted
ptorrijos99/FedLiNGAM/src/common/cumulants.py
code served (permissive licence) · get_code("79ab057c86b9555c")
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 small numpy arrays with at least 3 samples
x = np.array([1.0, 2.0, 3.0, 4.0])
y = np.array([2.0, 3.0, 4.0, 5.0])
z = np.array([3.0, 4.0, 5.0, 6.0])

ARGS = {
    'x': x,
    'y': y,
    'z': z,
}
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
compute_tau_matrix_4th Not yet run
unverified (harvested, no recorded run)
ptorrijos99/FedLiNGAM/src/common/metrics.py
code served (permissive licence) · get_code("0c1d5b2d09dd0faf")
How it ran

no invocation recorded.

fedrcd Not yet run
unverified (harvested, no recorded run)
ptorrijos99/FedLiNGAM/src/fedrcd/core.py
code served (permissive licence) · get_code("eeb390f2e36dd612")
How it ran

no invocation recorded.

fedrcd_noniterative Not yet run
unverified (harvested, no recorded run)
ptorrijos99/FedLiNGAM/src/fedrcd/core.py
code served (permissive licence) · get_code("c2532a034615ef11")
How it ran

no invocation recorded.

hc Not yet run
unverified (harvested, no recorded run)
ptorrijos99/FedLiNGAM/src/fedishc/core.py
code served (permissive licence) · get_code("edc5fc6f346de77e")
How it ran

no invocation recorded.

ishc Not yet run
unverified (harvested, no recorded run)
ptorrijos99/FedLiNGAM/src/fedishc/core.py
code served (permissive licence) · get_code("e1712fbdf086110d")
How it ran

no invocation recorded.

ishc Not yet run
unverified (harvested, no recorded run)
ptorrijos99/FedLiNGAM/src/fedrcd/core.py
code served (permissive licence) · get_code("03c120b833cb39b7")
How it ran

no invocation recorded.

ishc_4th Not yet run
unverified (harvested, no recorded run)
ptorrijos99/FedLiNGAM/src/fedishc/core.py
code served (permissive licence) · get_code("9023b29d567bc946")
How it ran

no invocation recorded.

Also present in other papers' code

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

In this paper we study linear non-Gaussian acyclic models (LiNGAM) when used in federated environments. These causal models allow one to go beyond Markov equivalence. However, in many domains data are scarce, and increasing the sample size by centralising data from different clients is not advisable due to regulations such as the GDPR. The federated environment offers an attractive option to balance privacy and causal discovery accuracy. Unfortunately, the standard centralised estimator in the LiNGAM setting, i.e., DirectLiNGAM, cannot be straightforwardly federated. Higher-order cumulant tensors offer a way around this obstacle: they depend only on the joint distribution of the variables involved and add exactly across independent sample groups, so a single communication round suffices in horizontal, vertical, and hybrid partitions. However, FedISHC, i.e., the current federated method along these lines, breaks down under near-symmetric noise. To overcome the above limitation, we introduce the FedRCD family of causal discovery algorithms, and investigate three variants that trade off communication rounds against algebraic noise; two of them are exact federated counterparts of the centralised high-order cumulant (HC) and HC-LiNGAM algorithms, and the single-round variants further effectively support exact unlearning at any granularity, from a single observation to a whole client. Numerical experiments show that at sample sizes typical of real deployments, the entire cumulant-based federated family does not actually rank variables by the population asymmetry that the scores encode at zero. It ranks them by a variance ladder induced by the DAG along its directed paths, the cumulant counterpart of varsortability. Marginal standardisation collapses every cumulant method to near-random ordering, while scale-invariant DirectLiNGAM, not federable under this protocol, is unaffected.

For agents

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

get_harvested_code_for_paper("2609.03705")
get_code_for_paper("2609.03705")
have("2609.03705")

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

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

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

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

Connect an agent — have() is free.