[Paper Review] Hard-Attention for Scalable Image Classification
This paper proposes Traversal Network (TNet), a multi-scale hard-attention architecture that processes high-resolution images by recursively attending to the most informative regions across scale-space, achieving higher accuracy with reduced FLOPs, memory, and inference time. TNet enables an adjustable trade-off between accuracy and complexity by varying the number of attended locations, while providing inherent interpretability through attention maps, outperforming hard-attention baselines on ImageNet and fMoW with up to 2.5× faster processing at higher accuracy.
Can we leverage high-resolution information without the unsustainable quadratic complexity to input scale? We propose Traversal Network (TNet), a novel multi-scale hard-attention architecture, which traverses image scale-space in a top-down fashion, visiting only the most informative image regions along the way. TNet offers an adjustable trade-off between accuracy and complexity, by changing the number of attended image locations. We compare our model against hard-attention baselines on ImageNet, achieving higher accuracy with less resources (FLOPs, processing time and memory). We further test our model on fMoW dataset, where we process satellite images of size up to $896 imes 896$ px, getting up to $2.5$x faster processing compared to baselines operating on the same resolution, while achieving higher accuracy as well. TNet is modular, meaning that most classification models could be adopted as its backbone for feature extraction, making the reported performance gains orthogonal to benefits offered by existing optimized deep models. Finally, hard-attention guarantees a degree of interpretability to our model's predictions, without any extra cost beyond inference. Code is available at $\href{https://github.com/Tpap/TNet}{github.com/Tpap/TNet}$.
Motivation & Objective
- To address the quadratic computational and memory cost of processing high-resolution images in deep learning.
- To enable efficient, scalable image classification without sacrificing accuracy on high-resolution inputs.
- To provide inherent interpretability through hard-attention mechanisms without additional inference cost.
- To offer a modular, end-to-end trainable architecture compatible with existing deep learning backbones.
Proposed method
- TNet processes images in a top-down, recursive manner across multiple scales, visiting only the most informative regions.
- It uses a differentiable policy network to select image locations at each scale, guided by a modified REINFORCE rule.
- Feature extraction is performed in parallel at each processing level, avoiding sequential RNNs and enabling direct gradient flow.
- The attended features from different locations are averaged and combined into a global representation for classification.
- A novel regularization method encourages classification based on individual attended locations, improving generalization.
- Hard-attention is applied without soft-attention or additional backward passes, ensuring interpretability at no extra cost.
Experimental results
Research questions
- RQ1Can we achieve high accuracy on high-resolution images without incurring quadratic computational complexity?
- RQ2Does a multi-scale hard-attention mechanism improve efficiency and accuracy compared to existing hard-attention baselines?
- RQ3Can hard-attention provide inherent interpretability without additional inference or training overhead?
- RQ4How does attending to fewer, more informative regions affect generalization, especially in low-contrast or cluttered scenes like satellite imagery?
- RQ5Can the model’s performance be decoupled from backbone architecture, enabling plug-and-play integration with optimized models?
Key findings
- On ImageNet, TNet achieves higher top-1 accuracy than strong hard-attention baselines while using fewer FLOPs, less memory, and faster inference.
- On fMoW, TNet processes 896×896 satellite images up to 2.5× faster than baselines, while achieving higher accuracy.
- Precision on ImageNet is high (indicating minimal background attention), while recall is low, suggesting focused attention within object bounding boxes.
- On fMoW, precision is low and recall is high, reflecting the model’s ability to attend to small, sparse objects across large images.
- Coverage increases sublinearly with the number of attended locations, indicating overlapping attention regions.
- Ablation studies confirm that the proposed regularization method significantly improves performance by promoting attention to individual informative locations.
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.