SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.01849 · 2020

Rank $2r$ iterative least squares: efficient recovery of ill-conditioned low rank matrices from few entries

arXiv · PDF · Open in the Atlas

Code that ran

13 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 0 have no contract verdict; 13 failures of our instrument; 4 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/2002.01849.json · badge: /api/ran/2002.01849.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
pizilber/R2RILS reimplementation (classifier label)
classifier basis: classifier_2025
7 ran · 1 no recorded run
Jonathan-WIS/R2RILS reimplementation (classifier label)
classifier basis: classifier_2025
6 ran · 2 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
R2RILS Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pizilber/R2RILS/python/R2RILS.py
code served (permissive licence) · get_code("80e507546315137e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 scipy import sparse

np.random.seed(0)

# Create a small matrix completion problem
m = 5  # rows
n = 6  # columns
rank = 2  # underlying rank

# Create a true low-rank matrix
U_true = np.random.randn(m, rank)
V_true = np.random.randn(n, rank)
X_true = U_true @ V_true.T

# Create observation mask (omega) - observe about 70% of entries
omega = np.random.rand(m, n) > 0.3
omega = omega.astype(float)

# Create observed matrix X (zero out unobserved entries)
X = X_true * omega

# Optional: custom initialization matrices
init_U = np.random.randn(m, rank)
init_V = np.random.randn(n, rank)

ARGS = {
    'X': X,
    'omega': omega,
    'rank': rank,
    'verbose': False,
    'max_iter': 10,
    'lsqr_col_norm': False,
    'lsqr_max_iter': 100,
    'lsqr_tol': 1e-10,
    'lsqr_smart_tol': True,
    'lsqr_smart_obj_min': 1e-05,
    'init_option': 0,  # INIT_WITH_SVD
    'init_U': init_U,
    'init_V': init_V,
    'weight_previous_estimate': 1.0,
    'weight_from_iter': 40,
    'weight_every_iter': 7,
    'early_stopping_rmse_abs': 5e-14,
    'early_stopping_rel': -1,
    'early_stopping_rmse_rel': -1
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, scipy, sklearn — 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
R2RILS Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pizilber/R2RILS/python/R2RILS.py
code served (permissive licence) · get_code("1775d19981a5e7b2")
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. 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 scipy import sparse
from scipy.sparse import linalg

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

# Create small test matrices
m, n = 4, 3  # distinct dimensions
rank = 2

# Create a low-rank matrix X with some structure
U_true = np.random.randn(m, rank)
V_true = np.random.randn(n, rank)
X_full = np.dot(U_true, V_true.T)

# Create omega mask (observation pattern)
omega = np.zeros((m, n))
# Mark some entries as observed
omega[0, 0] = 1
omega[0, 1] = 1
omega[1, 1] = 1
omega[1, 2] = 1
omega[2, 0] = 1
omega[3, 2] = 1

# Create X with only observed entries visible
X = X_full * omega

# Initialize U and V for custom initialization
init_U = np.random.randn(m, rank)
init_V = np.random.randn(n, rank)
init_U = np.linalg.qr(init_U)[0]
init_V = np.linalg.qr(init_V)[0]

ARGS = {
    'X': X,
    'omega': omega,
    'rank': rank,
    'verbose': True,
    'max_iter': 5,
    'lsqr_col_norm': False,
    'lsqr_max_iter': 100,
    'lsqr_tol': 1e-15,
    'lsqr_smart_tol': True,
    'lsqr_smart_obj_min': 1e-05,
    'init_option': 0,  # INIT_WITH_SVD
    'init_U': None,
    'init_V': None,
    'weight_previous_estimate': 1.0,
    'weight_from_iter': 40,
    'weight_every_iter': 7,
    'early_stopping_rmse_abs': 5e-14,
    'early_stopping_rel': -1,
    'early_stopping_rmse_rel': -1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy, sklearn — 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
convert_x_representation Ran
ran; our contract draft was wrong, not the code
Jonathan-WIS/R2RILS/R2RILS.py
pointer only (licence: NONE) · get_code("e3e6c0540759e59d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jonathan-WIS/R2RILS when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_x_representation Ran
ran; our contract draft was wrong, not the code
pizilber/R2RILS/python/R2RILS.py
code served (permissive licence) · get_code("8d7396d75265c764")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (27,) 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

# Analyzing the function:
# - x is a 1D array that will be indexed
# - rank, m, n are integers used for indexing
# - recovered_x accesses x[k * rank + i] for i in range(rank), k in range(n)
#   So max index is (n-1) * rank + (rank-1) = n*rank - 1
# - recovered_y accesses x[rank * n + j * rank + i] for i in range(rank), j in range(m)
#   So max index is rank*n + (m-1)*rank + (rank-1) = rank*n + m*rank - 1
# - Total max index is rank*n + m*rank - 1 = rank*(n+m) - 1
# - So x needs length at least rank*(n+m)

rank = 3
m = 4
n = 5

# x needs to have length at least rank * (n + m) = 3 * (5 + 4) = 27
x_length = rank * (n + m)
x = np.arange(x_length, dtype=np.float32)

ARGS = {
    'x': x,
    'rank': rank,
    'm': m,
    'n': n
}
Setup block drafted by
a language model, Claude Sonnet 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 (27,) — shape (27,) 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
generate_b Ran
ran; our contract draft was wrong, not the code
Jonathan-WIS/R2RILS/R2RILS.py
pointer only (licence: NONE) · get_code("5102efed429ab43d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jonathan-WIS/R2RILS when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_b Ran
ran; our contract draft was wrong, not the code
pizilber/R2RILS/python/R2RILS.py
code served (permissive licence) · get_code("62db7009596fa65b")
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 numpy as np

# X is indexed as X[j][k], so it should be a 2D array-like structure
# m is the first dimension size (number of rows)
# n is the second dimension size (number of columns)
# omega is indexed as omega[j][k], so it should be a 2D array-like structure with same shape as X
# omega[j][k] is checked for non-zero values

m = 2
n = 4

# Create X as a 2D numpy array (m x n)
X = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
])

# Create omega as a 2D numpy array (m x n) with some zero and non-zero values
omega = np.array([
    [1, 0, 1, 0],
    [0, 1, 1, 0]
])

ARGS = {
    "X": X,
    "omega": omega,
    "m": m,
    "n": n
}
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 (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
generate_sparse_matrix_entries Ran
ran; our contract draft was wrong, not the code
Jonathan-WIS/R2RILS/R2RILS.py
pointer only (licence: NONE) · get_code("4f3e147ef92f1b69")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jonathan-WIS/R2RILS when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_sparse_matrix_entries Ran
ran; our contract draft was wrong, not the code
pizilber/R2RILS/python/R2RILS.py
code served (permissive licence) · get_code("4443e54c29d5e15c")
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 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 torch
import numpy as np

torch.manual_seed(0)

# omega is a 2D array/list that is indexed as omega[j][k]
# The function checks if omega[j][k] != 0
# m is the number of rows in omega
# n is the number of columns in omega
# rank is an integer used for range iterations

m = 3
n = 4
rank = 2

# Create a sparse omega matrix (2D list) with some non-zero entries
omega = [
    [0, 1, 0, 2],
    [3, 0, 0, 0],
    [0, 0, 4, 0]
]

ARGS = {
    "omega": omega,
    "rank": rank,
    "m": m,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
get_U_V_from_solution Ran
ran; our contract draft was wrong, not the code
Jonathan-WIS/R2RILS/R2RILS.py
pointer only (licence: NONE) · get_code("c28bbec6cba5d9f1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jonathan-WIS/R2RILS when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_U_V_from_solution Ran
ran; our contract draft was wrong, not the code
pizilber/R2RILS/python/R2RILS.py
code served (permissive licence) · get_code("93d49a28a7a2ce6b")
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 numpy as np

# Analyze the function:
# - x: a 1D array that gets sliced
# - rank: integer, number of ranks
# - m: integer, dimension for U
# - n: integer, dimension for V
# The function extracts:
#   V: rank x n elements from x[0:rank*n]
#   U: rank x m elements from x[rank*n:rank*n+rank*m]
# So x needs at least rank*n + rank*m elements

rank = 3
m = 4
n = 5

# Construct x with enough elements: rank*n + rank*m = 3*5 + 3*4 = 15 + 12 = 27
total_elements = rank * n + rank * m
x = np.arange(total_elements, dtype=np.float32)

ARGS = {
    "x": x,
    "rank": rank,
    "m": m,
    "n": n,
}
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 — 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
get_estimated_value Ran
ran; our contract draft was wrong, not the code
Jonathan-WIS/R2RILS/R2RILS.py
pointer only (licence: NONE) · get_code("28e412f479e74d36")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jonathan-WIS/R2RILS when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_estimated_value Ran
ran; our contract draft was wrong, not the code
pizilber/R2RILS/python/R2RILS.py
code served (permissive licence) · get_code("65155b12b518c443")
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, 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 numpy as np

# Analyze the function to determine required dimensions
# The function uses:
# - x: indexed as x[i * n:(i + 1) * n] and x[rank * n + i * m:rank * n + (i + 1) * m]
#   So x needs length: rank * n + rank * m
# - U: list of rank elements, each reshaped to (m, 1)
# - V: list of rank elements, each reshaped to (1, n)
# - rank, m, n: integers

rank = 2
m = 3
n = 4

# Construct x with the required total length: rank * n + rank * m = 2*4 + 2*3 = 14
x = np.random.randn(rank * n + rank * m)

# Construct U: list of rank arrays, each will be reshaped to (m, 1)
# So each element should be a 1D array of length m
U = [np.random.randn(m) for _ in range(rank)]

# Construct V: list of rank arrays, each will be reshaped to (1, n)
# So each element should be a 1D array of length n
V = [np.random.randn(n) for _ in range(rank)]

ARGS = {
    'x': x,
    'U': U,
    'V': V,
    'rank': rank,
    'm': m,
    'n': n
}
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, 4) — shape (3, 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
rescale_A Ran
ran; our contract draft was wrong, not the code
Jonathan-WIS/R2RILS/R2RILS.py
pointer only (licence: NONE) · get_code("c1c23aba8b0205b8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jonathan-WIS/R2RILS when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

R2RILS Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from jonathan-wis/r2rils
pointer only; the stored copy get_code serves, from jonathan-wis/r2rils, is pointer only (licence: NONE) · get_code("4ec5a35b892b0ca7")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

R2RILS Not yet run
unverified (harvested, no recorded run)
Jonathan-WIS/R2RILS/R2RILS.py
pointer only (licence: NONE) · get_code("e52770e146de77b5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jonathan-WIS/R2RILS when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

generate_sparse_A Not yet run
unverified (harvested, no recorded run)
Jonathan-WIS/R2RILS/R2RILS.py
pointer only (licence: NONE) · get_code("039992f6e270eeb2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jonathan-WIS/R2RILS when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

generate_sparse_A Not yet run
unverified (harvested, no recorded run)
pizilber/R2RILS/python/R2RILS.py
code served (permissive licence) · get_code("701768db30408b31")
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 15 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 12 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.

FunctionAlso present inEarliest-datedOthers named
R2RILS
brick of this paper's assembly: entry
1 other paper
1 later
2106.02119 (2021-06)
A Scalable Second Order Method for Ill-Conditioned Matrix Completion from Few Samples
convert_x_representation
brick of this paper's assembly: helper
1 other paper
1 later
2106.02119 (2021-06)
A Scalable Second Order Method for Ill-Conditioned Matrix Completion from Few Samples
rescale_A
brick of this paper's assembly: helper
1 other paper
1 later
2106.02119 (2021-06)
A Scalable Second Order Method for Ill-Conditioned Matrix Completion from Few Samples

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

We present a new, simple and computationally efficient iterative method for low rank matrix completion. Our method is inspired by the class of factorization-type iterative algorithms, but substantially differs from them in the way the problem is cast. Precisely, given a target rank $r$, instead of optimizing on the manifold of rank $r$ matrices, we allow our interim estimated matrix to have a specific over-parametrized rank $2r$ structure. Our algorithm, denoted R2RILS for rank $2r$ iterative least squares, has low memory requirements, and at each iteration it solves a computationally cheap sparse least-squares problem. We motivate our algorithm by its theoretical analysis for the simplified case of a rank-1 matrix. Empirically, R2RILS is able to recover ill conditioned low rank matrices from very few observations -- near the information limit, and it is stable to additive noise.

For agents

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

get_harvested_code_for_paper("2002.01849")
get_code_for_paper("2002.01849")
have("2002.01849")

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

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

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

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

Connect an agent — have() is free.