TL;DR
Existing "all-in-one" image restoration networks use a single set of fixed parameters to clean up diverse corruptions like rain, haze, and noise, forcing models into conflicting design compromises. HAIR (Hypernetworks-based All-in-One Image Restoration) resolves this by using data-conditioned hypernetworks to dynamically generate restoration filter weights customized to each image’s specific degradation. When plugged into Restormer, the resulting model (Res-HAIR) outperforms prior state-of-the-art multi-degradation frameworks with only minimal parameter overhead.
What Problem Does This Paper Address?
Traditional deep learning restoration models are trained as task-specific specialists (e.g., one network for rain, another for noise). Recent "All-in-One" models attempt to unify these tasks into a single system capable of handling unknown corruptions. However, most existing models rely on a single backbone with fixed weights, modulating behavior merely by feeding degradation embeddings or prompt tokens into intermediate feature layers.
This "one-size-fits-all" approach runs into severe frequency-domain conflicts:
- Dehazing typically requires low-pass filtering while preserving sharp high-frequency edges.
- Deraining and denoising often require attenuating high-frequency noise and enhancing underlying edges.
When forced to handle both types of tasks with identical convolutional filters, the network compromises, degrading performance on individual tasks.
Methods
Instead of using fixed weights alongside conditional prompt tokens, HAIR dynamically predicts network weights based on the degraded image itself using data-conditioned hypernetworks.
The plug-and-play architecture splits an encoder-decoder network into two phases:
- Classifier: Positioned at the network bottleneck (where features possess wide receptive fields), a lightweight classifier applies ResNet blocks and Global Average Pooling (GAP) to extract a compact, resolution-independent Global Information Vector (GIV), denoted as $V_g$. This vector captures corruption identity and intensity without requiring ground-truth task labels.
- Hyper Selecting Net (HSN): A small fully connected neural network (FCNN) maps the GIV into a normalized Selecting Vector $V_s$ via softmax. This vector forms a convex combination over a learned bank of filter weights (the Weight Box $W$): $$w = \sum_{i=1}^N V_s^i W_i$$ The dynamically assembled weights $w$ then parameterize the convolutional layers inside the decoder's Transformer blocks (creating HyperTrans Blocks).
Because convolution distributes over addition ($x * \sum V_s^i W_i = \sum V_s^i (x * W_i)$), this dynamic weight generation is mathematically equivalent to a continuous Mixture-of-Experts (MoE) kernel selection.
The authors integrate HAIR into Restormer to create Res-HAIR, requiring only ~3M additional parameters.
Degraded Image ---> [ Fixed Encoder ] ---> Bottleneck Features
|
[ Classifier ]
|
Global Info Vector (GIV)
|
v
[ Dynamic Decoder ] <--- [ Hyper Selecting Net ]
|
Restored Image
Datasets
The authors evaluated HAIR across standard single-task and multi-task restoration benchmarks:
- Denoising: Trained on BSD400 and Waterloo Exploration Database (WED) with Gaussian noise levels $\sigma \in \{15, 25, 50\}$. Evaluated on BSD68 and Urban100.
- Deraining: Rain100L.
- Dehazing: SOTS (RESIDE outdoor set).
- Deblurring: GoPro.
- Low-Light Image Enhancement: LOL-v1.
Note: No new datasets were introduced; the authors relied on widely adopted standard benchmarks.
Key Insights and Ideas
- Kernel Selection over Feature Prompting: Generating dynamic weights avoids intermediate feature contamination. Theoretical analysis shows that embedding-based conditioning requires $\Omega(\epsilon^{-\min(3HW+k, 6HW)})$ parameters to reach approximation error $\epsilon$, whereas hypernetworks require only $O(\epsilon^{-3HW/r})$ parameters.
- Frequency Conflict Mitigation: When trained jointly on conflicting degradations (noise + haze), PromptIR suffered substantial drops in PSNR, whereas Res-HAIR maintained high restoration fidelity because its filters physically adapted to the degradation class.
- Bottleneck Feature Placement: Placing the Classifier after level 3 of a 4-level U-Net (a 3+4 configuration) provided the optimal trade-off: deep features provided sufficient global context to identify degradation type, while leaving most decoder layers free to use dynamic kernels.
- Universal Plug-and-Play Adaptability: HAIR is architecture-agnostic. Integrating it into Transweather, AirNet, or Restormer consistently boosted restoration metrics over prompt-based equivalents.
Key Results
- 3-Degradation Setting (Dehaze, Derain, Denoise): Res-HAIR achieved 32.70 dB average PSNR, outperforming PromptIR (32.06 dB) by +0.64 dB and the expert-routing model DaAIR (32.51 dB), while surpassing PromptIR on Rain100L deraining by 2.22 dB (38.59 dB vs. 36.37 dB).
- 5-Degradation Setting (+ Deblur, Low-Light): Res-HAIR reached 30.37 dB average PSNR across all five benchmarks—beating the baseline Restormer (27.60 dB) by +2.77 dB with only ~11% parameter overhead (29M vs. 26M), and outperforming the non-blind InstructIR (29.55 dB).
- Single-Task Baselines: In specialized single-degradation setups, Res-HAIR attained 39.00 dB on Rain100L (vs. 37.04 dB for PromptIR) and 32.70 dB on Urban100 denoising ($\sigma=25$).
Limitations and Future Work
- Unseen Composite Degradations: When tested on combined degradations not seen during training (e.g., simultaneous haze + noise), the classifier yields an intermediate GIV. The hypernetwork correspondingly generates "compromise" filter weights midway between dehazing and denoising kernels, leading to suboptimal restoration.
- Static Inference Network: While the main restoration path has dynamic weights per image, the hypernetwork parameters themselves remain static at test time.
- Future Directions: Extending data-conditioned hypernetworks beyond restoration to generalized generative modeling and image editing, as well as refining weight-generation schemes to explicitly decouple compound, overlapping corruptions.
Summary updated