A Low-Resolution Image is Worth 1x1 Words: Enabling Fine Image Super-Resolution with Transformers and TaylorShift

Sanath Budakegowdanadoddi Nagaraju, Brian Bernhard Moser, Tobias Christian Nauen, Stanislav Frolov, Federico Raue, Andreas Dengel

TL;DR

TaylorIR is a plug-and-play framework that enables Vision Transformers to perform true pixel-wise image super-resolution without exploding computational costs. By combining $1\times1$ patch embeddings with a memory-efficient, Taylor-series-based attention mechanism called TaylorShift, it achieves state-of-the-art restoration quality while slashing VRAM consumption by up to 60%.

What Problem Does This Paper Address?

Image Super-Resolution (SR) aims to reconstruct high-resolution images from low-resolution inputs. While Vision Transformers (ViTs) excel at capturing long-range dependencies for this task, they suffer from two major architectural bottlenecks:

  1. Quadratic Attention Costs: Standard self-attention scales quadratically ($\mathcal{O}(N^2)$) with sequence length. To keep computation feasible, current models restrict self-attention to small local windows (e.g., $8\times8$ tokens), preventing the network from utilizing global image context.
  2. Coarse Patch Embeddings: To further reduce the sequence length, ViTs typically group pixels into larger patches (e.g., $4\times4$ or $8\times8$). This downsampling averages out local variations, inherently blurring high-frequency details like sharp edges and fine textures.

The authors introduce TaylorIR to bridge this gap, allowing transformers to reason at the individual pixel level over much larger spatial windows.

Methods

TaylorIR introduces two core components that can be integrated into existing transformer-based SR architectures like SwinIR:

  • Pixel-Wise Patch Embedding ($1\times1$ Words): Instead of grouping pixels, TaylorIR sets the patch size to $p=1$. Every single pixel becomes an independent token, exposing the full-resolution spatial manifold directly to the network and eliminating hidden downsampling effects.
  • TaylorShift Attention: To make $1\times1$ pixel tokens computationally viable over large windows, the authors replace standard softmax attention with TaylorShift. This mechanism approximates the exponential function in softmax using a second-order Taylor expansion:

$$\text{T-SM}(A)_{ij} = \frac{1 + A_{ij} + \frac{1}{2}A_{ij}^2}{\sum_k (1 + A_{ik} + \frac{1}{2}A_{ik}^2)}$$

For long sequences, the authors reorder the matrix multiplication (Efficient TaylorShift) so that normalization occurs after mixing with the Value ($V$) matrix. This shifts the computational complexity from quadratic ($\mathcal{O}(N^2d)$) to near-linear ($\mathcal{O}(Nd^2)$ or $\mathcal{O}(Nd^3)$), making large-scale attention windows practical.

Fig. 2: TaylorIR has two pieces: (left) pixel-wise (1×1) patch embedding and (right) TaylorShift attention in place of windowed softmax attention. Together, they enable long-range context with lower memory and stable runtime.

The authors integrated this framework into SwinIR to create TaylorSwinIR, scaling the attention window size from $8\times8$ (64 tokens) up to $48\times48$ (2304 tokens).

Datasets

The models were trained on the standard DIV2K dataset (extracting $192\times192$ RGB sub-images).

Evaluation was performed across five classical image super-resolution benchmarks for upscaling factors of $\times2$, $\times3$, and $\times4$:

  • Set5
  • Set14
  • BSD100
  • Urban100
  • Manga109

Key Insights and Ideas

  • Breaking the Patch-Size Bottleneck: Linear-complexity attention mechanisms are usually motivated purely by speed. Here, the near-linear complexity of TaylorShift is leveraged to fundamentally alter the input representation—enabling a $1\times1$ patch size that preserves pixel-level fidelity.
  • Expanded Contextual Scope: By expanding the attention window to $48\times48$, TaylorIR achieves a much higher "Diffusion Index" on Local Attention Maps (LAM). This means the model successfully gathers informative context from a much wider area of the image to reconstruct fine details.
  • True Plug-and-Play Modularity: TaylorShift acts as a direct mathematical drop-in replacement for windowed softmax attention, requiring zero structural modifications to the underlying hierarchical backbone.

Key Results

  • Memory Reduction: At a matched large window size of $48\times48$, TaylorSwinIR reduced VRAM consumption by 37% to 85% across different datasets compared to a fine-grained baseline SwinIR. On the Urban100 dataset, memory usage dropped from 78.5 GB to 49.1 GB.
Fig. 1: Overview of TaylorIR’s impact on image SR. Using 1×1 patch embeddings, TaylorIR models the image at pixel-level resolution. TaylorShift [22] replaces standard self-attention with a Taylor-series-based alternative that maintains full token interaction while reducing memory load.
  • Quantitative Performance: TaylorSwinIR consistently outperformed the baseline SwinIR and other state-of-the-art models (like RCAN, SAN, HAN, NLSA) in PSNR and SSIM metrics. The gains were particularly prominent at lower scaling factors; for instance, achieving a +0.31 dB PSNR gain over SwinIR on Urban100 ($\times2$).
  • Qualitative Clarity: Visual comparisons demonstrate that TaylorSwinIR recovers significantly sharper high-frequency structures, dense line-art textures, and fine details in manga and urban imagery where standard models produce blurry artifacts.

Limitations and Future Work

Despite the significant complexity reductions offered by TaylorShift, the framework still faces substantial memory demands when processing extremely high-resolution images globally.

To address this, the authors point to two promising future directions:

  1. Exploring hybrid architectures that combine the complementary strengths of convolutional layers and transformers.
  2. Optimizing TaylorIR for real-time deployment on resource-constrained edge devices using model compression and quantization techniques.

Summary updated

BibTeX
@misc{nagaraju2024low,
  author = {Sanath Budakegowdanadoddi Nagaraju and Brian Bernhard Moser and Tobias Christian Nauen and Stanislav Frolov and Federico Raue and Andreas Dengel},
  title = {{A Low-Resolution Image is Worth 1x1 Words: Enabling Fine Image Super-Resolution with Transformers and TaylorShift}},
  year = {2024},
  eprint = {2411.10231},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.10231},
}
Figure