BaryIR: Learning Multi-Source Unified Representation in Continuous Barycenter Space for Generalizable All-in-One Image Restoration

Xiaole Tang, Xiaoyi He, Xiang Gu, Jian SunarXiv 2025 · DOI

Abstract

BaryIR is a novel "all-in-one" image restoration (AIR) framework designed to overcome the brittleness of existing models when encountering out-of-distribution degradations. By leveraging Optimal Transport, BaryIR decomposes image features into a unified, degradation-agnostic "barycenter" space and source-specific subspaces. This approach captures the shared geometry across diverse degradations like noise, blur, and haze. Experimental results demonstrate that BaryIR achieves state-of-the-art performance, particularly excelling in generalization to real-world and unseen degradations, with significant PSNR gains over existing methods such as PromptIR and InstructIR.

Introduction

Image restoration—the task of recovering clean images from those affected by noise, blur, rain, or haze—has traditionally relied on models specialized for a single task. Recently, All-in-One Image Restoration (AIR) has emerged, aiming to handle multiple degradations with a single model. However, existing AIR methods are often "brittle," relying heavily on degradation-specific signals like learnable prompts or embeddings. When these models encounter out-of-distribution (OOD) data—such as a level of haze or a type of blur they weren't specifically trained on—their performance drops significantly because they fail to capture the underlying "commonality" of natural images that exists regardless of the degradation.

Methodology

BaryIR shifts the focus from identifying the degradation to finding a unified representation of the data through a process of latent space decomposition.

The BaryIR architecture overview, illustrating the decomposition of the multi-source latent space into a continuous barycenter space and source-specific subspaces.

Latent Space Decomposition

Instead of a single feature vector, BaryIR splits the latent space into two distinct components:

  1. Continuous Barycenter Space: This encodes "unified" features that are common across all sources and are degradation-agnostic.
  2. Source-Specific Subspaces: These encode the specific "semantics" of the degradation, such as the unique patterns of rain streaks or noise distributions.

Multi-source Latent Optimal Transport (MLOT)

The core innovation is the use of Multi-source Latent Optimal Transport (MLOT). By treating different types of degraded images as distinct probability distributions, the model seeks a "Wasserstein Barycenter"—an average distribution representing the shared geometry of all sources. A lightweight neural network acts as a "Barycenter Map," transporting features from any degraded source into this continuous space.

Loss Functions

To ensure clean decomposition, BaryIR employs two key losses:

  • Contrastive Loss: Ensures different degradation types are clearly separated in their specific subspaces.
  • Orthogonality Loss: Ensures that unified features and source-specific features do not overlap or interfere with each other.

Experiments and Results

BaryIR was evaluated on a wide array of synthetic and real-world benchmarks, including SOTS (dehazing), Rain100L/H (deraining), and GoPro (deblurring).

Visual comparison of BaryIR against state-of-the-art methods across various degradation types, demonstrating superior restoration quality.

Performance Gains

BaryIR consistently outperformed state-of-the-art models. In a 3-degradation setup, it achieved an average PSNR gain of 0.8 dB over PromptIR. In a 5-degradation setup, it surpassed InstructIR by 1.11 dB.

Generalization and Robustness

The model's most striking results were in generalization to unseen data. On the real-world O-HAZE dataset, BaryIR yielded a massive 3.81 dB PSNR gain over the next best method. Furthermore, when tested on extreme noise levels ((\sigma=75)) not present in the training set ((\sigma \le 50)), BaryIR maintained a 3.30 dB lead in denoising, demonstrating exceptional OOD robustness.

Conclusion

By focusing on the shared geometry of the data manifold (the barycenter) rather than just learning to subtract specific noise types, BaryIR achieves a more robust and generalizable form of image restoration. Future work may extend this barycenter-driven unified representation to multi-modal signals, such as combining text, image, and audio, and further optimize the computational efficiency of the Optimal Transport mapping for real-time applications.

Summary updated

BibTeX
@misc{tang2025baryir,
  author = {Xiaole Tang and Xiaoyi He and Xiang Gu and Jian Sun},
  title = {{BaryIR: Learning Multi-Source Unified Representation in Continuous Barycenter Space for Generalizable All-in-One Image Restoration}},
  year = {2025},
  eprint = {2505.21637},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.21637},
}
Figure