SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.27325 · 2026

A Short Note on Batch-efficient Divide-and-Conquer Algorithm for EigenDecomposition

Yue Song

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 8 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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.27325.json · badge: /api/ran/2604.27325.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
KingJamesSong/BatchED community
Papers with Code archive
9 ran · 0 no recorded run
FunctionStatusWhere it lives
Batched_ED_Plus Ran
ran on a synthesized input · constructed an object; no result was computed
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("8ed929ac84e23497")
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 an instance of its own class, Batched_ED_Plus: the run constructed the object and did not call it, so no result was computed. 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 math

torch.manual_seed(0)

# Analyze the function to determine required arguments
# The function ConquerStep takes: xnorm, beta, t_vec, t_eig

B = 2  # batch size
half_size = 4  # half dimension
full_size = half_size * 2  # 8

# xnorm: appears to be a scalar or 1D tensor used for interval initialization
xnorm = torch.tensor([10.0], dtype=torch.float32)

# beta: used with .abs() and .unsqueeze(), appears to be a 1D batch tensor
beta = torch.tensor([0.5, -0.3], dtype=torch.float32)

# t_vec: shape (2*B, half_size, half_size) - batch of orthogonal matrices
# Split into t1_vec and t2_vec, each (B, half_size, half_size)
# Create orthogonal matrices using QR decomposition
t1_base = torch.randn(B, half_size, half_size, dtype=torch.float32)
t1_vec, _ = torch.linalg.qr(t1_base)

t2_base = torch.randn(B, half_size, half_size, dtype=torch.float32)
t2_vec, _ = torch.linalg.qr(t2_base)

t_vec = torch.cat([t1_vec, t2_vec], dim=0)  # shape (4, 4, 4)

# t_eig: diagonal eigenvalue matrices, shape (2*B, half_size, half_size)
# Should be diagonal matrices
t1_diag_vals = torch.tensor([[8.0, 5.0, 2.0, 0.5], [7.0, 4.0, 1.0, 0.2]], dtype=torch.float32)
t2_diag_vals = torch.tensor([[9.0, 6.0, 3.0, 1.0], [8.5, 5.5, 2.5, 0.8]], dtype=torch.float32)

t1_eig = torch.diag_embed(t1_diag_vals)
t2_eig = torch.diag_embed(t2_diag_vals)

t_eig = torch.cat([t1_eig, t2_eig], dim=0)  # shape (4, 4, 4)

# Also need to define interval_count and eps which are referenced in the function
interval_count = 4

ARGS = {
    "xnorm": xnorm,
    "beta": beta,
    "t_vec": t_vec,
    "t_eig": t_eig,
}
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 Batched_ED_Plus — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Batched_ED_Plus 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
ConquerStep Ran
ran; our contract draft was wrong, not the code
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("4badc8658834e482")
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 4, 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

torch.manual_seed(0)

# Analyze the function signature and body:
# ConquerStep(xnorm, beta, t_vec, t_eig)
# - xnorm: used in torch.cat with sorted_diag, should be a tensor of shape (B, 1)
# - beta: used with .abs(), .unsqueeze(), indexing with batch_index, should be (B,)
# - t_vec: size(0) divided by 2 to get B, size(1) is half_size, size(2) exists, should be (2*B, half_size, half_size)
# - t_eig: similar structure to t_vec, (2*B, half_size, half_size)

B = 2
half_size = 4
full_size = half_size * 2

# Create xnorm: shape (B, 1)
xnorm = torch.randn(B, 1)

# Create beta: shape (B,)
beta = torch.randn(B)

# Create t_vec: shape (2*B, half_size, half_size)
# This represents eigenvectors for two blocks
t_vec = torch.randn(2 * B, half_size, half_size)

# Create t_eig: shape (2*B, half_size, half_size)
# This represents eigenvalues/diagonal matrices for two blocks
t_eig = torch.randn(2 * B, half_size, half_size)

ARGS = {
    "xnorm": xnorm,
    "beta": beta,
    "t_vec": t_vec,
    "t_eig": t_eig,
}
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 4, 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
DivideStep Ran
ran; our contract draft was wrong, not the code
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("d63ed915045c577b")
How it ran

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

import torch

torch.manual_seed(0)

# x_orig is used with:
# - frobenius_norm(x_orig) which does torch.sum(x ** 2, dim=[1, 2])
# - x_orig.size(1) to get half_size
# - x[:, half_size, half_size - 1] indexing
# - x[:, half_size - 1, half_size - 1] indexing
# - x[:, half_size, half_size] indexing
# - x[:, :half_size, :half_size] slicing
# - x[:, half_size:, half_size:] slicing
#
# So x_orig needs shape (batch, dim, dim) where dim is even
# Let's use batch=2, dim=4 (so half_size=2)

x_orig = torch.randn(2, 4, 4)

ARGS = {
    "x_orig": x_orig
}
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 — 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
Householder_reflection Ran
ran; our contract draft was wrong, not the code
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("905bcf35cd5d7853")
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 4, 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

torch.manual_seed(0)

batch_size = 2
input_dim = 4

# Create a simple symmetric positive semi-definite covariance matrix for each batch
# by constructing it as X^T X where X is random
X = torch.randn(batch_size, input_dim, input_dim)
cov = torch.bmm(X.transpose(1, 2), X)

ARGS = {
    'cov': cov,
    'batch_size': batch_size,
    'input_dim': input_dim,
}
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 4, 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
QR_Givens_Shift Ran
ran; our contract draft was wrong, not the code
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("2c8c2cbacab439c2")
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 4, 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

torch.manual_seed(0)

# Create a small symmetric positive definite matrix for covariance
# Shape: (batch_size, input_dim, input_dim)
batch_size = 2
input_dim = 4

# Create a simple covariance matrix by constructing A @ A.T where A is random
A = torch.randn(batch_size, input_dim, input_dim)
cov = torch.bmm(A, A.transpose(1, 2))

# Ensure it's symmetric and positive definite
cov = (cov + cov.transpose(1, 2)) / 2 + input_dim * torch.eye(input_dim).unsqueeze(0)

iterations = 3

ARGS = {
    "cov": cov,
    "batch_size": batch_size,
    "input_dim": input_dim,
    "iterations": iterations
}
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 4, 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
frobenius_norm Ran
ran; our contract draft was wrong, not the code
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("5fa710d49280b036")
How it ran

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

import torch

torch.manual_seed(0)

# The function takes a tensor x and computes the frobenius norm
# It expects x to have at least 3 dimensions (it sums over dims 1 and 2)
# Create a small 3D tensor: (batch_size=2, dim1=4, dim2=3)
x = torch.randn(2, 4, 3)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
house_two_sides Ran
ran; our contract draft was wrong, not the code
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("3b4d5ac14d9be0c1")
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) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Analyze the function:
# - A: used with .bmm(mu) and .dtype, so it's a batch of matrices
# - mu: used with .norm(dim=1), .transpose(1,2), .bmm(p), so it's a 3D tensor
# The function performs batch matrix operations on Householder reflections

# A should be shape (batch, n, n) - batch of square matrices
# mu should be shape (batch, n, 1) - batch of column vectors
batch_size = 2
n = 4

A = torch.randn(batch_size, n, n, dtype=torch.float32)
mu = torch.randn(batch_size, n, 1, dtype=torch.float32)

ARGS = {
    "A": A,
    "mu": mu,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
taylor_polynomial Ran
ran; our contract draft was wrong, not the code
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("52dec2bd552fe06a")
How it ran

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

import torch
torch.manual_seed(0)

# The function expects a single parameter 's' which is a 3D tensor
# Based on the code, it extracts diagonal elements using torch.diagonal(s, dim1=1, dim2=2)
# This means s should have shape (batch_size, dim, dim) where dim1=1 and dim2=2 are the matrix dimensions
# After diagonal extraction, s becomes shape (batch_size, dim)

batch_size = 2
matrix_dim = 4

# Create a 3D tensor with shape (batch_size, matrix_dim, matrix_dim)
# The function will extract the diagonal from dims 1 and 2
s = torch.randn(batch_size, matrix_dim, matrix_dim, dtype=torch.float32)

ARGS = {
    "s": s
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
wilkinson_shift Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KingJamesSong/BatchED/utils_ed_plus.py
code served (permissive licence) · get_code("4ada5114fcf3c18d")
How it ran

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

import torch

torch.manual_seed(0)

# The function expects a matrix parameter with shape (batch_size, 2, 2)
# It accesses matrix[:, 0, 0], matrix[:, 1, 1], and matrix[:, 0, 1]
# These are 2x2 matrices in a batch

batch_size = 2
matrix = torch.randn(batch_size, 2, 2)

ARGS = {
    "matrix": matrix
}
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 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

is at the heart of many computer vision algorithms and applications. One crucial bottleneck limiting its usage is the expensive computation cost, particularly for a mini-batch of matrices in deep neural networks. Our previous work proposed a dedicated QRbased ED algorithm for batched small matrices (dim<32). This short paper targets the limitation and proposes a batch-efficient Divide-and-Conquer based ED algorithm for larger matrices. The numerical test shows that for a mini-batch of matrices whose dimensions are smaller than 64, our method can be much faster than the Pytorch SVD function. The Pytorch implementation is available at: https://github.com/KingJamesSong/BatchED.

For agents

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

get_harvested_code_for_paper("2604.27325")
get_code_for_paper("2604.27325")
have("2604.27325")

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

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

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

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

Connect an agent — have() is free.