ADIR: Adaptive Diffusion for Image Reconstruction

Shady Abu-Hussein, Tom Tirer, Raja Giryes · DOI

Abstract

Diffusion models have emerged as powerful priors for image reconstruction tasks. However, their "one-size-fits-all" nature often lacks the specific context required for high-fidelity restoration of unique textures. We present ADIR (Adaptive Diffusion for Image Reconstruction), a framework that specializes pre-trained diffusion models at test-time. By retrieving a small set of semantically similar images from a large-scale dataset and performing efficient Low-Rank Adaptation (LoRA), ADIR transforms a general model into a specialized expert for the specific image under reconstruction.

Introduction

Image reconstruction aims to recover a clean image $x$ from a degraded observation $y$, typically modeled as $y = Ax + e$. While deep learning models have significantly advanced this field, they often struggle with a trade-off: task-specific models lack generalization, while zero-shot models utilizing general priors lack the specific "context" of the input image.

General-purpose diffusion models, while impressive, are not optimized for the specific features of a given input. For instance, a model might know the general structure of birds but lack the specific textural nuances of a rare species. Previous attempts to adapt models at test-time often overfit to the degraded input $y$, resulting in artifacts. ADIR addresses this by leveraging external clean data to provide the necessary visual context.

The ADIR Framework

The ADIR approach consists of three primary components designed to bridge the gap between general priors and specific image contexts.

The ADIR pipeline: retrieving similar images from an external dataset to fine-tune the diffusion model via LoRA.

1. Retrieval-Based Adaptation

Instead of fine-tuning on the degraded input, ADIR uses a vision-language model (CLIP) to identify $K$ visually and semantically similar images from a massive external dataset, such as the Google Open Dataset containing 1.7 million images. CLIP embeddings are notably robust to degradation, allowing the system to find high-quality "neighbors" even when the input is blurry or low-resolution.

2. Efficient Fine-Tuning with LoRA

To maintain computational efficiency during reconstruction, ADIR employs Low-Rank Adaptation (LoRA). By updating only a small fraction of the model's weights, the adaptation process becomes fast enough to be integrated into the reconstruction workflow without the prohibitive cost of full-model retraining.

3. Modified Guidance Sampling

The authors introduce a stable "surrogate" likelihood function for the diffusion sampling process. Standard automatic differentiation for guidance can be numerically unstable; ADIR simplifies gradient calculations into a "relaxation" that ignores certain recursive dependencies, ensuring the generated image remains mathematically consistent with the original measurements ($y = Ax$).

Experimental Results

ADIR was evaluated on the DIV2K validation set using base models like Stable Diffusion and Guided Diffusion. The results demonstrate significant improvements across multiple metrics and tasks.

Qualitative comparison of ADIR against baselines for super-resolution tasks.

Super-Resolution and Deblurring

In 8x upscaling tasks, ADIR-SD (Stable Diffusion) achieved superior perceptual scores (MUSIQ and KonIQ) compared to the base model. Visually, ADIR produces sharper results with realistic fine details, such as individual feathers or complex textures, which are often lost in standard bicubic or guided diffusion methods.

Generalization and Efficiency

The framework shows a remarkable ability to generalize to resolutions beyond the base model's training data (e.g., reconstructing $512 \times 512$ images using a model trained on $256 \times 256$). Furthermore, the use of K-D Trees for retrieval and LoRA for tuning ensures that the adaptive overhead remains manageable.

Discussion and Future Work

While ADIR represents a significant step forward, several challenges remain. The method currently assumes the degradation operator $A$ is known, which is rarely the case in "blind" real-world scenarios. Additionally, the quality of reconstruction is inherently tied to the diversity of the external retrieval pool; if no similar images exist in the dataset, the benefits of adaptation are reduced. Future research will focus on addressing these limitations and further reducing the runtime overhead of the adaptation step.

Summary updated

BibTeX
@misc{abuhussein2022adir,
  author = {Shady Abu-Hussein and Tom Tirer and Raja Giryes},
  title = {{ADIR: Adaptive Diffusion for Image Reconstruction}},
  year = {2022},
  eprint = {2212.03221},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.03221},
}
Figure