[Paper Review] SparseFormer: Sparse Visual Recognition via Limited Latent Tokens
SparseFormer proposes a sparse visual recognition framework that uses a limited number of learnable latent tokens (down to 49) to represent images, replacing dense processing of all patches or pixels. By focusing attention only on salient regions via iterative refinement of region-of-interest (RoI) descriptors and sparse feature sampling, it achieves performance on par with dense models like Swin-T while significantly reducing FLOPs and improving throughput, especially in low-compute regimes.
Human visual recognition is a sparse process, where only a few salient visual cues are attended to rather than traversing every detail uniformly. However, most current vision networks follow a dense paradigm, processing every single visual unit (e.g,, pixel or patch) in a uniform manner. In this paper, we challenge this dense paradigm and present a new method, coined SparseFormer, to imitate human's sparse visual recognition in an end-to-end manner. SparseFormer learns to represent images using a highly limited number of tokens (down to 49) in the latent space with sparse feature sampling procedure instead of processing dense units in the original pixel space. Therefore, SparseFormer circumvents most of dense operations on the image space and has much lower computational costs. Experiments on the ImageNet classification benchmark dataset show that SparseFormer achieves performance on par with canonical or well-established models while offering better accuracy-throughput tradeoff. Moreover, the design of our network can be easily extended to the video classification with promising performance at lower computational costs. We hope that our work can provide an alternative way for visual modeling and inspire further research on sparse neural architectures. The code will be publicly available at https://github.com/showlab/sparseformer
Motivation & Objective
- To challenge the dominant dense paradigm in vision transformers and CNNs that process every pixel or patch uniformly.
- To imitate human visual recognition by focusing only on a few salient regions through learnable latent tokens.
- To reduce computational cost and memory footprint by limiting operations to a sparse set of tokens in the latent space.
- To enable end-to-end training with only classification signals, without requiring localization supervision.
- To explore a new sparse neural architecture paradigm for vision that is efficient and generalizable across image and video tasks.
Proposed method
- Introduces a lightweight early convolutional encoder to extract initial image features.
- Employs a latent focusing transformer that iteratively refines region-of-interest (RoI) descriptors for each latent token to attend to discriminative image regions.
- Uses sparse feature sampling via bilinear interpolation to extract features from image regions corresponding to each token’s RoI, avoiding dense operations.
- Processes the resulting latent token embeddings through a standard, deep Transformer encoder in the latent space, enabling high-accuracy recognition.
- Initializes token RoIs in a grid-like pattern (e.g., 7×7 for 49 tokens) and learns their spatial extent and position end-to-end.
- Uses adaptive decoding with Xavier initialization to stabilize training, ensuring initial behavior resembles unconditional convolution.

Experimental results
Research questions
- RQ1Can a vision model achieve competitive accuracy while drastically reducing FLOPs by processing only a small number of sparse latent tokens?
- RQ2Can a sparse attention mechanism, guided only by classification signals, learn to focus on foreground objects without explicit localization supervision?
- RQ3How does the performance of a sparse architecture compare to dense counterparts like Swin Transformers in terms of accuracy-throughput trade-off?
- RQ4Can the sparse design be effectively extended to video recognition, where computational cost is a major bottleneck?
- RQ5Does the model demonstrate robustness to input perturbations such as random erasures or zero-padding?
Key findings
- SparseFormer-Tiny with 2.0 GFLOPs achieves 81.0% top-1 accuracy on ImageNet-1K at 1270 images per second, outperforming Swin-T (4.5 GFLOPs, 81.3% top-1, 726 images/s) in throughput.
- With only 49 latent tokens, SparseFormer achieves 81.0% top-1 accuracy, demonstrating strong efficiency and performance at low compute.
- On the Ade20K semantic segmentation benchmark, SparseFormer-T with 400 tokens achieves 43.5% mIoU and 54.7% mAcc at just 43 GFLOPs—1/8 of Swin-T’s FLOPs—while remaining competitive.
- Visualizations confirm that SparseFormer learns to progressively focus on discriminative foreground regions across stages, even without localization supervision.
- The model shows robustness to input disturbances such as random erasures and zero-padding, adapting its sampling to avoid uninformative regions over training.
- The architecture generalizes well to video classification, achieving promising performance on Kinetics-400 with lower computation than dense models.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.