Exposure-Invariant Conformal Error Bands for RAW Image Denoising

A camera that denoises a dark photo returns one clean-looking image and no indication of which parts of it are real. Conformal prediction is a statistical wrapper that turns any model's output into error bands guaranteed to contain the truth a chosen fraction of the time, with no assumptions about the data distribution. It could supply that indication. It carries one hard requirement, though: the calibration images used to set the band width must be statistically interchangeable ("exchangeable") with the test images. In a real camera this fails constantly. The analog gain (ISO) and the exposure amplification change from shot to shot, and the size of the noise changes with them. A band calibrated on bright, low-ISO shots is too narrow for a high-ISO night shot. A single band calibrated over everything is too wide for the easy shots and still too narrow for the hard ones.

This proposal works in the camera's RAW domain, the high-bit-depth sensor values recorded before any tone curve or compression, where each value is proportional to photon count. There, sensor physics says exactly how noise scales with gain and brightness. We propose to divide each pixel's restoration error by this physically known noise scale before calibrating. The goal is error scores whose distribution is approximately the same at every ISO, so that one small calibration set yields bands that are valid across exposure conditions, including ISO settings never seen during calibration. Computing the bands takes one forward pass of the denoiser plus a closed-form formula. It needs no repeated diffusion sampling.

Core Claim

The k-Sigma Transform of Practical Deep Raw Image Denoising on Mobile Devices linearly rescales RAW frames so that noise at any ISO looks like noise at a single reference ISO. That work used it to train one small denoiser for all ISOs. Our claim is that the same transform, applied to conformal error scores instead of network inputs, restores near-exchangeability across exposure conditions. Concretely, let $\hat y_j$ be the denoiser's estimate at pixel $j$, $y_j$ the reference value, and $(a_g, b_g)$ the Poisson-Gaussian noise parameters at gain $g$. Here $a_g$ is the shot-noise slope and $b_g$ the read-noise variance; both are measured from flat calibration frames and need no labeled pairs. We define the normalized score as

$$s_j = \frac{|y_j - \hat y_j|}{u_j\,\sqrt{a_g \hat y_j + b_g}},$$

where $u_j$ is an optional learned per-pixel factor, predicted by a small head trained entirely in k-Sigma space and therefore ISO-agnostic by construction. The band is $\hat y_j \pm \lambda\, u_j \sqrt{a_g \hat y_j + b_g}$.

A single image-level parameter $\lambda$ is chosen by conformal risk control on a held-out set. It guarantees that, in expectation, at most a fraction $\beta$ of pixels fall outside their bands. Controlling this fraction of uncovered pixels, rather than requiring every pixel to be covered, avoids the inflated joint uncertainty regions that independent pixel-wise intervals produce.

The statistical guarantee is marginal over the calibration mixture, and that part is exact. The new and testable claim is empirical: coverage holds per exposure condition, including held-out ISOs and amplification ratios, because the normalized score distribution barely moves across them.

Relation to Prior Work

Two papers motivate the gap. Principal Uncertainty Quantification with Spatial Correlation for Image Restoration Problems draws many diffusion samples and calibrates along their principal components. It shows that pixel-independent bands waste enormous volume. Image Super-Resolution with Guarantees via Conformalized Generative Models uses the variance across diffusion samples to build a trusted-region mask with a risk guarantee. Both work on sRGB images, both need many generative passes per image, and neither treats the camera's acquisition settings as a source of distribution shift.

We borrow the risk-control formulation from the second paper. We differ from both in three ways. We replace sample variance with a physically derived scale. We work in RAW. And we target validity across sensor gain, which neither addresses. Metric-guided Image Reconstruction Bounds via Conformal Prediction calibrates bounds on task metrics for general reconstruction, but does not use sensor linearity.

On the RAW side, Learning to See in the Dark, Unprocessing Images for Learned Raw Denoising and the mobile k-Sigma denoiser supply the point predictors and the noise model we reuse. All three output a single image with no uncertainty. Conformalized Quantile Regression supplies the idea of input-adaptive bands. We test it directly as a competitor, because a learned quantile head is the obvious way to obtain adaptivity without physics.

One piece of evidence constrains the design. A High-Quality Denoising Dataset for Smartphone Cameras shows that real smartphone noise departs from textbook models: training on real rather than synthetic Gaussian noise moves PSNR from about 26 to about 30 dB. That is why the physical scale serves only as a normalizer inside a distribution-free calibration, not as the source of the intervals themselves. The same paper's handling of clipped pixels motivates a censoring rule. Where the reference value is saturated or at the black level, we score only the one-sided violation, so those pixels do not falsely count as covered or uncovered.

Research Program

We first train standard RAW denoisers on packed four-channel Bayer input: a U-Net in the style of See-in-the-Dark and the mobile k-Sigma denoiser. For each, we fit the optional $u_j$ head on a training split using a pinball loss on k-Sigma-normalized residuals. We then measure how far the normalized score distribution drifts across ISO bins, using the Kolmogorov–Smirnov distance between bins. This tells us before any coverage experiment whether the invariance premise holds.

Next we run calibration in three protocols. The first is in-distribution, with random splits. The second holds out ISO values, calibrating on low and mid ISO and testing on the highest. The third holds out sensors: calibrate on some SIDD phones and test on another, re-estimating only $(a_g, b_g)$ from flat frames for the new phone. Finally, we time the full pipeline on 1-megapixel inputs to show the uncertainty overhead stays a small fraction of denoising cost.

Baselines

The naive reference is pooled split conformal on unnormalized absolute errors: one $\lambda$ for all exposures, constant-scale bands. It should be valid on average but badly miscovered in individual ISO bins, and it sets the floor that any proposal must clear.

The parametric reference uses uncalibrated Poisson-Gaussian intervals, $\hat y \pm z\sqrt{a_g\hat y + b_g}$. It uses exactly our physical scale without conformal calibration. It isolates whether calibration is needed at all.

Per-ISO stratified conformal (Mondrian calibration) calibrates a separate $\lambda$ in each ISO bin. It is exactly valid per bin when each bin has enough data, so it is the strongest competitor for in-distribution ISOs. For fairness we give it the same total calibration budget, split across bins. We beat it if, at equal total budget, our worst-bin coverage error is no larger and our bands are no wider, and if we remain valid on held-out ISOs, where it is undefined.

Learned-scale conformal follows the adaptive spirit of Conformalized Quantile Regression. A quantile or scale head is trained on raw residuals without k-Sigma normalization, then calibrated the same way. It shares our architecture, training data and tuning budget. It also serves as the key ablation, since it differs from our method only in whether the physical scale normalizes the score. Beating it on held-out ISO coverage is the central result.

Sampling-based risk control follows Image Super-Resolution with Guarantees via Conformalized Generative Models. Its indecision mask comes from the variance of multiple stochastic restorations, which we draw from a deep ensemble or a conditional diffusion denoiser. It is calibrated to the same pixel-violation risk $\beta$. That paper reports qualitatively that trusted-region error tracks the target $\alpha$ on Liu4K and DIV2K, but gives no number in our file. No reported result was found on Lacuna for conformal uncertainty on SID or SIDD RAW denoising. We count a win if we match its band width at matched risk, at a fraction of its compute.

For point accuracy, the file's reference is 39.76 dB PSNR for the "Ours-3.6G" model in Practical Deep Raw Image Denoising on Mobile Devices. Our bands wrap such a model without changing its output.

Why not just…?

Why not just use the Poisson-Gaussian model to write down intervals directly? Those intervals describe input sensor noise, not the denoiser's output error, which depends on the network's capacity and learned priors. Real phone noise also departs from the model, as the SIDD synthetic-versus-real gap shows (A High-Quality Denoising Dataset for Smartphone Cameras). The parametric baseline tests this directly. We expect systematic over- or under-coverage that drifts with ISO. If it instead covers correctly, the conformal layer adds little, and we will say so.

Why not just calibrate separately at each ISO? This is the real threat. Stratified calibration is exactly valid per bin and very simple. Its weaknesses are that it splits a scarce labeled budget, since each SIDD ground-truth frame costs a 150-frame burst, and that it cannot handle an ISO with no calibration data. The equal-budget and held-out-ISO protocols decide the matter. If stratified calibration ties us when every ISO is well represented, we will report it as the right choice in that regime and restrict our claim to small budgets and unseen conditions.

Why not just learn the uncertainty scale with a quantile head, as in CQR? A learned head adapts to brightness, but it learns the gain dependence only over the ISOs it saw, with no reason to extrapolate. The physical scale extrapolates by construction. The learned-scale ablation is the decisive comparison. If a learned head already generalizes to held-out ISOs, the physics adds nothing and the idea should be dropped.

Why not just apply PUQ or sampling-based risk control to the sRGB output? In sRGB, tone mapping and 8-bit quantization have already merged the gain dependence into a nonlinear, clipped signal. Both methods also cost many generative passes per image, and PUQ's authors note it does not scale to high resolution (Principal Uncertainty Quantification with Spatial Correlation for Image Restoration Problems). The sampling-based baseline above measures how much band tightness we give up, if any, for a large reduction in compute.

Proposed Experiments

We use the See-in-the-Dark dataset (Sony Bayer subset, amplification ratios ×100, ×250 and ×300) and SIDD (five phones, labeled ISO metadata). DND serves as a secondary benchmark for in-distribution coverage on four further cameras.

The metrics are marginal pixel-violation rate against target $\beta$, worst-bin violation across ISO or ratio bins, mean band width in k-Sigma units and in linear RAW units, the fraction of pixels whose band exceeds a usability threshold, and added milliseconds per megapixel.

The decisive check is to calibrate on SID ×100 and ×250 and test on ×300, and likewise on SIDD low and mid ISO with testing on the top ISO. The idea succeeds if the normalized method keeps worst-bin violation within about two percentage points of $\beta$, while the pooled and learned-scale baselines exceed it clearly. It fails if the drift diagnostic shows the normalized score distribution shifting across bins as much as the raw one.

A second check, on SIDD, calibrates on four phones and tests on the fifth with only flat-frame noise parameters re-estimated. This is a deliberately hard stretch goal. We expect partial success at best, given the known cross-sensor color and noise differences.