Triplet Attention
A ResNet-50 image classifier with triplet attention, a three-branch add-on module for cross-dimension attention.
Image classification · 831 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Image classification
- Parameters
- 25.6M
- Operations
- 831
- Framework
- PyTorch
- Recurrent
- No
- Published
- WACV 2021
- Cited by
- 1,241 (as of 30 October 2026)
- Authors
- Diganta Misra, Trikay Nalamada, Ajay Uppili Arasanipalai, Qibin Hou
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m21070
- Graph hash
- ba472186fce082eaec42b7f3764e43d1ba1468ee08499d8afced1cfd823de436
- Skeleton hash
- dc06bd10934bf1e08f5010cb28be72ed1b6b6d9eef807ddf1a76b235a5bd07da
- Architecture hash
- 7caeae5925b708ac6121d1e0f7a4777d4bb09eb28763181157367adb718d470c
- Diagram SHA-256
- 060a82b613efe3ac598f152f027060b91a12ef125402b977c9ff9a5dc3271f16
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
Triplet attention is a lightweight attention module that plugs into standard convolutional backbones as an add-on. This model is a ResNet-50 with the module added, one of the ImageNet configurations the repository lists.
The module computes attention weights with a three-branch structure that picks up interaction across dimensions. For an input tensor, it builds dependencies between dimensions with a rotation operation followed by residual transformations, encoding inter-channel and spatial information at what the paper calls negligible computational overhead. Because the module preserves dimensions, the repository notes that it can be inserted between convolutional layers in most stages of most networks.
The paper evaluates it on image classification on ImageNet-1k and object detection on MSCOCO and PASCAL VOC, and inspects GradCAM and GradCAM++ results visually. The repository's ImageNet table lists ResNet-50 with triplet attention (k = 7) at 25.56 M parameters and 22.52% top-1 error. In the released code only the ResNet family and MobileNetV2 are officially supported.
Key idea. Triplet attention computes attention weights with a three-branch structure that uses rotation and residual transformations to model cross-dimension interaction at negligible computational overhead.
- Triplet Attention
- Convolutional Triplet Attention Module
- Rotate to Attend
- attention module
- cross-dimension interaction
- image classification
- ResNet-50 with triplet attention
- lightweight attention
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{misra2020rotateattendconvolutionaltriplet,
title={Rotate to Attend: Convolutional Triplet Attention Module},
author={Diganta Misra and Trikay Nalamada and Ajay Uppili Arasanipalai and Qibin Hou},
year={2020},
eprint={2010.03045},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2010.03045},
}