SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.06338 · 2021

Understanding approximate and unrolled dictionary learning for pattern recovery

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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 3 have no contract verdict; 0 failures of our instrument; 2 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/2106.06338.json · badge: /api/ran/2106.06338.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
bmalezieux/unrolled_dl canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
FunctionStatusWhere it lives
cost_matrix_v Ran
ran on a synthesized input
bmalezieux/unrolled_dl/experiments_approximate/experiments/benchmark_meg.py
code served (permissive licence) · get_code("0487c4d5581f5388")
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 (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 numpy as np

# The function takes two parameters: D and Dref
# Both are used with indexing [i, 0] and [j, 0], suggesting shape (N, 1, M)
# where N is the number of samples, 1 is a fixed dimension, and M is the signal length
# The function accesses D.shape[0] and Dref.shape[0] to get the number of samples
# Each D[i, 0] and Dref[j, 0] is passed to correlate(), which expects 1D arrays

# Create D: shape (2, 1, 4) - 2 samples, fixed dimension 1, signal length 4
D = np.array([
    [[1.0, 2.0, 3.0, 4.0]],
    [[5.0, 6.0, 7.0, 8.0]]
])

# Create Dref: shape (3, 1, 4) - 3 samples, fixed dimension 1, signal length 4
# Using different first dimension size to distinguish from D
Dref = np.array([
    [[1.5, 2.5, 3.5, 4.5]],
    [[2.0, 3.0, 4.0, 5.0]],
    [[0.5, 1.5, 2.5, 3.5]]
])

ARGS = {
    "D": D,
    "Dref": Dref
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (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
fista_iteration Ran
ran on a synthesized input
bmalezieux/unrolled_dl/plipy/loss_and_gradients.py
code served (permissive licence) · get_code("fb5ade9a35fff503")
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 numpy as np

torch.manual_seed(0)

# Determine reasonable dimensions
# The function uses matrix operations: operator.t(), matmul operations
# For non-inpainting case: operator @ out - y, so operator is (m, n), out is (n,), y is (m,)
# For inpainting case: prior_inpainting @ out, so prior_inpainting is (dict_dim, n), out is (n,)

n_features = 4  # dimension of out
m_measurements = 3  # dimension of y and operator rows

# Create operator as a matrix
operator = torch.randn(m_measurements, n_features)

# Create data vector y
y = torch.randn(m_measurements)

# Create current iterate
out = torch.randn(n_features)

# Create old iterate for momentum
iterate_old = torch.randn(n_features)

# Step size
step = torch.tensor([0.1])

# FISTA momentum term
t = 1.0

# Regularization parameter
lambd = 0.01

# Inpainting parameters
inpainting = False
prior_inpainting = None

# Alternative setup for inpainting case (commented out to use non-inpainting)
# dict_dim = 5
# prior_inpainting = torch.randn(dict_dim, n_features)
# operator_mask = torch.ones(m_measurements)  # mask
# inpainting = True

ARGS = {
    'out': out,
    'iterate_old': iterate_old,
    'y': y,
    'operator': operator,
    'step': step,
    't': t,
    'lambd': lambd,
    'inpainting': inpainting,
    'prior_inpainting': prior_inpainting,
}
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 — 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
recovery_score Ran
ran on a synthesized input
bmalezieux/unrolled_dl/experiments_approximate/experiments/benchmark_meg.py
code served (permissive licence) · get_code("394d3d798e8be9aa")
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 numpy as np

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

# Create sample data for D (learnt prior)
# D should be a 2D array where D.shape[0] is number of filters/atoms
# and D.shape[1] is the feature dimension
D = np.random.randn(3, 4)

# Create sample data for Dref (reference/truth prior)
# Dref should have compatible dimensions for the operations
Dref = np.random.randn(2, 4)

# Parameter u controls which cost matrix computation method to use
u = True

ARGS = {
    "D": D,
    "Dref": Dref,
    "u": u
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
condat_vu_iteration Not yet run
unverified (harvested, no recorded run)
bmalezieux/unrolled_dl/plipy/loss_and_gradients.py
code served (permissive licence) · get_code("bcd29c73f5f1180f")
How it ran

no invocation recorded.

ista_iteration Not yet run
unverified (harvested, no recorded run)
bmalezieux/unrolled_dl/plipy/loss_and_gradients.py
code served (permissive licence) · get_code("398828f7e4e99059")
How it ran

no invocation recorded.

Also present in other papers' code

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

Dictionary learning consists of finding a sparse representation from noisy data and is a common way to encode data-driven prior knowledge on signals. Alternating minimization (AM) is standard for the underlying optimization, where gradient descent steps alternate with sparse coding procedures. The major drawback of this method is its prohibitive computational cost, making it unpractical on large real-world data sets. This work studies an approximate formulation of dictionary learning based on unrolling and compares it to alternating minimization to find the best trade-off between speed and precision. We analyze the asymptotic behavior and convergence rate of gradients estimates in both methods. We show that unrolling performs better on the support of the inner problem solution and during the first iterations. Finally, we apply unrolling on pattern learning in magnetoencephalography (MEG) with the help of a stochastic algorithm and compare the performance to a state-of-the-art method.

For agents

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

get_harvested_code_for_paper("2106.06338")
get_code_for_paper("2106.06338")
have("2106.06338")

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

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

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

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

Connect an agent — have() is free.