SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.03475 · September 2026

SafeRestore: Detector-Relative Risk Certificates for Selective Industrial Image Restoration

Jun Wang, Shaoliang Yang

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 12 failures of our instrument; 1 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/2609.03475.json · badge: /api/ran/2609.03475.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
nbbllxx0/SafeRestore canonical (classifier label)
classifier basis: census
13 ran · 1 no recorded run
FunctionStatusWhere it lives
build_detector Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/torch_models.py
pointer only (licence: NOASSERTION) · get_code("78b4c1455f0aa696")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

build_restorer Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/torch_models.py
pointer only (licence: NOASSERTION) · get_code("733a1615dbab679a")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

choose_threshold Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nbbllxx0/SafeRestore/src/saferestore/certification.py
pointer only (licence: NOASSERTION) · get_code("f2d8329df4fbda17")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

clopper_pearson_upper Ran
ran, honoured the contract we drafted
nbbllxx0/SafeRestore/src/saferestore/certification.py
pointer only (licence: NOASSERTION) · get_code("356e969b2091c75e")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

degrade_batch Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/degradation.py
pointer only (licence: NOASSERTION) · get_code("3ac5072227ec45b4")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

evaluate_threshold Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/certification.py
pointer only (licence: NOASSERTION) · get_code("8d66fbfe34d5bd87")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

forward_consistency Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/degradation.py
pointer only (licence: NOASSERTION) · get_code("15aca1baec96308b")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

inventory_sha256 Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/datasets/carinthia_s.py
pointer only (licence: NOASSERTION) · get_code("0f7ca407247e48fc")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

level_for_sample Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/degradation_schedule.py
pointer only (licence: NOASSERTION) · get_code("b3c6a061ea606108")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

load_carinthia_s Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/datasets/carinthia_s.py
pointer only (licence: NOASSERTION) · get_code("85ba7dd9702a45d3")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

quantile_evidence_scores Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/scores.py
pointer only (licence: NOASSERTION) · get_code("c9450247acb60341")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

restore_methods Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/degradation.py
pointer only (licence: NOASSERTION) · get_code("7e5ed4366c393c96")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

soft_dice_loss Ran
ran; our contract draft was wrong, not the code
nbbllxx0/SafeRestore/src/saferestore/torch_models.py
pointer only (licence: NOASSERTION) · get_code("6eebe82792a3fe01")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

degrade_mixed_batch Not yet run
unverified (harvested, no recorded run)
nbbllxx0/SafeRestore/src/saferestore/degradation_schedule.py
pointer only (licence: NOASSERTION) · get_code("1b6eddd23399644a")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nbbllxx0/SafeRestore (NOASSERTION). 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.

Also present in other papers' code

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

Industrial inspection pipelines often restore a measured image before a detector acts on it, yet restoration can suppress detector-supported defect structure or create clean-region activations. We formulate restoration as a selective action problem over the measured display, five restored candidates, and review. SafeRestore ranks candidates with action-specific fitted scores, chooses a gate on threshold-tuning data, and evaluates the fixed gate on a disjoint certification sample with two one-sided exact binomial bounds: one for the positive-conditional evidence-loss incident rate and one for the all-accepted excess-activation incident rate. The guarantee is marginal for one policy fixed before its certification outcomes are observed, under an image-level i.i.d. working model. In a retrospective split-sample study of 4,591 public Carinthia-S images, the protocol yields auditable risk-coverage behavior. The primary all-action policy passes in one of five training repetitions (12.0% +/- 26.9% pass-gated test coverage when failures count as zero), whereas fixed bicubic and reduced-complexity variants pass more often. On reserved morphologies, evidence-loss incidence rises to 81.1-90.3%, and KolektorSDD lacks both detector competence and enough positive certification images for the stated target. The contribution is therefore an auditable, detector-relative framework for deciding when a transformed image may be returned automatically and when review remains necessary -- not a claim that adaptive routing outperforms simpler policies on the present evidence.

For agents

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

get_harvested_code_for_paper("2609.03475")
get_code_for_paper("2609.03475")
have("2609.03475")

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

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

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

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

Connect an agent — have() is free.