Paper: Beyond Degradation Redundancy: Contrastive Prompt Learning for All-in-One Image Restoration
Author: Gang Wu, Junjun Jiang*, Kui Jiang, Xianming Liu, and Liqiang Nie
All-in-One Image Restoration (AiOIR) aims to address multiple degradation tasks with a single model. A popular way is to use task-aware prompts (a.k.a. instructions or guidance to the restoration backbone). While existing prompt paradigms suffer from two essential issues:
- Representation Redundancy: adaptive prompt representations become overlapping and entangled across tasks
- Functional Misalignment: explicit prompts (e.g., from classifiers) are discriminative for classification, not necessarily optimal for reconstruction
This repo implements Contrastive Prompt Learning (CPL), a general plug-and-play framework that fixes both.
CPL improves prompt-task alignment through two complementary components:
-
Sparse Prompt Module (SPM) — fight redundancy with principled sparsity. Instead of softly blending many prompts, SPM uses top-k sparse routing to activate only the most relevant prompt experts, reducing cross-task confusion, and keeps inference efficient.
-
Contrastive Prompt Regularization (CPR) — align prompts by behavior, not embeddings. Conventional regularization operates on prompt embeddings. CPR is different: it regularizes the restoration outcome.
- ✅ Positive: degraded image + correct prompt
- ❌ Negative: same image + mismatched prompts
If wrong prompts can still produce good restorations, the model is not truly prompt-controlled—CPR explicitly penalizes that.
| Benchmark | Dataset | Pretrained Model | Results |
|---|---|---|---|
| WeatherBench | Download | Model | Results |
This codebase is built upon and inspired by prior works in AiOIR, including (but not limited to): PromptIR, MioIR, AdaIR, DRSFormer. Thanks a lot for their nice sharing.
If you find this work useful, please cite:
@article{Wu2025CPLIR,
title = {Beyond Degradation Redundancy: Contrastive Prompt Learning for All-in-One Image Restoration},
author = {Wu, Gang and Jiang, Junjun and Jiang, Kui and Liu, Xianming and Nie, Liqiang},
journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
year = {2025}
}