---
title: Denoising Diffusion Null-Space Model (DDNM)
url: https://www.emergentmind.com/topics/denoising-diffusion-null-space-model-ddnm-4381b30a-b9fc-4742-bf26-7835b4fbd91a
type: topic
---

# Denoising Diffusion Null-Space Model (DDNM)

The Denoising Diffusion Null-Space Model (DDNM) is a zero-shot image restoration framework that rigorously enforces linear measurement consistency by combining denoising diffusion probabilistic models (DDPMs) with the range–null-space decomposition of linear inverse problems. DDNM and its extensions permit direct leveraging of powerful pretrained generative priors without any retraining or network modification, supporting a broad class of linear inverse restoration tasks—including super-resolution, inpainting, deblurring, and compressed sensing—while ensuring that all restored outputs are provably consistent with observed measurements. Extensions such as Mask-Shift Restoration (MSR) and Hierarchical Restoration (HiR) enable seamless and semantically coherent processing of images with arbitrary sizes.

## 1. Theoretical Basis: Range–Null-Space Decomposition

Given a linear inverse problem $y = A\,x + n$, where $A$ is a known linear measurement or degradation operator, DDNM decomposes the solution set into orthogonal subspaces: the range space (row-space of $A$) and the null space (kernel of $A$) [2212.00490]. Any $x \in \mathbb{R}^D$ consistent with $A\,x = y$ can be expressed as
$$
\hat{x} = A^{\dagger} y + (I - A^{\dagger} A)z,
$$
where $A^{\dagger}$ is the Moore–Penrose pseudoinverse, $z$ is arbitrary, the first term ensures strict measurement consistency, and the second spans the null space. By design, $A\,\hat{x} = y$ holds exactly. DDNM leverages this structure to ensure the observed (range) part is fixed, while only the null component is stochastically refined via the diffusion prior.

## 2. DDNM Sampling Algorithm and Mathematical Formulation

At each reverse-diffusion step $t \rightarrow t-1$, DDNM [2303.00354, 2212.00490] executes the following:

1. **Denoising Prior**: The pretrained denoiser $Z_\theta$ estimates noise $\epsilon_t$ from $x_t$.
2. **Posterior Mean Estimate**: Compute the "clean" image estimate,
   $$
   x_{0|t} = \frac{x_t - \sigma_t \epsilon_t}{a_t}.
   $$
3. **Null-Space Consistency Projection**: Replace the range part of $x_{0|t}$ with $A^{\dagger}y$:
   $$
   \hat{x}_{0|t} = A^{\dagger} y + (I - A^{\dagger} A)x_{0|t}.
   $$
4. **Sampling**: Advance to the next iterate,
   $$
   x_{t-1} = a_{t-1} \hat{x}_{0|t} + \sigma_{t-1}\left(\eta_t \epsilon + \sqrt{1 - \eta_t^2}\, \epsilon_t\right), \quad \epsilon\sim\mathcal{N}(0,I).
   $$

The process is repeated for $T$ steps with a schedule $\{a_t, \sigma_t, \eta_t\}$, typically corresponding to DDPM ($\eta=1$) or DDIM ($\eta=0$) variants. Data consistency is enforced at every step via the null-space update [2212.00490, 2303.00354], guaranteeing $A\,x_{t}=y$ for all $t$.

## 3. Extensions: DDNM+, Mask-Shift Restoration (MSR), and Hierarchical Restoration (HiR)

**DDNM+** generalizes DDNM to support noisy observations and is robustified for challenging scenarios (e.g., large-scale SR, low CS ratios). The update modifies the range-correction to allow for partial replacement, scaled by a time-dependent factor $\Sigma_t$, and adapts the sampling variance using $\Phi_t$ to maintain theoretical consistency with the noise schedule [2212.00490].

**Mask-Shift Restoration (MSR)** addresses restoration of arbitrarily sized images. Input images are divided into overlapping fixed-size patches. For each patch, overlapping regions are treated as hard constraints via binary masks. During each diffusion step, the range-projected estimate in the overlap region is replaced with the corresponding pixels from previously restored neighboring patches, while the remainder is denoised via DDNM. This prevents boundary artefacts and ensures local coherence [2303.00354].

**Hierarchical Restoration (HiR)** imbues restored images with global semantic structure to prevent out-of-domain (OOD) or semantic inconsistencies, especially for large images. HiR applies a two-level diffusion process: (1) first, a downsampled version is restored (usually with MSR), preserving coarse semantics; (2) then, this low-frequency structure is injected as a prior during high-resolution diffusion, by projecting current denoised estimates onto the space matched to upsampled low-frequency reconstruction, before the final measurement consistency projection [2303.00354].

## 4. Empirical Effectiveness and Applications

DDNM achieves state-of-the-art performance versus prior zero-shot and model-based methods, substantiated by systematic experiments [2212.00490]. Across a wide range of inverse problems—super-resolution, inpainting, deblurring, compressed sensing, colorization, and real-world restoration tasks—DDNM provides:

- **Strict Data Consistency**: All outputs exactly satisfy $A\,x=y$ to numerical precision.
- **Diversity**: Multiple plausible reconstructions (null-space samples) are efficiently generated, controlled only by the diffusion prior.
- **High Fidelity**: Use of a diffusion prior ensures output details and texture remain on-manifold for natural images.

Empirical metrics on standard datasets include improvements of 2–5 dB in PSNR and 20–40% reduction in LPIPS over GAN-based and prior diffusion approaches. Notable test cases include 4× super-resolution (FID drop from 43→39 on ImageNet), deblurring (PSNR +1.9 dB), colorization (FID +4–10 points), and compressed sensing (PSNR +1.7 dB).

In wireless image transmission, DDNM is used in conjunction with DeepJSCC coding, where the range-space is transmitted and the null-space is restored by diffusion at the receiver, yielding higher perceptual quality under bandwidth and SNR constraints [2309.15889].

InfraDiffusion adapts DDNM for restoration and segmentation of depth maps projected from sparse point clouds. It extends DDNM with a boundary mask, ensuring that generative sampling and range projections only affect physically meaningful support regions, thereby improving downstream segmentation metrics (e.g., mIoU from 0.064→0.708 on masonry test data) [2509.03324].

## 5. Implementation Strategies and Practical Recommendations

- **Patch size** for unlimited-size restoration should match the training size of the underlying diffusion U-Net (commonly 256×256).
- **Overlap width** should be at least half the patch size to minimize seam artefacts (MSR).
- **Classifier guidance** can be incorporated, with scale factors ∼1.5–2.0 for sharper outputs.
- **Sampling schedule**: $T$ is often set to 100–250 (DDIM or DDPM schedule, respectively).
- **Time-travel trick**: Optional local jump-forward/noise-back steps (DDNM+) can improve global consistency for hard inverse problems or large images.
- **Accurate knowledge of $A$ and $A^\dagger$** is necessary for optimal consistency enforcement.

## 6. Limitations, Best Practices, and Comparative Context

DDNM's efficacy is upper-bounded by the quality of the pretrained diffusion prior; failure modes arise for extremely challenging $A$ or OOD degradations. Inference time scales with image size and patch count; large-scale restoration incurs substantial compute cost. For best performance, the practitioner must accurately specify both $A$ and $A^\dagger$, which is not always possible (e.g., unknown degradations).

Compared to simpler patching schemes, the combination of MSR and HiR in DDNM eliminates block seams and preserves long-range semantic coherence. Naïve patching yields artifacts, disconnected semantics, and poor quality on large or nonstandard images, whereas DDNM’s explicit treatment of null/row-space and overlap constraints ensures both local and global fidelity [2303.00354].

DDNM frameworks unify strict linear measurement consistency (via range–null decomposition) with the flexibility of pretrained unconditional diffusion priors. This synergy enables a general-purpose, zero-shot principle for image restoration that generalizes across diverse linear IR tasks and scales to unlimited image sizes, without retraining or prior exposure to target degradations.

Source: https://www.emergentmind.com/topics/denoising-diffusion-null-space-model-ddnm-4381b30a-b9fc-4742-bf26-7835b4fbd91a