Recursive Generalization Transformer for Image Super-Resolution

Zheng Chen, Yulun Zhang, Jinjin Gu, Linghe Kong, Xiaokang Yang

TL;DR

The Recursive Generalization Transformer (RGT) achieves state-of-the-art image super-resolution by capturing global spatial dependencies with linear computational complexity. By recursively compressing features into representative maps and using a novel hybrid adaptive integration (HAI) module, it overcomes the "local window" limitations of previous Transformers without the massive overhead of vanilla self-attention.

What Problem Does This Paper Address?

Image Super-Resolution (SR) is the task of recovering high-resolution (HR) details from low-resolution (LR) inputs. While Convolutional Neural Networks (CNNs) have long dominated this field, they struggle with "global context"—understanding how a pattern in one corner of an image relates to a similar pattern far away.

Transformers, which excel at modeling these long-range dependencies via self-attention, seem like a natural fit. However, vanilla self-attention has quadratic complexity: if you double the image size, the computational cost quadruples. To stay efficient, most current SR Transformers (like SwinIR) restrict attention to small "local windows." While this saves memory, it sacrifices the very global awareness that makes Transformers powerful. The authors of RGT set out to find a way to get global context at a linear cost.

Methods

The RGT architecture introduces two primary innovations to balance performance and efficiency:

Overall Architecture of RGT

1. Recursive-Generalization Self-Attention (RG-SA)

Instead of comparing every pixel to every other pixel, RG-SA uses a Recursive Generalization Module (RGM).

Recursive-Generalization Self-Attention Module
  • Compression: It recursively applies depth-wise convolutions to "summarize" the entire input feature map into a small, constant-sized "representative feature map" (e.g., $16 \times 16$).
  • Cross-Attention: The model then performs cross-attention between the original high-resolution input (the Query) and these condensed representative maps (the Key and Value).
  • Efficiency: Because the representative map is a fixed, small size, the complexity becomes linear relative to the input image size. It also scales down the channel dimensions of the attention matrices to reduce redundancy.

2. Hybrid Adaptive Integration (HAI)

The authors found that simply alternating between global (RG-SA) and local (L-SA) attention blocks wasn't enough because the features they produce are at different "levels" (global summaries vs. fine local details).

  • The Adaptor: HAI introduces a learnable adaptor ($\alpha$) that acts as a smart skip connection. Instead of just adding the input to the output, it adaptively adjusts the features to ensure they are properly aligned before fusion. This helps the network effectively integrate global context without washing out local textures.

Datasets

The models were trained and evaluated using standard high-quality SR benchmarks:

  • Training: DIV2K and Flickr2K.
  • Testing/Evaluation: Set5, Set14, B100, Urban100, and Manga109.
  • Comparison: The authors compared RGT against a wide array of SOTA models, including CNN-based (RCAN, HAN) and Transformer-based (SwinIR, CAT, ELAN) architectures.

Key Insights and Ideas

  • Recursion is Flexible: By using a recursive design for the RGM, the model can handle varying input resolutions dynamically. It simply repeats the compression steps until the target representative map size is reached.
  • Global Context Matters for Structures: The results are most striking on datasets like Urban100 (which contains many repetitive architectural structures). This confirms that being able to "see" the whole image helps the model reconstruct repeating patterns (like windows on a building) more accurately than local-only methods.
  • Solving the Fusion Gap: The HAI module highlights that "global" and "local" features aren't immediately compatible. The learnable adaptor $\alpha$ is crucial for preventing the misalignment that usually occurs when mixing different attention scales.

Key Results

  • Quantitative Performance: RGT consistently outperformed previous SOTA methods across all datasets. On the Urban100 ($\times 2$) benchmark, RGT achieved a PSNR of 34.83 dB, outperforming the popular SwinIR (34.46 dB) and CAT-A (34.78 dB).
  • Efficiency: Despite the performance boost, RGT is more efficient than many competitors. For example, compared to CAT-A, RGT reduces FLOPs by ~30% and parameters by ~19% while delivering better image quality.
  • Qualitative Superiority: Visual comparisons show that RGT is significantly better at recovering sharp, regular textures (like stripes or grids) where other models produce blurring or "aliasing" artifacts.

Limitations and Future Work

  • Representative Map Size: While the representative map size is constant during testing, it is a hyperparameter that must be chosen carefully. A map that is too small might lose too much detail, while one that is too large increases computational cost.
  • Complexity of Implementation: The recursive nature and the HAI module add architectural complexity compared to simpler "stack-of-blocks" Transformers.
  • Future Directions: The authors suggest that the recursive generalization concept could be extended to other low-level vision tasks beyond super-resolution, such as image denoising or deblurring, where global context is equally vital.

Summary updated

BibTeX
@inproceedings{chen2024recursive,
  author = {Zheng Chen and Yulun Zhang and Jinjin Gu and Linghe Kong and Xiaokang Yang},
  title = {{Recursive Generalization Transformer for Image Super-Resolution}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=owziuM1nsR},
}
Figure