Whose Fault Is the Uncertainty? Attributing Restoration Doubt to Scene or Corruption

When a photo taken in rain, haze or low light is cleaned up by a neural network, the output can be wrong for two very different reasons. The network may be looking at a kind of corruption it has never seen, such as underwater color cast or heavy compression. Or it may be looking at a kind of scene it has never seen, where the corruption is familiar but the textures and shapes behind it are not. Today's uncertainty estimates for image restoration report a single number or map per pixel, so they cannot say which of the two is happening. Yet the right response differs. A novel corruption calls for re-estimating or adapting the model's picture of the corruption, or refusing to restore. A novel scene calls for flagging likely hallucinated detail.

This note proposes to split restoration uncertainty along two axes at once. The first is the usual split between aleatoric uncertainty (ambiguity in the data itself, which more training data cannot fix) and epistemic uncertainty (the model's own ignorance, which more data can fix). The second is a split between the content pathway and the degradation pathway of a restoration network that already separates "what the scene is" from "what corrupted it". The claim is that a disentangled architecture makes it possible to attribute epistemic uncertainty to the part of the model responsible for it. We also argue that this attribution can be tested cleanly with a factorial benchmark that moves content and corruption out of distribution independently.

Core Claim

A growing line of restoration work separates content from degradation. DASR learns a degradation embedding by contrasting patches from the same versus different images. DRAT subtracts a content encoding to purify that embedding. The Universal Degradation Model compresses degradation codes so they carry little information about content. BaryIR maps content to a shared Wasserstein barycenter and pushes degradation-specific variation into orthogonal residual subspaces. All four produce deterministic codes, and none of them reports how unsure it is.

On the uncertainty side, LR+D ("It depends") combines a per-pixel aleatoric head with ensemble- or dropout-based epistemic uncertainty in a low-rank-plus-diagonal covariance. PUQ finds the principal directions of variation in diffusion posterior samples and calibrates them. Both treat the network as one block and output one combined uncertainty field.

Our claim is that the separation into content and degradation pathways gives a natural place to cut the uncertainty. The degradation code $d$ and the network weights $\theta = (\theta_{\text{deg}}, \theta_{\text{con}})$ play distinct roles, where $\theta_{\text{deg}}$ is the degradation encoder and $\theta_{\text{con}}$ is the content-and-reconstruction backbone. Nesting the law of total variance over both gives, for restored pixels $y$ and input $x$:

$$\mathrm{Var}[y\mid x] = \underbrace{\mathbb{E}_{\theta}\mathbb{E}_{d}\,\mathrm{Var}[y\mid x,d,\theta]}_{\text{content ambiguity}} + \underbrace{\mathbb{E}_{\theta}\,\mathrm{Var}_{d}\,\mathbb{E}[y\mid x,d,\theta]}_{\text{degradation ambiguity}} + \underbrace{\mathrm{Var}_{\theta}\,\mathbb{E}[y\mid x,\theta]}_{\text{epistemic}}$$

The first term is irreducible loss of scene detail. The second is irreducible doubt about what the corruption was, for example a blur kernel that the evidence cannot pin down. The third term is then split further. We sample only $\theta_{\text{deg}}$ with $\theta_{\text{con}}$ fixed to get degradation-epistemic uncertainty, and sample only $\theta_{\text{con}}$ with $\theta_{\text{deg}}$ fixed to get content-epistemic uncertainty. We report the leftover interaction term rather than hiding it.

The testable prediction is low cross-talk. On images with familiar corruption but unfamiliar content, degradation-epistemic uncertainty should stay flat. On familiar content with unfamiliar corruption, content-epistemic uncertainty should stay flat. A monolithic ensemble cannot produce this separation, even in principle. We further predict that an embedding without explicit disentanglement will show measurable cross-talk because of the content leakage documented by DRAT.

Research Program

The base model is a dual-pathway all-in-one restorer in the DRAT style. We add the entropy-compression regularizer of the Universal Degradation Model to its degradation encoder. We make three changes.

First, the degradation encoder outputs a mean and diagonal variance for $d$ rather than a point. It is trained with a variational bottleneck, which is compatible with the existing compression objective. Sampling $d$ then gives the degradation-ambiguity term.

Second, the reconstruction head predicts a low-rank-plus-diagonal output covariance, following LR+D, for the content-ambiguity term. We keep low rank because both PUQ and LR+D show that pixel-independent variances are badly miscalibrated.

Third, epistemic uncertainty is estimated per pathway. The degradation encoder is small (DRAT's full model is 9.59M parameters), so we can afford an explicit ensemble of degradation encoders over a shared, frozen backbone. For the backbone we compare an ensemble of reconstruction heads with the single-model distillation of Contextual Similarity Distillation. That method distills ensemble variance into one network through kernel regression on last-layer gradients, but it has only been shown on classification and low-dimensional control, and it does not separate aleatoric from epistemic uncertainty. Our aleatoric heads supply that missing split. Calibration of the final intervals follows CLEAR, which learns weights on aleatoric and epistemic terms using a pinball loss on validation data. We extend it from two weights to three, one each for content aleatoric, degradation-epistemic and content-epistemic.

The uncertainty is only useful if it drives decisions, so we add one downstream use. When degradation-epistemic uncertainty is high, the model blends toward a conservative, low-strength restoration. When content-epistemic uncertainty is high, the model marks the affected regions as possibly hallucinated. This addresses the over-correction of clean regions that BDG and Visual-Instructed Degradation Diffusion describe.

The benchmark is the main construction effort. Training follows the standard three-task all-in-one setting: noise on BSD400/WED, rain on Rain100L and haze on SOTS, all natural scenes. The test set is a two-by-two grid.

  • Familiar content, familiar corruption: the standard test splits.
  • Unfamiliar content, familiar corruption: FFHQ/CelebA-HQ faces with the same synthetic noise and rain. For haze, the barycenter/residual structure lets us instead use degradation transfer from the Universal Degradation Model, which reports MS-SSIM of 0.879 for reproduction and 0.875 for transfer on WQI.
  • Familiar content, unfamiliar corruption: BSD500 with JPEG at quality factor 10, real O-HAZE, underwater imagery, and CDD-11 composite mixtures.
  • Both unfamiliar: faces carrying the unfamiliar corruptions.

Within the familiar cell we also sweep severity, such as noise level, to probe aleatoric behavior. LowLevelEval provides a broader zero-shot check across its 40 datasets.

Baselines

Plain restorer. The naive reference point is the same dual-pathway restorer with no uncertainty output, scored by output-free proxies such as the norm of the restoration residual. Its role is to show whether any uncertainty machinery is needed to detect shift at all.

Full-network ensemble with LR+D. The strongest existing uncertainty method is LR+D, run as a deep ensemble over the entire restoration network. It is the most complete published joint aleatoric–epistemic estimator for high-dimensional image outputs, reporting test log-likelihood of −13 against −1252 for a diagonal Bayesian baseline on NYU Depth V2. We run it on the same backbone, data and number of forward passes as our per-pathway estimates. We also give it the same budget of calibration points (CLEAR notes about 150 as a minimum). Beating it means matching its log-likelihood and interval coverage in all four cells while beating it on attribution, where it can only offer a single epistemic score. No reported result was found on Lacuna for shift-type detection AUROC in image restoration by any method, so these numbers will be new.

Strongest restoration model. On restoration quality the reference is BaryIR, which reports a 0.81 dB average PSNR gain over PromptIR on the three-task setting and a 2.09 dB gain over the second-best method on unseen O-HAZE. The uncertainty-gated variant must not lose more than a small, pre-declared PSNR margin to it on the familiar cells. Its value must appear on the unfamiliar-corruption cells, as fewer severe failures at matched average PSNR.

Kept-at-test-time task uncertainty. We run TUR with its uncertainty module retained at inference rather than discarded. It is the only prior work that applies Bayesian uncertainty to all-in-one restoration, reporting a +3.41 dB gain on real deweathering.

Key ablation. The ablation that isolates our key ingredient applies the same per-pathway estimators to an entangled backbone, with the disentanglement losses removed and a degradation head attached to shared features. If cross-talk does not rise in this ablation, the disentanglement is not what makes attribution work.

Why not just…?

Why not just use a full deep ensemble and read off epistemic variance? It measures how much the model is ignorant but not where the ignorance sits. Its members share the same entangled features, so their disagreement mixes corruption error and texture error. The factorial grid tests this directly. If full-ensemble variance separates the familiar-content/unfamiliar-corruption cell from the unfamiliar-content/familiar-corruption cell no better than chance, it cannot support the choice between adapting and flagging. The costs of 10–100 members noted by CLEAR and CSD make it a poor deployment option regardless.

Why not just measure nearest-neighbor or Mahalanobis distance in DASR's degradation embedding? This is the most serious threat, and we treat it as a first-class baseline rather than a straw man. It is cheap, and a distance in degradation-code space might already flag unfamiliar corruption. Our hypothesis is that content leaking into the code makes this distance also rise on unfamiliar scenes. DASR's own reliance on spatially uniform degradation points the same way. If distance on a well-disentangled code shows cross-talk as low as our ensemble-based score, we will report the finding as stated: the contribution then is that disentanglement enables a simple attribution score, and the ensembled degradation encoder is unnecessary. The entangled-backbone ablation still decides whether disentanglement matters.

Why not just predict per-pixel variance with a Gaussian likelihood head? That captures only aleatoric uncertainty, and the file's evidence is consistent that this fails under shift. CLEAR shows aleatoric-only intervals falling from 95% to 40–70% coverage when extrapolating. PUQ shows pixel-wise bounds exaggerate uncertainty volume by roughly 10 to 100 times. We include this head as the aleatoric-only baseline and expect it to under-cover on both unfamiliar axes.

Proposed Experiments

Attribution. The first decisive check is attribution on the two-by-two grid. For each score (degradation-epistemic, content-epistemic, full-ensemble epistemic, embedding distance) we report two AUROCs:

  • Target AUROC: separating the familiar cell from the cell that shifts that score's intended axis.
  • Cross-talk AUROC: the same score on the cell that shifts only the other axis, where 0.5 is ideal.

Success means target AUROC clearly above the full-ensemble baseline's ability to tell the axes apart, and cross-talk near 0.5 for the disentangled model but not for the entangled ablation.

Aleatoric behavior. The second check sweeps severity within familiar corruptions. The content-ambiguity and degradation-ambiguity terms should grow with severity while both epistemic terms stay flat. Epistemic terms that rise with noise level would indicate the confusion between noise and novelty that Houlsby et al. warn wastes acquisition effort.

Calibration. The third check is calibration. We measure marginal coverage and normalized interval width of the three-weight CLEAR-style intervals in every cell, against LR+D and aleatoric-only intervals at the same coverage target.

Use. The last check asks whether attribution helps in practice. We compare uncertainty-gated restoration with BaryIR and the plain backbone on PSNR in the unfamiliar-corruption cells and on the lowest 10% of per-image PSNR. We also measure how often content-epistemic flags coincide with regions whose error exceeds a threshold.

All runs report forward passes and wall-clock time per megapixel, since a per-pathway estimate is only worth having if it costs far less than a full ensemble.