Source-linked AI summary

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

Shaoliang Yang, Jun Wang

arXiv:2609.03475v1cs.CVstat.AP

TL;DR

Restoration can change detector-supported defect evidence or clean-region activations, making automatic return a decision that needs held-out evidence. SafeRestore ranks raw and restored actions and certifies a fixed return gate against two incident rates. In retrospective Carinthia-S testing, the primary all-action policy passed less often than simpler alternatives, while reserved morphologies and another dataset exposed transfer limits.

  • Problem

    Restoration can suppress small detector-supported defects or introduce structure that activates a detector, while average reconstruction metrics may not capture these failures.

    Source: §1 · p. 1
  • Method

    SafeRestore ranks the raw display and five restored candidates, then evaluates a fixed gate on disjoint certification data with exact bounds for positive-conditional evidence loss and all-accepted excess activation.

    Source: §1 · p. 1, §4.2 · p. 6, §9 · p. 18
  • Results

    The primary all-action policy passed in one of five repetitions; fixed bicubic, an interpolation-only pool, and a reduced-feature policy each passed in three of five and achieved higher mean pass-gated coverage.

    Source: §9 · p. 18
  • Takeaways & Limitations

    Certification and review provide safeguards for deciding when automatic return is supported, but the observed results do not establish adaptive-policy superiority or cross-domain readiness.

    Source: §8.1 · p. 16, §9 · p. 18

    Evidence is retrospective, physical independence is unknown under image-level i.i.d. sampling, and the certificate does not transfer to new morphologies or acquisition settings without additional evidence.

    Source: §5 · p. 8, §8.5 · p. 17

Abstract

from arXiv · show

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.

1 Introduction

Restoration can alter detector-supported defect evidence or produce clean-region activations, so the relevant question is whether a fixed policy has enough held-out evidence to return an image automatically. SafeRestore ranks raw and restored actions, then certifies a fixed gate against two distinct incident limits; the study finds that simpler policies pass more often than the primary all-action policy.

1 Introduction

  • Restoration can suppress small defects or introduce structure that activates a detector, failures not well summarized by PSNR or SSIM.The inspection decision may retain the measured display, return a restoration, or send the case to review; the question is whether held-out evidence supports automatic return under both incident limits.Source: §1 · p. 1
  • SafeRestore fits action-specific ranking scores, selects an action and gate, then uses disjoint certification data to bound evidence loss among accepted positives and excess activation among all accepted images.The scores are not calibrated probabilities, and the guarantee is marginal for one policy fixed before certification outcomes are observed.Source: §1 · pp. 1–2, Figure 1 · p. 2
  • The primary all-action policy passes in one of five repetitions, while fixed bicubic and simpler variants pass more often.Certification exposes training sensitivity and withholds automatic return when evidence is insufficient.Source: §1 · p. 2

2.1 Restoration evaluated through downstream evidence

  • SafeRestore differs from restoration and uncertainty methods by certifying a selective image-action policy under two detector-relative incident limits.Related methods principally optimize expected task performance, reconstruction quality, or computation; SafeRestore acts after the transforms and detector are trained.Source: §2.1 · p. 3, §2.2 · p. 3

2.2 Uncertainty, selective prediction, and routing

  • The paper distinguishes image- or task-output uncertainty from the incident rate of a discrete raw/restored/review policy.Its conservative split uses tuning to choose one gate and an independent certification role to evaluate that fixed gate with two exact binomial bounds and a Bonferroni allocation.Source: §2.2 · p. 3

2.3 Industrial inspection setting

  • Controlled transformations isolate the action decision but do not physically qualify a scanner, recipe, or fabrication process.Carinthia-S provides SEM image–mask pairs across six morphology classes.Source: §2.3 · p. 3

2.4 Relationship to a prior Carinthia-S study

  • The earlier study [11] shares all 4,591 Carinthia-S image identities, but SafeRestore uses a new selective-policy estimand and certification records.No fitted model, detector operating point, split, synthetic record, or numerical result from that study enters the current score fitting, threshold selection, or certification.Source: §2.4 · p. 4, Table 1 · p. 4

3 Decision Problem and Detector-Relative Risks

The decision problem treats each measured image as a choice among the raw display, five restorations, and review. It defines separate detector-relative incident risks and reports coverage in a way that distinguishes positive and clean populations and operating prevalence.

3 Decision Problem and Detector-Relative Risks

  • The policy receives a controlled observation and may select the raw display or one of five fixed or learned transformations; review is the terminal action when the selected candidate is not returned.The reference image and mask are reserved for their designated offline data roles, and physical independence cannot be verified from the available grouping metadata.Source: §3 · pp. 4–5

3.1 Image-level incidents

  • Evidence loss marks defect-pixel recall below r0 on positive images, while excess activation marks clean-region false-positive rate above f0 on every image.The primary thresholds are r0 = 0.25 and f0 = 0.002; these detector-relative incidents are not causal claims that a transformation deleted or invented structure.Source: §3.1 · p. 5
  • Policy evidence-loss risk conditions on accepted positives, whereas excess-activation risk conditions on all accepted images.Using positives only for evidence loss prevents accepted clean images from artificially lowering that risk.Source: §3.1 · p. 5

3.2 Coverage and operating prevalence

  • Positive and clean return coverage are reported separately, and overall coverage and activation risk can be standardized to an operating prevalence.The two risk limits, each 0.15, are simultaneous research thresholds rather than manufacturing acceptance limits; missing required accepted observations count as certificate failure.Source: §3.2 · p. 5

4 Selective Restoration Policy

SafeRestore applies a selective decision layer to a fixed pool of measured and restored images. Action-specific scores rank candidates and images, while a threshold chosen on tuning data is evaluated on a separate certification role.

4.1 Candidate actions and common detector

  • The action pool includes the raw display and five fixed or learned restorations, compared under the same detector checkpoint and pixel threshold within each repetition.The learned restorer uses six 32-channel residual blocks; application requires generating and scoring all candidates, with no efficiency benefit assumed.Source: §4.1 · p. 6

4.2 Action-specific ranking scores

  • For each action, class-balanced logistic regressions rank evidence-loss risk on positive images and excess-activation risk on all images using detector and consistency features.The six features require no reference image or defect mask at application time, and the sigmoid outputs are ranking scores, not calibrated probabilities.Source: §4.2 · p. 6

4.3 Threshold selection and certification

  • The largest eligible tuning prefix fixes the gate; if none qualifies, the policy has no automatic-return region, and validity comes only from disjoint certification.The tuning rule requires at least 15 accepted images and 15 accepted positives and uses half-target empirical-risk margins; archived records permit reconstruction of comparisons.Source: §4.3 · pp. 6–7, Table 2 · p. 7

5 Exact Marginal Certification Guarantee

The certificate bounds two incident rates for one policy fixed before certification outcomes are observed, under an image-level i.i.d. working model. Its scope does not extend automatically to policy selection, clustered sampling, or new settings.

5 Exact Marginal Certification Guarantee

  • The guarantee is conditional on pre-certification information fixing one policy and on certification images being i.i.d. image-level units from the nominal distribution.The public metadata do not identify wafers, lots, specimens, or repeated fields of view, so physical independence cannot be audited from the manifest.Source: §5 · p. 7
  • Two one-sided exact binomial upper bounds use δ/2 per endpoint, and a union bound controls false certification at level δ without requiring independent endpoint indicators.With no observations for an endpoint, its bound is 1, preventing an evidence-free passing certificate.Source: §5 · pp. 7–8
  • The marginal guarantee does not cover searching across seeds, action pools, or other policy choices and then selecting a passing member.For five separately certified policies, the direct union bound is at most 5δ = 0.50 when δ = 0.10; the study selects no passing seed for deployment.Source: §5 · p. 8
  • The certificate does not automatically transfer to clustered production data, new morphologies, scanners, recipes, or prevalence mixtures, and the evidence is retrospective rather than newly acquired.The authors call for cluster-level sampling or dependence-aware analysis and prospective, cluster-identified acquisitions before making a production claim.Source: §5 · p. 8

6 Evaluation Design

The evaluation uses controlled degradations and split data roles to compare selective policies, fixed actions, and diagnostic variants. Its certification claims are bounded by the available populations and evidence volume.

6 Evaluation Design

  • The evaluation asks whether fixed selective policies pass both held-out bounds, whether actions differ in fidelity and incident profiles, and where results fail under changed settings.The study varies endpoints, features, evidence volume, morphology, architecture, and dataset.Source: §6 · p. 8

6.1 Carinthia-S population and data roles

  • Carinthia-S supplies 4,591 public SEM image–mask pairs; classes 3, 4, and 6 are nominal, while classes 1, 2, and 5 form a 67-image reserved diagnostic.Images receive matched mild, moderate, or severe blur, downsampling, and noise; these controlled transformations are not a specified SEM acquisition model.Source: §6.1 · p. 8, Figure 2 · p. 9

6.2 Models, repetitions, and endpoints

  • The primary and alternate model families are trained from scratch at five seeds, while detector thresholds and risk targets are fixed under the stated evaluation design.The primary evidence-loss incident is recall below 0.25, the boundary analysis uses a 0.50 floor, and both policy-risk targets are 0.15.Source: §6.2 · pp. 8–9, Table 3 · p. 9

6.3 Comparators and outcomes

  • The primary comparison is the all-action policy against separately fit, tuned, and certified fixed-action, restoration-only, entropy-gated, and oracle comparators.The main outcome is marginal seed-level certificates passed; pass-gated coverage is zero for a failing policy and summarizes training sensitivity across seeds.Source: §6.3 · pp. 9–10

6.4 KolektorSDD boundary study

  • KolektorSDD's diagnostic split has only 5 tuning positives and 13 certification positives; even zero incidents among 13 gives U(0, 13; 0.05) = 0.206 > 0.15.Five tuning positives fall below the minimum of 15, so this design cannot support the stated certificate; detector competence is a separate diagnostic.Source: §6.4 · p. 10

7 Results

On nominal data, fixed bicubic and simpler variants pass certification more often than the primary all-action policy; limited evidence and reserved morphologies further constrain automatic return. The results map where the selective-restoration protocol is unreliable rather than demonstrating adaptive-policy superiority.

7.1 Most primary policies do not pass, and simpler policies do better

  • Fixed bicubic passes in 3/5 repetitions with 23.3%±22.2% pass-gated coverage, versus 1/5 and 12.0%±26.9% for the all-action policy.Bilinear and smoothed bicubic also exceed the all-action policy's pass count; conditional coverage is broadly similar across most policies.Source: §7.1 · pp. 10, 12, Figure 4 · p. 11

7.2 Risk–coverage behavior and evidence sufficiency

  • At the tuning-selected gate, certification coverage is 51.4%, while too few accepted clean images support a separate 15% clean-component bound.Even with zero incidents, at least 19 accepted clean images are needed; eligible primary gates accept only 10–13.Source: §7.2 · p. 12, Figure 5 · p. 12

7.3 Candidate fidelity and detector incidents are differently ordered

  • Learned restoration reaches mean PSNR 39.7 dB and 6.7% evidence-loss incidence, but its mean excess-activation incidence is 51.3%.Raw and fixed interpolation have 46.1–48.7% evidence-loss incidence and 3.0–3.8% excess-activation incidence, so PSNR alone does not identify a policy meeting both limits.Source: §7.3 · pp. 12–13, Figure 6 · p. 13

7.4 Fitted scores provide ordering, not probability calibration

  • Incident rates generally rise across endpoint-score quantiles, supporting score use for ranking, but class-balanced sigmoid outputs are not calibrated study-population probabilities.The policy uses induced ordering; gates pass based on held-out incident counts and exact bounds.Source: §7.4 · pp. 13–14, Figure 7 · p. 13

7.5 Illustrative decisions connect the gate to image evidence

  • Illustrative cases show that a passing population certificate permits individual errors, while a highly ranked action can still be sent to review.One returned example crosses the 0.2% excess-activation threshold; the certificate controls a population rate, not every image.Source: §7.5 · p. 14, Figure 8 · p. 14

7.6 Feature and pool ablations expose unnecessary complexity

  • Removing forward consistency or restricting the pool to interpolation raises passes from 1/5 to 3/5, while removing raw or using only learned action yields no passes.Because variants reuse identities and were examined retrospectively, these results motivate prospective simplification rather than post hoc selection; entropy-gated raw and an outcome-informed oracle also fail accept-all certification.Source: §7.6 · pp. 14–15, Table 6 · p. 15

7.7 Architecture and second-domain checks do not provide external confirmation

  • The alternate attention-gated detector and U-Net family passes in 3/5 repetitions, but KolektorSDD supplies no external certificate.KolektorSDD has detector-validation Dice of approximately 0.033–0.042, only five tuning positives, and 13 certification positives—insufficient for the 15% target even with zero incidents.Source: §7.7 · p. 15

7.8 Severity and population shift reveal where return becomes unreliable

  • The seed-211 gate returns 86.6% of mild and 80.5% of moderate observations, but only 1.6% of severe observations; reserved morphologies show 81.1–90.3% evidence-loss incidence.Only two severe images are returned, one with excess activation; the nominal certificate does not transfer to the 67 reserved morphologies, where coverage is 32.8–55.2%.Source: §7.8 · pp. 15–16, Figure 9 · p. 15, Figure 10 · p. 16

8 Discussion

Certification changes the interpretation of restoration comparisons: the primary adaptive policy passed only one of five repetitions, while simpler alternatives passed more often. The discussion qualifies these certificates by their detector-relative endpoints, evidence requirements, and retrospective image-level scope.

8.1 Certification changes the conclusion drawn from restoration results

  • Only one of five primary all-action policies passed, while fixed bicubic, an interpolation-only pool, and a policy without the consistency feature each passed in three of five repetitions.Learned restoration reduced severe evidence-loss incidents and fixed interpolation limited excess activation, but the resulting policy did not improve certification outcomes over simpler alternatives in these repetitions.Source: §8.1 · p. 16

8.2 Interpretation of scores, incidents, and certificates

  • The fitted sigmoid outputs rank incidents but are not calibrated probabilities, and certificates apply to one fixed policy rather than every returned image or subgroup.The examined alternative bound constructions left the pass/fail pattern unchanged, but this does not establish invariance to every valid interval procedure.Source: §8.2 · p. 17

8.3 Population mixture and evidence requirements

  • Evidence loss is conditional on accepted positives, whereas excess activation is measured across accepted images and depends on the operating mixture.The nominal test set has 430 positives but only 16 clean images; at a 15% target and endpoint error allocation 0.05, even zero incidents require 19 accepted units and one incident requires 30.Source: §8.3 · p. 17

8.4 Operational implications

  • A prospective study should prespecify sampling units, endpoints, strata, and review costs; current candidate generation before selection supports no latency or energy claim.Public metadata omit wafer or lot groupings, so the image-level i.i.d. model cannot address within-cluster dependence; a cascade would require new threshold selection and certification.Source: §8.4 · p. 17

8.5 Limitations and prospective study design

  • Retrospective data reuse, unknown physical grouping, and controlled degradations limit confirmation under real rescanning, charging, drift, contamination, or recipe changes.The 15% risk limits and 25% recall floor are research choices, and two compact architecture families with a six-feature ranker do not establish method generality.Source: §8.5 · pp. 17–18

9 Conclusion

SafeRestore treats restoration as a selective action and requires population-level incident-rate evidence before automatic return. In the retrospective study, the primary all-action policy passed in one of five repetitions, while the authors recommend simpler prespecified policies and fresh cluster-aware certification for future study.

9 Conclusion

  • SafeRestore bounds evidence loss among accepted positives and excess activation among all accepted images using a disjoint sample, for one policy fixed in advance under an image-level i.i.d. working model.The action set includes the raw display and five restored candidates.Source: §9 · p. 18
  • The primary all-action policy passed in one of five repetitions and achieved 12.0%±26.9% pass-gated coverage, while simpler variants passed more often.Reserved morphologies had 81.1–90.3% evidence-loss incidence, and KolektorSDD lacked adequate detector competence and positive sample size for the target.Source: §9 · p. 18
  • The next study should prespecify a simple policy, reserve newly acquired wafer- or lot-level clusters, collect adequate positive and clean populations, and measure human-review performance.Until such evidence exists, restoration should remain selectable and rejectable rather than hidden mandatory preprocessing.Source: §9 · p. 18

Data and Code Availability

The authors identify the public datasets, release analysis materials, and disclose limits on retrospective confirmation and physical grouping. The supplement also records the analysis scope and inventory rules for the two datasets.

Data and Code Availability

  • The authors state that Carinthia-S and KolektorSDD are publicly distributed under their authors’ licenses and that analysis code, split manifests, records, summaries, tests, data, and figure scripts will be released.No model, operating point, numerical result, or synthetic record from [11] enters fitting, threshold selection, or certification, although Carinthia-S identity overlap is disclosed.Source: Data and Code Availability · p. 18

Declaration of Generative AI Assistance

  • The Cursor editor assisted with code drafting and language editing, while the authors designed and verified the study, ran experiments, reviewed the manuscript, and accept responsibility.Source: Declaration of Generative AI Assistance · p. 18

S1 Analysis Scope and Statistical Interpretation

  • The retrospective analysis reuses Carinthia-S identities previously appearing in [11] and lacks wafer, lot, specimen, or field-of-view groupings, limiting empirical confirmation and leaving image-level independence uncertain.The five repetitions reuse identities and data-role assignments, so they measure fitting sensitivity rather than five independent factory samples.Source: S1 Analysis Scope and Statistical… · p. 21

S2 Data Inventory and Split Verification

  • The inventory treats one image as the statistical unit, defines positivity by a nonempty resized binary mask, and reserves classes 1, 2, and 5 for morphology diagnostics.KolektorSDD's diagnostic split is not the official fold and cannot support the stated certificate because its tuning and certification positive counts are too small.Source: Table S1 · p. 21, S2 Data Inventory and Split Verification · p. 21, Table S2 · p. 21

S3 Implementation Details

The supplement documents the compact models, score fitting, gate selection, and sensitivity analyses used in the study. It also reports architecture and tuning-rule checks and points to the complete policy comparisons.

S3 Implementation Details

  • Images are converted to grayscale and resized to 256 × 256, masks use nearest-neighbor resizing and thresholding, and training augmentation uses only independent horizontal and vertical flips.Source: S3 Implementation Details · p. 21
  • The primary detector is a three-level U-Net with 117,393 parameters, while the primary restorer has six residual blocks and 111,585 parameters and adds its output to bicubic interpolation.Both are trained for five epochs; the detector uses weighted binary cross-entropy plus soft Dice, and the restorer uses image and gradient ℓ1 losses.Source: S3 Implementation Details · pp. 21–22
  • For each action and endpoint, class-balanced logistic regression fits ranking scores; tuning uses a half-target incident-rate criterion and certification uses one-sided Clopper–Pearson bounds.All candidates are generated before action selection, so runtime is not an efficiency result.Source: S3 Implementation Details · p. 22

S4 Architecture-Family Sensitivity

  • The alternate architecture family passed in 3/5 repetitions with 18.9% ± 19.6% pass-gated coverage, indicating architecture sensitivity rather than family-independent validity.The reported pass counts do not permit post-certification seed selection.Source: S4 Architecture-Family Sensitivity · p. 22, Table S3 · p. 22

S5 Exploratory Tuning-Rule Sensitivity

  • Two alternative tuning rules were examined after primary results were available; the tuning-UCB variant produced two passing marginal certificates but does not nominate a rule or seed for deployment.A future comparison must prespecify one rule, control familywise error, or use fresh certification data.Source: S5 Exploratory Tuning-Rule Sensitivity · p. 22, Table S4 · p. 23

S6 Complete Policy Comparisons

S7 Feature and Action-Pool Ablations

The ablations find no observed certificate-pattern improvement from added feature and candidate complexity, while the raw action is essential in this design. Separate analyses examine certification evidence volume and transfer to reserved morphologies.

S7 Feature and Action-Pool Ablations

  • Consistency features and a learned candidate add complexity without improving the observed certificate pattern; the raw action is essential in this design.The feature and action-pool variants are tuned and certified as separate marginal policies on the same five identities and seeds; aggregate pass counts are not five independent replications.Source: S7 Feature and Action-Pool Ablations · p. 24, Table S11 · p. 24, Table S12 · p. 25

S8 Evidence Volume and Population Boundaries

S9 Clean-Proxy and KolektorSDD Diagnostics

Diagnostics delimit what the clean-proxy and KolektorSDD evidence can establish, while sensitivity and endpoint-volume analyses examine certification requirements. The released records and code support reconstruction of the study’s analyses.

S9 Clean-Proxy and KolektorSDD Diagnostics

  • Under the post-hoc seed-211 gate, 38/80 clean proxies are returned (47.5%), and 10/38 returned proxies have excess activation (26.3%).The proxies are inpainted positive test images, not matched physical clean acquisitions; the 80 identities are neither random nor morphology-balanced, and the analysis is not confirmatory.Source: S9 Clean-Proxy and KolektorSDD… · p. 25, Table S15 · p. 25
  • KolektorSDD has five tuning positives and 13 certification positives in a non-official diagnostic split, and fails before an informative restoration-policy comparison.These findings mark sample-size and detector-competence boundaries, not external-domain performance.Source: S9 Clean-Proxy and KolektorSDD… · p. 25, Table S15 · p. 25

S10 Sensitivity to the Bound Construction

  • The pass/fail pattern is identical under four bound constructions; removing multiplicity shifts the largest bound by roughly one percentage point, insufficient to rescue seeds 207 or 223.Two seeds fail earlier at threshold tuning, where no bound is involved; other valid interval procedures require separate analysis.Source: S10 Sensitivity to the Bound… · p. 26, Table S16 · p. 26

S11 Endpoint Evidence Required for a Certificate

  • All-action gates accept 123–169 positives and 133–182 images, but only 10–13 clean images versus 19 required even with zero incidents; prospective designs should size positive and clean populations separately.The clean-only activation component is therefore reported descriptively rather than certified; KolektorSDD also falls short with 13 certification positives.Source: S11 Endpoint Evidence Required for a… · p. 26, Table S17 · p. 26

S12 Released Record Schema

  • Archived deletion_* fields map to evidence-loss terms and invention_* fields to excess-activation terms; coverage is pre-certificate, deployable_coverage is pass-gated, and action_pool denotes the all-action policy.The archive names remain for stability; the article’s terminology carries the intended meaning.Source: S12 Released Record Schema · p. 27

S13 Reproducibility Resources

  • Released code and records support reconstructing splits, refitting score models, evaluating fixed gates, and regenerating aggregates and figures without retraining the detector or restorer.The materials include split manifests, per-image and per-action records, trained-model summaries, certificate counts, visual sources, and regression tests.Source: S13 Reproducibility Resources · p. 27
Loading 2609.03475v1…