mlsanityData to 13 Oct 2026

A Reproduction Study: The Kernel PCA Interpretation of Self-Attention Fails Under Scrutiny

arXiv 2505.07908 ↗First posted 12 May 2025cs.LG cs.AI cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

In this reproduction study, we revisit recent claims that self-attention implements kernel principal component analysis (KPCA) (Teo et al., 2024), positing that (i) value vectors V capture the eigenvectors of the Gram matrix of the keys, and (ii) that self-attention projects queries onto the principal component axes of the key matrix K in a feature space. Our analysis reveals three critical inconsistencies: (1) No alignment exists between learned self-attention value vectors and what is proposed in the KPCA perspective, with average similarity metrics (optimal cosine similarity ≤ 0.32, linear CKA (Centered Kernel Alignment) ≤ 0.11, kernel CKA ≤ 0.32) indicating negligible correspondence; (2) Reported decreases in reconstruction loss Jproj, arguably justifying the claim that the self-attention minimizes the projection error of KPCA, are misinterpreted, as the quantities involved differ by orders of magnitude (~!103); (3) Gram matrix eigenvalue statistics, introduced to justify that V captures the eigenvector of the gram matrix, are irreproducible without undocumented implementation-specific adjustments. Across 10 transformer architectures, we conclude that the KPCA interpretation of self-attention lacks empirical support.

Key facts. No citing papers in the map yet (data through 13 Oct 2026). Builds on 22 of its 33 references that are in the map. First posted on arXiv 12 May 2025.

Builds on

22 of 33 references.

References · 22

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,304
  2. 2020Language Models are Few-Shot Learnerscited by 32,320
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,043
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,322
  5. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,111
  6. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,107
  7. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,476
  8. 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,915
  9. 2020Training data-efficient image transformers & distillation through attentioncited by 4,574
  10. 2019Unsupervised Cross-lingual Representation Learning at Scalecited by 3,916
  11. 2020Longformer: The Long-Document Transformercited by 3,393
  12. 2020Taming Transformers for High-Resolution Image Synthesiscited by 3,237
10 more
  1. 2016Pointer Sentinel Mixture Modelscited by 3,047
  2. 2019Similarity of Neural Network Representations Revisitedcited by 1,719
  3. 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,531
  4. 2018Image Transformercited by 771
  5. 2019CamemBERT: a Tasty French Language Modelcited by 368
  6. 2020LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attentioncited by 326
  7. 2018Molecular Transformer - A Model for Uncertainty-Calibrated Chemical Reaction Predictioncited by 225
  8. 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 211
  9. 2023Primal-Attention: Self-attention through Asymmetric Kernel SVD in Primal Representationcited by 29
  10. 2019On the optimality of kernels for high-dimensional clusteringcited by 2

Built on by

Not cited yet.