SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.02820 · 2021

Randomized Nyström Preconditioning

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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 8 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2110.02820.json · badge: /api/ran/2110.02820.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
cvxgrp/torch_linops community (classifier label)
classifier basis not recorded on the link
8 ran · 2 no recorded run
FunctionStatusWhere it lives
CG Ran
ran on a synthesized input
cvxgrp/torch_linops/linops/cg.py
code served (permissive licence) · get_code("d55b28ffa0c2b62d")
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 method. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple positive definite matrix operator
# A_mm should be callable that takes a vector and returns A @ vector
n = 4
A_dense = torch.randn(n, n)
A_dense = A_dense @ A_dense.T + torch.eye(n)  # Make it positive definite

def A_mm(x):
    """Matrix-vector product for A"""
    return A_dense @ x

# Create a preconditioner (optional, we'll use identity)
def M_mm(x):
    """Preconditioner: identity matrix"""
    return x

# Right-hand side vector
B = torch.randn(n)

# Initial guess (optional)
X0 = torch.zeros(n)

# Convergence parameters
rtol = 0.001
atol = 0.0
maxiter = 20
verbose = False

ARGS = {
    'A_mm': A_mm,
    'M_mm': M_mm,
    'rtol': rtol,
    'atol': atol,
    'maxiter': maxiter,
    'X0': X0,
    'verbose': verbose,
}
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 method — a method output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a method 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
L2norm2entry Ran
ran on a synthesized input
cvxgrp/torch_linops/linops/block_minres.py
code served (permissive licence) · get_code("1377659592149919")
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, 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 L2norm2entry takes two parameters x and y
# and computes the L2 norm (Euclidean distance) between them
# by computing sqrt(x^2 + y^2)
# Both parameters should be tensors that support ** and + operations

x = torch.randn(2, 4)
y = torch.randn(2, 4)

ARGS = {
    "x": x,
    "y": y,
}
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, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
bminres Ran
ran on a synthesized input
cvxgrp/torch_linops/linops/block_minres.py
code served (permissive licence) · get_code("2be9101c1bd89ab3")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small symmetric positive definite matrix for A
# Using a square matrix of size 4x4
n = 4
s = 2

# Create a simple symmetric positive definite matrix
A_base = torch.randn(n, n)
A = A_base @ A_base.T + torch.eye(n) * 0.1  # Ensure positive definiteness

# Create B matrix (n x s)
B = torch.randn(n, s)

# M is optional preconditioner - None is valid
M = None

# X0 is optional initial guess - None is valid
X0 = None

# Tolerance for convergence
tol = 1e-05

# Maximum iterations
maxiters = 5

# Verbose flag
verbose = True

ARGS = {
    "A": A,
    "B": B,
    "M": M,
    "X0": X0,
    "tol": tol,
    "maxiters": maxiters,
    "verbose": verbose
}
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
cg_batch_Kis1 Ran
ran on a synthesized input
cvxgrp/torch_linops/linops/cg.py
code served (permissive licence) · get_code("1def44d2a1dd1627")
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 (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
import numpy as np

torch.manual_seed(0)

# Create a small positive definite matrix for A_mm
n = 4
A_dense = torch.randn(n, n)
A_dense = A_dense @ A_dense.T + torch.eye(n)  # Make it positive definite

def A_mm(x):
    """Matrix-vector product with A"""
    return A_dense @ x

# Create right-hand side vector B
B = torch.randn(n)

# Create a preconditioner M_mm (identity for simplicity)
def M_mm(x):
    """Identity preconditioner"""
    return x

# Create initial guess X0
X0 = torch.randn(n)

# Define ARGS dictionary with all parameters
ARGS = {
    'A_mm': A_mm,
    'B': B,
    'M_mm': M_mm,
    'X0': X0,
    'rtol': 0.001,
    'atol': 0.0,
    'maxiter': 20,
    'verbose': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (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
inner Ran
ran on a synthesized input
cvxgrp/torch_linops/linops/minres.py
code served (permissive licence) · get_code("0771c85befba490e")
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 (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
import numpy as np

torch.manual_seed(0)

# The function inner(x, y) multiplies x and y element-wise, then sums along axis 0
# Both x and y need to be array-like objects supporting * operator and .sum(axis=0)
# Let's use numpy arrays with shape (2, 4) - batch size 2, dimension 4

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

y = np.array([[0.5, 1.5, 2.5, 3.5],
              [4.5, 5.5, 6.5, 7.5]])

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

torch.manual_seed(0)

# Construct a small matrix A (m x n) and vector b (m,)
m, n = 4, 3
A = torch.randn(m, n, dtype=torch.float64)
b = torch.randn(m, dtype=torch.float64)

# Optional initial guess x0
x0 = torch.zeros(n, dtype=torch.float64)

ARGS = {
    "A": A,
    "b": b,
    "damp": 0.0,
    "atol": 1e-06,
    "btol": 1e-06,
    "conlim": 100000000.0,
    "iter_lim": None,
    "calc_var": False,
    "x0": x0,
}
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 (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
operator_matrix_product Ran
ran on a synthesized input
cvxgrp/torch_linops/linops/linops.py
code served (permissive licence) · get_code("4c6d929f6a997587")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a small stand-in class for A that supports the @ operator
class MatrixOperator:
    def __init__(self, matrix):
        self.matrix = matrix
        self.shape = matrix.shape
        self.supports_operator_matrix = False
    
    def __matmul__(self, other):
        # Implement matrix multiplication
        return self.matrix @ other

# Create matrix A (2x4)
A_matrix = torch.randn(2, 4)
A = MatrixOperator(A_matrix)

# Create matrix M (4x3)
M = torch.randn(4, 3)

ARGS = {
    "A": A,
    "M": M
}
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
symmetric_equilibrate Ran
ran on a synthesized input
cvxgrp/torch_linops/linops/equilibration.py
code served (permissive licence) · get_code("9e83deeea3640b89")
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 (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)

# A must be a square matrix (n x n)
# The function performs operations like A @ (D * s) where D is diagonal and s is a vector
A = torch.randn(4, 4)

ARGS = {
    'A': A,
    'alpha': 1,
    'gamma': 0.4,
    'M': 15,
    'iterations': 200,
    'device': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (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
equilibrate Not yet run
unverified (harvested, no recorded run)
cvxgrp/torch_linops/linops/equilibration.py
code served (permissive licence) · get_code("d3f0af7ffb9ea6ea")
How it ran

no invocation recorded.

randomized_power_err_est Not yet run
unverified (harvested, no recorded run)
cvxgrp/torch_linops/linops/nystrom_precondition.py
code served (permissive licence) · get_code("88f0692fde784662")
How it ran

no invocation recorded.

Also present in other papers' code

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

This paper introduces the Nyström PCG algorithm for solving a symmetric positive-definite linear system. The algorithm applies the randomized Nyström method to form a low-rank approximation of the matrix, which leads to an efficient preconditioner that can be deployed with the conjugate gradient algorithm. Theoretical analysis shows that preconditioned system has constant condition number as soon as the rank of the approximation is comparable with the number of effective degrees of freedom in the matrix. The paper also develops adaptive methods that provably achieve similar performance without knowledge of the effective dimension. Numerical tests show that Nyström PCG can rapidly solve large linear systems that arise in data analysis problems, and it surpasses several competing methods from the literature.

For agents

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

get_harvested_code_for_paper("2110.02820")
get_code_for_paper("2110.02820")
have("2110.02820")

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

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

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

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

Connect an agent — have() is free.