Transcending the Limit of Local Window: Advanced Super-Resolution Transformer with Adaptive Token Dictionary

Leheng Zhang, Yawei Li, Xingyu Zhou, Xiaorui Zhao, Shuhang Gu

TL;DR

The Adaptive Token Dictionary (ATD) framework breaks the "local window" bottleneck in Super-Resolution (SR) Transformers by introducing a learnable, image-adaptive dictionary. By combining cross-attention for global priors and category-based self-attention for long-range dependencies, ATD achieves state-of-the-art performance on standard benchmarks while maintaining a competitive computational footprint.

What Problem Does This Paper Address?

Single Image Super-Resolution (SISR) aims to reconstruct high-resolution (HR) images from low-resolution (LR) inputs. While Transformer-based models have recently dominated this field, they face a significant trade-off: computational complexity.

Standard self-attention scales quadratically with the number of pixels. To stay efficient, most models (like SwinIR) use window-based self-attention, restricting a pixel's "view" to a small local neighborhood. This prevents the model from leveraging similar textures or structures located far away in the image—a major disadvantage for recovering sharp, repetitive details like those found in architecture or textiles. Furthermore, these rectangular windows are content-agnostic, often grouping unrelated pixels together.

Methods

The authors propose the ATD-SR method, which augments the standard Transformer architecture with three novel components:

  1. Token Dictionary Cross-Attention (TDCA): The model maintains a set of auxiliary "dictionary tokens" that learn common image structures from the training data. Image tokens interact with this dictionary via cross-attention, allowing them to incorporate global and external priors with linear complexity.
  2. Adaptive Dictionary Refinement (ADR): Instead of static tokens, the dictionary is refined at each layer. It uses a "reverse attention" mechanism to summarize information from the current image features back into the dictionary, making the priors specific to the input image.
  3. Adaptive Category-based Multi-head Self-Attention (AC-MSA): Using the similarity maps from the dictionary, the model groups image tokens into "categories" based on content rather than spatial location. Self-attention is then performed within these categories. This effectively creates irregularly shaped, content-aware windows that can span the entire image.
Figure 1. Three different kinds of attention mechanism: (a) window-based self-attention exploits tokens in the same local window to enhance image tokens; (b) our proposed token dictionary cross-attention leverages the auxiliary dictionary to summarize and incorporate global information to the image tokens; (c) our proposed category-based self-attention adopts category labels to divide image tokens.

These modules are integrated into a parallel architecture within each ATD block, working alongside standard window-based attention to capture local, global, and external information simultaneously.

Figure 2. The proposed (a) Token Dictionary Cross-Attention (TDCA) and (b) Adaptive Category-based Multi-head Self-Attention (AC- MSA). In Fig. 2b, we omit the details of dividing categories θ into sub-categories ϕ for simplicity and better understanding. More details of TDCA and AC-MSA can be found in Sec. 3.2 and Sec. 3.4.

Datasets

  • Training: The full ATD model was trained on the DF2K dataset (a combination of DIV2K and Flickr2K). A lightweight version, ATD-light, was trained solely on DIV2K.
  • Evaluation: Performance was benchmarked on five standard datasets: Set5, Set14, BSD100, Urban100, and Manga109.

Key Insights and Ideas

  • Modernizing Dictionary Learning: The paper successfully bridges classical "dictionary learning" (popular before the deep learning era) with modern Transformers. The dictionary acts as a global "summary" that bypasses the quadratic cost of pixel-to-pixel attention.
  • Content-Aware Partitioning: By letting the dictionary categorize pixels, the model breaks free from rigid grids. As shown in the visualization below, the model naturally groups semantically similar areas—like trees, roofs, or smooth sky—allowing them to "talk" to each other regardless of distance.
  • Linear Complexity for Global Reach: TDCA provides a way to achieve a global receptive field with $O(N \cdot M)$ complexity (where $N$ is pixels and $M$ is dictionary size) instead of $O(N^2)$, making it highly efficient for high-resolution tasks.
Visualization showing how AC-MSA groups semantically similar pixels (e.g., trees in 'b' and 'c', roofs in 'd') into attention categories.

Key Results

ATD achieves top-tier results across all benchmarks, often outperforming much larger models:

  • Urban100 (x4): ATD reached 28.17 dB PSNR, surpassing the previous state-of-the-art HAT (27.97 dB) while using slightly fewer parameters (20.3M vs 20.8M).
  • Lightweight SR: ATD-light outperformed the popular OmniSR by a significant 0.45 dB on the Manga109 (x4) benchmark.
  • Qualitative Superiority: Visual results show that ATD is much better at reconstructing sharp edges and avoiding the "ringing" artifacts common in other methods when dealing with complex textures.

Limitations and Future Work

  • Dictionary Capacity: The authors found that increasing the dictionary size ($M$) beyond a certain point (e.g., 96 tokens) actually led to performance degradation, suggesting a limit to how much information the current refinement strategy can effectively manage.
  • Parallelism vs. Receptive Field: To ensure efficient GPU parallelism, categories are further divided into fixed-size sub-categories. While random shuffling helps maintain a global reach, this step technically limits the theoretical maximum receptive field of the category-based attention.
  • Future Directions: Exploring more sophisticated ways to initialize and refine the dictionary, or applying this content-aware grouping to other vision tasks like denoising or deblurring, could be fruitful.

Summary updated

BibTeX
@misc{zhang2024transcending,
  author = {Leheng Zhang and Yawei Li and Xingyu Zhou and Xiaorui Zhao and Shuhang Gu},
  title = {{Transcending the Limit of Local Window: Advanced Super-Resolution Transformer with Adaptive Token Dictionary}},
  year = {2024},
  eprint = {2401.08209},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.08209},
}
Figure