SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.04876 · 2022

Subquadratic Kronecker Regression with Applications to Tensor Decomposition

arXiv · PDF · Open in the Atlas

Code that ran

16 of 17 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, 0 violated it and 16 have no contract verdict; 0 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/2209.04876.json · badge: /api/ran/2209.04876.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
fahrbach/subquadratic-kronecker-regression canonical (classifier label)
classifier basis not recorded on the link
16 ran · 1 no recorded run
FunctionStatusWhere it lives
ComputeLossTerms Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/tucker_als.py
code served (permissive licence) · get_code("82c781f4547b2669")
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 LossTerms. 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 tensorly as tl
from tensorly.decomposition import tucker

# Create a small test tensor
np.random.seed(0)
Y_tensor = np.random.randn(4, 5, 3)

# Compute norm and size of Y_tensor
Y_norm = np.linalg.norm(Y_tensor)
Y_size = Y_tensor.size

# Compute Tucker decomposition to get X_tucker
X_tucker = tucker(Y_tensor, rank=[2, 2, 2])

# Set regularization strength
l2_regularization = 0.01

ARGS = {
    "X_tucker": X_tucker,
    "Y_tensor": Y_tensor,
    "l2_regularization": l2_regularization,
    "Y_norm": Y_norm,
    "Y_size": Y_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorly — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LossTerms — a LossTerms output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LossTerms 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_ridge_leverage_scores Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/tucker_als.py
code served (permissive licence) · get_code("32d613ea9e77d51b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (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 numpy as np

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

# Create a small matrix A with shape (m, n) where m=5 samples, n=4 features
# The function computes ridge leverage scores for each row of A
A = np.random.randn(5, 4)

# Set a small positive l2_regularization parameter
l2_regularization = 0.1

ARGS = {
    "A": A,
    "l2_regularization": l2_regularization,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (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
create_regression_experiment_01 Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/kronecker_regression_main.py
code served (permissive licence) · get_code("c14379352ef2082f")
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 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

ARGS = {
    'num_dim': 3,
    'n': 2,
    'd': 4,
    'seed': 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 list, ndim 3, dtype family float — 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
get_eigs Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/upper_bound_experiment.py
code served (permissive licence) · get_code("eb116619cfd8e34a")
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 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 get_eigs(A):
    return sorted([round(eig.real + 1e-10, 8) for eig in np.linalg.eig(A)[0]])

# A is a square matrix that np.linalg.eig can operate on
# Create a small 4x4 matrix
A = np.array([
    [1.0, 0.5, 0.2, 0.1],
    [0.5, 2.0, 0.3, 0.4],
    [0.2, 0.3, 3.0, 0.6],
    [0.1, 0.4, 0.6, 4.0]
], dtype=np.float64)

ARGS = {
    "A": A
}
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 float — 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
get_output_filename_prefix Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/tensor_data_handler.py
code served (permissive licence) · get_code("2cd73c0cc8f82e5b")
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 str. 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

ARGS = {
    'input_filename': 'data/model/weights.pt'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_ridge_leverage_score_matrix Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/upper_bound_experiment.py
code served (permissive licence) · get_code("f295c618bf061a18")
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

# The function takes a matrix A and an optional l2_regularization parameter
# A should be a 2D numpy array
# The function computes: A @ pinv(A.T @ A + l2_regularization * I) @ A.T

# Create a small matrix A with distinct dimensions (3 rows, 4 columns)
A = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0],
    [9.0, 10.0, 11.0, 12.0]
], dtype=np.float64)

# L2 regularization parameter (small positive value)
l2_regularization = 0.1

ARGS = {
    "A": A,
    "l2_regularization": l2_regularization
}
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
kron_mat_mult Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/tucker_als.py
code served (permissive licence) · get_code("6320a3bc98e8aa3b")
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 (6, 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 numpy as np

# Create valid arguments for kron_mat_mult
# The function expects:
# - kroneckor_matrices: a list of numpy arrays (matrices)
# - matrix: a numpy array (1D or 2D)

# The constraint is that the product of all column dimensions in kroneckor_matrices
# must equal the number of rows in matrix

# Let's create a simple example:
# If we have 2 kronecker matrices with shapes (3, 4) and (2, 3),
# the product of columns is 4 * 3 = 12
# So our input matrix should have 12 rows

kron_mat_1 = np.array([[1.0, 2.0, 3.0, 4.0],
                       [5.0, 6.0, 7.0, 8.0],
                       [9.0, 10.0, 11.0, 12.0]], dtype=np.float64)  # shape (3, 4)

kron_mat_2 = np.array([[1.0, 2.0, 3.0],
                       [4.0, 5.0, 6.0]], dtype=np.float64)  # shape (2, 3)

kroneckor_matrices = [kron_mat_1, kron_mat_2]

# Product of column dimensions: 4 * 3 = 12
# So matrix should have 12 rows
# Create a matrix with 12 rows and 2 columns
matrix = np.arange(24, dtype=np.float64).reshape(12, 2)

ARGS = {
    "kroneckor_matrices": kroneckor_matrices,
    "matrix": matrix
}
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 (6, 2) — shape (6, 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
kronecker_product Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/kronecker_regression_main.py
code served (permissive licence) · get_code("2bbf21749cd13578")
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 (8, 6) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function takes a list of factors and computes their Kronecker product
# Each factor should be a 2D numpy array
factors = [
    np.array([[1.0, 2.0], [3.0, 4.0]]),  # 2x2 matrix
    np.array([[5.0, 6.0, 7.0], [8.0, 9.0, 10.0]]),  # 2x3 matrix
    np.array([[11.0], [12.0]])  # 2x1 matrix
]

ARGS = {
    "factors": factors
}
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 (8, 6) — shape (8, 6) 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
random_gaussian_design_matrix_min_betas Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/upper_bound_experiment.py
code served (permissive licence) · get_code("67c61c9c639a565c")
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 numpy as np

# Construct valid arguments for random_gaussian_design_matrix_min_betas
ARGS = {
    "n": 50,  # number of samples
    "d": 10,  # number of features
    "l2_regularization": 0.1,  # L2 regularization parameter
    "percentage_to_remove": 0.3,  # percentage of rows to remove
    "seed": 42  # random seed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 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
read_and_parse_log_file Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/get_mean_runtime.py
code served (permissive licence) · get_code("4b52a8280877e3e3")
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 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 tempfile
import os

# Create a temporary log file with the expected format
temp_dir = tempfile.mkdtemp()
log_filename = os.path.join(temp_dir, "test_log.txt")

# Write a sample log file that matches the expected format
log_content = """# Training log
step: 1
loss: 0.5 rmse: 0.3 time: 1.2
loss: 0.45 rmse: 0.28 time: 1.3
step: 2
loss: 0.4 rmse: 0.25 time: 1.4
"""

with open(log_filename, 'w') as f:
    f.write(log_content)

ARGS = {
    "filename": log_filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, dtype family float — 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
read_hooi_rre Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/extract_tensor_decomposition_output.py
code served (permissive licence) · get_code("5df2e021bfb18192")
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 str. 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 tempfile
import os

# Create a temporary file with test content
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("some line\n")
temp_file.write("rre: 0.12345\n")
temp_file.write("another line\n")
temp_file.close()

path = temp_file.name

ARGS = {
    'path': path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
read_hooi_time Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/extract_tensor_decomposition_output.py
code served (permissive licence) · get_code("162e2d122a391a5f")
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 str. 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 tempfile
import os

# Create a temporary file with HOOI timing data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("iteration 1 time 0.5\n")
temp_file.write("iteration 2 time 0.6\n")
temp_file.write("avg iter time 0.55\n")
temp_file.write("final result done\n")
temp_file.close()

path = temp_file.name

ARGS = {
    'path': path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
read_rre Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/extract_tensor_decomposition_output.py
code served (permissive licence) · get_code("df933c150238639d")
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 str. 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 tempfile
import os

# Create a temporary file with the expected format
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("some header line\n")
temp_file.write("loss: value1 value2 value3 value4 value5 0.456\n")
temp_file.write("loss: value1 value2 value3 value4 value5 0.789\n")
temp_file.write("loss: value1 value2 value3 value4 value5 0.123\n")
temp_file.close()

path = temp_file.name

ARGS = {
    'path': path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
solve_least_squares Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/all_tucker_main.py
code served (permissive licence) · get_code("87cf5dc0462ab0d3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct valid arguments for solve_least_squares
# The function solves: (A^T A + lambda*I) x = A^T b

# Create a small system: A is m x n, b is m x 1
# Using distinct sizes: m=5 (samples), n=3 (features)
m = 5
n = 3

# Create matrix A (5 x 3)
A = np.random.randn(m, n)

# Create vector b (5,) or (5, 1)
b = np.random.randn(m)

# L2 regularization parameter
l2_regularization = 0.1

ARGS = {
    "A": A,
    "b": b,
    "l2_regularization": l2_regularization,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tensor_index_to_vec_index Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/all_tucker_main.py
code served (permissive licence) · get_code("502528d393a1debc")
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 int64, ndim 0, dtype family int, 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

# tensor_index_to_vec_index takes:
# - tensor_index: a tuple or array of indices into a multi-dimensional tensor
# - shape: the shape of the tensor
# It uses np.ravel_multi_index to convert multi-dimensional indices to flat indices

# Example: if we have a 3D tensor of shape (2, 4, 5)
# and we want the flat index of element [1, 2, 3]
# ravel_multi_index will compute it

tensor_index = (1, 2, 3)  # indices in each dimension
shape = (2, 4, 5)  # shape of the tensor

ARGS = {
    "tensor_index": tensor_index,
    "shape": shape
}
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 int64, ndim 0, dtype family int, 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
vec_index_to_tensor_index Ran
ran on a synthesized input
fahrbach/subquadratic-kronecker-regression/all_tucker_main.py
code served (permissive licence) · get_code("ea2d967d838577d7")
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 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

# vec_index_to_tensor_index takes a flat index and a shape tuple
# and converts the flat index to multi-dimensional indices using np.unravel_index

# Create test arguments
vec_index = 5  # flat index into a flattened array
shape = (2, 3, 4)  # shape of the original multi-dimensional array

ARGS = {
    "vec_index": vec_index,
    "shape": shape
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — 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
loss_function Not yet run
unverified (harvested, no recorded run)
fahrbach/subquadratic-kronecker-regression/kronecker_regression_main.py
code served (permissive licence) · get_code("565559f51bbf56ac")
How it ran

no invocation recorded.

Also present in other papers' code

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

Kronecker regression is a highly-structured least squares problem $\min_{\mathbf{x}} \lVert \mathbf{K}\mathbf{x} - \mathbf{b} \rVert_{2}^2$, where the design matrix $\mathbf{K} = \mathbf{A}^{(1)} \otimes \cdots \otimes \mathbf{A}^{(N)}$ is a Kronecker product of factor matrices. This regression problem arises in each step of the widely-used alternating least squares (ALS) algorithm for computing the Tucker decomposition of a tensor. We present the first subquadratic-time algorithm for solving Kronecker regression to a $(1+\varepsilon)$-approximation that avoids the exponential term $O(\varepsilon^{-N})$ in the running time. Our techniques combine leverage score sampling and iterative methods. By extending our approach to block-design matrices where one block is a Kronecker product, we also achieve subquadratic-time algorithms for (1) Kronecker ridge regression and (2) updating the factor matrices of a Tucker decomposition in ALS, which is not a pure Kronecker regression problem, thereby improving the running time of all steps of Tucker ALS. We demonstrate the speed and accuracy of this Kronecker regression algorithm on synthetic data and real-world image tensors.

For agents

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

get_harvested_code_for_paper("2209.04876")
get_code_for_paper("2209.04876")
have("2209.04876")

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

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

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

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

Connect an agent — have() is free.