Traditional deep learning models for image restoration operate under a convenient but flawed assumption: that degradation is uniform across an image. Standard Convolutional Neural Networks (CNNs) apply the same learned weights to every pixel, and basic Vision Transformers apply uniform attention mechanisms across spatial windows.
In the real world, however, corruption is rarely homogeneous. An Under-Display Camera (UDC) experiences severe, spatially varying diffraction and flare depending on local pixel intensity and display geometry. Adverse weather conditions like rain or haze vary dynamically based on scene depth. JPEG compression artifacts cluster aggressively around complex textures while leaving flat regions relatively untouched.
When a spatially invariant network encounters these non-uniform corruptions, it faces a fundamental dilemma. If it applies filters strong enough to clear heavy local degradation, it over-smoothes cleaner regions of the image. If it preserves fine details, it leaves artifacts behind. Spatially Adaptive Feature Modulation solves this problem by decoupling the estimation of degradation from the reconstruction of image content, dynamically reconfiguring the network's internal activations at every pixel.
The Core Mechanism: Affine Feature Transformation
Instead of forcing a network to implicitly deduce degradation patterns while simultaneously trying to reconstruct clean pixels, adaptive modulation networks ingest an explicit or latent "degradation condition." This condition is used to dynamically alter intermediate feature maps via element-wise affine transformations—a technique often referred to as a Spatial Feature Transform (SFT).
Mathematically, given an intermediate feature map $F$, the network computes spatially varying scaling factors $\gamma$ and shifting factors $\beta$ from a degradation representation $D$:
$$F_{\text{modulated}} = \gamma(D) \odot F + \beta(D)$$
Where $\odot$ denotes element-wise multiplication. This simple mechanism acts as a powerful conditional gate. If a region is heavily blurred, $\gamma$ and $\beta$ can amplify the activations of high-frequency restoration filters. If a region is already clean, the modulation can suppress restoration operations, allowing the original textures to pass through unchanged.
[Degraded Image] ----> [ Restoration Network Layers ] ----> [Output Image]
^
| (Affine Modulation: Scale γ / Shift β)
[Degradation Map] ---> [ Modulation Generator ]
Incorporating Physical and Hardware Priors
One of the most direct ways to leverage this architecture is by conditioning the network on known physical properties of the imaging system. This is particularly effective for hardware-constrained setups like Under-Display Cameras.
- Optical Point Spread Functions (PSFs): Chongyi Li et al. utilize a condition encoder to embed measured hardware PSFs directly into the network. This allows the model to adapt to specific display rotations and grid alignments by modulating feature maps based on the physical diffraction characteristics of the device.
- Local Intensity Conditioning: Diffraction artifacts in UDCs are highly dependent on light intensity; bright highlights cause massive flare, while dark regions do not. To address this, Xina Liu et al. employ SFT layers conditioned on local pixel intensity, allowing the network to apply aggressive flare-reduction strategies to over-saturated highlights without altering low-contrast areas.
- Noise and Scattering Models: Kinam Kwon et al. combine a physics-based optical model with a noise-adaptive network, feeding local degradation parameters and noise estimates pixel-by-pixel to balance sharpness and noise reduction. For semi-transparent displays, Binbin Song explicitly models the physical scattering effect, using global scattering estimates to scale and shift local feature maps via an affine transformation.
Blind Restoration via Learned Latent Representations
In many real-world scenarios, the exact degradation process is unknown. In these "blind" restoration tasks, the network must learn to infer the degradation representation directly from the corrupted input.
Global vs. Local Conditioning
Depending on the task, degradation can be modeled as a global style or a localized map. For instance, Hui Zheng et al. treat unknown blur kernels as a global style code, modulating the mean and standard deviation of image features to account for blur without the computational overhead of heavy spatial transforms. Similarly, Longguang Wang et al. use unsupervised contrastive learning to extract an abstract degradation representation, generating channel-wise modulation coefficients that tune the importance of different feature channels on the fly.
However, for spatially non-stationary corruptions like motion blur, local conditioning is required. Dasong Li et al. learn explicit, pixel-wise degradation maps and inject them directly into the network's skip connections. By applying learned scaling and shifting factors across multiple scales, the network dynamically adjusts its processing based on the exact blur intensity at each pixel.
All-In-One Networks
This decoupling is what enables "all-in-one" restoration models to handle completely different types of corruption (e.g., rain, haze, and noise) within a single set of weights. Boyun Li et al. developed AirNet, which extracts a latent degradation code from the input image and uses SFT layers to adjust internal feature distributions, tailoring the restoration strategy to the specific corruption type and intensity identified.
Cross-Modal and Generative Guidance
Spatially adaptive modulation also provides a clean interface for injecting auxiliary data or leveraging the rich structural priors of large pre-trained models.
- LiDAR and Depth Guidance: In autonomous driving and smartphone photography, depth data offers a natural map of how degradation changes across space. Diego Valsesia et al. introduce a lightweight adapter that feeds auxiliary LiDAR depth features into a pre-trained deblurring model, using depth boundaries to modulate image features and sharply recover object edges.
- Diffusion Latent Spaces: Generative models inherently understand image structure. Zizheng Yang et al. discovered that the intermediate semantic latent spaces of frozen diffusion models transition from encoding content to encoding haze characteristics over time. They extract these latent features to serve as a spatially varying guidance map, modulating restoration activations via SFT for highly accurate dehazing.
- Foundation Model Priors: Shu Kong et al. leverage pre-trained features from models like CLIP and Stable Diffusion to dynamically modulate a network, allowing it to switch between local convolutional operations and global transformer context depending on local degradation characteristics.
Architectural Integration and Content Awareness
Where and how should this modulation occur? Recent architectures show that modulation is most effective when it is both multi-scale and content-aware.
Content-Degradation Interaction
Modulation should not just blindly apply a degradation map; it must respect the underlying image content. Yifeng Zhou et al. integrate degradation information via content-based queries, ensuring that restoration filters respect local structural boundaries to prevent halos or ghosting artifacts in complex textures. For compression artifact removal, Long Peng et al. use a spatially aware map of estimated degradation to selectively restore features, preventing over-smoothing in clean, low-compression zones.
Multi-Scale and Multi-Axial Modulation
Modern architectures apply modulation across multiple dimensions simultaneously. For weather-corrupted images, Ruoxi Zhu et al. combine spatially local, spatially global, and channel-wise modulations. Their model uses degradation embeddings to generate weights for local depthwise convolutions, adjust self-attention mechanisms for long-range dependencies, and re-calibrate feature channels based on weather type.
+---> Channel Modulation (Global Style)
|
Degradation Embedding +---> Spatial Modulation (Local Textures)
|
+---> Attention Modulation (Long-Range Context)
In hierarchical networks, modulation can happen within the core blocks or at the decision boundaries. Xiaodong Cun et al. introduce learnable multi-scale spatial biases directly into a Transformer decoder, functioning as a learnable tensor added before attention modules to flexibly adapt representations to specific damage types. Meanwhile, Pan Zhou 0002 et al. employ a dual-stage process where standard convolutions identify regional characteristics to dynamically generate parameters for subsequent operations, effectively creating a self-modulating network.
Finally, modulation can be used to dynamically ensemble different specialized algorithms. The authors of the Prior and Prediction Inverse Kernel Transformer for Single Image Defocus Deblurring generate spatially varying coefficient maps to adaptively mix the outputs of prior-based and prediction-based deblurring modules at each pixel, ensuring the optimal restoration strategy is chosen for every unique region of the scene.
Why It Works: The Intuition
Spatially adaptive feature modulation works because it transforms a static neural network into a dynamic meta-network.
Instead of forcing a single set of convolutional filters to learn a compromise mapping that handles all levels of corruption simultaneously, the degradation condition acts as a set of control knobs. The network learns a generalized representation of how to fix images, and the modulation layers use the degradation map to instantiate the exact filter properties needed for each specific coordinate. By shifting and scaling activations dynamically, the architecture achieves pixel-level self-reconfiguration, maximizing restoration strength exactly where it is needed while leaving the rest of the image pristine.
Key Foundational Work
Controllable Image Restoration for Under-Display Camera in Smartphones (2021) — contributed 1 concept elements to this direction.
Blind Super-Resolution With Iterative Kernel Correction (2019) — contributed 1 concept elements to this direction.
Unsupervised Degradation Representation Learning for Blind Super-Resolution (2021) — contributed 1 concept elements to this direction.