atlas

Research map / Architectures and efficiency / Attention and transformers

Dissecting Query-Key Interaction in Vision Transformers

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Theory of self-attention dynamics · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Analyzes ViT query-key interactions via SVD of W_q^T W_k, showing early layers attend to similar tokens (grouping) and late layers to dissimilar tokens (contextualization), with interpretable singular modes.

Problem

Whether self-attention in vision transformers mainly groups similar tokens or attends to dissimilar tokens for contextualization, and how query-key interactions can be interpreted semantically.

Approach

Decompose the query-key interaction matrix W_q^T W_k by SVD into singular modes, treating left and right singular vectors as paired feature directions; measure grouping vs. contextualization via cosine similarity between each mode's left and right singular vectors, weighted by singular values.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
move from early to late layersMost ViTs, especially classification-trained models · Odd-One-Out (O3)attention allocation to same objects versus contextual tokensMixed
move from early to late layersViTs · ImageNet singular-mode analysisweighted cosine similarity of left and right singular vectorsMixed
use pixel-level mask-prediction pretraining rather than classification fine-tuningSimMIM ViT-B/16 · O3 and layer-wise attention analysisattention to same objectsMixed
use a self-supervised objective rather than a classification objectiveViTs · Layer-wise query-key interaction analysisattention to similar versus dissimilar tokensMixed
move from early to late layersViTs · ADE20Kprobability that left and right singular vectors select the same objectMixed

Surprising findings

Limitations

Experimental setup

Datasets: Odd-One-Out (O3) ImageNet validation set ADE20K

Benchmarks: Odd-One-Out (O3) ImageNet validation ADE20K

Metrics: attention overlap ratio with same/different object/backgroun singular-value-weighted cosine similarity between left and r probability left and right singular vectors highlight same o

Baselines: ViT DeiT CLIP DINO SimMIM I-JEPA

Builds on: Vision Transformer DINO Odd-One-Out dataset

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy