Manuscript Offprint

arXiv:2610.33194

Support-guided OOD Removal with Diffusion

Alireza Kheirandish, Sara Fridovich-Keil

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Many real-world signals are corrupted by localized, structured perturbations whose distribution is unknown: an intermittent background noise in a music recording, a watermark stamped on a photograph, a cast shadow. We study the task of recovering a clean signal x from an observation y containing such a localized out-of-distribution (OOD) corruption. We propose Support-guided OOD Removal with Diffusion, SORD, an iterative algorithm to recover x using only two ingredients: a binary map of the corruption support and a single diffusion model pretrained on clean signals. SORD does not require any paired data or any statistical model of the corruption. We evaluate SORD on natural images and human faces with spatially localized corruptions including handwritten digits, other images, watermarks, and shadows, as well as audio recordings of different musical instruments with temporally localized corruptions including other instruments and human speech. SORD is competitive with, and often outperforms, posterior-sampling inpainting given the same diffusion prior and the same mask, source-separation baselines that require a separate diffusion model for each source, and, on several benchmarks, supervised networks trained on paired clean and corrupted signals. The code is released here: https://github.com/voilalab/SORD.

1 INTRODUCTION

Figure

Figure 1: SORD removes diverse localized OOD corruptions without prior knowledge of the corruption distribution. Examples span semantic image patches, watermarks, shadows, and localized audio interference. Rows show the corrupted observation (top), our reconstruction (middle), and the clean target (bottom).

Localized corruptions arise in many restoration problems: a limited region of an image may be affected by structured noise, a watermark may cover part of an image, a cast shadow may alter a region, or an interfering sound may overlap a musical recording for a short time. These corruptions can be highly structured and semantically meaningful, rendering simple (e.g., Gaussian) noise models inadequate. At the same time, collecting paired examples or training a generative model for every possible corruption type can be impractical in the face of unexpected corruptions.

Existing approaches for removing localized corruptions generally fall into three categories. Supervised restoration methods learn a direct mapping from corrupted to clean signals (Liu et al., 2021; Liang et al., 2021; Guo et al., 2023b); these methods can perform well on specific tasks, but require paired clean and corrupted training data and are then restricted to removing corruptions similar to those seen during training. Posterior-sampling approaches combine a pretrained generative prior over clean signals with a known measurement model or like-lihood (Kawar et al., 2022; Chung et al., 2023). While these methods have achieved strong performance on many inverse problems (Lugmayr et al., 2022; Wang et al., 2023; Song et al., 2023), including inpainting a masked region, they generally require the corruption statistics to be known (Legin et al., 2023), often assuming relatively simple likelihood models such as Gaussian or Poisson noise (Chung et al., 2023) rather than corruptions with complex spatial, semantic, or temporal structure. Finally, source-separation approaches explicitly learn distributions for both the clean signal class and the corruption class, for example using separate generative models (Stevens et al., 2025; Mariani et al., 2024). These approaches can represent substantially richer corruption types, but require training data or learned generative priors for the anticipated corruption classes.

In many applications, these requirements can be restrictive or impractical. Paired clean and corrupted examples may be unavailable, and the corruption distribution may be too complex or unexpected to model accurately. We therefore consider a more weakly specified setting in which a strong generative prior is available for the clean signal class and the corruption is localized to a known support Ω\Omega; we do not assume access to any paired corruption data, parametric corruption distribution, or generative model of the corruption class.

Our key idea is to replace statistical prior knowledge of the corruption distribution with structural prior knowledge of where or when the corruption occurs. In many applications, the corruption is localized: it affects only a spatial subset of an image, as with watermarks, shadows, or localized artifacts, or only a temporal segment of an audio signal, as when an interfering sound briefly overlaps with a recording. The corruption within this region may have complex and unknown structure, but identifying its support is often substantially easier than modeling its distribution. A broad class of anomaly-detection and segmentation methods have already been proposed to estimate the support of such localized corruptions (Defard et al., 2021; Roth et al., 2022; Wyatt et al., 2022; Zhang et al., 2023; Kheirandish et al., 2026).

Rather than attempting to model the corruption distribution, we treat localized corruptions as out-of-distribution (OOD) relative to a generative prior over clean signals. The observations outside the corrupted region Ω\Omega are regarded as clean and are preserved, while the region inside Ω\Omega is reconstructed using the clean-signal generative prior. Unlike standard inpainting, however, the corrupted observations inside Ω\Omega may still carry information about the underlying clean signal. Our algorithm, SORD, therefore alternates between explaining the observed corrupted region and reconstructing a signal that is consistent with both the learned clean-data distribution and the trusted observations outside Ω\Omega. At each iteration, SORD uses its estimated uncertainty to adapt its effective step size and evaluate an adaptive stopping criterion. Empirically, we find that knowledge of the clean-signal prior and corruption support alone can be sufficient to match or outperform approaches that rely on paired training data or explicit corruption models.

We evaluate SORD across localized structured corruptions in both images and audio, as shown in Figure 1. For images, we consider both controlled additive corruptions to face images as well as specific applications in watermark removal and shadow removal in which the corruptions are not purely additive. For audio, we consider temporally localized additive audio interference in which a musical recording of one instrument is corrupted by another instrument or by human speech. Across these settings, we compare SORD with posterior-sampling (inpainting) methods using the same clean-signal prior and corruption support, supervised restoration models trained for specific corruption types, and multi-source diffusion models that explicitly model possible interfering sources. The results show that support information can substantially reduce the need for an explicit corruption model, while corruption-specific supervision remains advantageous when the test corruption is well represented by its training distribution. To summarize, our main contributions are:

  1. We introduce SORD, an iterative algorithm for removing localized, highly structured OOD corruptions without requiring prior knowledge, training examples, or a generative model of the corruption. Instead, our method requires only a mask specifying the corruption support and a diffusion model trained on the clean signal distribution.

  2. We demonstrate the generality of our approach across both image and audio restoration tasks, where corruptions are localized spatially or temporally. Across a diverse range of structured corruption types, SORD is competitive with approaches with substantially stronger modeling or training requirements, including supervised methods that require paired clean and corrupted data and source-separation methods that require an additional generative model trained on the corruption class.

References (36)

  • Diffusion posterior sampling for general noisy inverse problems
  • Split then refine: Stacked attention-guided resunets for blind single image visible watermark removal
  • Padim: A patch distribution modeling framework for anomaly detection and localization
  • ImageNet: A large-scale hierarchical image database
  • Diffusion models beat gans on image synthesis
  • Shadowformer: Global context helps shadow removal (opens the publisher in a new tab)
  • Shadowdiffusion: When degradation prior meets diffusion model for shadow removal
  • A diffusion-based framework for multi-class anomaly detection
  • Score-based source separation with applications to digital communication signals
  • A style-based generator architecture for generative adversarial networks
  • Analyzing and improving the training dynamics of diffusion models
  • Denoising diffusion restoration models
  • Klip: Localized distribution shift detection via kl-divergence with diffusion priors in inverse problems
  • Gradient-based learning applied to document recognition
  • Score-based likelihood characterization for inverse problems in the presence of non-gaussian noise
  • Visible watermark removal via self-calibrated localization and background refinement
  • Wdnet: Watermark-decomposition network for visible watermark removal
  • Simplenet: A simple network for image anomaly detection and localization
  • Deep learning face attributes in the wild
  • RePaint: Inpainting using denoising diffusion probabilistic models
  • Cutting music source separation some Slakh: A dataset to study the impact of training data quality and quantity
  • Multi-source diffusion models for simultaneous music generation and separation
  • Patchwiper: Leveraging dynamic patch-wise parameters for real-world visible watermark removal (opens the publisher in a new tab)
  • Towards total recall in industrial anomaly detection
  • Diffusion-based generative speech source separation (opens the publisher in a new tab)
  • Denoising diffusion implicit models
  • Pseudoinverse-guided diffusion models for inverse problems
  • W. Stevens, Hans van Gorp, Faik C. Meral, Junseob Shin, Jason Yu, Jean-Luc Robert, and Ruud J. G. van Sloun
  • scikit-image: image processing in Python
  • Stacked conditional generative adversarial networks for jointly learning shadow detection and shadow removal
  • Zero-shot image restoration using denoising diffusion null-space model
  • AnoDDPM: Anomaly detection with denoising diffusion probabilistic models using simplex noise
  • Draem: A discriminatively trained reconstruction embedding for surface anomaly detection
  • Improving diffusion inverse problem solving with decoupled noise annealing
  • Unsupervised surface anomaly detection with diffusion probabilistic model
  • Denoising diffusion models for plug-and-play image restoration