Cameras on factory floors, vehicles and field sensors increasingly record evidence that several parties must agree on: an inspection photo that triggers a payment, a dashcam frame in an insurance claim. Blockchains let these parties share a tamper-evident record, but they are very slow and expensive per byte. BLOCKBENCH found that permissioned ledgers trail an in-memory database by over 100x in throughput (BLOCKBENCH), and public Ethereum handles roughly 7–20 transactions per second (ShareBC). Devices therefore compress images hard, store them off-chain, and write only a hash to the ledger. At that level of compression the images are nearly useless for automated analysis. On COCO at JPEG quality factor 10, detection mAP drops to 9.5%. A learned restoration network can bring it back to 26.1% (Sensitivity Decouple Learning), but a restorer invents detail. Once someone restores the image, nothing on the ledger distinguishes a faithful restoration from a fabricated one.
The proposal rests on one observation. JPEG compression is a deterministic, public degradation, and it can be separated cleanly from the unknown physical degradations (sensor noise, blur) that the camera applied first. That separation lets us write a cheap, bit-exact test for any claimed restoration: re-encode it with the same integer JPEG encoder and quality table, and check that it produces exactly the committed quantized coefficients. The restorer can be stochastic, generative, or proprietary. The check is deterministic, needs no neural network, and can be split into 8×8 blocks. A smart contract can therefore settle a dispute by recomputing a single block. We propose to build this check, and to measure the question that decides whether it is worth anything: how much task-relevant content can a restorer fabricate while still passing?
Core Claim
Decoupled degradation modeling is usually justified by optimization. Blur and noise demand opposite operations, so separate branches avoid conflicting gradients (Two Heads Better than One; Warm Diffusion). We argue that the same decoupling also marks a boundary of trust.
The codec part of the degradation has a known forward model. It defines an admissible set: all images whose encoding matches the commitment. A restoration can be certified to lie inside that set. The physical part (sensor noise, optical blur) has no exact forward model, so no restoration of it can be certified. Its output can only be labeled with the identity of the model that produced it.
Our concrete claims come in three layers. First, a restorer can be forced into the admissible set, by projection or by training, while losing little of the downstream accuracy that unconstrained restorers such as DAGN achieve. Second, the admissible set leaves an adversary some freedom, which we call slack, and we can measure it. We define slack as the largest change an adversarial restorer can make to a fixed detector's outputs while staying inside the set. Third, the sender can shrink slack cheaply by spending extra committed bits exactly where a detector's decision is sensitive. This gives a rate–certifiability trade-off that neither the restoration literature nor the ledger literature has studied.
Research Program
Stage one: a certifiable codec-inversion stage. The camera encodes each image with a fixed-point integer DCT, so every honest machine produces identical bits. It writes to the ledger the hash of the bitstream and a Merkle root over per-block quantized coefficients. A Merkle root is a single hash that commits to many items while allowing any one item to be proven with a short path. The bitstream itself goes to off-chain storage, as in the standard pattern described in A Survey on Off-chain Networks.
A restorer publishes its output together with a Merkle root over its 8×8 pixel blocks. Anyone can re-encode the output off-chain. A challenger who finds a mismatching block submits only that block, its Merkle path, and the committed coefficients. The contract then recomputes 64 integer multiply-adds and one rounding step. This is the optimistic, fraud-proof style of verification the off-chain survey discusses, reduced to a primitive small enough to run on-chain. We will implement it and measure gas cost on a local Ethereum testnet. No reported result was found on Lacuna for the on-chain cost of verifying image-block computations.
Stage two: a labeled physical-restoration stage. Deblurring or denoising the sensor image necessarily moves it out of the admissible set, because the camera's pre-compression image already contained that noise. The design therefore follows the two-stage separation of Two-Stage Domain Adapted Training. Stage one yields the certified estimate of what the sensor captured. Stage two's output is recorded with a model hash and explicitly marked as uncertified.
Making restorers set-respecting. We will test three ways of producing stage-one outputs. The first is a hard projection, which clips each DCT coefficient of any restorer's output back into its quantization interval. The second is a DAGN-style restorer trained with the projection placed inside its forward pass. The third adds a separate high-frequency branch in the spirit of the dual-branch extractor of Two Heads Better than One, so that the textural guess and the constrained structure are modeled apart.
Measuring and shrinking slack. For a fixed detector $f$ and committed coefficients $c$, let $S(c)$ be the set of images whose integer encoding equals $c$. We define slack as
$$\Delta(c) = \max_{x \in S(c)} \; d\big(f(x), f(x_{\text{ref}})\big),$$
where $x_{\text{ref}}$ is the uncompressed original and $d$ counts added, removed, or relabeled detections. We estimate $\Delta$ from below with projected-gradient attacks inside $S(c)$.
We then let the sender spend a small bit budget on finer quantization of the coefficients to which the detector is most sensitive, located by gradient saliency on the sender's own image. We trace the resulting curve of slack against committed bytes. The file's own motivation for this comes from Sensitivity Decouple Learning, which separates compression-insensitive semantic features from compression-sensitive ones. We turn that separation into a bit-allocation rule.
Baselines
The naive reference point is the decoded JPEG with no restoration, hashed on-chain. It is trivially verifiable and useless for detection. The file reports 9.5% COCO mAP at QF=10 for raw JPEG (Sensitivity Decouple Learning). Any certified restorer must clearly exceed it.
The strongest existing restorer is DAGN from Sensitivity Decouple Learning, run unconstrained. It is the strongest competitor because it explicitly targets downstream detection on heavily compressed images. It reports 26.1% mAP at QF=10 on COCO, a 2.06 dB PSNR gain on BSD500, and about 29.7 ms per 512×512 image. We will retrain it on DIV2K and Flickr2K with the same detector, the same training budget and the same hyperparameter search as our variants. The comparison has two halves. Our certified variant "wins" if it stays within 2 mAP points of unconstrained DAGN while offering a guarantee DAGN lacks. We also measure DAGN's own slack, meaning how often its outputs fall outside $S(c)$ and by how much, to show whether the guarantee has a cost.
A generic all-in-one restorer, Perceive-IR, reported at a 0.57 dB average gain over PromptIR, tests whether the projection step helps or hurts strong restorers that were not built for compression. The key ablation isolates the constraint. We compare DAGN with post-hoc projection, DAGN trained through projection, and DAGN without projection, all at identical compute. For the ledger side, the reference points are Ethereum and ShareBC as reported in ShareBC: roughly 7–20 transactions per second on mainnet and about $0.32 per contract transaction. Our target is one commitment transaction per image and one bounded-cost transaction per dispute.
Why not just…?
Why not just hash the file on IPFS and let each consumer restore it? This is the standard pattern (A Survey on Off-chain Networks), and it works when every party accepts every other party's restorer. It fails exactly when parties disagree about what a restored image shows. The hash certifies only the degraded bits, so there is no shared object to argue about. Our check adds only the step that keeps restorations tied to those bits. If slack turns out to be near zero even without projection, meaning restorers already stay inside the set, then this alternative is essentially sufficient and we will report that.
Why not just run a deterministic restorer and have validators rerun it, or use a zero-knowledge proof of inference? This is the real threat. It gives stronger guarantees about which computation ran. But it certifies the computation, not the faithfulness to the data: a faithfully rerun network can still hallucinate. Rerunning also imposes the execution overhead that BLOCKBENCH identifies as a primary bottleneck, and floating-point determinism across hardware is fragile. The two approaches can be combined, and we will measure the verification cost of rerunning versus block re-encoding. We will not claim our check replaces proof of computation. We claim it certifies a different property, one that holds for any restorer.
Why not just compress less? Spending more bandwidth shrinks both the artifacts and the slack. Edge devices, however, operate under tight channel budgets such as the 10 MHz and 2 W setting modeled in ShareBC. The honest test is to compare our saliency-targeted extra bits against uniformly raising the quality factor at equal total bytes. If uniform raising reaches the same slack and mAP, the bit-allocation component is unnecessary and we will drop it.
Proposed Experiments
We train on DIV2K and Flickr2K and evaluate restoration on BSD500, LIVE1 and LIU4K, at quality factors 10, 20 and 40. Downstream accuracy is COCO detection mAP with a frozen detector. For stage two, we add Gaussian and real noise (SIDD) before encoding and report which gains remain certified and which do not.
Three checks decide the proposal. The first is the accuracy cost of certification: set-constrained DAGN against unconstrained DAGN on COCO mAP and PSNR. The second is the slack measurement. If projected-gradient attacks inside $S(c)$ can routinely insert or delete confident detections at QF=10, the bare certificate is weak at useful compression levels. The contribution then becomes the rate–slack curve, and the question is whether a few percent extra committed bytes, placed by saliency, beat a uniform quality increase at equal size. The third is the systems measurement: commitment and dispute gas on a local Ethereum testnet, and aggregate verification throughput when validators re-encode images, compared against rerunning a restorer.
The bet fails if slack stays large at every affordable rate. That would be a useful negative result: it would show that restoration from severely compressed ledger-anchored images cannot be made trustworthy by any check that treats the codec as the only known degradation.
References
- BLOCKBENCH: A Framework for Analyzing Private Blockchains
- Efficient Blockchain-Empowered Data Sharing Incentive Scheme for Internet of Things
- Sensitivity Decouple Learning for Image Compression Artifacts Reduction
- Two Heads Better Than One: Dual Degradation Representation for Blind Super-Resolution
- Warm Diffusion: Recipe for Blur-Noise Mixture Diffusion Models
- A Survey on Off-chain Networks: Frameworks, Technologies, Solutions and Challenges
- Two-stage domain adapted training for better generalization in real-world image restoration and super-resolution
- Perceive-IR: Learning to Perceive Degradation Better for All-in-One Image Restoration