SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.05082 · 2020

Learning to Stop While Learning to Predict

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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, 1 violated it and 2 have no contract verdict; 3 failures of our instrument; 0 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/2006.05082.json · badge: /api/ran/2006.05082.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
xinshi-chen/l2stop community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
Im2Patch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xinshi-chen/l2stop/dncnn_stop/dataset.py
code served (permissive licence) · get_code("2af2ba98f984835a")
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 4, dtype family float, shape (3, 3, 3, 24) 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

# Create a small test image tensor
# Shape: (channels, width, height)
# Using distinct sizes: 3 channels, 8x6 spatial dimensions
img = np.random.rand(3, 8, 6).astype(np.float32)

# Window size for patching
win = 3

# Stride for patch extraction
stride = 1

ARGS = {
    "img": img,
    "win": win,
    "stride": stride
}
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 4, dtype family float, shape (3, 3, 3, 24) — shape (3, 3, 3, 24) 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
batch_PSNR Ran
ran; our contract draft was wrong, not the code
xinshi-chen/l2stop/dncnn_stop/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from axgoujon/weakly_convex_ridge_regularizer, is pointer only (licence: NONE) · get_code("1391a8ffffc258ce")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from axgoujon/weakly_convex_ridge_regularizer, and GitHub detected no licence in that repository 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.

batch_PSNR_vector Ran
ran on a synthesized input
xinshi-chen/l2stop/dncnn_stop/utils.py
code served (permissive licence) · get_code("441688378928f71a")
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 (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small test tensors with batch size 2, channels 3, height 4, width 5
batch_size = 2
channels = 3
height = 4
width = 5

# img: noisy image tensor
img = torch.randn(batch_size, channels, height, width, dtype=torch.float32)

# imclean: clean reference image tensor
imclean = torch.randn(batch_size, channels, height, width, dtype=torch.float32)

# data_range: dynamic range of the data (typically 1.0 for normalized images or 255 for 8-bit)
data_range = 1.0

ARGS = {
    'img': img,
    'imclean': imclean,
    'data_range': data_range
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, 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 (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
data_augmentation Ran
ran on a synthesized input
xinshi-chen/l2stop/dncnn_stop/utils.py
code served (permissive licence) · get_code("0b71fac5a3384432")
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 3, dtype family float, shape (3, 4, 5) 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

# Create a small test image with shape (C, H, W)
# Using distinct dimensions: 3 channels, 4 height, 5 width
image = np.random.rand(3, 4, 5).astype(np.float32)

# Test with mode 0 (no augmentation)
mode = 0

ARGS = {
    "image": image,
    "mode": mode,
}
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 3, dtype family float, shape (3, 4, 5) — shape (3, 4, 5) 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
normalize Ran
ran, violated the contract we drafted
xinshi-chen/l2stop/dncnn_stop/dataset.py
pointer only (licence: MIT); the stored copy get_code serves, from zhihefang/SFGNet, is pointer only (licence: NONE) · get_code("5dfad570b582b1ea")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zhihefang/SFGNet, and GitHub detected no licence in that repository 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.

sdn_training_step_DS Ran
ran; our contract draft was wrong, not the code
xinshi-chen/l2stop/sdn_stop/model_funcs.py
pointer only (licence: MIT); the stored copy get_code serves, from gorakraj/earlyexit_onnx, is pointer only (licence: NONE) · get_code("d0092b78fbcce2b3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from gorakraj/earlyexit_onnx, and GitHub detected no licence in that repository 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.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 1 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
Im2Patch 5 other papers
3 dated earlier, 2 later
1608.03981 (2016-08)
Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising
1901.09221 (2019-01)
Progressive Image Deraining Networks: A Better and Simpler Baseline
1907.03029 (2019-07)
Blind Universal Bayesian Image Denoising with Gaussian Noise Level Learning
and 2 more not named here
normalize 4 other papers
3 dated earlier, 1 later
1608.03981 (2016-08)
Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising
1901.09221 (2019-01)
Progressive Image Deraining Networks: A Better and Simpler Baseline
1907.03029 (2019-07)
Blind Universal Bayesian Image Denoising with Gaussian Noise Level Learning
and 1 more not named here
data_augmentation 3 other papers
2 dated earlier, 1 later
1608.03981 (2016-08)
Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising
1907.03029 (2019-07)
Blind Universal Bayesian Image Denoising with Gaussian Noise Level Learning
2111.11843 (2021-11)
U-shape Transformer for Underwater Image Enhancement
batch_PSNR 2 other papers
2 later
2111.11843 (2021-11)
U-shape Transformer for Underwater Image Enhancement
2308.10542 (2023-08)
Learning Weakly Convex Regularizers for Convergent Image-Reconstruction Algorithms
sdn_training_step_DS 1 other paper
1 dated earlier
2002.10025 (2020-02)
Triple Wins: Boosting Accuracy, Robustness and Efficiency Together by Enabling Input-Adaptive Inference

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

There is a recent surge of interest in designing deep architectures based on the update steps in traditional algorithms, or learning neural networks to improve and replace traditional algorithms. While traditional algorithms have certain stopping criteria for outputting results at different iterations, many algorithm-inspired deep models are restricted to a ``fixed-depth'' for all inputs. Similar to algorithms, the optimal depth of a deep architecture may be different for different input instances, either to avoid ``over-thinking'', or because we want to compute less for operations converged already. In this paper, we tackle this varying depth problem using a steerable architecture, where a feed-forward deep model and a variational stopping policy are learned together to sequentially determine the optimal number of layers for each input instance. Training such architecture is very challenging. We provide a variational Bayes perspective and design a novel and effective training procedure which decomposes the task into an oracle model learning stage and an imitation stage. Experimentally, we show that the learned deep model along with the stopping policy improves the performances on a diverse set of tasks, including learning sparse recovery, few-shot meta learning, and computer vision tasks.

For agents

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

get_harvested_code_for_paper("2006.05082")
get_code_for_paper("2006.05082")
have("2006.05082")

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

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

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

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

Connect an agent — have() is free.