SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.13612 · 2026

Deep Learning as Neural Low-Degree Filtering: A Spectral Theory of Hierarchical Feature Learning

Florent Krzakala, Yatin Dandi, Luca Arnaboldi, Matteo Vilucchio, Hugo Tabanelli

arXiv · PDF

Code that ran

13 of 28 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; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 10 failures of our instrument; 15 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/2605.13612.json · badge: /api/ran/2605.13612.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
IdePHICS/Neural-LoFi-Theory community
Papers with Code archive
13 ran · 15 no recorded run
FunctionStatusWhere it lives
Layer1Bundle Ran
ran on a synthesized input
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("f291cc0a78d4f14d")
How it ran

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

import numpy as np
from dataclasses import dataclass

@dataclass(slots=True)
class Layer1Bundle:
    """Precomputed layer-1 state consumed by :class:`KernelSpectralTrainer`.

    All arrays are NumPy float32.  The bundle may be partially populated:
    when ``alpha_full`` / ``lambda_full`` are absent the trainer runs its
    own eigendecomposition on ``g_train``.

    Attributes
    ----------
    g_train : ndarray
        ``(n_max, n_max)`` train Gram matrix.
    g_cross : ndarray | None
        ``(n_max, n_test)`` cross Gram matrix, or ``None``.
    alpha_full : ndarray | None
        ``(n_max, m_max)`` spec-A matrix (``A = G^{-1/2} B`` with ``B``
        the top eigenvectors of ``G^{1/2} Y G^{1/2}`` ranked by
        ``|lambda|``), or ``None``.  Any cache produced with the
        pre-rewrite "generalised-eigenproblem" convention must be
        regenerated — its ``alpha`` has different semantics.
    lambda_full : ndarray | None
        ``(m_max,)`` eigenvalues corresponding to ``alpha_full``.
    """
    g_train: np.ndarray
    g_cross: np.ndarray | None
    alpha_full: np.ndarray | None = None
    lambda_full: np.ndarray | None = None

    def slice_train(self, n: int) -> np.ndarray:
        """Top-left ``(n, n)`` sub-block of :attr:`g_train`."""
        if self.g_train.shape[0] < n or self.g_train.shape[1] < n:
            raise ValueError(f'Cached G has shape {self.g_train.shape}; need at least {n} x {n}')
        return np.ascontiguousarray(self.g_train[:n, :n])

    def slice_cross(self, n: int, n_test: int) -> np.ndarray | None:
        """Top-left ``(n, n_test)`` sub-block of :attr:`g_cross`."""
        if self.g_cross is None:
            return None
        if self.g_cross.shape[0] < n or self.g_cross.shape[1] < n_test:
            raise ValueError(f'Cached G_cross has shape {self.g_cross.shape}; need at least {n} x {n_test}')
        return np.ascontiguousarray(self.g_cross[:n, :n_test])

    def slice_eigen(self, n: int, m: int) -> tuple[np.ndarray, np.ndarray] | None:
        """Return ``(eigvals[:m], alpha[:n, :m])`` or ``None`` if absent."""
        if self.alpha_full is None or self.lambda_full is None:
            return None
        m_avail = self.alpha_full.shape[1]
        if m > m_avail:
            raise ValueError(f'Layer-1 cache has m_max={m_avail} but layer requests m={m}')
        alpha = np.ascontiguousarray(self.alpha_full[:n, :m])
        eigvals = self.lambda_full[:m].astype(np.float32)
        return (eigvals, alpha)


INIT_ARGS = {
    'g_train': np.random.randn(6, 6).astype(np.float32),
    'g_cross': np.random.randn(6, 4).astype(np.float32),
    'alpha_full': np.random.randn(6, 3).astype(np.float32),
    'lambda_full': np.array([2.5, 1.8, 0.9], dtype=np.float32),
}

ARGS = {
    'n': 4,
    'm': 2,
}

METHOD = 'slice_eigen'

bundle = Layer1Bundle(**INIT_ARGS)
result = getattr(bundle, METHOD)(**ARGS)
print(f"Result: {result}")
print(f"Eigenvalues shape: {result[0].shape if result else None}")
print(f"Alpha shape: {result[1].shape if result else None}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_apply_kernel_rowchunked Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("ae7d449cab9539b0")
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 2, dtype family float, shape (2, 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 torch
from torch import Tensor

torch.manual_seed(0)

class SimpleKernel:
    """Minimal KernelBase subclass for testing."""
    
    def __init__(self, sigma_w: float = 1.0, sigma_b: float = 0.0):
        self.sigma_w = float(sigma_w)
        self.sigma_b = float(sigma_b)
    
    def kernel_from_qs(self, q1: Tensor, q2: Tensor, q12: Tensor) -> Tensor:
        """Simple RBF-like kernel: exp(-||q1 - q2||^2 / q12)."""
        # Broadcast and compute a simple kernel value
        return torch.exp(-torch.abs(q1 - q2) / (torch.abs(q12) + 1e-6))
    
    def _per_pair_working_bytes(self, dtype: torch.dtype) -> int:
        return torch.tensor([], dtype=dtype).element_size()

# Create a minimal kernel instance
kernel = SimpleKernel(sigma_w=1.0, sigma_b=0.1)

# Create small test tensors
# q1: shape (n, 1) - diagonal terms for first input
q1 = torch.randn(2, 1)

# q2: shape (1, m) - diagonal terms for second input (broadcasted)
q2 = torch.randn(1, 3)

# q12: shape (n, m) - off-diagonal dot products
q12 = torch.randn(2, 3)

# row_chunk: process 1 row at a time
row_chunk = 1

ARGS = {
    "kernel": kernel,
    "q1": q1,
    "q2": q2,
    "q12": q12,
    "row_chunk": row_chunk,
}
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 2, dtype family float, shape (2, 3) — shape (2, 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
_auto_rescale_deeper_sigma_w Ran
ran, honoured the contract we drafted
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("3af1fbc4d2f6eecf")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# Create a small tensor for k_train_diag
# The function calls .mean().item() on it, so it needs to be a valid tensor
k_train_diag = torch.randn(2, 4)

ARGS = {
    "k_train_diag": k_train_diag,
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_auto_rescale_layer0_sigma_w Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("76571e6b89ddae55")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# Create a small training tensor
# Shape: (batch_size=2, feature_dim=4)
x_train = torch.randn(2, 4)

ARGS = {
    "x_train": x_train,
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_clone_kernel_with Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("52e2a0c7a89e4e87")
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 ConcreteKernel. 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
from torch import nn

torch.manual_seed(0)

# Create a minimal concrete implementation of KernelBase
class ConcreteKernel(nn.Module):
    def __init__(self, *, sigma_w: float = 1.0, sigma_b: float = 0.0):
        super().__init__()
        self.sigma_w = float(sigma_w)
        self.sigma_b = float(sigma_b)
        self.name = 'concrete'
        self.memory_budget_bytes = 1 << 30

    def kernel_from_qs(self, q1, q2, q12):
        # Simple pointwise kernel: q12 + 0.1 * q1 * q2
        return q12 + 0.1 * q1 * q2

    def _per_pair_working_bytes(self, dtype: torch.dtype) -> int:
        return torch.tensor([], dtype=dtype).element_size()

    def _pick_row_chunk(self, n: int, m: int, dtype: torch.dtype) -> int:
        per_row = max(1, m * self._per_pair_working_bytes(dtype))
        rows = max(1, self.memory_budget_bytes // per_row)
        return int(min(n, rows))

    @torch.no_grad()
    def gram(self, x, y=None, *, row_chunk=None):
        symmetric = y is None
        if symmetric:
            y = x
        n, d = x.shape
        m = y.shape[0]
        if y.shape[1] != d:
            raise ValueError(f'x has dim {d} but y has dim {y.shape[1]}; must match.')
        scale = self.sigma_w ** 2 / d
        bias = self.sigma_b ** 2
        q_diag_x = scale * (x * x).sum(dim=1) + bias
        q_diag_y = q_diag_x if symmetric else scale * (y * y).sum(dim=1) + bias
        if row_chunk is None:
            row_chunk = self._pick_row_chunk(n, m, x.dtype)
        row_chunk = max(1, int(row_chunk))
        out = torch.empty(n, m, dtype=x.dtype, device=x.device)
        y_t = y.T if symmetric else y.T.contiguous()
        for start in range(0, n, row_chunk):
            stop = min(start + row_chunk, n)
            x_chunk = x[start:stop]
            if symmetric:
                y_slice = y[start:]
                dots = x_chunk @ y_slice.T
                q12 = scale * dots + bias
                q1 = q_diag_x[start:stop].unsqueeze(1)
                q2 = q_diag_y[start:].unsqueeze(0)
                out[start:stop, start:] = self.kernel_from_qs(q1, q2, q12)
                if start > 0:
                    out[start:stop, :start] = out[:start, start:stop].T
            else:
                dots = x_chunk @ y_t
                q12 = scale * dots + bias
                q1 = q_diag_x[start:stop].unsqueeze(1)
                q2 = q_diag_y.unsqueeze(0)
                out[start:stop] = self.kernel_from_qs(q1, q2, q12)
        if symmetric:
            out = 0.5 * (out + out.T)
        return out


# Create a kernel instance with custom sigma_w and sigma_b
kernel = ConcreteKernel(sigma_w=2.5, sigma_b=0.1)

ARGS = {
    'kernel': kernel,
    'sigma_w': 3.14,
    'sigma_b': 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 ConcreteKernel — a ConcreteKernel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ConcreteKernel 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
_default_row_chunk Ran
ran, honoured the contract we drafted
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("628e5981751b957f")
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 int, 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 torch
from torch import Tensor

class KernelBase:
    """Infinite-width (NNGP) kernel with a vectorised Gram routine.

    Attributes
    ----------
    name : str
        Registered kernel name; set on subclasses.
    memory_budget_bytes : int
        Soft upper bound on peak working-tensor memory per chunk.  Used
        to derive an automatic ``row_chunk`` when the caller does not
        specify one.  Defaults to 1 GiB.
    """
    name: str = 'base'
    memory_budget_bytes: int = 1 << 30

    def __init__(self, *, sigma_w: float=1.0, sigma_b: float=0.0) -> None:
        self.sigma_w = float(sigma_w)
        self.sigma_b = float(sigma_b)

    def kernel_from_qs(self, q1: Tensor, q2: Tensor, q12: Tensor) -> Tensor:
        raise NotImplementedError

    def _per_pair_working_bytes(self, dtype: torch.dtype) -> int:
        return torch.tensor([], dtype=dtype).element_size()


class ConcreteKernel(KernelBase):
    def __init__(self, *, sigma_w: float=1.0, sigma_b: float=0.0, n_quad: int=1):
        super().__init__(sigma_w=sigma_w, sigma_b=sigma_b)
        self.n_quad = n_quad

    def kernel_from_qs(self, q1: Tensor, q2: Tensor, q12: Tensor) -> Tensor:
        return q12


torch.manual_seed(0)

kernel = ConcreteKernel(sigma_w=1.0, sigma_b=0.0, n_quad=1)
n = 5
m = 3
dtype = torch.float32

ARGS = {
    'kernel': kernel,
    'n': n,
    'm': m,
    'dtype': dtype
}
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 int, 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
_spectral_signed_eig_torch Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("f814af31232595bd")
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 tuple. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch

torch.manual_seed(0)

# Create small test matrices
# g should be a square matrix (Gram matrix-like)
n = 4
g = np.random.randn(n, n).astype(np.float64)
g = (g + g.T) / 2  # Make symmetric

# y should be a vector
y = np.random.randn(n).astype(np.float64)

# k is the number of top eigenvalues to extract
k = 2

# eps is a small regularization constant
eps = 1e-8

ARGS = {
    "g": g,
    "y": y,
    "k": k,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 — 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
fit_kernel_ridge_readout Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("73ce9a754463e7b3")
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 dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a minimal model that has the attributes used by fit_kernel_ridge_readout
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        # x_train is checked to determine device/dtype
        self.x_train = nn.Parameter(torch.randn(2, 4), requires_grad=False)
        # ridge_weight and ridge_bias will be set by the function
        self.ridge_weight = nn.Parameter(torch.zeros(2), requires_grad=False)
        self.ridge_bias = nn.Parameter(torch.zeros(1), requires_grad=False)

model = MinimalModel()

# Create small kernel matrices and targets
# K_train: (n_train, n_train) symmetric PSD kernel matrix
n_train = 2
K_train = torch.tensor([
    [2.0, 0.5],
    [0.5, 2.0]
], dtype=torch.float64)

# y_train: (n_train,) target values
y_train = torch.tensor([1.0, -1.0], dtype=torch.float64)

# K_cross: (n_train, n_test) cross kernel matrix - optional but we'll provide it
n_test = 3
K_cross = torch.randn(n_train, n_test, dtype=torch.float64)

# y_test_np: optional test targets
y_test_np = np.array([1.0, -1.0, 1.0])

ARGS = {
    'model': model,
    'K_train': K_train,
    'y_train': y_train,
    'K_cross': K_cross,
    'y_test_np': y_test_np,
    'alpha_min': -2.0,
    'alpha_max': 2.0,
    'alpha_num': 5,
    'verbose': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fit_ridge_readout Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("16e67820c82e25e2")
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 dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from torch import nn

torch.manual_seed(0)

# Create a minimal nn.Module that the function will attach ridge_weight and ridge_bias to
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)

model = SimpleModel()

# Create training data
# h_train: (N_train, D) - training features
N_train = 8
D = 4
h_train = torch.randn(N_train, D, dtype=torch.float32)

# y_train: (N_train,) - training targets (binary labels: -1 or 1)
y_train = torch.tensor([-1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0], dtype=torch.float32)

# Create test data
N_test = 4
h_test = torch.randn(N_test, D, dtype=torch.float32)
y_test_np = np.array([-1.0, 1.0, -1.0, 1.0], dtype=np.float32)

ARGS = {
    'model': model,
    'h_train': h_train,
    'y_train': y_train,
    'h_test': h_test,
    'y_test_np': y_test_np,
    'alpha_min': -6.0,
    'alpha_max': 6.0,
    'alpha_num': 50,
    'verbose': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
kernel_ridge_cv Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("9ef10cea5b965794")
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 KernelRidgeFit. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from dataclasses import dataclass

# Create a small symmetric positive semi-definite kernel Gram matrix
n = 5
np.random.seed(0)
# Generate a random matrix and make it symmetric PSD
A = np.random.randn(n, n)
K_train = A @ A.T  # This is symmetric PSD
K_train = K_train.astype(np.float64)

# Create training targets
y_train = np.array([1.0, 2.5, 3.1, 1.8, 2.2], dtype=np.float64)

# Create candidate alpha values
alphas = np.array([0.001, 0.01, 0.1, 1.0, 10.0], dtype=np.float64)

ARGS = {
    'K_train': K_train,
    'y_train': y_train,
    'alphas': alphas,
    'center': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KernelRidgeFit — a KernelRidgeFit output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a KernelRidgeFit 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
kernel_ridge_predict Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("4c6392e379269052")
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 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
from dataclasses import dataclass

@dataclass(slots=True)
class KernelRidgeFit:
    """Result of a kernel-ridge fit with CV over alpha."""
    alpha: float
    dual_coef: np.ndarray
    bias: float
    loo_mse: float
    train_mse: float
    cv_curve: np.ndarray

# Create a small KernelRidgeFit instance
n_train = 5
fit = KernelRidgeFit(
    alpha=0.1,
    dual_coef=np.array([0.5, -0.3, 0.2, 0.1, -0.4]),
    bias=2.5,
    loo_mse=0.15,
    train_mse=0.08,
    cv_curve=np.array([0.5, 0.3, 0.15, 0.2, 0.25])
)

# Create K_cross: shape (n_train, n_test)
# n_train=5, n_test=3
K_cross = np.random.randn(5, 3)

ARGS = {
    "fit": fit,
    "K_cross": K_cross
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
resolve_device Ran
ran; our contract draft was wrong, not the code
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("7b9102bca59770de")
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 str. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import logging
import torch

# Set seed for reproducibility
torch.manual_seed(0)

# Configure logging to see the function's output
logging.basicConfig(level=logging.INFO)

# The function takes a single parameter: device (a string)
# It resolves device strings, with special handling for "auto"
# The function only uses the device parameter as a string for comparison and logging

ARGS = {
    "device": "auto"
}
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 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
spectral_signed_eig Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("4b216cc0308244a6")
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 tuple. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch

torch.manual_seed(0)

# Create a small symmetric positive definite Gram matrix (4x4)
n = 4
np.random.seed(0)
g_random = np.random.randn(n, n).astype(np.float64)
g = (g_random + g_random.T) / 2  # Make symmetric
g = g + n * np.eye(n)  # Make positive definite

# Create binary targets in {-1, +1}
y = np.array([1, -1, 1, -1], dtype=np.float64)

# Number of eigenpairs to extract (must be < n)
k = 2

# Regularization floor for eigenvalues
eps = 1e-6

ARGS = {
    'g': g,
    'y': y,
    'k': k,
    'eps': eps,
    'use_torch_gpu_eigh': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BaseTrainer Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("5241b31e984ec04a")
How it ran

no invocation recorded.

BaseTrainerConfig Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("cb72484b17ea17c1")
How it ran

no invocation recorded.

KernelBase Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("50148c048d683985")
How it ran

no invocation recorded.

KernelLayerSpec Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("85c4e6fdc39549be")
How it ran

no invocation recorded.

KernelRidgeFit Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("b975765a6f74dcb3")
How it ran

no invocation recorded.

KernelSpectralConfig Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("28bf2993b506610d")
How it ran

no invocation recorded.

KernelSpectralModel Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("e9275d5f3b5744dc")
How it ran

no invocation recorded.

KernelSpectralTrainer Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("f83aff06220e7ce4")
How it ran

no invocation recorded.

LayerState Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("fa5c0c85feb2e9c6")
How it ran

no invocation recorded.

_auto_rescale_kernel_for_state Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("c0cfd4039b3a2284")
How it ran

no invocation recorded.

_deep_nngp_layer_entry Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("30d9ebb15553889b")
How it ran

no invocation recorded.

_eigen_layer_entry Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("2cd6d1d2eb874db4")
How it ran

no invocation recorded.

deep_nngp_kernel Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("8b0b440460d50d9f")
How it ran

no invocation recorded.

generalised_signed_eig Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("1e80caeb31121eb9")
How it ran

no invocation recorded.

get_kernel Not yet run
unverified (harvested, no recorded run)
IdePHICS/Neural-LoFi-Theory/src/train_hierarchically/training/kernel_spectral.py
code served (permissive licence) · get_code("caa7a67cf08fadf5")
How it ran

no invocation recorded.

Also present in other papers' code

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

Understanding how deep neural networks learn useful internal representations from data remains a central open problem in the theory of deep learning. We introduce Neural Low-Degree Filtering (Neural LoFi), a stylized limit of gradient-based training in which hierarchical feature learning becomes an explicit iterative spectral procedure. In this limit, the dynamics at each layer decouple: given the current representation, the next layer selects directions with maximal accessible low-degree correlation to the label. This yields a tractable surrogate mechanism for deep learning, together with a natural kernel-space interpretation. Neural LoFi provides a mathematically explicit framework for studying multi-layer feature learning beyond the lazy regime. It predicts how representations are selected layer by layer, explains how emergence of concepts arises with given sample complexity, and gives a concrete mechanism by which depth progressively constructs new features from old ones through low-degree compositionality. We complement the theory with mechanistic experiments on fully connected and convolutional architectures, showing that Neural LoFi improves over lazy random-feature baselines, recovers meaningful structured filters, and predicts representations aligned with early gradient-descent feature discovery with real datasets.

For agents

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

get_harvested_code_for_paper("2605.13612")
get_code_for_paper("2605.13612")
have("2605.13612")

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

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

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

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

Connect an agent — have() is free.