Abstract
Transformer-based models have achieved state-of-the-art performance in Single Image Super-Resolution (SISR) but suffer from high computational costs, particularly for 4K and 8K resolutions. We present AdaFormer, an efficient Transformer architecture that utilizes adaptive token sparsification to reduce latency. By identifying and "halting" the processing of simple image regions while focusing on complex textures, AdaFormer achieves up to a 90% reduction in latency compared to models like SwinIR on high-resolution benchmarks without compromising reconstruction quality.
Introduction
While Transformers excel at capturing long-range dependencies necessary for high-quality super-resolution, their uniform processing approach is inherently inefficient. Standard models apply the same computational effort to every pixel, regardless of whether it belongs to a featureless sky or a detailed architectural facade. Furthermore, many efficient Transformers rely on local window attention, which restricts their receptive field and limits their ability to restore large-scale structures.
AdaFormer addresses these challenges by introducing a content-aware processing pipeline that adaptively allocates computational resources based on image complexity.
Methodology
The AdaFormer architecture is built around two primary components: the Texture-relevant Sparse Attention Block (TSAB) and an Adaptive Token Early-Exit strategy.
Texture-relevant Sparse Attention Block (TSAB)
To overcome the limitations of local window attention, TSAB employs a dual-branch structure. One branch performs standard local self-attention, while a parallel branch executes global cross-attention. This global branch utilizes "learned prototypes"—representative feature vectors—to aggregate information from across the entire image. This allows the model to maintain a global context, which is vital for consistent texture and edge restoration.
Adaptive Token Exit and Uncertainty-Guided Loss
The core of AdaFormer's efficiency is the Adaptive Token Exit strategy. A lightweight Confidence Estimator evaluates image patches (tokens) as they pass through successive Transformer layers. If a token is determined to be sufficiently recovered or represents a simple region, it exits the computation early.
To train this estimator without manual labels, the authors employ aleatoric uncertainty modeling. By treating SR as a regression task where the model predicts both the pixel value and its associated uncertainty (using a Laplace distribution), the confidence estimator learns to identify when a patch is statistically "finished."
Experiments and Results
AdaFormer was evaluated on standard SR benchmarks (Set5, Set14, B100, Urban100) and high-resolution datasets (DIV8K).
Performance and Efficiency
- Latency Reduction: On the Test8K dataset, AdaFormer achieved a latency of 1355ms, a nearly 90% reduction compared to SwinIR's 11766ms, while maintaining superior PSNR.
- Benchmark Comparison: Compared to ELAN-light, AdaFormer demonstrated a 1.22x speedup on the B100 benchmark with competitive accuracy.
- Sparsity Trends: Analysis revealed that by the final layer, approximately 90% of tokens in high-resolution images can be halted, confirming that most computational effort is required only in the initial stages for the majority of the image.
Qualitative Analysis
Visual results indicate that AdaFormer's global context branch enables sharper edge reconstruction and cleaner textures on complex structures, such as foliage and building facades, compared to models that lack global awareness but process all tokens uniformly.
Conclusion
AdaFormer demonstrates that adaptive token sparsification is a highly effective strategy for scaling Transformer-based super-resolution to ultra-high resolutions. By leveraging uncertainty-guided halting and global cross-attention, it breaks the trade-off between computational efficiency and reconstruction quality. Future work includes optimizing the sparse computation for mobile NPU hardware and extending the adaptive framework to other restoration tasks like denoising and deblurring.
Summary updated