SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.26673 · 2026

Laplace Approximation for Bayesian Tensor Network Kernel Machines

Kim Batselier, Albert Saiapin

arXiv · PDF · Open in the Atlas

Code that ran

24 of 38 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; 3 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 19 failures of our instrument; 14 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/2604.26673.json · badge: /api/ran/2604.26673.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
AlbMLpy/laplace-tnkm community
Papers with Code archive
24 ran · 14 no recorded run
FunctionStatusWhere it lives
_get_fw_part_mtx Ran
ran, violated the contract we drafted
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("1d014af6dde00d50")
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 ArrayImpl, 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 jax.numpy as jnp
from jax import Array

# Create small JAX arrays for testing
# fw_hadamard: a single array that will be divided by elements in fw_list
fw_hadamard = jnp.ones((2, 4), dtype=jnp.float32)

# fw_list: list of arrays to divide fw_hadamard by
fw_list = [
    jnp.ones((2, 4), dtype=jnp.float32) * 2.0,
    jnp.ones((2, 4), dtype=jnp.float32) * 3.0,
]

ARGS = {
    "fw_hadamard": fw_hadamard,
    "fw_list": fw_list,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
add_constant_shift Ran
ran; our contract draft was wrong, not the code
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("5c513d4df9704023")
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. 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)

# Create a simple function that will be wrapped
def simple_fn(x):
    return x * 2

# Define ARGS dict with all parameters for add_constant_shift
ARGS = {
    'fn': simple_fn,
    'shift': 0.5
}
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 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
als_cpd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("219f09c62d43450f")
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 ArrayImpl, ndim 1, dtype family float, shape (24,) 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 jax
import jax.numpy as jnp
import numpy as np
from typing import Callable

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

# Define a simple feature map function
def simple_fmap(x: jnp.ndarray, q: int) -> jnp.ndarray:
    """
    Simple feature map that applies polynomial features.
    Returns a matrix of shape (batch_size, m_order)
    """
    m_order = 3
    # Create polynomial features: [1, x, x^2]
    features = jnp.ones((x.shape[0], m_order), dtype=jnp.float32)
    features = features.at[:, 1].set(x)
    features = features.at[:, 2].set(x ** 2)
    return features

# Set up problem dimensions
batch_size = 2
d_dim = 4  # dimension of input (number of CPD cores)
kd = 2     # number of input features per core
m_order = 3  # order/feature dimension
rank = 2   # CPD rank

# Create input data
x = jnp.array(np.random.randn(batch_size, kd), dtype=jnp.float32)

# Create target output
y = jnp.array(np.random.randn(batch_size), dtype=jnp.float32)

# Initialize weight vector as flattened tensor
# Shape should be (m_order * rank * d_dim,)
w_ten_shape = (d_dim, m_order, rank)
w_vec = jnp.array(np.random.randn(m_order * rank * d_dim), dtype=jnp.float32)

# Create the shape tuple for w_shape parameter
w_shape = (d_dim, m_order, rank)

# Set hyperparameters
n_epoch = 2
gamma_w = 0.1
beta_e = 1.0

# Optional tracker (set to None)
tracker = None

# Construct ARGS dictionary
ARGS = {
    'w_vec': w_vec,
    'kd': kd,
    'w_shape': w_shape,
    'x': x,
    'y': y,
    'fmap': simple_fmap,
    'n_epoch': n_epoch,
    'gamma_w': gamma_w,
    'beta_e': beta_e,
    'tracker': tracker,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (24,) — shape (24,) 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
check_zero_cols Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("c331b17915f3c001")
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 ArrayImpl, ndim 2, dtype family float, shape (4, 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 jax.numpy as jnp
import jax

# Set seed for reproducibility
jax.config.update("jax_default_prng_impl", "threefry2x32")

# Create a small test tensor with shape (d_dim, feature_dim, rank)
# Using distinct sizes: d_dim=4, feature_dim=3, rank=2
d_dim = 4
feature_dim = 3
rank = 2

# Create a tensor where some columns are close to zero and some are not
w_ten = jnp.array([
    [[1e-15, 0.5], [1e-16, 0.3], [1e-15, 0.7]],      # First core: column 0 near zero
    [[0.2, 1e-15], [0.4, 1e-16], [0.6, 1e-15]],      # Second core: column 1 near zero
    [[1e-15, 1e-14], [1e-16, 2e-15], [1e-15, 3e-15]], # Third core: both columns near zero
    [[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]]              # Fourth core: no columns near zero
], dtype=jnp.float32)

ARGS = {
    "w_ten": w_ten
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (4, 2) — shape (4, 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
cov_estimation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("9effe7eff2f5776f")
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 3, 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
from jax import Array
import jax.numpy as jnp

# Create a small positive definite matrix to serve as a Hessian
# Using a 4x4 symmetric positive definite matrix
np.random.seed(0)
random_matrix = np.random.randn(4, 4)
w_hess = random_matrix @ random_matrix.T  # Ensures positive definiteness

# Convert to JAX array
w_hess = jnp.array(w_hess, dtype=jnp.float32)

ARGS = {
    "w_hess": w_hess,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
ff_q2 Ran
ran, violated the contract we drafted
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("445fb38f62d7ba95")
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 ArrayImpl, ndim 2, dtype family float, shape (4, 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 jax.numpy as jnp
import numpy as np

# Create small test data
x = jnp.array([0.1, 0.2, 0.3, 0.4])  # batch of 4 samples

# Parameters based on the function signature and docstring
q = 2  # quantization level, should be in range [0, log2(m_order) - 1]
m_order = 8  # order parameter
k_d = 4  # dimension parameter
p_scale = 1.0  # scaling factor (default value)

ARGS = {
    "x": x,
    "q": q,
    "m_order": m_order,
    "k_d": k_d,
    "p_scale": p_scale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (4, 2) — shape (4, 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
fourier_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("1fe6a176eca20cb9")
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 ArrayImpl, ndim 2, dtype family float, shape (5, 8) 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 jax.numpy as jnp
import numpy as np

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

# Define arguments for fourier_features function
x = jnp.array([0.1, 0.2, 0.3, 0.4, 0.5])  # Input array, shape (5,)
q = 3  # Parameter q
m_order = 8  # Number of Fourier orders
p_scale = 2.0  # Scale parameter

ARGS = {
    "x": x,
    "q": q,
    "m_order": m_order,
    "p_scale": p_scale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (5, 8) — shape (5, 8) 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
hess_full Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("f8b56d1579b61d11")
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 ArrayImpl, ndim 2, dtype family float, shape (120, 120) 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 jax.numpy as jnp
import numpy as np

# Define a simple feature map function
def simple_fmap(x, q):
    """
    Simple feature map that takes a 1D array x and degree q,
    returns a matrix of shape (len(x), m_order) where each column is x^(q+1)
    """
    n = x.shape[0]
    m_order = 3
    result = jnp.ones((n, m_order))
    for col in range(m_order):
        result = result.at[:, col].set(x ** (q + col + 1))
    return result

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

# Tiny dimensions for testing
batch_size = 2  # number of samples
d_dim = 4       # dimension of input (different from other dims)
kd = 2          # kernel dimension divisor
m_order = 3     # order dimension (different from d_dim and rank)
rank = 5        # rank dimension (different from m_order)

# Create w_ten: shape (d_dim * kd, m_order, rank) = (8, 3, 5)
w_ten = jnp.array(np.random.randn(d_dim * kd, m_order, rank), dtype=jnp.float32)

# Create x: shape (batch_size, d_dim) = (2, 4)
x = jnp.array(np.random.randn(batch_size, d_dim), dtype=jnp.float32)

# Create y: shape (batch_size,) = (2,)
y = jnp.array(np.random.randn(batch_size), dtype=jnp.float32)

# Regularization parameters
gamma_w = 0.01
beta_e = 0.1

# Feature map function
fmap = simple_fmap

# Mode for hessian computation
mode = 'full'

ARGS = {
    'w_ten': w_ten,
    'kd': kd,
    'x': x,
    'y': y,
    'fmap': fmap,
    'gamma_w': gamma_w,
    'beta_e': beta_e,
    'mode': mode
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (120, 120) — shape (120, 120) 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
hess_last Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("ac24265810de7fcd")
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 ArrayImpl, ndim 2, dtype family float, shape (15, 15) 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 jax.numpy as jnp
import jax
from typing import Callable

# Define a simple feature map function
def simple_fmap(x: jnp.ndarray, q: int) -> jnp.ndarray:
    """
    Simple feature map that returns a matrix of shape (batch_size, m_order).
    """
    batch_size = x.shape[0]
    m_order = 3
    # Create a simple feature matrix based on input and q parameter
    features = jnp.ones((batch_size, m_order)) * (1.0 + q * 0.1)
    features = features + jnp.expand_dims(x, axis=1) * 0.01
    return features

# Set up dimensions
batch_size = 2
d_dim = 4  # spatial dimension
kd = 2     # divisor for k, q computation
m_order = 3  # feature map output dimension
rank = 5   # tensor rank

# Create input data
x = jnp.ones((batch_size, d_dim), dtype=jnp.float32)

# Create weight tensor of shape (d_dim, m_order, rank)
# This represents the CPD cores
w_ten = jnp.ones((d_dim, m_order, rank), dtype=jnp.float32) * 0.5

# Set hyperparameters
gamma_w = 0.1
beta_e = 0.5

# Create the arguments dictionary
ARGS = {
    "w_ten": w_ten,
    "kd": kd,
    "x": x,
    "fmap": simple_fmap,
    "gamma_w": gamma_w,
    "beta_e": beta_e,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (15, 15) — shape (15, 15) 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
init_beta_e Ran
ran, honoured the contract we drafted
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("dab8194df85ffae8")
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 numpy as np
from typing import Optional

torch.manual_seed(0)

ARGS = {
    "beta_e": None
}
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 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
init_gamma_w Ran
ran, honoured the contract we drafted
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("0c4ade04bff329b6")
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 torch.nn as nn

torch.manual_seed(0)

# Based on the function body, gamma_w is an Optional[float]
# The function checks if gamma_w is None, and if so sets it to a ratio
# We'll test both cases: when gamma_w is provided and when it's None

# Case 1: gamma_w is None (will trigger the initialization logic)
ARGS = {
    "gamma_w": None
}
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 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
init_weights Ran
ran; our contract draft was wrong, not the code
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("a7c931d1505091f8")
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 jax.numpy as jnp
import numpy as np

ARGS = {
    "m_order": 4,
    "rank": 3,
    "d_dim": 2,
    "q_base": None,
    "init_type": None,
    "seed": 42,
    "dtype": jnp.float64,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, 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
khatri_rao_row Ran
ran, honoured the contract we drafted
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("a6599219f699aad9")
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 ArrayImpl, ndim 2, dtype family float, shape (2, 12) 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 jax.numpy as jnp
from jax import Array

# khatri_rao_row takes two ArrayLike inputs (a and b)
# It performs vmap(jnp.kron) over them, so both should be 2D arrays
# where the first dimension is the batch dimension

# Create two small 2D arrays for testing
# a: shape (2, 4) - batch of 2 vectors of dimension 4
# b: shape (2, 3) - batch of 2 vectors of dimension 3

a = jnp.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
])

b = jnp.array([
    [0.1, 0.2, 0.3],
    [0.4, 0.5, 0.6]
])

ARGS = {
    "a": a,
    "b": b
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (2, 12) — shape (2, 12) 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
low_rank_cov_estimation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("5b30c8fbe83d7e72")
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 3, 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
import jax.numpy as jnp
from jax import Array

# Create a small Hessian matrix that is symmetric and positive semi-definite
# Shape: (4, 4) - a small square matrix suitable for eigendecomposition
np.random.seed(0)
random_matrix = np.random.randn(4, 4)
w_hess = random_matrix @ random_matrix.T  # Ensure symmetric positive semi-definite

threshold = 0.001

ARGS = {
    "w_hess": w_hess,
    "threshold": threshold,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
poli_norm_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("fd96b9e644ac3c66")
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 ArrayImpl, ndim 2, dtype family float, shape (4, 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 jax.numpy as jnp
import numpy as np

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

# Create small sample data
x = jnp.array([1.0, 2.0, 3.0, 4.0])  # 1D array of 4 elements
q = 2  # integer parameter
order = 3  # integer parameter for polynomial order

# Construct ARGS dict with all parameters
ARGS = {
    "x": x,
    "q": q,
    "order": order
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (4, 3) — shape (4, 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
predict_std Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("118c573a1ea2b34f")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np
from functools import partial
from jax import Array, jit, vmap

# Define the feature map function
def simple_feature_map(x, q):
    """Simple feature map that returns a matrix of shape (batch_size, rank)"""
    batch_size = x.shape[0]
    rank = 3
    # Create a simple feature: outer product style expansion
    features = jnp.ones((batch_size, rank))
    for i in range(rank):
        features = features.at[:, i].set(jnp.sin(x * (q + 1) * (i + 1)))
    return features

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

# Parameters
batch_size = 2
d_dim = 4  # input dimension
m_order = 3  # order (different from d_dim)
rank = 5  # rank (different from m_order)
kd = 2  # number of dimensions for feature mapping
n_samples = 3

# Create w_ten (weight tensor) of shape (d_dim, m_order, rank)
w_ten = jnp.array(np.random.randn(d_dim, m_order, rank), dtype=jnp.float32)

# Create Cholesky factor for uncertainty
# Shape should be (n_params, n_params) where n_params = m_order * rank * d_dim / last_dim
n_params = m_order * rank
w_cholesky = jnp.array(np.random.randn(n_params, n_params) * 0.1, dtype=jnp.float32)
# Make it lower triangular for Cholesky
w_cholesky = jnp.tril(w_cholesky)

# Create input data x of shape (batch_size, d_dim)
x = jnp.array(np.random.randn(batch_size, d_dim), dtype=jnp.float32)

# Beta_e parameter
beta_e = 2.0

# Prediction mode
pd_mode = 'la'

# Feature map function
fmap = simple_feature_map

# Seed for reproducibility
seed = 42

# Construct the ARGS dictionary
ARGS = {
    'w_ten': w_ten,
    'w_cholesky': w_cholesky,
    'kd': kd,
    'x': x,
    'fmap': fmap,
    'beta_e': beta_e,
    'pd_mode': pd_mode,
    'n_samples': n_samples,
    'seed': seed,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
prepare_fmap Ran
ran; our contract draft was wrong, not the code
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("11bacf9963dbdd74")
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 jax.numpy as jnp
from functools import partial

class FeatureSpec:
    def __init__(self, name, p_scale=1.0, l_scale=1.0, shift=None):
        self.name = name
        self.p_scale = p_scale
        self.l_scale = l_scale
        self.shift = shift

ARGS = {
    'fmap_spec': FeatureSpec(name='ppf', p_scale=1.0, l_scale=1.0, shift=None),
    'm_order': 8,
    'is_quant': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
process_weights Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("96a2795649a36e57")
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 jax.numpy as jnp
import numpy as np

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

# Create a small CPD (Canonical Polyadic Decomposition) weights tensor
# Shape: (d_dim, n_dim, rank)
# d_dim=4, n_dim=3, rank=2
d_dim = 4
n_dim = 3
rank = 2

# Create a tensor with some columns that are close to zero and some that aren't
w_data = np.random.randn(d_dim, n_dim, rank).astype(np.float32)

# Make sure at least one column is NOT all zeros so rank doesn't become 0
w_data[:, :, 0] = np.random.randn(d_dim, n_dim) * 10  # Keep this one large

# Convert to JAX array
w_ten = jnp.array(w_data)

ARGS = {
    "w_ten": w_ten
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, 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
pure_poli_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("59ae00ea6014914e")
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 ArrayImpl, ndim 3, dtype family float, shape (2, 1, 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 jax
import jax.numpy as jnp
from jax import Array
import numpy as np

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

# Create small sample data
x = jnp.array([[1.0, 2.0, 3.0, 4.0],
               [5.0, 6.0, 7.0, 8.0]])  # shape: (2, 4)

q = 3  # parameter q (though not used in function body, included as parameter)

order = 4  # order parameter for polynomial features

ARGS = {
    "x": x,
    "q": q,
    "order": order
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 3, dtype family float, shape (2, 1, 4) — shape (2, 1, 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
rbf_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("98e7e88363d422eb")
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 ArrayImpl, ndim 2, dtype family float, shape (8, 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 jax.numpy as jnp
import numpy as np

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

# Create small test input
x = np.array([[-0.5, 0.3, -0.1, 0.7],
              [0.2, -0.4, 0.6, -0.2]], dtype=np.float32)

# Define parameters
q = 3
order = 4
lscale = 1.0

# Construct ARGS dict with all parameters
ARGS = {
    "x": x,
    "q": q,
    "order": order,
    "lscale": lscale
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (8, 4) — shape (8, 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
ten3tovec Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("865f1495d1e7fa4a")
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 ArrayImpl, ndim 1, dtype family int, shape (24,) 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 jax.numpy as jnp

# Create a small 3D JAX array (tensor)
# Using distinct dimensions: 2, 3, 4 to make shapes unambiguous
w_ten = jnp.arange(2 * 3 * 4).reshape(2, 3, 4)

ARGS = {
    "w_ten": w_ten
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family int, shape (24,) — shape (24,) 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
update_beta_e Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("d7684ab7374c0597")
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 jax.numpy as jnp
import numpy as np
from functools import partial
from jax import Array, jit, vmap

# Define a simple feature map function
def simple_fmap(x: Array, q: int) -> Array:
    """Simple feature map that returns a matrix of shape (batch_size, rank)"""
    batch_size = x.shape[0]
    rank = 3
    # Create simple features based on input and q parameter
    features = jnp.ones((batch_size, rank)) * (1.0 + q * 0.1)
    return features

# Set up small tensors and arrays
batch_size = 2
d_dim = 4  # dimension
m_order = 3  # order/mode
rank = 3  # rank of CPD
kd = 2  # number of groups

# Create weight tensor (d_dim, m_order, rank)
w_ten = jnp.ones((d_dim, m_order, rank), dtype=jnp.float32) * 0.5

# Create input data (batch_size, d_dim)
x = jnp.array(np.random.randn(batch_size, d_dim), dtype=jnp.float32)

# Create target output (batch_size,)
y = jnp.array(np.random.randn(batch_size), dtype=jnp.float32)

# Create Cholesky matrix for posterior sampling
# Shape should be (n_par, n_par) where n_par is number of parameters
n_par = d_dim * m_order * rank
w_cholesky = jnp.eye(n_par, dtype=jnp.float32) * 0.1

# Parameters for Beta distribution update
c = 2.0
d = 2.0

# Number of samples for expectation
n_samples = 2

# Random seed
seed = 42

# Prediction mode
pd_mode = 'la'  # or 'lla'

ARGS = {
    'c': c,
    'd': d,
    'w_ten': w_ten,
    'w_cholesky': w_cholesky,
    'kd': kd,
    'x': x,
    'y': y,
    'fmap': simple_fmap,
    'pd_mode': pd_mode,
    'n_samples': n_samples,
    'seed': seed,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — 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
vec2ten3 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("41b7007591ec82d0")
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 ArrayImpl, ndim 3, dtype family float, shape (4, 3, 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 jax
import jax.numpy as jnp
from functools import partial
from jax import Array, jit, vmap

# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')

# Create test arguments
# vec2ten3 expects:
# - w_vec: a 1D array that will be reshaped
# - d_dim: dimension size (used in reshape)
# - m_order: order size (used in reshape)
# - rank: rank size (used in reshape)

# The function reshapes w_vec into (m_order, rank, d_dim)
# then transposes to (d_dim, m_order, rank)
# So we need: w_vec.size == d_dim * m_order * rank

d_dim = 4
m_order = 3
rank = 2

# Total elements needed: 4 * 3 * 2 = 24
total_elements = d_dim * m_order * rank
w_vec = jnp.arange(total_elements, dtype=jnp.float32)

ARGS = {
    "w_vec": w_vec,
    "d_dim": d_dim,
    "m_order": m_order,
    "rank": rank
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 3, dtype family float, shape (4, 3, 2) — shape (4, 3, 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
w_sample Ran
ran; our contract draft was wrong, not the code
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("f896328d8211f825")
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 ArrayImpl, ndim 1, dtype family float, shape (5,) 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 jax.numpy as jnp
import numpy as np

# Construct arguments for w_sample function
# The function expects:
# - w_mean_vec: a vector that supports .copy() and indexing with .at[-n_par:].set()
# - w_cholesky: a matrix with .shape[0], .shape[1] and .dot() method
# - seed: Optional[int]

# Create w_mean_vec as a jax array (supports copy and at indexing)
w_mean_vec = jnp.array([1.0, 2.0, 3.0, 4.0, 5.0])

# Create w_cholesky as a numpy array (supports shape and dot product)
# Shape should be (n_par, n_features) where n_par=3, n_features=2
# This allows z to have shape (2,) and w_cholesky.dot(z) to have shape (3,)
w_cholesky = np.array([
    [0.5, 0.1],
    [0.2, 0.6],
    [0.3, 0.4]
])

seed = 42

ARGS = {
    "w_mean_vec": w_mean_vec,
    "w_cholesky": w_cholesky,
    "seed": seed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (5,) — shape (5,) 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
LaplaceCPR Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("9c10cba673fed7af")
How it ran

no invocation recorded.

get_fw_hadamard_mtx Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("27fe1ede95cabccb")
How it ran

no invocation recorded.

get_scores Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("bbbbd8c608bbaa0e")
How it ran

no invocation recorded.

hess_block_diag Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("a9b2cfe0107ade2f")
How it ran

no invocation recorded.

hess_cov_estimation Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("c86c5ab727ebe041")
How it ran

no invocation recorded.

hess_diag Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("125aa5a708829163")
How it ran

no invocation recorded.

hess_ggn Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("e830512c308cc69d")
How it ran

no invocation recorded.

jacob_cpd Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("8195b570eca6c4c8")
How it ran

no invocation recorded.

ppf_q2 Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("c4811ab9bc77aa4d")
How it ran

no invocation recorded.

predict_score Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("6de1b61668632be2")
How it ran

no invocation recorded.

predict_score_linear Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("6513323517c0d99d")
How it ran

no invocation recorded.

prepare_system Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("b6384909c851c500")
How it ran

no invocation recorded.

update_gamma_w Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("1ce6491dc0f39385")
How it ran

no invocation recorded.

update_weights Not yet run
unverified (harvested, no recorded run)
AlbMLpy/laplace-tnkm/source/models/LaplaceCPR.py
code served (permissive licence) · get_code("fc59ace7021aae04")
How it ran

no invocation recorded.

Also present in other papers' code

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

Uncertainty estimation is essential for robust decision-making in the presence of ambiguous or out-of-distribution inputs. Gaussian Processes (GPs) are classical kernel-based models that offer principled uncertainty quantification and perform well on small-to medium-scale datasets. Alternatively, formulating the weight space learning problem under tensor network assumptions yields scalable tensor network kernel machines. However, these assumptions break Gaussianity, complicating standard probabilistic inference. This raises a fundamental question: how can tensor network kernel machines provide principled uncertainty estimates? We propose a novel Bayesian Tensor Network Kernel Machine (LA-TNKM) that employs a (linearized) Laplace approximation for Bayesian inference. A comprehensive set of numerical experiments shows that the proposed method consistently matches or surpasses Gaussian Processes and Bayesian Neural Networks (BNNs) across diverse UCI regression benchmarks, highlighting both its effectiveness and practical relevance.

For agents

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

get_harvested_code_for_paper("2604.26673")
get_code_for_paper("2604.26673")
have("2604.26673")

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

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

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

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

Connect an agent — have() is free.