Manuscript Offprint

arXiv:2609.11156

UniH3^3: Unifying Hierarchical Homogeneity and Heterogeneity for All-in-One Medical Image Restoration

Zhiwen Yang, Jiayin Li, Chengyu Liu, Hui Zhang, Bingzheng Wei, Yan Xu

Zhiwen Yang 1^{1} ID^{ID}, Jiayin Li 1^{1} ID^{ID}, Chengyu Liu 1^{1} ID^{ID}, Hui Zhang 2^{2} ID^{ID}, Bingzheng Wei 3^{3} ID^{ID}, and Yan Xu 1†^{1\dagger} ID^{ID}

1^{1} School of Biological Science and Medical Engineering, Beihang University, Beijing 100191, China

2^{2} Department of Biomedical Engineering, Tsinghua University, Beijing 100084, China

3^{3} Independent Researcher

†^{\dagger} Corresponding Author

upyzwup@buaa.edu.cn xuyan04@gmail.com

Abstract. All-in-One medical image restoration (MedIR) aims to address diverse tasks across modalities and degradation types using a single universal model. Existing methods typically prioritize modeling inter-task heterogeneity (e.g., distinct data distributions and degradation types). However, they largely neglect the inherent homogeneity present in medical images, such as widely shared anatomical structures within and across modalities, which can be leveraged to ease model training and improve generalization. To this end, we propose UniH 3^{3}, a novel framework that Unifies Hierarchical Homogeneity and Heterogeneity for all-in-one medical image restoration. Specifically, to comprehensively exploit homogeneity, we introduce a Hierarchical Homogeneity Memory (H 2^{2}M) module that progressively distills intra- and inter-task homogeneity priors from high-quality images during training, and adaptively retrieves the most relevant priors tailored to the input for guided restoration. These retrieved priors are then injected into the restoration pipeline via an efficient Homogeneity-Guided Attention (HGA) mechanism. Furthermore, to comprehensively address heterogeneity, we design a Hierarchical Heterogeneity Balancer (H 2^{2}B) that mitigates both inter- and intra-task conflicts during optimization, facilitating balanced and effective multi-task learning. Extensive experiments on two large-scale benchmarks—MedIR-2D-500K and MedIR-3D-3K—demonstrate that UniH 3^{3} achieves state-of-the-art performance on both all-in-one and single-task medical image restoration. We hope this work establishes a strong benchmark and advances the development of general-purpose medical image restoration models. Code is available at https://github.com/Yaziwel/UniH3.

Keywords: Medical Image Restoration · All-in-One · Universal Model

1 Introduction

Medical image restoration (MedIR) aims to recover a high-quality (HQ) image from a degraded low-quality (LQ) acquisition. Since each medical image modal-

Yang et al.

ity (e.g., PET, CT, MRI) operates under distinct physical principles and is often studied independently, most MedIR research has focused on a single-task setting, in which researchers train specialized models to address the primary degradation introduced by the imaging physics of each modality. Typical MedIR includes PET image denoising [56,67,68,77], CT image denoising [5,40,51], MRI image super-resolution [9,25,45,53]. Despite their success in specific scenarios, single-task models have limited practicality for two main reasons. First, in complex scenarios where multiple MedIR tasks coexist (e.g., multimodal PET/CT and PET/MRI), single-task models trained for one task often underperform on others. Moreover, training separate models for each task leads to inefficiencies in both deployment and maintenance. Second, the single-task paradigm hinders progress toward more general intelligence in MedIR. These limitations motivate interest in a universal model that can handle diverse MedIR tasks.

Recent advances in computer vision have fostered the emergence of All-in-One restoration frameworks [8, 11, 32, 42, 48, 63, 66]. Pioneering research in the medical domain [4, 8, 63, 66], particularly the first work on AMIR [63], has established the feasibility of unified modeling for MedIR. To manage diverse tasks within a single model, existing approaches predominantly focus on modeling task heterogeneity—that is, distinguishing between tasks to apply specialized processing. Techniques such as contrastive learning [32], degradation classification [23], visual prompting [42], and mixture-of-experts (MoE) [63, 69] are widely employed to distinguish between tasks.

However, we argue that current All-in-One methods suffer from two critical limitations. First, they largely overlook the inherent homogeneity of medical images. Compared with natural images, medical images from different modalities and tasks often exhibit more consistent anatomical structures and share stronger biological priors. Neglecting this shared knowledge prevents models from exploiting cross-task synergies, thereby increasing the difficulty of learning as the number of tasks grows. Second, regarding heterogeneity, existing methods typically address only inter-task differences (e.g., different degradation types or modalities) while ignoring intra-task variations (e.g., variations caused by different scanners, centers, or patient demographics). This coarse-grained approach fails to resolve optimization conflicts that arise from subtle intra-task distribution shifts. Therefore, it is imperative to simultaneously model both homogeneity and heterogeneity at a hierarchical level (inter- and intra-task) to achieve robust and effective All-in-One MedIR.

To address these challenges, we propose UniH 3^{3}, a novel framework that Unifies Hierarchical Homogeneity and Heterogeneity for All-in-One medical image restoration. On the one hand, to fully exploit shared knowledge, we introduce a Hierarchical Homogeneity Memory (H 2^{2}M) module. This module progressively distills both inter- and intra-task priors from HQ images into a memory bank during training. During inference, it adaptively retrieves the most relevant structural priors tailored to the input, which are then injected into the network via an efficient Homogeneity-Guided Attention (HGA) mechanism to guide restoration. On the other hand, to manage task conflicts comprehensively, we design a

  1. RELATED WORK

3

Hierarchical Heterogeneity Balancer (H²B). Unlike traditional weighting strategies [27, 58] that only balance loss functions at the task level, H²B dynamically mitigates optimization conflicts at both inter- and intra-task levels, ensuring balanced convergence across diverse data distributions. Finally, to validate the effectiveness of UniH³, we construct a benchmark comprising two large-scale datasets: MedIR-2D-500K, containing 509,200 2D image pairs across seven 2D MedIR tasks, and MedIR-3D-3K, containing 3,522 3D volume pairs across three 3D MedIR tasks. Extensive experiments on this benchmark indicate that UniH³ achieves state-of-the-art (SOTA) performance in both all-in-one and single-task medical image restoration.

In summary, our contributions are as follows:

– We propose UniH 3^{3}, a novel framework that simultaneously models hierarchical inter- and intra-task homogeneity and heterogeneity for effective all-in-one medical image restoration.

– We present a Hierarchical Homogeneity Memory (H 2^{2}M) module that can adaptively distill and retrieve homogeneity priors to guide the restoration process. Additionally, an efficient Homogeneity-Guided Attention (HGA) mechanism is introduced to fully exploit the retrieved prior for guided restoration.

– We develop a Hierarchical Heterogeneity Balancer (H 2^{2}B), which achieves fine-grained task balancing by resolving optimization conflicts arising from both inter-task distinctions and intra-task variations.

References (76)

  • Brecahad: a dataset for breast cancer histopathological annotation and diagnosis
  • Deep ultrasound denoising using diffusion probabilistic models
  • Multitask learning
  • All-in-one medical image restoration with latent diffusion-enhanced vector-quantized codebook prior
  • Low-dose ct with a residual encoder-decoder convolutional neural network
  • Simple baselines for image restoration
  • Beyond external constraints: The missing dimension of ai governance
  • Endoir: Degradation-agnostic all-in-one endoscopic image restoration via noise-aware routing diffusion (opens arXiv in a new tab)
  • Efficient and accurate mri super-resolution using a generative adversarial network and 3d multilevel densely connected network
  • Can ai help in screening viral and covid-19 pneumonia? Ieee Access 8, 132665–132676
  • Adair: Adaptive all-in-one image restoration via frequency mining and modulation
  • Digestpath: A benchmark dataset with challenge review for the pathological detection and segmentation of digestive-system
  • Optical coherence tomography image denoising using a generative adversarial network with speckle modulation
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Highly aligned stromal collagen is a negative prognostic factor following pancreatic ductal adenocarcinoma resection
  • Sparsity based denoising of spectral domain optical coherence tomography images
  • Triplet cross-fusion learning for unpaired image denoising in optical coherence tomography
  • Mamba: Linear-Time Sequence Modeling with Selective State Spaces
  • Mambair: A simple baseline for image restoration with state-space model
  • Ultrasound image enhancement challenge 2023 (Apr 2023) (opens the publisher in a new tab)
  • Styledrive: Towards driving-style aware benchmarking of end-to-end autonomous driving
  • Automated measurement of fetal head circumference using 2d ultrasound images
  • Universal image restoration pre-training via degradation classification (opens arXiv in a new tab)
  • Squeeze-and-excitation networks
  • Swin transformer for fast mri
  • Spach transformer: Spatial and channel-wise transformer based on local and global self-attentions for pet image denoising
  • Multi-task learning using uncertainty to weigh losses for scene geometry and semantics
  • A multi-organ nucleus segmentation challenge
  • Deep learning for segmentation using an open large-scale dataset in 2d echocardiography
  • Backpropagation applied to handwritten zip code recognition
  • Single image super-resolution for whole slide image using convolutional neural networks and self-supervised color normalization
  • All-in-one image restoration for unknown corruption
  • Octa-500: a retinal dataset for optical coherence tomography angiography study
  • Swinir: Image restoration using swin transformer
  • Muon is scalable for llm training (opens arXiv in a new tab)
  • Ixi dataset
  • Low-dose ct for the detection and classification of metastatic liver lesions: results of the 2016 low dose ct grand challenge
  • Low-dose ct image and projection dataset
  • Ultrasound nerve segmentation (2016), kaggle
  • Denomamba: A fused state-space model for low-dose ct denoising (opens arXiv in a new tab)
  • RWKV: Reinventing RNNs for the Transformer Era
  • Promptir: Prompting for all-in-one image restoration
  • Exploring the effect of image enhancement techniques on covid-19 detection using chest x-ray images
  • Gland segmentation in colon histology images: The glas challenge contest
  • Uni-coal: A unified framework for cross-modality synthesis and super-resolution of mr images
  • Tubule-u-net: a novel dataset and deep learning-based tubule segmentation framework in whole slide images of breast cancer
  • A review on ct and x-ray images denoising methods
  • Transweather: Transformer-based restoration of images degraded by adverse weather conditions
  • The wu-minn human connectome project: an overview
  • Attention is all you need
  • Ctformer: convolution-free token2token dilated vision transformer for low-dose ct denoising
  • A real-world dataset and benchmark for foundation model adaptation in medical image classification
  • Enhanced generative adversarial network for 3d brain mri super-resolution
  • Chestx-ray8: Hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases
  • Recovering realistic texture in image super-resolution by deep spatial feature transform
  • 3d conditional generative adversarial networks for high-quality pet image estimation at low dose
  • Uformer: A general u-shaped transformer for image restoration
  • Debiased all-in-one image restoration with task uncertainty regularization
  • Attriprompter: Auto-prompting with attribute semantics for zero-shot nuclei detection via visual-language pre-trained models
  • Visual textualization for image prompted object detection
  • A cross-scanner and cross-tracer deep learning method for the recovery of standard-dose imaging quality from low-dose pet
  • Graphecho: Graph-driven unsupervised domain adaptation for echocardiogram video segmentation
  • All-in-one medical image restoration via task-adaptive routing
  • Region attention transformer for medical image restoration
  • Restore-rwkv: Efficient and effective medical image restoration with rwkv
  • Tat: Task-adaptive transformer for all-in-one medical image restoration
  • Unipet: a universal network for high-quality pet image denoising across varied dose reduction factors
  • Drmc: A generalist model with dynamic routing for multi-center pet image synthesis
  • Complexity experts are task-discriminative learners for any image restoration
  • Restormer: Efficient transformer for high-resolution image restoration
  • A video-based augmented reality system for human-in-the-loop muscle strength assessment of juvenile dermatomyositis
  • A comprehensive survey of action quality assessment: Method and benchmark
  • Adaptive score alignment learning for continual perceptual quality assessment of 360-degree videos in virtual reality
  • Phi: Bridging domain shift in long-term action quality assessment via progressive hierarchical instruction
  • Sdpt: synchronous dual prompt tuning for fusion-based visual-language pre-trained models
  • Sdpt: Synchronous dual prompt tuning for visual-language pre-trained models