Methods › General › Attention Mechanisms › Class Attention

Class Attention

36 papers tagged archive 2025-07-28

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ₒ ∈R^(d ×d), and the corresponding biases b_q, bₖ, bᵥ, bₒ ∈Rᵈ . 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ᵀ ∈R^(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.

PaperSource

In Syntology name not resolved (unknown_name). The lookup matched no method, paper or venue by this name; that asserts nothing about whether code exists.

Near matches the lookup lists, each a different name: attention-based probing classifier; bi-directional attention classifier; Class Semantics-based Attention (CSA); hybrid quantum-classical attention model; Class-Specific Residual Attention (CSRA); Class-Knowledge-Task Multi-Head Attention (CKT-MHA); Class-Weighted Sparse-Attention Fusion Network (SAFN); Stratified Class-Specific Attention Based Transformer Network.

Syntology's have check for this name (free, it answers coverage only), read 2026-10-05; ask it again live. A level is the served verification level of that one answer; nothing here is summed across methods.

Papers archive 2025-07-28

archive papers tagged: 36 · with a code link: 18 · where Syntology ran a sample: 7 (6 with a run with no instrument failure, 1 where every run was a failure of Syntology's instrument) Syntology

Show: all tagged papersonly where code ran (7 of 36 tagged: 6 with a run with no instrument failure, 1 where every run was a failure of Syntology's instrument)

Page 1 of 1: papers 1 to 36 of 36, newest first by the archive's date (ties by slug), in archive order.

Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code, as “N ran (of which C constructed an object rather than computing a result; K with no instrument failure: H honoured, V violated, P with no contract checked; I where Syntology's instrument failed) · U unverified”; the instrument figure counts failures of Syntology's instrument, not of the code. It is per sample and not a correctness claim. When the archive marks a repository official for the paper, the line starts with that repository's state (the archive's flag, not a verdict on who wrote the code; “community repositories only” when every sample that ran came from a community repository, “official: no sample here; runs from other or unrecorded repositories” when some came from a repository the paper names or has in its text, or from none recorded); hover it for the repositories the samples that ran came from.

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.

TaskPapers
Image Classification3
Semantic Segmentation3
Transfer Learning3
Efficient ViTs2
Knowledge Distillation2
Natural Language Understanding2
Object Detection2
Visual Prompt Tuning2
image-classification2
Authorship Attribution1
Automatic Speech Recognition1
Automatic Speech Recognition (ASR)1
BIG-bench Machine Learning1
Classification1
Common Sense Reasoning1
Computed Tomography (CT)1
Continual Learning1
Decision Making1
Denoising1
Dimensionality Reduction1

Usage over time archive 2025-07-28

Papers per year tagged with Class Attention: 2021 to 2025, peak 23 23 0 2021: 23 papers 2021 2022: 4 papers 2022 2023: 4 papers 2023 2024: 3 papers 2024 2025: 2 papers 2025
Papers per year the archive tags with this method, by the paper's archive date (36 dated). Bars are counts, not a trend claim.

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

Attention MechanismsAttention

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