SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.08335 · 2024

A Sparsity Principle for Partially Observable Causal Representation Learning

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2403.08335.json · badge: /api/ran/2403.08335.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
danrux/sparsity-crl canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
MCC Ran
ran; our contract draft was wrong, not the code
danrux/sparsity-crl/Ball/evaluation.py
code served (permissive licence) · get_code("4d9302e9e1606114")
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 torch
import numpy as np

torch.manual_seed(0)

# Create two small tensors
# z: (batch_size=2, features=4)
# hz: (batch_size=2, features=3)
# These need to be different sizes so we can see the shape behavior
z = torch.randn(2, 4)
hz = torch.randn(2, 3)

# k should be less than or equal to min(k, number_of_features_in_hz)
# Based on the code: cor_abs[0:k, k:] means we need k <= z.shape[1]
k = 2

ARGS = {
    "z": z,
    "hz": hz,
    "k": k
}
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 — 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
MCC Ran
ran; our contract draft was wrong, not the code
danrux/sparsity-crl/Causal3DIdent/evaluation.py
code served (permissive licence) · get_code("89b190475337fca6")
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

# Analyze the function:
# - z: used as z.T in np.corrcoef, so needs to be array-like with shape (n_samples, n_features)
# - hz: used as hz.T in np.corrcoef, so needs to be array-like with shape (n_samples, n_features)
# - k: used as index for slicing cor_abs[0:k, k:], so needs to be an int
# 
# np.corrcoef(z.T, hz.T) will return correlation matrix of shape (2k, 2k)
# We slice [0:k, k:] to get shape (k, k)
# linear_sum_assignment expects a cost matrix
# cor_abs[assignments] indexes into the (k, k) matrix

# Create small test arrays
np.random.seed(0)

# z and hz should have distinct dimensions to be probeable
# Let's use 5 samples, 3 features for z and 5 samples, 4 features for hz
z = np.random.randn(5, 3).astype(np.float32)
hz = np.random.randn(5, 4).astype(np.float32)

# k should be the minimum of the number of features in z and hz
# Since we're slicing cor_abs[0:k, k:], k should be <= 3 (number of features in z)
# and the second dimension accessed is k: which should be <= 4 (number of features in hz)
k = 3

ARGS = {
    "z": z,
    "hz": hz,
    "k": k,
}
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
construct_invertible_mlp Ran
ran; our contract draft was wrong, not the code
danrux/sparsity-crl/Numerical/invertible_network_utils.py
code served (permissive licence) · get_code("02cc40a0bed356c0")
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 Sequential. 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
import torch
from torch import nn
from scipy.stats import ortho_group

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    'n': 4,
    'n_layers': 2,
    'n_iter_cond_thresh': 100,
    'cond_thresh_ratio': 0.25,
    'weight_matrix_init': 'pcl',
    'act_fct': 'leaky_relu',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch, typing_extensions — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_decoder Ran
ran; our contract draft was wrong, not the code
danrux/sparsity-crl/Numerical/invertible_network_utils.py
code served (permissive licence) · get_code("c2621183d830d73f")
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 function. 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 numpy as np
import torch
import os
import tempfile

torch.manual_seed(0)

# Create a temporary directory for save_dir
temp_dir = tempfile.mkdtemp()

# Create a temporary npz file for load_f (optional, we'll set it to None for this test)
# If we wanted to test with load_f, we'd create it like:
# temp_npz = os.path.join(temp_dir, 'weights.npz')
# np.savez(temp_npz, np.random.randn(4, 5), np.random.randn(4, 5))

ARGS = {
    'x_dim': 5,
    'z_dim': 3,
    'seed': 42,
    'n_layers': 2,
    'load_f': None,
    'save_dir': temp_dir,
    'manifold': 'nn',
    'smooth': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_mlp Ran
ran; our contract draft was wrong, not the code
danrux/sparsity-crl/Ball/encoders_image.py
code served (permissive licence) · get_code("0ce92aeb68c01b29")
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 Sequential. 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
from typing import List, Union, Literal

torch.manual_seed(0)

ARGS = {
    'n_in': 4,
    'n_out': 3,
    'layers': [8, 6],
    'layer_normalization': 'bn',
    'output_normalization': 'gn',
    'output_normalization_kwargs': {'num_groups': 1},
    'act_inf_param': 0.2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, typing_extensions — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
reg_scheduler Ran
ran, honoured the contract we drafted
danrux/sparsity-crl/Causal3DIdent/main_3dident.py
code served (permissive licence) · get_code("280f233fe90c2460")
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 float64, ndim 0, 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

def reg_scheduler(step, start=1.0):
    return start + np.log(step)

ARGS = {
    "step": 10,
    "start": 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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
reorder Not yet run
unverified (harvested, no recorded run)
danrux/sparsity-crl/Ball/evaluation.py
code served (permissive licence) · get_code("6d0e79fdb10ec36d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Causal representation learning aims at identifying high-level causal variables from perceptual data. Most methods assume that all latent causal variables are captured in the high-dimensional observations. We instead consider a partially observed setting, in which each measurement only provides information about a subset of the underlying causal state. Prior work has studied this setting with multiple domains or views, each depending on a fixed subset of latents. Here, we focus on learning from unpaired observations from a dataset with an instance-dependent partial observability pattern. Our main contribution is to establish two identifiability results for this setting: one for linear mixing functions without parametric assumptions on the underlying causal model, and one for piecewise linear mixing functions with Gaussian latent causal variables. Based on these insights, we propose two methods for estimating the underlying causal variables by enforcing sparsity in the inferred representation. Experiments on different simulated datasets and established benchmarks highlight the effectiveness of our approach in recovering the ground-truth latents.

For agents

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

get_harvested_code_for_paper("2403.08335")
get_code_for_paper("2403.08335")
have("2403.08335")

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

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

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

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

Connect an agent — have() is free.