Rethinking RGB Color Representation for Image Restoration Models

Jaerin Lee, JoonKyu Park, Sungyong Baik, Kyoung Mu Lee · Submission to ICLR 2024 · Rejected

TL;DR

Standard per-pixel loss functions (such as $L_1$ or $L_2$) computed directly in RGB space force image restoration models to output blurry textures because RGB pixels encode only point color, not spatial context. This paper introduces augmented RGB (aRGB)—a feature space learned by an autoencoder with a mixture-of-experts encoder and a strictly linear decoder—which preserves RGB color while explicitly embedding local structural information. By swapping RGB pixel loss with an aRGB pixel loss, existing restoration networks achieve sharper reconstructions, fewer artifacts, and higher PSNR/SSIM across super-resolution, denoising, and deblurring without any architectural changes during inference.

What Problem Does This Paper Address?

In deep image restoration (e.g., super-resolution, denoising, deblurring), networks are almost universally trained with per-pixel distance metrics ($L_1$, $L_2$, or smooth $L_1$) calculated between the RGB prediction and the ground truth. However, raw RGB values only represent isolated 3-channel color coordinates without any local spatial context. Minimizing distances in this space averages out high-frequency details, yielding blurry, plasticky outputs.

While auxiliary objectives like perceptual losses (VGG feature matching) and adversarial (GAN) losses improve visual plausibility, they cannot replace pixel-level losses because they discard exact pixel alignment and precise color fidelity. The authors argue that the root cause of blurriness is not the metric itself, but the underlying representation space (RGB) in which the distance is measured.

Methods

The authors propose augmented RGB (aRGB), lifting 3-channel RGB images into a higher-dimensional space $\mathbb{R}^{C \times H \times W}$ ($C=128$) using an autoencoder framework:

RGB Input (3ch) ──► MoE Encoder f ──► aRGB Latent (128ch) ──► 1x1 Linear Decoder g ──► RGB Output (3ch)
                    (Router + Experts)                         (Orthogonal projection)
  1. Mixture-of-Experts (MoE) Encoder ($f$): A non-linear convolutional encoder with a receptive field of $9 \times 9$. A 5-layer convolutional router partitions each pixel into one of $K=20$ convolutional experts (using a top-1 routing policy and a load-balancing loss). The MoE design handles the discontinuous, topologically complex manifold of natural image patches.
  2. Linear Decoder ($g$): Implemented strictly as $1 \times 1$ convolutions without non-linear activations (an affine mapping $g(\xi) = A\xi + b$). This enforces a strict constraint: the 3D RGB color must be directly decodable from the representation.
  3. Training & Inference Integration: The autoencoder is trained with clean natural images using an $L_1$ reconstruction loss with Gaussian noise injected into the latent space to prevent trivial identity mapping. Once trained, the decoder is discarded. During training of an image restoration model, standard loss functions are computed in the aRGB space: $$\mathcal{L}_{\text{total, aRGB}} = \mathcal{L}_{\text{pixel}}(f(x_H), f(\hat{x}_H)) + \mathcal{L}_{\text{aux}}(x_H, \hat{x}_H)$$ At test time, the restoration network operates normally and directly outputs standard RGB images—incurring zero test-time computational overhead.

Datasets

  • Autoencoder Pre-training: A large corpus of ~1.97 million patches compiled from DIV2K, Flickr2K, DIV8K, and ImageNet-1k.
  • Task Benchmarks (Existing Datasets):
  • Perceptual Super-Resolution ($4\times$): Trained ESRGAN/RRDBNet on DIV2K, Flickr2K, and OSTv2; evaluated on Set14, B100, Manga109, Urban100, DIV2K-Val, and OST300.
  • Real Image Denoising: Trained NAFNet on the Smartphone Image Denoising Dataset (SIDD) Medium sRGB; evaluated on SIDD validation.
  • Motion Blur Deblurring: Trained MPRNet on the GoPro dataset; evaluated on GoPro and HIDE test sets.
  • New benchmarks introduced: None.

Key Insights and Ideas

  • Orthogonal Decomposition of Color and Structure: Because the decoder is linear, any aRGB feature vector $\xi$ can be decomposed using the Moore-Penrose pseudoinverse $A^\dagger$: $$\xi = \underbrace{A^\dagger A \xi}_{\xi_\parallel \text{ (color)}} + \underbrace{(I - A^\dagger A)\xi}_{\xi_\perp \text{ (structure)}}$$ The parallel component $\xi_\parallel$ carries color information, while the perpendicular component $\xi_\perp$ lives in the nullspace of $A$ and acts as a pure structural/edge feature reservoir.

  • MoE Matches Patch Topology: Small pixel values can vary continuously, but natural image patches exhibit semantic and structural discontinuities. The discrete routing in MoE accommodates this discontinuous patch manifold far better than a single continuous ConvNet.

  • Stabilized, Well-Scaled Gradients: Calculating distances in aRGB space inflates distances for similar images and produces gradients that are over $100\times$ larger, centered, and significantly smoother than RGB gradients, effectively accelerating convergence without destabilizing learning rates.
  • Outperforming RGB at Its Own Metric: Surprisingly, training denoisers (NAFNet) and deblurrers (MPRNet) on aRGB losses yielded higher RGB PSNR and SSIM than training those models directly on RGB $L_2$ or Charbonnier losses.

Key Results

  • Perceptual Super-Resolution (ESRGAN, $4\times$ on Urban100): Replacing the RGB $L_1$ loss with $\mathcal{L}_{1,\text{aRGB}}$ in full adversarial training improved PSNR from 22.78 dB to 23.27 dB, SSIM from 0.7033 to 0.7196, LPIPS from 0.1232 to 0.1183, and reduced FID from 20.62 to 17.74, noticeably eliminating GAN-induced visual artifacts and color distortion.
  • Image Denoising (NAFNet-width64 on SIDD): Training with $\mathcal{L}_{1,\text{aRGB}}$ boosted PSNR from 40.30 dB to 40.34 dB and SSIM from 0.9614 to 0.9620 compared to the baseline trained directly on PSNR loss.
  • Motion Deblurring (MPRNet on GoPro): Deblurring PSNR rose from 32.66 dB to 32.71 dB (and from 33.31 dB to 33.39 dB when using Test-Time Local Converter [TLC]), yielding sharper edges and better boundary alignment.

Limitations and Future Work

  • Training-Time Overhead: While test-time inference is unchanged, training requires forward passes through the frozen aRGB MoE encoder for both the prediction and the ground truth.
  • Sensitivity to Gradient Clipping: Because aRGB generates gradients orders of magnitude larger than standard RGB losses, default gradient clipping can throttle training benefits; clipping thresholds must be relaxed (e.g., $L_\infty$ norm of 20).
  • Unexplored Architecture Co-design: The authors kept all restoration architectures and hyperparameters tuned to default RGB configurations; co-optimizing restoration model architectures and loss schedules specifically for aRGB could unlock further performance gains.

Summary updated

Abstract

The per-pixel distance loss defined in the RGB color domain has been almost a compulsory choice for training image restoration models, despite its well-known tendency to guide the model to produce blurry, unrealistic textures. To enhance the visual plausibility of restored images, recent methods employ auxiliary objectives such as perceptual or adversarial losses. Nevertheless, they still do not eliminate the reliance on the per-pixel distance in the RGB domain. In this work, we try to redefine the very representation space over which the per-pixel distance is measured. Our augmented RGB ($a$RGB) space is the latent space of an autoencoder that comprises a single affine decoder and a nonlinear encoder, trained to preserve color information while capturing low-level image structures. As a direct consequence, per-pixel distance metrics, e.g., $L_{1}$, $L_{2}$, and smooth $L_{1}$ losses, can also be defined over our $a$RGB space in the same way as for the RGB space. We then replace the per-pixel losses in the RGB space with their counterparts in training various image restoration models such as deblurring, denoising, and perceptual super-resolution. By simply redirecting the loss function to act upon the proposed $a$RGB space, we demonstrate boosted performance without any modification to model architectures or other hyperparameters. Our results imply that the RGB color is not the optimal representation for image restoration tasks.
BibTeX
@misc{lee2024rethinking,
  author = {Jaerin Lee and JoonKyu Park and Sungyong Baik and Kyoung Mu Lee},
  title = {{Rethinking RGB Color Representation for Image Restoration Models}},
  year = {2024},
  eprint = {2402.03399},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.03399},
}

Loading related content...

Figure