Methods › General › Attention Mechanisms › Class Attention
Class Attention
Introduced by Hugo Touvron et al. in Going deeper with Image Transformers
archive 2025-07-28 Description, source and code snippet are the archive's method entry.
A Class Attention layer, or CA Layer, is an attention mechanism for vision transformers used in CaiT that aims to extract information from a set of processed patches. It is identical to a self-attention layer, except that it relies on the attention between (i) the class embedding x_(class) (initialized at CLS in the first CA) and (ii) itself plus the set of frozen patch embeddings x_(patches) .
Considering a network with h heads and p patches, and denoting by d the embedding size, the multi-head class-attention is parameterized with several projection matrices, W_q, Wₖ, Wᵥ, Wₒ ∈𝐑^(d ×d), and the corresponding biases b_q, bₖ, bᵥ, bₒ ∈𝐑ᵈ . With this notation, the computation of the CA residual block proceeds as follows. We first augment the patch embeddings (in matrix form) as z=[x_(class), x_(patches)]. We then perform the projections:
Q=W_q x_(class)+b_q
K=Wₖ z+bₖ
V=Wᵥ z+bᵥ
The class-attention weights are given by
A=Softmax(Q . Kᵀ / √(d / h))
where Q . Kᵀ ∈𝐑^(h ×1 ×p). This attention is involved in the weighted sum A ×V to produce the residual output vector
out_(CA)=Wₒ A V+bₒ
which is in turn added to x_(class) for subsequent processing.
Papers archive 2025-07-28
30 shown of 36, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.
-
Prompt-CAM: A Simpler Interpretable Transformer for Fine-Grained Analysis 16 Jan 2025 · 1 repository · arXiv:2501.09333Syntology ran 1 of 1 samples · 0 unverified
-
Prompt-CAM: Making Vision Transformers Interpretable for Fine-Grained Analysis 1 Jan 2025 · 1 repository
-
SpectralKD: A Unified Framework for Interpreting and Distilling Vision Transformers via Spectral Analysis 26 Dec 2024 · 1 repository · arXiv:2412.19055
-
An Attention-based Representation Distillation Baseline for Multi-Label Continual Learning 19 Jul 2024 · 1 repository · arXiv:2407.14249
-
LF-ViT: Reducing Spatial Redundancy in Vision Transformer for Efficient Image Recognition 8 Jan 2024 · 1 repository · arXiv:2402.00033Syntology ran 10 of 18 samples · 8 unverified · 18 pointer-only (licence)
-
Self-distilled Masked Attention guided masked image modeling with noise Regularized Teacher (SMART) for medical image analysis 2 Oct 2023 · 0 repositories · arXiv:2310.01209
-
Class Attention Transfer Based Knowledge Distillation 25 Apr 2023 · 1 repository · arXiv:2304.12777Syntology ran 4 of 4 samples · 0 unverified · 4 pointer-only (licence)
-
SACANet: scene-aware class attention network for semantic segmentation of remote sensing images 22 Apr 2023 · 1 repository · arXiv:2304.11424
-
Detecting Severity of Diabetic Retinopathy from Fundus Images: A Transformer Network-based Review 3 Jan 2023 · 0 repositories · arXiv:2301.00973
-
Bidirectional Representations for Low Resource Spoken Language Understanding 24 Nov 2022 · 0 repositories · arXiv:2211.14320
-
Adaptive Sparse ViT: Towards Learnable Adaptive Token Pruning by Fully Exploiting Self-Attention 28 Sep 2022 · 1 repository · arXiv:2209.13802Syntology ran 1 of 1 samples · 0 unverified · 1 pointer-only (licence)
-
Class-attention Video Transformer for Engagement Intensity Prediction 12 Aug 2022 · 1 repository · arXiv:2208.07216
-
MaiT: Leverage Attention Masks for More Efficient Image Transformers 6 Jul 2022 · 0 repositories · arXiv:2207.03006
-
Augmenting Convolutional networks with attention-based aggregation 27 Dec 2021 · 5 repositories · arXiv:2112.13692Syntology ran 1 of 2 samples · 1 unverified
-
SSA: Semantic Structure Aware Inference for Weakly Pixel-Wise Dense Predictions without Cost 5 Nov 2021 · 0 repositories · arXiv:2111.03392
-
MaiT: integrating spatial locality into image transformers with attention masks 29 Sep 2021 · 1 repository
-
Is cell segregation like oil and water: asymptotic versus transitory regime 1 Sep 2021 · 0 repositories · arXiv:2109.00364
-
Dynamic Relevance Learning for Few-Shot Object Detection 4 Aug 2021 · 1 repository · arXiv:2108.02235
-
Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformer 3 Aug 2021 · 1 repository · arXiv:2108.01390Syntology ran 5 of 9 samples · 4 unverified
-
A comparison of latent semantic analysis and correspondence analysis of document-term matrices 25 Jul 2021 · 0 repositories · arXiv:2108.06197
-
Otimizacao de Redes Neurais atraves de Algoritmos Geneticos Celulares 18 Jul 2021 · 0 repositories · arXiv:2107.08326
-
Scientia Potentia Est -- On the Role of Knowledge in Computational Argumentation 1 Jul 2021 · 0 repositories · arXiv:2107.00281
-
Detecting Cattle and Elk in the Wild from Space 29 Jun 2021 · 0 repositories · arXiv:2106.15448
-
Towards self-organized control: Using neural cellular automata to robustly control a cart-pole agent 29 Jun 2021 · 1 repository · arXiv:2106.15240
-
Contrastive Attention for Automatic Chest X-ray Report Generation 13 Jun 2021 · 0 repositories · arXiv:2106.06965
-
A reversible system based on hybrid toggle radius-4 cellular automata and its application as a block cipher 9 Jun 2021 · 1 repository · arXiv:2106.04777
-
Cherry-Picking Gradients: Learning Low-Rank Embeddings of Visual Data via Differentiable Cross-Approximation 29 May 2021 · 1 repository · arXiv:2105.14250
-
Evolutionary Algorithms for Designing Reversible Cellular Automata 25 May 2021 · 1 repository · arXiv:2105.12039
-
Designing AI-based Conversational Agent for Diabetes Care in a Multilingual Context 20 May 2021 · 0 repositories · arXiv:2105.09490
-
EBM-Fold: Fully-Differentiable Protein Folding Powered by Energy-based Models 11 May 2021 · 0 repositories · arXiv:2105.04771
Tasks archive 2025-07-28
20 shown of 49 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.
Usage over time archive 2025-07-28
Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).
Categories archive 2025-07-28
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections