arXiv:2609.08011cs.CVSep 2026

Manuscript Offprint

arXiv:2609.08011

TaskGuard: Task-Conditioned Restoration Utility for Risk-Aware Object Detection

Vung Pham

Abstract

Image restoration is commonly applied before object detection under adverse conditions, yet a visually improved image need not improve the downstream task. We study this mismatch as restoration utility prediction: given a degraded image and its candidate restoration, should the restoration be used or should the original observation be preserved? We introduce TaskGuard, a post-hoc controller for frozen restoration and detection pipelines. TaskGuard characterizes the realized restoration residual through its interaction with detector sensitivity and predicts whether the intervention is task-beneficial. Exact regional counterfactuals reveal substantial within-image utility heterogeneity, while a deployable pseudo-gradient preserves statistically reliable directional information. Feature-group ablation further shows that task-conditioned evidence contributes information beyond detector-response and residual statistics. The TaskGuard utility predictor is trained only on Gaussian degradation and frozen before final evaluation, then transferred to unseen motion blur, rain, and defocus. Across these unseen families, TaskGuard reduces loss-negative interventions by 54.2% (family macro) and practical per-image detection deteriorations by 37.0% (pooled), while preserving 98.8% of the Always-Restore COCO AP. On natural-rain DAWN, it reduces loss-negative interventions by 97.9% while retaining 77.8% of the AP improvement obtained by deraining. These results support restoration utility as a task-conditioned property of the specific intervention rather than image appearance alone.

1. Introduction

Image degradation caused by noise, blur, rain, and other adverse conditions can substantially reduce object-detection accuracy, motivating restoration before recognition [5, 10, 13]. Modern restoration methods can recover considerable aggregate detection performance, but their effects are not uniformly beneficial. A perceptually cleaner image may re-

move, alter, or introduce evidence important to the downstream model [1, 7, 11]. Consequently, unconditional restoration may improve average accuracy while making individual observations worse [2].

For instance, Figure 1(a) shows a clear benefit from restoration: the detector correctly detects all ground-truth objects in the restored image, while missing all of them in the degraded counterpart. However, the effect of restoration can be surprisingly subtle. Figure 1(b) shows a restored image that appears cleaner and remains visually close to its degraded input. Nevertheless, the degraded image yields the correct cow detection, whereas restoration leads to a higher-confidence but incorrect horse prediction. Similarly, in Figure 1(c), restoration introduces a false-positive car detection in the lower-right corner, even though no car is present. Thus, perceptual clarity and detector confidence can improve even when detector correctness deteriorates. This motivates evaluating the effect of the specific restoration intervention on the downstream task rather than relying on visual quality or detector confidence alone.

We therefore consider a post-hoc decision problem: given a degraded image and the particular restoration produced by a frozen restorer, should that candidate restoration actually be accepted? We call this restoration utility prediction. Unlike approaches that modify the enhancement process using downstream supervision [1, 5, 7, 13], we leave both the restorer and detector unchanged. Instead, TaskGuard estimates the task utility of the realized image change and decides whether to restore or preserve the degraded input. Accordingly, it selects restore for Figure 1(a) and preserve for (b) and (c).

The key hypothesis is that restoration utility depends not only on what changed but on whether that change agrees with downstream task sensitivity. TaskGuard therefore couples the realized restoration residual with a detector gradient. We validate this directional mechanism using exact regional counterfactual interventions and additionally test whether its annotation-free pseudo-gradient counterpart preserves the privileged signal used in the analysis.

The TaskGuard utility predictor is trained only on Gauss-

Figure

Figure 1. Examples of restoration utility. (a) Gaussian restoration recovers three missed objects. (b) Rain restoration changes a correct cow detection to an incorrect horse; TaskGuard preserves the input. (c) On natural rain, deraining introduces a false-positive car; TaskGuard preserves the input. Dashed boxes denote ground truth and solid boxes detector predictions.

sian degradation and frozen before evaluation on fresh Gaussian data, unseen motion blur, rain, and defocus, and natural-rain DAWN [6]. The same frozen decisions are also evaluated under RT-DETR-L [15]. Our contributions are:

  • We formulate restoration utility as a post-hoc intervention for frozen restoration–detection pipelines and introduce a directional residual–task-sensitivity representation.

  • We validate the proposed mechanism with exact regional counterfactuals, direct pseudo-gradient analysis, and feature-group ablation showing that task-conditioned evidence adds information beyond detector-response and residual statistics.

  • We develop a frozen Restore-or-Preserve policy with a TRAIN-only risk–utility threshold and demonstrate zero-shot degradation-family transfer, natural-rain transfer, practical-risk reduction, and partial cross-detector safety transfer.